Bug Report
Ignore Unbound variable
To Reproduce
Gist URL: https://gist.github.com/mypy-play/d2f10eb93875541fd255cd23f4c4a790
Playground URL: https://mypy-play.net/?mypy=latest&python=3.11&gist=d2f10eb93875541fd255cd23f4c4a790
def func(flag: bool) -> str:
if flag:
name = "Name"
return name
func(False)
Expected Behavior
error: unbound name variable
Actual Behavior
Type checking succeeds
- Mypy version used: 1.7.1
- Mypy command-line flags: None
- Mypy configuration options from
mypy.ini (and other config files): Empty, this is reproducable on mypy playground
- Python version used: 3.11.3
Bug Report
Ignore
UnboundvariableTo Reproduce
Gist URL: https://gist.github.com/mypy-play/d2f10eb93875541fd255cd23f4c4a790
Playground URL: https://mypy-play.net/?mypy=latest&python=3.11&gist=d2f10eb93875541fd255cd23f4c4a790
Expected Behavior
error: unbound
namevariableActual Behavior
Type checking succeeds
mypy.ini(and other config files): Empty, this is reproducable on mypy playground