use local mypy, add files to config

pull/25892/head
Cameron Clough 3 years ago
parent e55d071a3e
commit 164f9e07b7
No known key found for this signature in database
GPG Key ID: 48B6A0DB1DE6C320
  1. 15
      .pre-commit-config.yaml
  2. 6
      Pipfile
  3. 1051
      Pipfile.lock
  4. 2
      mypy.ini

@ -24,18 +24,13 @@ repos:
# if you've got a short variable name that's getting flagged, add it here # if you've got a short variable name that's getting flagged, add it here
- -L bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup - -L bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup
- --builtins clear,rare,informal,usage,code,names,en-GB_to_en-US - --builtins clear,rare,informal,usage,code,names,en-GB_to_en-US
- repo: https://github.com/pre-commit/mirrors-mypy - repo: local
rev: v0.931
hooks: hooks:
- id: mypy - id: mypy
exclude: '^(pyextra/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(opendbc/)|(laika_repo/)|(rednose_repo/)/|(tinygrad/)|(tinygrad_repo/)' name: mypy
additional_dependencies: ['types-PyYAML', 'lxml', 'numpy', 'types-atomicwrites', 'types-pycurl', 'types-requests', 'types-certifi'] entry: pipenv run mypy --config=mypy.ini
args: pass_filenames: false
- --warn-redundant-casts language: system
- --warn-return-any
- --warn-unreachable
- --warn-unused-ignores
#- --html-report=/home/batman/openpilot
- repo: https://github.com/PyCQA/flake8 - repo: https://github.com/PyCQA/flake8
rev: 4.0.1 rev: 4.0.1
hooks: hooks:

@ -43,6 +43,12 @@ carla = {version = "==0.9.13", markers="platform_system != 'Darwin'"}
ft4222 = "*" ft4222 = "*"
pandas = "*" pandas = "*"
tabulate = "*" tabulate = "*"
types-pyyaml = "*"
lxml = "*"
types-atomicwrites = "*"
types-pycurl = "*"
types-requests = "*"
types-certifi = "*"
[packages] [packages]
atomicwrites = "*" atomicwrites = "*"

1051
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

@ -1,6 +1,8 @@
[mypy] [mypy]
python_version = 3.8 python_version = 3.8
plugins = numpy.typing.mypy_plugin plugins = numpy.typing.mypy_plugin
files = body, common, docs, scripts, selfdrive, site_scons, system, tools
; exclude = pyextra, cereal, panda, opendbc, laika, laika_repo, rednose, rednose_repo, tinygrad, tinygrad_repo
; third-party packages ; third-party packages
ignore_missing_imports = True ignore_missing_imports = True

Loading…
Cancel
Save