]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Let mypy check tests/types code 132/head
authorDenis Laxalde <denis.laxalde@dalibo.com>
Thu, 28 Oct 2021 09:35:04 +0000 (11:35 +0200)
committerDenis Laxalde <denis.laxalde@dalibo.com>
Tue, 2 Nov 2021 08:54:39 +0000 (09:54 +0100)
We configure mypy to check untyped defs in tests/ directory, but only
let it check tests/types files at the moment.

pyproject.toml

index a2fc4abdda1621d89801a920d00b34112ad4ecc2..82a801c3ae6f6c54b5b2dfa09905327025c194e8 100644 (file)
@@ -15,7 +15,12 @@ testpaths=[
 
 
 [tool.mypy]
-files = ["psycopg/psycopg", "psycopg_pool/psycopg_pool", "psycopg_c/psycopg_c"]
+files = [
+    "psycopg/psycopg",
+    "psycopg_pool/psycopg_pool",
+    "psycopg_c/psycopg_c",
+    "tests/types",
+]
 warn_unused_ignores = true
 show_error_codes = true
 strict = true
@@ -28,5 +33,6 @@ ignore_missing_imports = true
 
 [[tool.mypy.overrides]]
 module = "tests.*"
+check_untyped_defs = true
 disallow_untyped_defs = false
 disallow_untyped_calls = false