diff --git a/pyproject.toml b/pyproject.toml index a29de7c95..43aeda05d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,6 +55,7 @@ extra_standard_library = [ "opcode", "pyexpat", ] +known_first_party = ["utils"] [tool.pycln] all = true diff --git a/tests/check_consistent.py b/tests/check_consistent.py index 5e6abf85f..bb48404a0 100755 --- a/tests/check_consistent.py +++ b/tests/check_consistent.py @@ -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, diff --git a/tests/get_stubtest_system_requirements.py b/tests/get_stubtest_system_requirements.py index bae75ac0b..0be137e97 100644 --- a/tests/get_stubtest_system_requirements.py +++ b/tests/get_stubtest_system_requirements.py @@ -3,6 +3,7 @@ import os import sys import tomli + from utils import METADATA_MAPPING platform = sys.platform diff --git a/tests/mypy_test.py b/tests/mypy_test.py index 0fd07095b..efb58a836 100644 --- a/tests/mypy_test.py +++ b/tests/mypy_test.py @@ -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, diff --git a/tests/pytype_test.py b/tests/pytype_test.py index 74dfc302c..7e8e69ba0 100755 --- a/tests/pytype_test.py +++ b/tests/pytype_test.py @@ -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 = {} diff --git a/tests/stubtest_third_party.py b/tests/stubtest_third_party.py index 98e8015a3..4115d3cb5 100755 --- a/tests/stubtest_third_party.py +++ b/tests/stubtest_third_party.py @@ -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