We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Bug Report
Failed to find exact letter case of module name when relative import on Windows OS.
To Reproduce
ModuleName ├─ __init__.py ├─ file.py ├─ main.py # main.py from .file import *
Everything is fine when the path is correct with letter case.
mypy .\ModuleName\main.py Success: no issues found in 1 source file
But if the path of files is wrong with letter case,
mypy .\moduleName\main.py
but there will be an [import-not-found] error.
[import-not-found]
moduleName\main.py:1: error: Cannot find implementation or library stub for module named "moduleName.file" [import-not-found]
Your Environment
The text was updated successfully, but these errors were encountered:
I think it may be the same question with #12880
Edit: It's more difficult for this one,
os.path.normcase
os.path.normpath
pathlib.Path(...).resolve()
It seems no simple solution for this one.
This may help #12880: replace
mypy/mypy/find_sources.py
Line 36 in 1affabe
path = os.path.normpath(path) drive, root, path = os.path.splitroot(path) if drive.endswith(":"): drive = drive.upper() path = os.path.join(drive, root, path)
Sorry, something went wrong.
No branches or pull requests
Bug Report
Failed to find exact letter case of module name when relative import on Windows OS.
To Reproduce
Everything is fine when the path is correct with letter case.
But if the path of files is wrong with letter case,
but there will be an
[import-not-found]
error.Your Environment
The text was updated successfully, but these errors were encountered: