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
Similar to #8166 (comment)
This is understood by the Pylance language server (and I assume pyright, although I haven't properly tested)
setuptools for example, has this snippet of code, which causes error: Cannot find implementation or library stub for module named "dl" [import-not-found] on Windows:
Bug Report
mypy respects platform conditions using
sys.platform
variable, but do not recognizeos.name
.Related issue: #8166
To Reproduce
Consider this piece of code, assuming we are on Linux:
Expected Behavior
mypy should not raise any error.
Actual Behavior
mypy fails with:
Note that replacing
os.name == 'nt'
withsys.platform == 'win32'
fixes this issue.Environment
The text was updated successfully, but these errors were encountered: