mypy
d503cf87 - Fix crash on typevar with forward ref used in other module (#20334)

Commit
187 days ago
Fix crash on typevar with forward ref used in other module (#20334) Fixes https://github.com/python/mypy/issues/20326 Type variables with forward references in upper bound are known to be problematic. Existing mechanisms to work with them implicitly assumed that they are used in the same module where they are defined, which is not necessarily the case for "old-style" type variables that can be imported. Note that the simplification I made in `semanal_typeargs.py` would be probably sufficient to fix this, but that would be papering over the real issue, so I am making a bit more principled fix.
Author
Committer
Parents
Loading