Closed
Description
Bug Report
I upgraded to mypy 0.950 today and ran into the following error involving function return types:
To Reproduce
# x.py
def fn(x: float = 8.9) -> float:
return 2 ** x # error: Returning Any from function declared to return "float" [no-any-return]
Expected Behavior
Expected this to pass cleanly.
Actual Behavior
I'm not sure why this now returns Any.
Your Environment
- Mypy version used: 0.950
- Mypy configuration options from
mypy.ini
(and other config files): strict = True - Python version used: Python 3.10.0
- Operating system and version: Mac OSX
Metadata
Metadata
Assignees
Labels
No labels