-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort imports for more consistent diff (ruff/isort) #4392
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
import pytest | ||
|
||
|
||
pytest_plugins = 'setuptools.tests.fixtures' | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,68 +22,66 @@ | |
|
||
from __future__ import annotations | ||
|
||
from abc import ABC | ||
import sys | ||
from abc import ABC | ||
|
||
if sys.version_info < (3, 8): # noqa: UP036 # Check for unsupported versions | ||
raise RuntimeError("Python 3.8 or later is required") | ||
|
||
import os | ||
import _imp | ||
import collections | ||
import email.parser | ||
import errno | ||
import functools | ||
import importlib | ||
import importlib.abc | ||
import importlib.machinery | ||
import inspect | ||
import io | ||
import time | ||
import ntpath | ||
import operator | ||
import os | ||
import pkgutil | ||
import platform | ||
import plistlib | ||
import posixpath | ||
import re | ||
import stat | ||
import tempfile | ||
import textwrap | ||
import time | ||
import types | ||
import warnings | ||
import zipfile | ||
import zipimport | ||
from pkgutil import get_importer | ||
from typing import ( | ||
TYPE_CHECKING, | ||
Any, | ||
BinaryIO, | ||
Literal, | ||
Callable, | ||
Dict, | ||
Iterable, | ||
Iterator, | ||
Literal, | ||
Mapping, | ||
MutableSequence, | ||
NamedTuple, | ||
NoReturn, | ||
Tuple, | ||
Union, | ||
TYPE_CHECKING, | ||
Protocol, | ||
Callable, | ||
Iterable, | ||
Tuple, | ||
TypeVar, | ||
Union, | ||
overload, | ||
) | ||
import zipfile | ||
import zipimport | ||
import warnings | ||
import stat | ||
import functools | ||
import pkgutil | ||
import operator | ||
import platform | ||
import collections | ||
import plistlib | ||
import email.parser | ||
import errno | ||
import tempfile | ||
import textwrap | ||
import inspect | ||
import ntpath | ||
import posixpath | ||
import importlib | ||
import importlib.abc | ||
import importlib.machinery | ||
from pkgutil import get_importer | ||
|
||
import _imp | ||
|
||
sys.path.extend(((vendor_path := os.path.join(os.path.dirname(os.path.dirname(__file__)), 'setuptools', '_vendor')) not in sys.path) * [vendor_path]) # fmt: skip | ||
# workaround for #4476 | ||
sys.modules.pop('backports', None) | ||
|
||
# capture these to bypass sandboxing | ||
from os import utime | ||
from os import open as os_open | ||
from os.path import isdir, split | ||
from os import open as os_open, utime # isort: skip | ||
from os.path import isdir, split # isort: skip | ||
|
||
try: | ||
from os import mkdir, rename, unlink | ||
|
@@ -93,20 +91,16 @@ | |
# no write support, probably under GAE | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question that doesn't affect this PR: What's GAE ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Google App Engine? I don't know... the change is from 2009, before setuptools moved to Github and unfortunatelly all references to issues/PR have been messed up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
WRITE_SUPPORT = False | ||
|
||
from jaraco.text import ( | ||
yield_lines, | ||
drop_comment, | ||
join_continuation, | ||
) | ||
import packaging.markers | ||
import packaging.requirements | ||
import packaging.specifiers | ||
import packaging.utils | ||
import packaging.version | ||
from jaraco.text import drop_comment, join_continuation, yield_lines | ||
from platformdirs import user_cache_dir as _user_cache_dir | ||
|
||
if TYPE_CHECKING: | ||
from _typeshed import BytesPath, StrPath, StrOrBytesPath | ||
from _typeshed import BytesPath, StrOrBytesPath, StrPath | ||
from typing_extensions import Self, TypeAlias | ||
|
||
warnings.warn( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import functools | ||
import inspect | ||
import re | ||
import textwrap | ||
import functools | ||
|
||
import pytest | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import sys | ||
|
||
|
||
if sys.version_info < (3, 10): | ||
import importlib_metadata as metadata # pragma: no cover | ||
else: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not automated