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
Mypy complains about the following program because of deferred type checking:
from typing import Union def f(a: Union[int, str]) -> None: x a = x a + 1 # Error x = 1 + 1
If x = 1 + 1 is before the function definition there is no error.
x = 1 + 1
This was originally reported by @ecprice: #1748 (comment). There's additional discussion in the linked PR.
The text was updated successfully, but these errors were encountered:
This works correctly on master.
Sorry, something went wrong.
No branches or pull requests
Mypy complains about the following program because of deferred type checking:
If
x = 1 + 1
is before the function definition there is no error.This was originally reported by @ecprice: #1748 (comment). There's additional discussion in the linked PR.
The text was updated successfully, but these errors were encountered: