-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugmypy got something wrongmypy got something wrongtopic-runtime-semanticsmypy doesn't model runtime semantics correctlymypy doesn't model runtime semantics correctly
Description
Bug Report
Noticed when playing with #20819. When you assign an int to __qualname__, Python raises a TypeError but mypy itself doesn't.
To Reproduce
class X:
__qualname__ = 5Expected Behavior
Error.
Actual Behavior
No error.
Your Environment
Reproduced in mypy-play
- Mypy version used: 1.19.1
- Mypy command-line flags: N/A
- Mypy configuration options from
mypy.ini(and other config files): N/A - Python version used: 3.12
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongtopic-runtime-semanticsmypy doesn't model runtime semantics correctlymypy doesn't model runtime semantics correctly