Skip to content

Commit a93fa61

Browse files
authored
mypy_test: fix for stub deletions (#4816)
I think this should helps prevent issues like #4815 Co-authored-by: hauntsaninja <>
1 parent 7aa5bd0 commit a93fa61

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/mypy_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ def main():
132132
flags.append("--no-implicit-optional")
133133
flags.append("--disallow-any-generics")
134134
flags.append("--disallow-subclassing-any")
135+
# Setting custom typeshed dir prevents mypy from falling back to its bundled typeshed in
136+
# case of stub deletions
137+
flags.append("--custom-typeshed-dir")
138+
flags.append(os.path.dirname(os.path.dirname(__file__)))
135139
if args.warn_unused_ignores:
136140
flags.append("--warn-unused-ignores")
137141
if args.platform:

0 commit comments

Comments
 (0)