-
-
Couldn't load subscription status.
- Fork 1.2k
Closed
Labels
Needs reproduction 🔍Need a way to reproduce it locally on a maintainer's machineNeed a way to reproduce it locally on a maintainer's machine
Description
Steps to reproduce
from typing import TYPE_CHECKING
from anyio import run, connect_tcp, create_task_group
if TYPE_CHECKING:
from typing import List
from anyio import SocketStream, TaskGroup # pylint: disable=ungrouped-importsRemove the pylint: disable comment and it will report ungrouped-imports
Current behavior
ungrouped-imports is reported for any duplicate import sources defined in an if TYPE_CHECKING block, not including the typing module.
Expected behavior
Pylint accepts the syntax as it's common to have certain imports in TYPE_CHECKING if not needed at runtime.
pylint --version output
pylint 2.4.4
astroid 2.3.3
Python 3.8.1 (default, Jan 8 2020, 23:09:20)
[GCC 9.2.0]
ian-h-chamberlain, failable and Avasamsigbjornlo
Metadata
Metadata
Assignees
Labels
Needs reproduction 🔍Need a way to reproduce it locally on a maintainer's machineNeed a way to reproduce it locally on a maintainer's machine