sourcenouveau, Does mypy not do type inference when you use functions from other modules? That can't be right...
If I have:
modabc.py
def abc() -> str: return "abc"
modxyz.py
from modabc import abc def xyz() -> str: x = abc() return x
I get
error: Returning Any from function declared to return "str"
.I would prefer not to annotate the local variable. How come mypy isn't checking the annotations from
modabc
?
Add comment