]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Make isort configuration compatible with isort v5 (#1050)
authorTaneli Hukkinen <hukkinj1@users.noreply.github.com>
Sat, 4 Jul 2020 21:31:09 +0000 (00:31 +0300)
committerGitHub <noreply@github.com>
Sat, 4 Jul 2020 21:31:09 +0000 (22:31 +0100)
* Make isort configuration compatible with isort v5

* Use isort's black profile

httpx/_transports/asgi.py
scripts/check
scripts/lint
setup.cfg

index 2e228209926b6ea53c24c0ac989a5eeea8b4b46b..dc44850d10c341820a5e3bab55cb9797e652ff6d 100644 (file)
@@ -8,6 +8,7 @@ from .._utils import warn_deprecated
 
 if TYPE_CHECKING:  # pragma: no cover
     import asyncio
+
     import trio
 
     Event = Union[asyncio.Event, trio.Event]
index f25b220c6880b646ad6f01a978d2beca32589683..2b42506f6f7640b28d92ec10c2ac84faa4a794f1 100755 (executable)
@@ -11,4 +11,4 @@ set -x
 ${PREFIX}black --check --diff --target-version=py36 $SOURCE_FILES
 ${PREFIX}flake8 $SOURCE_FILES
 ${PREFIX}mypy httpx
-${PREFIX}isort --check --diff --project=httpx --recursive $SOURCE_FILES
+${PREFIX}isort --check --diff --project=httpx $SOURCE_FILES
index 5141cca049e1700950a7db680974e1ba49ae6e58..a8cab1a6e076177e244785fec7c05e0e1d278e8e 100755 (executable)
@@ -10,5 +10,5 @@ set -x
 
 ${PREFIX}autoflake --in-place --recursive $SOURCE_FILES
 ${PREFIX}seed-isort-config --application-directories=httpx
-${PREFIX}isort --project=httpx --recursive --apply $SOURCE_FILES
+${PREFIX}isort --project=httpx $SOURCE_FILES
 ${PREFIX}black --target-version=py36 $SOURCE_FILES
index 98fae653d8179e5be17fb0f99a33ee435c31dc82..6732488f63df88176da9578b71fcccbbabaa7440 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -11,13 +11,10 @@ disallow_untyped_defs = False
 check_untyped_defs = True
 
 [tool:isort]
+profile = black
 combine_as_imports = True
-force_grid_wrap = 0
-include_trailing_comma = True
 known_first_party = httpx,tests
 known_third_party = brotli,certifi,chardet,cryptography,hstspreload,httpcore,pytest,rfc3986,setuptools,sniffio,trio,trustme,uvicorn
-line_length = 88
-multi_line_output = 3
 
 [tool:pytest]
 addopts = --cov=httpx --cov=tests -rxXs