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
To Reproduce
from typing import NamedTuple def bar() -> None: class MyNamedTuple(NamedTuple): a: int def foo(self) -> None: print(self.a, misspelled_var_name)
Expected Behavior The error Name "misspelled_var_name" is not defined.
Actual Behavior
Deferral trace: src.foo:8 src.foo:8 ... src.foo:8 src\foo.py: error: INTERNAL ERROR: maximum semantic analysis iteration count reached
Your Environment
mypy.ini
The text was updated successfully, but these errors were encountered:
A similar example, where I'd expect the error Name "Set" is not defined but also get INTERNAL ERROR:
from typing import NamedTuple def bar() -> None: class MyNamedTuple(NamedTuple): a: int def foo(self) -> None: ... int_set: Set[int] = { 1 }
(The "deferral trace" for this example is longer.)
Sorry, something went wrong.
Fix crash on NamedTuple with method and error in function (#17498)
1acdfd0
Fixes #16814 This one is tricky and may expose some other bugs. But IMO this is strictly correct thing to do.
Successfully merging a pull request may close this issue.
To Reproduce
Expected Behavior
The error Name "misspelled_var_name" is not defined.
Actual Behavior
Your Environment
mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: