Skip to content

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

Closed

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.

Activity

  1. self-assigned this
    on Mar 6, 2018
  2. JukkaL commented on Mar 8, 2018

    @JukkaL
    CollaboratorAuthor

    This was also fixed by #4695.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions