Skip to content

False F401 with annotations and no_type_check. #14762

@coady

Description

@coady

Using v0.8.1.

from collections.abc import Iterable
from typing import no_type_check

@no_type_check
def func(it: Iterable):
    ...

outputs

.py:1:29: F401 [*] `collections.abc.Iterable` imported but unused
  |
1 | from collections.abc import Iterable

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