From bb151dbaedc9b82b71b7b71d2daf9d170bb413d5 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Tue, 3 Dec 2024 20:16:28 +0100 Subject: [PATCH] tests/py: Add mypy config for tests 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. --- tests/.mypy.ini | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/.mypy.ini diff --git a/tests/.mypy.ini b/tests/.mypy.ini new file mode 100644 index 000000000..aad8c0c90 --- /dev/null +++ b/tests/.mypy.ini @@ -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