false-positive name-defined
regression with dataclasses and shadowing
#12907
Labels
bug
mypy got something wrong
topic-dataclasses
topic-runtime-semantics
mypy doesn't model runtime semantics correctly
topic-variable-scope
Bug Report
This file:
is perhaps a bit unorthodox, but runs fine, because the
collections: ...
doesn't actually shadow the module when definingother
.Actual Behavior
mypy v0.950 was happy with it, but mypy v0.960 claims that:
Introducing commit
Bisected to 03901ef ("Running dataclass transform in a later pass to fix crashes (#12762)", @JukkaL)
Your Environment
mypy.ini
(and other config files): noneThe text was updated successfully, but these errors were encountered: