Closed
Description
Bug description
example.py:
# pylint: disable=missing-docstring
from pathlib import Path
import typing as t
example: t.Annotated[str, "Path"] = "/foo/bar"
Configuration
No response
Command used
pylint example.py
Pylint output
Success: no issues found in 1 source file
--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
Expected behavior
It should report unused-import
, since the parameter to Annotated
does not refer to pathlib.Path
.
Pylint version
pylint 2.15.3
astroid 2.12.10
Python 3.10.7 (main, Sep 7 2022, 00:00:00) [GCC 12.2.1 20220819 (Red Hat 12.2.1-1)]
OS / Environment
fedora 36
Additional dependencies
No response