mypy_test: fix for stub deletions (#4816)

I think this should helps prevent issues like #4815

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanu
2020-12-13 23:41:20 -08:00
committed by GitHub
parent 7aa5bd0029
commit a93fa6120e

View File

@@ -132,6 +132,10 @@ def main():
flags.append("--no-implicit-optional")
flags.append("--disallow-any-generics")
flags.append("--disallow-subclassing-any")
# Setting custom typeshed dir prevents mypy from falling back to its bundled typeshed in
# case of stub deletions
flags.append("--custom-typeshed-dir")
flags.append(os.path.dirname(os.path.dirname(__file__)))
if args.warn_unused_ignores:
flags.append("--warn-unused-ignores")
if args.platform: