mypy fails to recognize functions as generators when sys.platform
is used in conditions
#5678
Labels
bug
mypy got something wrong
priority-1-normal
topic-runtime-semantics
mypy doesn't model runtime semantics correctly
mypy
seems to be too thorough when interpretingif sys.platform == ...
conditions. Consider the following file:I'm trying to run
mypy
for this file on Linux usingmypy gen.py
Expected behavior:
mypy
test passes for this file on LinuxActual behavior:
I get this on Linux:
At the same time,
mypy
on macOS does not complain. I think that this is related to #698Platform information:
The text was updated successfully, but these errors were encountered: