You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
errors in other files are reported when running mypy on a file with lowercase drive letter #18590
> mypy c:\Users\user\project\sandpit\foo.py
c:\Users\user\project\sandpit\bar.py:1: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]
Found 1 error in 1 file (checked 1 source file)
> mypy C:\Users\user\project\sandpit\foo.py
Success: no issues found in 1 source file
In general mypy fails at case sensitivity on Windows (#12880, #18445, both have information for if someone wants to solve this) but since this is a specific case I won't close as duplicate.
(If I had to guess, the import is resolved to an upper case drive letter which passes some case-sensitive filter based on input files)
this causes issues with the mypy vscode plugin which always passes files with a lowercase drive letter. if there are too many errors in other files it won't show any of the errors on the current file
On mypy 1.15.0, I seem to get bar.py:1: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] no matter which case c has.
Activity
A5rocks commentedon Feb 3, 2025
In general mypy fails at case sensitivity on Windows (#12880, #18445, both have information for if someone wants to solve this) but since this is a specific case I won't close as duplicate.
(If I had to guess, the import is resolved to an upper case drive letter which passes some case-sensitive filter based on input files)
DetachHead commentedon Feb 3, 2025
this causes issues with the mypy vscode plugin which always passes files with a lowercase drive letter. if there are too many errors in other files it won't show any of the errors on the current file
use correct capitalization of file paths to work around python/mypy#1…
use correct capitalization of file paths to work around python/mypy#1…
wyattscarpenter commentedon May 19, 2025
On mypy 1.15.0, I seem to get
bar.py:1: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]no matter which case c has.