We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running mypy on this small code example:
def build_greeting(name: str = 'World') -> str: return f'Hello {name}!' def greet(name='World'): print(build_greeting(name)) if __name__ == '__main__': greet('foo') greet(4)
results in it reporting "no issues". Although greet and thus build_greeting are called with an integer.
greet
build_greeting
The text was updated successfully, but these errors were encountered:
Hi, since greet isn't annotated it isn't checked, please see https://mypy.readthedocs.io/en/stable/common_issues.html#no-errors-reported-for-obviously-wrong-code
Sorry, something went wrong.
This also shows no issue:
from typing import Any def build_greeting(name: str = 'World') -> str: return f'Hello {name}!' def greet(name: Any = 'World') -> None: print(build_greeting(name)) if __name__ == '__main__': greet(4)
So transitive problems don't seem to be checked.
Mypy doesn't really do interprocedural analysis like that.
No branches or pull requests
Running mypy on this small code example:
results in it reporting "no issues". Although
greet
and thusbuild_greeting
are called with an integer.The text was updated successfully, but these errors were encountered: