Mypy doesn't recognize access to a named tuple defined in another module within an import cycle, if the other module is processed later than the module that contains the reference to the named tuple.
Example:
# a.pyfromcollectionsimportnamedtuplefrombimportfN=namedtuple('N', 'a')# b.pyimportadeff(x: a.N) ->None: ... # Invalid type "a.N"
A potential fix is to process references to types in a later phase of semantic analysis than type definitions.
This is related to #3016.
Mypy doesn't recognize access to a named tuple defined in another module within an import cycle, if the other module is processed later than the module that contains the reference to the named tuple.
Example:
A potential fix is to process references to types in a later phase of semantic analysis than type definitions.
This is related to #3016.