Skip to content

Commit c6b9b4c

Browse files
authored
Stricter settings in mypy_test (#9294)
1 parent fce46d2 commit c6b9b4c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tests/mypy_test.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,11 @@ def get_mypy_flags(args: TestConfig, temp_name: str, *, testing_stdlib: bool) ->
251251
"--no-site-packages",
252252
"--custom-typeshed-dir",
253253
str(Path(__file__).parent.parent),
254-
"--no-implicit-optional",
255-
"--disallow-untyped-decorators",
256-
"--disallow-any-generics",
257-
"--strict-equality",
254+
"--strict",
255+
# Stub completion is checked by pyright (--allow-*-defs)
256+
"--allow-untyped-defs",
257+
"--allow-incomplete-defs",
258+
"--allow-subclassing-any", # Needed until we can use non-types dependencies #5768
258259
"--enable-error-code",
259260
"ignore-without-code",
260261
"--config-file",

tests/regr_test.py

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def test_testcase_directory(package: PackageInfo, version: str, platform: str, q
9494
msg += "standard library test cases..." if is_stdlib else f"test cases for {package_name!r}..."
9595
print(msg, end=" ")
9696

97+
# "--enable-error-code ignore-without-code" is purposefully ommited. See https://github.com/python/typeshed/pull/8083
9798
flags = [
9899
"--python-version",
99100
version,

0 commit comments

Comments
 (0)