From c6b9b4ce85d4432639eb146e6f03806b08128a5a Mon Sep 17 00:00:00 2001 From: Avasam Date: Fri, 2 Dec 2022 13:55:55 -0500 Subject: [PATCH] Stricter settings in `mypy_test` (#9294) --- tests/mypy_test.py | 9 +++++---- tests/regr_test.py | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/mypy_test.py b/tests/mypy_test.py index a0069ae69..6eee3213a 100644 --- a/tests/mypy_test.py +++ b/tests/mypy_test.py @@ -251,10 +251,11 @@ def get_mypy_flags(args: TestConfig, temp_name: str, *, testing_stdlib: bool) -> "--no-site-packages", "--custom-typeshed-dir", str(Path(__file__).parent.parent), - "--no-implicit-optional", - "--disallow-untyped-decorators", - "--disallow-any-generics", - "--strict-equality", + "--strict", + # Stub completion is checked by pyright (--allow-*-defs) + "--allow-untyped-defs", + "--allow-incomplete-defs", + "--allow-subclassing-any", # Needed until we can use non-types dependencies #5768 "--enable-error-code", "ignore-without-code", "--config-file", diff --git a/tests/regr_test.py b/tests/regr_test.py index ef084cf65..37d09ef9c 100644 --- a/tests/regr_test.py +++ b/tests/regr_test.py @@ -94,6 +94,7 @@ def test_testcase_directory(package: PackageInfo, version: str, platform: str, q msg += "standard library test cases..." if is_stdlib else f"test cases for {package_name!r}..." print(msg, end=" ") + # "--enable-error-code ignore-without-code" is purposefully ommited. See https://github.com/python/typeshed/pull/8083 flags = [ "--python-version", version,