You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromtypingimportTypedDictclassC:
deff(self) ->None:
classD(TypedDict): ...
self.d: D
> rm -rf .mypy_cache; mypy test.py; mypy -c "import test"Traceback (most recent call last): File "/home/user/projects/test-python/.venv/bin/mypy", line 8, in <module> sys.exit(console_entry()) File "/home/user/projects/test-python/.venv/lib/python3.8/site-packages/mypy/__main__.py", line 15, in console_entry main() File "mypy/main.py", line 99, in main File "mypy/main.py", line 178, in run_build File "mypy/build.py", line 189, in build File "mypy/build.py", line 262, in _build File "mypy/build.py", line 2938, in dispatch File "mypy/build.py", line 3329, in process_graph File "mypy/build.py", line 3410, in process_fresh_modules File "mypy/build.py", line 2108, in fix_cross_refs File "mypy/fixup.py", line 52, in fixup_module File "mypy/fixup.py", line 135, in visit_symbol_table File "mypy/fixup.py", line 72, in visit_type_info File "mypy/fixup.py", line 137, in visit_symbol_table File "mypy/nodes.py", line 1040, in accept File "mypy/fixup.py", line 193, in visit_var File "mypy/types.py", line 398, in accept File "mypy/fixup.py", line 230, in visit_type_alias_type File "mypy/fixup.py", line 366, in lookup_fully_qualified_alias File "mypy/lookup.py", line 49, in lookup_fully_qualifiedAssertionError: Cannot find component 'D' for 'test.C.D'
mypy 1.6.1
The text was updated successfully, but these errors were encountered:
Fixes#16336
All the story with `@`-names is a mess. FWIW I just copied the logic
from named tuples, where it works. So although it is a mess, it will be
now be a consistent mess, with full parity between `NamedTuple` and
`TypedDict`.
mypy 1.6.1
The text was updated successfully, but these errors were encountered: