From b7ee725f3a5ba336cfca89f55d8a3b7d3bf7d27b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Aug 2024 11:41:51 -0400 Subject: [PATCH] Apply isort. Ref pypa/distutils#240 --- distutils/ccompiler.py | 2 +- distutils/command/install_data.py | 1 - distutils/spawn.py | 1 - distutils/tests/test_archive_util.py | 2 +- distutils/tests/test_build.py | 3 +-- distutils/tests/test_build_ext.py | 2 +- distutils/tests/test_extension.py | 1 - distutils/tests/test_install_data.py | 5 ++--- distutils/tests/test_mingwccompiler.py | 8 ++++---- distutils/tests/test_spawn.py | 2 +- distutils/tests/test_sysconfig.py | 2 +- 11 files changed, 12 insertions(+), 17 deletions(-) diff --git a/distutils/ccompiler.py b/distutils/ccompiler.py index 42b08124..bc4743bc 100644 --- a/distutils/ccompiler.py +++ b/distutils/ccompiler.py @@ -22,7 +22,7 @@ ) from .file_util import move_file from .spawn import spawn -from .util import execute, split_quoted, is_mingw +from .util import execute, is_mingw, split_quoted class CCompiler: diff --git a/distutils/command/install_data.py b/distutils/command/install_data.py index bd2932ab..a90ec3b4 100644 --- a/distutils/command/install_data.py +++ b/distutils/command/install_data.py @@ -9,7 +9,6 @@ import functools import os - from typing import Iterable from ..core import Command diff --git a/distutils/spawn.py b/distutils/spawn.py index 50d30a27..107b0113 100644 --- a/distutils/spawn.py +++ b/distutils/spawn.py @@ -12,7 +12,6 @@ import subprocess import sys import warnings - from typing import Mapping from ._log import log diff --git a/distutils/tests/test_archive_util.py b/distutils/tests/test_archive_util.py index abbcd36c..389eba16 100644 --- a/distutils/tests/test_archive_util.py +++ b/distutils/tests/test_archive_util.py @@ -18,10 +18,10 @@ from distutils.spawn import spawn from distutils.tests import support from os.path import splitdrive -from test.support import patch import path import pytest +from test.support import patch from .compat.py38 import check_warnings from .unix_compat import UID_0_SUPPORT, grp, pwd, require_uid_0, require_unix_id diff --git a/distutils/tests/test_build.py b/distutils/tests/test_build.py index 8fb1bc1b..d379aca0 100644 --- a/distutils/tests/test_build.py +++ b/distutils/tests/test_build.py @@ -4,8 +4,7 @@ import sys from distutils.command.build import build from distutils.tests import support -from sysconfig import get_config_var -from sysconfig import get_platform +from sysconfig import get_config_var, get_platform class TestBuild(support.TempdirManager): diff --git a/distutils/tests/test_build_ext.py b/distutils/tests/test_build_ext.py index 6c4c4ba8..8bd3cef8 100644 --- a/distutils/tests/test_build_ext.py +++ b/distutils/tests/test_build_ext.py @@ -25,11 +25,11 @@ fixup_build_ext, ) from io import StringIO -from test import support import jaraco.path import path import pytest +from test import support from .compat import py38 as import_helper diff --git a/distutils/tests/test_extension.py b/distutils/tests/test_extension.py index 73370996..41872e04 100644 --- a/distutils/tests/test_extension.py +++ b/distutils/tests/test_extension.py @@ -3,7 +3,6 @@ import os import pathlib import warnings - from distutils.extension import Extension, read_setup_file import pytest diff --git a/distutils/tests/test_install_data.py b/distutils/tests/test_install_data.py index 4b15a269..c800f86c 100644 --- a/distutils/tests/test_install_data.py +++ b/distutils/tests/test_install_data.py @@ -2,12 +2,11 @@ import os import pathlib - -import pytest - from distutils.command.install_data import install_data from distutils.tests import support +import pytest + @pytest.mark.usefixtures('save_env') class TestInstallData( diff --git a/distutils/tests/test_mingwccompiler.py b/distutils/tests/test_mingwccompiler.py index 28f4762b..3e3ad505 100644 --- a/distutils/tests/test_mingwccompiler.py +++ b/distutils/tests/test_mingwccompiler.py @@ -1,8 +1,8 @@ -import pytest - -from distutils.util import split_quoted, is_mingw -from distutils.errors import DistutilsPlatformError, CCompilerError from distutils import sysconfig +from distutils.errors import CCompilerError, DistutilsPlatformError +from distutils.util import is_mingw, split_quoted + +import pytest class TestMingw32CCompiler: diff --git a/distutils/tests/test_spawn.py b/distutils/tests/test_spawn.py index 2576bdd5..fd7b669c 100644 --- a/distutils/tests/test_spawn.py +++ b/distutils/tests/test_spawn.py @@ -7,10 +7,10 @@ from distutils.errors import DistutilsExecError from distutils.spawn import find_executable, spawn from distutils.tests import support -from test.support import unix_shell import path import pytest +from test.support import unix_shell from .compat import py38 as os_helper diff --git a/distutils/tests/test_sysconfig.py b/distutils/tests/test_sysconfig.py index edc17992..49274a36 100644 --- a/distutils/tests/test_sysconfig.py +++ b/distutils/tests/test_sysconfig.py @@ -9,12 +9,12 @@ from distutils import sysconfig from distutils.ccompiler import new_compiler # noqa: F401 from distutils.unixccompiler import UnixCCompiler -from test.support import swap_item import jaraco.envs import path import pytest from jaraco.text import trim +from test.support import swap_item def _gen_makefile(root, contents):