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
Pyright needs to make assumptions about the value of sys.platform during analysis because many type stub files (including the typeshed stub files for stdlib) use sys.platform to conditionalize code for different platforms. By default, Pyright assumes that sys.platform is "" (empty string). This is an appropriate assumption for code that is intended to run on all platforms. If you intend to run your code on a specific platform, you can specify the target in the pythonconfig.json file using the pythonPlatform setting. If you set this to "Linux", Pyright will assume that sys.platform == 'linux'.
Environment data
Code Snippet
This code works but feels, well, obtuse:
Expected behavior
No problem raised on
if sys.platform ...
blockActual behavior
Problem is raised.
The text was updated successfully, but these errors were encountered: