an error along the lines of "signature 2 incompatible with implementation" because it cannot return a str when flag=False
Actual Behavior
$ mypy test.py
test.py:11:13: note: Revealed type is "builtins.float"
test.py:12:13: note: Revealed type is "builtins.str"
test.py:13:13: note: Revealed type is "builtins.str"
Bug Report
Mypy should ensure
overload
s are compatible with the implementationTo Reproduce
Expected Behavior
an error along the lines of "signature 2 incompatible with implementation" because it cannot return a
str
whenflag=False
Actual Behavior
Your Environment