From: Denis Laxalde Date: Mon, 4 Oct 2021 09:20:55 +0000 (+0200) Subject: Explicitly disallow some mypy checks for tests/ X-Git-Tag: 3.0~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5494dfc5efe91980eab78b79680ad2e7fea6f007;p=thirdparty%2Fpsycopg.git Explicitly disallow some mypy checks for tests/ When running mypy on the tests/ directory, the top-level mypy configuration is used and strict mode is thus enforced whereas tests code is not typed. As mypy might be run in people editors by default, the current situation makes this uncomfortable. By disabling obvious checks, we get a nicer developer experience. A more straightforward option would be to set 'check_untyped_defs = False', but this would prevent valid code to be checked, so the current proposal is a trade-off. --- diff --git a/.mypy.ini b/.mypy.ini index ea6e1e5b4..46466c509 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -13,3 +13,7 @@ ignore_missing_imports = True [mypy-shapely.*] ignore_missing_imports = True + +[mypy-tests.*] +disallow_untyped_defs = False +disallow_untyped_calls = False