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
hauntsaninja
changed the title
mypy resolves symbol incorrectly with import cycle
mypy resolves symbol incorrectly with builtins import cycle
Nov 13, 2021
Context: python/typeshed#6289
To reproduce:
git checkout 9eabedca5f47a710f29d6e3e2b3a389853fab5aa
Then run:
and note that mypy incorrectly resolves slice to builtins.slice instead of ast.slice in ast.pyi
Note that if you change the order of files, it works just fine:
It's a pretty weird case, import cycle with builtins, collision with name in builtins,
from _ast import *
in ast.pyi, etc. But a scary kind of bug :-)The text was updated successfully, but these errors were encountered: