[mypyc] Loading type from imported modules. by advait-dixit · Pull Request #18158 · python/mypy (original) (raw)

Fixes #1075

Previously, this compiled but failed to run:

import collections from typing_extensions import TypedDict class C(TypedDict): x: collections.deque

Although type of x was being inferred correctly, it was not looking for collections.deque in imported modules.