Skip to content

Feature request: remove type-checking block instead of inserting pass #234

Description

@jakkdl
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from collections.abc import Sequence

...

will replace the Sequence import with a pass. But specifically with TYPE_CHECKING blocks I see no reason not to remove the entire block if you'd otherwise insert a pass, and the TYPE_CHECKING import can then also be removed (unless referenced elsewhere).

Should also work with

import typing

if typing.TYPE_CHECKING:
    from collections.abc import Sequence

...

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions