-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
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
“AssertionError: Cannot find component” for local NamedTuple inside class method #10913
Comments
andersk
added a commit
to andersk/zulip
that referenced
this issue
Aug 3, 2021
The locally defined NamedTuple was triggering a mypy caching bug (python/mypy#10913), and we don’t use the tuple behavior anyway. Signed-off-by: Anders Kaseorg <anders@zulip.com>
andersk
added a commit
to andersk/zulip
that referenced
this issue
Aug 3, 2021
The locally defined NamedTuple was triggering a mypy caching bug (python/mypy#10913), and we don’t use the tuple behavior anyway. Signed-off-by: Anders Kaseorg <anders@zulip.com>
andersk
added a commit
to andersk/zulip
that referenced
this issue
Aug 3, 2021
The locally defined NamedTuple was triggering a mypy caching bug (python/mypy#10913), and we don’t use the tuple behavior anyway. Signed-off-by: Anders Kaseorg <anders@zulip.com>
Similar traceback in #11121 |
JukkaL
added a commit
that referenced
this issue
May 17, 2022
Make sure the fullname of a named tuple defined within a method matches the nesting of the definition in the symbol table. Otherwise we'll have a crash during deserialization. In particular, a named tuple defined within a method will now be always stored in the symbol table of the surrounding class, instead of the global symbol table. Previously there was an inconsistency between old-style and new-style syntax. Fix #10913.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Crash Report
This is a variant of #7281 that still crashes incremental checking on 0.910 and
master
(9f409c3), both of which include #10432, which was supposed to fix #7281.The difference in this case is that the local
NamedTuple
is defined inside a class method rather than a global function.To Reproduce
Traceback
Your Environment
mypy.ini
(and other config files): noneThe text was updated successfully, but these errors were encountered: