mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
pyproject: Add configuration for mypy to ignore some libraries
- This way, we know what we are overriding and can use type annotations for libraries where they are available. - Invocation of mypy tool on command line becomes straight forward. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
bb7782a464
commit
eba41aa295
@ -25,7 +25,7 @@ static-type-check:
|
||||
- apt-get update
|
||||
- apt-get install -y mypy
|
||||
script:
|
||||
- mypy --ignore-missing-imports .
|
||||
- mypy .
|
||||
|
||||
unit-tests:
|
||||
stage: test
|
||||
|
||||
@ -81,3 +81,27 @@ disable = [
|
||||
"too-many-arguments", # Has not resulted in a refactoring
|
||||
"too-many-ancestors", # Easy to hit when using Django
|
||||
]
|
||||
|
||||
# Ignore missing type stubs for some libraries. Try to keep this list minimal
|
||||
# and use type annotations where available.
|
||||
[[tool.mypy.overrides]]
|
||||
module = [
|
||||
"aptsources.*",
|
||||
"augeas.*",
|
||||
"axes.*",
|
||||
"captcha.*",
|
||||
"cherrypy.*",
|
||||
"configobj.*",
|
||||
"dbus.*",
|
||||
"django.*",
|
||||
"gi.*",
|
||||
"pam.*",
|
||||
"pgi.*",
|
||||
"plinth.tests.config_local",
|
||||
"pytest_splinter.*",
|
||||
"ruamel.*",
|
||||
"selenium.*",
|
||||
"splinter.*",
|
||||
"stronghold.*",
|
||||
]
|
||||
ignore_missing_imports = true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user