Teach isort that imports from utils are first-party imports (#9500)

This commit is contained in:
Alex Waygood
2023-01-11 16:25:32 +00:00
committed by GitHub
parent b8f337a452
commit ab1921a737
6 changed files with 7 additions and 1 deletions

View File

@@ -55,6 +55,7 @@ extra_standard_library = [
"opcode",
"pyexpat",
]
known_first_party = ["utils"]
[tool.pycln]
all = true

View File

@@ -15,6 +15,7 @@ import yaml
from packaging.requirements import Requirement
from packaging.specifiers import SpecifierSet
from packaging.version import Version
from utils import (
METADATA_MAPPING,
VERSIONS_RE,

View File

@@ -3,6 +3,7 @@ import os
import sys
import tomli
from utils import METADATA_MAPPING
platform = sys.platform

View File

@@ -24,6 +24,7 @@ if TYPE_CHECKING:
from typing_extensions import Annotated, TypeAlias
import tomli
from utils import (
VERSIONS_RE as VERSION_LINE_RE,
PackageDependencies,

View File

@@ -19,10 +19,11 @@ import traceback
from collections.abc import Iterable, Sequence
import pkg_resources
import utils
from pytype import config as pytype_config, load_pytd # type: ignore[import]
from pytype.imports import typeshed # type: ignore[import]
import utils
TYPESHED_SUBDIRS = ["stdlib", "stubs"]
TYPESHED_HOME = "TYPESHED_HOME"
_LOADERS = {}

View File

@@ -12,6 +12,7 @@ from pathlib import Path
from typing import NoReturn
import tomli
from utils import colored, get_mypy_req, make_venv, print_error, print_success_msg