Stricter settings in mypy_test (#9294)

This commit is contained in:
Avasam
2022-12-02 13:55:55 -05:00
committed by GitHub
parent fce46d22ff
commit c6b9b4ce85
2 changed files with 6 additions and 4 deletions

View File

@@ -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",

View File

@@ -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,