Skip to content

Fix --custom-typeshed-dir crash caused by #13155 #13296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 1, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test which fails on master
  • Loading branch information
AlexWaygood committed Jul 31, 2022
commit 0f8e9f00a62ea31330cde7131faed75fe27d3d4b
13 changes: 13 additions & 0 deletions test-data/unit/cmdline.test
Original file line number Diff line number Diff line change
Expand Up @@ -1465,3 +1465,16 @@ sys.path = path
mypy: "typing.py" shadows library module "typing"
note: A user-defined top-level module with name "typing" is not supported
== Return code: 2

[case testCustomTypeshedDirWithRelativePathDoesNotCrash]
# cmd: mypy --custom-typeshed-dir dir dir/typing.pyi
[file dir/stdlib/abc.pyi]
[file dir/stdlib/builtins.pyi]
[file dir/stdlib/sys.pyi]
[file dir/stdlib/types.pyi]
[file dir/stdlib/typing.pyi]
[file dir/stdlib/typing_extensions.pyi]
[file dir/stdlib/VERSIONS]
[out]
Failed to find builtin module mypy_extensions, perhaps typeshed is broken?
== Return code: 2