Skip to content

Commit

Permalink
tests/py: Add mypy config for tests
Browse files Browse the repository at this point in the history
This ensures that our typing information is correct. Unfortunately
we cannot enable mypy checks in pre-commit because it passes the list of
changed python files to it which then ignores our exclude rule.
  • Loading branch information
swick committed Dec 3, 2024
1 parent 45bc076 commit bc51972
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/.mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[mypy]
warn_unused_configs = True
check_untyped_defs=True
files=.
exclude = (?x)(
templates/.*.py # template files are a bit special
|test-document-fuse.py$ # has issues with typing
)

[mypy-gi.*]
ignore_missing_imports = True
[mypy-dbus.*]
ignore_missing_imports = True
[mypy-dbusmock.*]
ignore_missing_imports = True

0 comments on commit bc51972

Please sign in to comment.