Closed ssbarnea closed 7 hours ago
Pyright is working as intended here, so I don't consider this a bug.
In your code sample above, the symbol run
is not defined prior to the if
statement. Perhaps your sample is incomplete? How would run
receive a value prior to the import statement otherwise?
Describe the bug
Apparently pyright is not able to detect any conditional imports. This is a big deal as there is a lot of production code that needs to make use of these. For example mypy has no problem dealing with these.
pyright 1.1.389