Skip to content

Imported types for arguments before positional-only marker reported unused #3462

Closed
@ghost

Description

Steps to reproduce

from typing import AnyStr, Set
def func(arg: AnyStr, /, arg2: Set[str]):
    pass

Current behavior

example.py:1:0: W0611: Unused AnyStr imported from typing (unused-import)

Expected behavior

No warning shown

pylint --version output

pylint 2.4.4
astroid 2.3.3
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)]

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