Skip to content

Commit 2415d50

Browse files
committed
👹 Feed the hobgoblins (delint).
Apply isort rules using `ruff --select I --fix`.
1 parent 13b1f91 commit 2415d50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+344
-400
lines changed

conftest.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
import logging
12
import os
2-
import sys
3-
import platform
43
import pathlib
5-
import logging
4+
import platform
5+
import sys
66

7-
import pytest
87
import path
9-
8+
import pytest
109

1110
collect_ignore = []
1211

@@ -93,8 +92,7 @@ def temp_cwd(tmp_path):
9392

9493
@pytest.fixture
9594
def pypirc(request, save_env, distutils_managed_tempdir):
96-
from distutils.core import PyPIRCCommand
97-
from distutils.core import Distribution
95+
from distutils.core import Distribution, PyPIRCCommand
9896

9997
self = request.instance
10098
self.tmp_dir = self.mkdtemp()

distutils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import sys
21
import importlib
2+
import sys
33

44
__version__, _, _ = sys.version.partition(' ')
55

distutils/_log.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
import logging
22

3-
43
log = logging.getLogger()

distutils/_macos_compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import sys
21
import importlib
2+
import sys
33

44

55
def bypass_compiler_fixup(cmd, args):

distutils/_modified.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import functools
44
import os.path
55

6+
from ._functools import splat
67
from .errors import DistutilsFileError
78
from .py39compat import zip_strict
8-
from ._functools import splat
99

1010

1111
def _newer(source, target):

distutils/_msvccompiler.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,28 @@
1313
# ported to VS 2005 and VS 2008 by Christian Heimes
1414
# ported to VS 2015 by Steve Dower
1515

16+
import contextlib
1617
import os
1718
import subprocess
18-
import contextlib
19-
import warnings
2019
import unittest.mock as mock
20+
import warnings
2121

2222
with contextlib.suppress(ImportError):
2323
import winreg
2424

25+
from itertools import count
26+
27+
from ._log import log
28+
from .ccompiler import CCompiler, gen_lib_options
2529
from .errors import (
30+
CompileError,
2631
DistutilsExecError,
2732
DistutilsPlatformError,
28-
CompileError,
2933
LibError,
3034
LinkError,
3135
)
32-
from .ccompiler import CCompiler, gen_lib_options
33-
from ._log import log
3436
from .util import get_platform
3537

36-
from itertools import count
37-
3838

3939
def _find_vc2015():
4040
try:

distutils/archive_util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
that sort of thing)."""
55

66
import os
7-
from warnings import warn
87
import sys
8+
from warnings import warn
99

1010
try:
1111
import zipfile
1212
except ImportError:
1313
zipfile = None
1414

1515

16+
from ._log import log
17+
from .dir_util import mkpath
1618
from .errors import DistutilsExecError
1719
from .spawn import spawn
18-
from .dir_util import mkpath
19-
from ._log import log
2020

2121
try:
2222
from pwd import getpwnam

distutils/bcppcompiler.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,17 @@
1414
import os
1515
import warnings
1616

17+
from ._log import log
18+
from ._modified import newer
19+
from .ccompiler import CCompiler, gen_preprocess_options
1720
from .errors import (
18-
DistutilsExecError,
1921
CompileError,
22+
DistutilsExecError,
2023
LibError,
2124
LinkError,
2225
UnknownFileError,
2326
)
24-
from .ccompiler import CCompiler, gen_preprocess_options
2527
from .file_util import write_file
26-
from ._modified import newer
27-
from ._log import log
28-
2928

3029
warnings.warn(
3130
"bcppcompiler is deprecated and slated to be removed "

distutils/ccompiler.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
Contains CCompiler, an abstract base class that defines the interface
44
for the Distutils compiler abstraction model."""
55

6-
import sys
76
import os
87
import re
8+
import sys
99
import warnings
1010

11+
from ._itertools import always_iterable
12+
from ._log import log
13+
from ._modified import newer_group
14+
from .dir_util import mkpath
1115
from .errors import (
1216
CompileError,
17+
DistutilsModuleError,
18+
DistutilsPlatformError,
1319
LinkError,
1420
UnknownFileError,
15-
DistutilsPlatformError,
16-
DistutilsModuleError,
1721
)
18-
from .spawn import spawn
1922
from .file_util import move_file
20-
from .dir_util import mkpath
21-
from ._modified import newer_group
22-
from .util import split_quoted, execute
23-
from ._log import log
24-
from ._itertools import always_iterable
23+
from .spawn import spawn
24+
from .util import execute, split_quoted
2525

2626

2727
class CCompiler:

distutils/cmd.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
in the distutils.command package.
55
"""
66

7-
import sys
7+
import logging
88
import os
99
import re
10-
import logging
10+
import sys
1111

12-
from .errors import DistutilsOptionError
13-
from . import util, dir_util, file_util, archive_util, _modified
12+
from . import _modified, archive_util, dir_util, file_util, util
1413
from ._log import log
14+
from .errors import DistutilsOptionError
1515

1616

1717
class Command:

0 commit comments

Comments
 (0)