Skip to content

Imports behind TYPE_CHECKING should trigger "undefined name" when used #658

Description

@last-partizan

Consider following example:

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    import os

print(os.path.curdir)

pyflakes should trigger "undefined name" in this case.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions