-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrong
Description
Bug Report
I get a false-positive "Incompatible types in assignment" error.
To Reproduce
This is bug.py
:
"""False-positive 'Incompatible types in assignment'."""
VAR = 0
VAR = "0"
mypy bug.py
Expected Behavior
No error.
Actual Behavior
> mypy bug.py
bug.py:3: error: Incompatible types in assignment (expression has type "str", variable has type "int")
Found 1 error in 1 file (checked 1 source file)
> mypy bug.py --allow-redefinition
bug.py:3: error: Incompatible types in assignment (expression has type "str", variable has type "int")
Found 1 error in 1 file (checked 1 source file)
Your Environment
- Mypy version used: mypy 0.790
- Mypy command-line flags: none
- Mypy configuration options from
mypy.ini
(and other config files): none that I am aware of - Python version used: 3.8.6
- Operating system and version: some Linux
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrong