Skip to content

Any type inferred for circular reference due to import cycle #3277

Closed
@JukkaL

Description

@JukkaL

The inferred Any type is unexpected:

t.py:

import t2
def f() -> None: pass
reveal_type(t2.f)  # Revealed type is 'Any'

t2.py:

from t import f

A better option would be to reveal the correct type or generate an error if it's not possible.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions