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
error listed twice with wrong filename(capitalization) in output #11690
> mypy -V
mypy 0.920+dev.1393e3fec49a9505fd3a31f3406ddd4e2e1c54b8
> mypy --strict test.py
src/thing.py:1: error: Name "asdf" is not defined
src/Thing.py:1: error: Name "asdf" is not defined
Edit:
This is observed with WSL on the windows file system and not WSL on the Linux fs
Can you delete your mypy cache and then check if the following patch fixes:
diff --git a/mypy/fscache.py b/mypy/fscache.py
index c77b941c5..fb651326f 100644
--- a/mypy/fscache.py
+++ b/mypy/fscache.py
@@ -202,9 +202,6 @@ class FileSystemCache:
The caller must ensure that prefix is a valid file system prefix of path.
"""
- if sys.platform == "linux":
- # Assume that the file system on Linux is case sensitive
- return self.isfile(path)
if not self.isfile(path):
# Fast path
return False
@hauntsaninja did you know that github supports diff as a code block language.
diff --git a/mypy/fscache.py b/mypy/fscache.py
index c77b941c5..fb651326f 100644
--- a/mypy/fscache.py+++ b/mypy/fscache.py@@ -202,9 +202,6 @@ class FileSystemCache:
The caller must ensure that prefix is a valid file system prefix of path.
"""
- if sys.platform == "linux":- # Assume that the file system on Linux is case sensitive- return self.isfile(path)
if not self.isfile(path):
# Fast path
return False
Activity
JelleZijlstra commentedon Dec 9, 2021
Is this on an OS with case-insensitive files? We've had some similar issues.
KotlinIsland commentedon Dec 9, 2021
Happens on wsl and not windows
hauntsaninja commentedon Dec 9, 2021
Can you delete your mypy cache and then check if the following patch fixes:
KotlinIsland commentedon Dec 10, 2021
@hauntsaninja did you know that github supports
diffas a code block language.hauntsaninja commentedon Dec 10, 2021
I knew that. Does the diff fix the issue or not? (I don't have a system I can repro the issue on)
KotlinIsland commentedon Dec 10, 2021
testing it now
KotlinIsland commentedon Dec 10, 2021
I think that change resolves the issue
KotlinIsland commentedon Dec 10, 2021
Very strange, on another machine with the exact same files it doesn't follow the imports at all.
KotlinIsland commentedon Dec 10, 2021
Raised it here #11697
pranavrajpal commentedon Dec 10, 2021
Is this happening on WSL 1 or 2? Also, are you using the Windows file system or the Linux file system?
KotlinIsland commentedon Dec 10, 2021
wsl 2 on the windows file system, it does not happen with wsl + linux fs
Remove assumption of case insensitivity
Remove assumption of case sensitivity (#11708)
Remove assumption of case sensitivity (python#11708)