maint(precommit): Apply isort (#3195)

* Apply isort

* Tweak isort config

* Add env.py as a known_first_party

* Add one missing known first party

* Make config compat with older isort versions

* Add another comment

* Revert pyproject setting
This commit is contained in:
Aaron Gokaslan
2021-08-13 12:37:05 -04:00
committed by GitHub
parent d6841f60cc
commit 9df2f1ff13
45 changed files with 73 additions and 67 deletions

View File

@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
from ._version import version_info, __version__
from .commands import get_include, get_cmake_dir
from ._version import __version__, version_info
from .commands import get_cmake_dir, get_include
__all__ = (
"version_info",

View File

@@ -5,7 +5,7 @@ import argparse
import sys
import sysconfig
from .commands import get_include, get_cmake_dir
from .commands import get_cmake_dir, get_include
def print_includes():

View File

@@ -1,4 +1,4 @@
from typing import Union, Tuple
from typing import Tuple, Union
def _to_int(s: str) -> Union[int, str]: ...

View File

@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import os
DIR = os.path.abspath(os.path.dirname(__file__))

View File

@@ -41,23 +41,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import contextlib
import os
import platform
import shutil
import sys
import sysconfig
import tempfile
import threading
import platform
import warnings
import sysconfig
try:
from setuptools.command.build_ext import build_ext as _build_ext
from setuptools import Extension as _Extension
from setuptools.command.build_ext import build_ext as _build_ext
except ImportError:
from distutils.command.build_ext import build_ext as _build_ext
from distutils.extension import Extension as _Extension
import distutils.errors
import distutils.ccompiler
import distutils.errors
WIN = sys.platform.startswith("win32") and "mingw" not in sysconfig.get_platform()
PY2 = sys.version_info[0] < 3

View File

@@ -1,13 +1,12 @@
# IMPORTANT: Should stay in sync with setup_helpers.py (mostly checked by CI /
# pre-commit).
from typing import Any, Callable, Dict, Iterator, List, Optional, Type, TypeVar, Union
from types import TracebackType
import contextlib
import distutils.ccompiler
from distutils.command.build_ext import build_ext as _build_ext # type: ignore
from distutils.extension import Extension as _Extension
import distutils.ccompiler
import contextlib
from types import TracebackType
from typing import Any, Callable, Dict, Iterator, List, Optional, Type, TypeVar, Union
WIN: bool
PY2: bool