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
- -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
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
- repo: local
hooks:
- id: mypy
exclude: '^(pyextra/)|(cereal/)|(rednose/)|(panda/)|(laika/)|(opendbc/)|(laika_repo/)|(rednose_repo/)/|(tinygrad/)|(tinygrad_repo/)'
additional_dependencies: ['types-PyYAML', 'lxml', 'numpy', 'types-atomicwrites', 'types-pycurl', 'types-requests', 'types-certifi']
args:
- --warn-redundant-casts
- --warn-return-any
- --warn-unreachable
- --warn-unused-ignores
#- --html-report=/home/batman/openpilot
name: mypy
entry: pipenv run mypy --config=mypy.ini
pass_filenames: false
language: system
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:

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

1051
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

@ -1,6 +1,8 @@
[mypy]
python_version = 3.8
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
ignore_missing_imports = True

Loading…
Cancel
Save