]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Use ruff format (#2901)
authorKar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
Thu, 2 Nov 2023 11:48:53 +0000 (15:48 +0400)
committerGitHub <noreply@github.com>
Thu, 2 Nov 2023 11:48:53 +0000 (12:48 +0100)
httpx/_transports/default.py
pyproject.toml
requirements.txt
scripts/check
scripts/lint

index 7dba5b8208a5129c930e74e30178f8b5b5e5aa6f..76c543ce4e94b736303e7df76b16bcadedcc3b7a 100644 (file)
@@ -64,7 +64,7 @@ SOCKET_OPTION = typing.Union[
 def map_httpcore_exceptions() -> typing.Iterator[None]:
     try:
         yield
-    except Exception as exc:  # noqa: PIE-786
+    except Exception as exc:
         mapped_exc = None
 
         for from_exc, to_exc in HTTPCORE_EXC_MAP.items():
index baa92e9a433f3a66c98c8ca5f14705023ee4e425..0626f55f9756a22a99f9c6122ef2871b1d71ea10 100644 (file)
@@ -95,7 +95,10 @@ replacement = 'src="https://raw.githubusercontent.com/encode/httpx/master/\1"'
 [tool.ruff]
 select = ["E", "F", "I", "B", "PIE"]
 ignore = ["B904", "B028"]
-line-length = 120
+line-length = 88
+
+[tool.ruff.pycodestyle]
+max-line-length = 120
 
 [tool.ruff.isort]
 combine-as-imports = true
index a4241efd58e2411da6e1cf7027baeb15b0af369a..a08636d49db4fd1408817b27fc4ecf04ddf4fb33 100644 (file)
@@ -19,13 +19,12 @@ build==0.10.0
 twine==4.0.2
 
 # Tests & Linting
-black==23.9.1
 coverage[toml]==7.3.0
 cryptography==41.0.4
 mypy==1.5.1
 types-certifi==2021.10.8.2
 pytest==7.4.3
-ruff==0.0.291
+ruff==0.1.3
 trio==0.22.2
 trio-typing==0.9.0
 trustme==1.1.0
index ef7b064f9abf352ff9d490c219fb09ded6d0a330..a4bce0948e5a6882cf365c97ec0678f83b8eb226 100755 (executable)
@@ -9,6 +9,6 @@ export SOURCE_FILES="httpx tests"
 set -x
 
 ./scripts/sync-version
-${PREFIX}black --check --diff $SOURCE_FILES
+${PREFIX}ruff format $SOURCE_FILES --diff
 ${PREFIX}mypy $SOURCE_FILES
 ${PREFIX}ruff check $SOURCE_FILES
index 22d12cba064fe894bd218a0cff8903ea23d2fb35..3d8685a0652f613afc1dbc9457b6e530dabec172 100755 (executable)
@@ -9,4 +9,4 @@ export SOURCE_FILES="httpx tests"
 set -x
 
 ${PREFIX}ruff --fix $SOURCE_FILES
-${PREFIX}black $SOURCE_FILES
+${PREFIX}ruff format $SOURCE_FILES