Skip to content

Commit ab1921a

Browse files
authored
Teach isort that imports from utils are first-party imports (#9500)
1 parent b8f337a commit ab1921a

File tree

6 files changed

+7
-1
lines changed

6 files changed

+7
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ extra_standard_library = [
5555
"opcode",
5656
"pyexpat",
5757
]
58+
known_first_party = ["utils"]
5859

5960
[tool.pycln]
6061
all = true

tests/check_consistent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from packaging.requirements import Requirement
1616
from packaging.specifiers import SpecifierSet
1717
from packaging.version import Version
18+
1819
from utils import (
1920
METADATA_MAPPING,
2021
VERSIONS_RE,

tests/get_stubtest_system_requirements.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import sys
44

55
import tomli
6+
67
from utils import METADATA_MAPPING
78

89
platform = sys.platform

tests/mypy_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from typing_extensions import Annotated, TypeAlias
2525

2626
import tomli
27+
2728
from utils import (
2829
VERSIONS_RE as VERSION_LINE_RE,
2930
PackageDependencies,

tests/pytype_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
from collections.abc import Iterable, Sequence
2020

2121
import pkg_resources
22-
import utils
2322
from pytype import config as pytype_config, load_pytd # type: ignore[import]
2423
from pytype.imports import typeshed # type: ignore[import]
2524

25+
import utils
26+
2627
TYPESHED_SUBDIRS = ["stdlib", "stubs"]
2728
TYPESHED_HOME = "TYPESHED_HOME"
2829
_LOADERS = {}

tests/stubtest_third_party.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from typing import NoReturn
1313

1414
import tomli
15+
1516
from utils import colored, get_mypy_req, make_venv, print_error, print_success_msg
1617

1718

0 commit comments

Comments
 (0)