Skip to content

Commit 1b7f39e

Browse files
authored
Use ruff format (#2901)
1 parent 05937f4 commit 1b7f39e

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

httpx/_transports/default.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
def map_httpcore_exceptions() -> typing.Iterator[None]:
6565
try:
6666
yield
67-
except Exception as exc: # noqa: PIE-786
67+
except Exception as exc:
6868
mapped_exc = None
6969

7070
for from_exc, to_exc in HTTPCORE_EXC_MAP.items():

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ replacement = 'src="https://raw.githubusercontent.com/encode/httpx/master/\1"'
9595
[tool.ruff]
9696
select = ["E", "F", "I", "B", "PIE"]
9797
ignore = ["B904", "B028"]
98-
line-length = 120
98+
line-length = 88
99+
100+
[tool.ruff.pycodestyle]
101+
max-line-length = 120
99102

100103
[tool.ruff.isort]
101104
combine-as-imports = true

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ build==0.10.0
1919
twine==4.0.2
2020

2121
# Tests & Linting
22-
black==23.9.1
2322
coverage[toml]==7.3.0
2423
cryptography==41.0.4
2524
mypy==1.5.1
2625
types-certifi==2021.10.8.2
2726
pytest==7.4.3
28-
ruff==0.0.291
27+
ruff==0.1.3
2928
trio==0.22.2
3029
trio-typing==0.9.0
3130
trustme==1.1.0

scripts/check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ export SOURCE_FILES="httpx tests"
99
set -x
1010

1111
./scripts/sync-version
12-
${PREFIX}black --check --diff $SOURCE_FILES
12+
${PREFIX}ruff format $SOURCE_FILES --diff
1313
${PREFIX}mypy $SOURCE_FILES
1414
${PREFIX}ruff check $SOURCE_FILES

scripts/lint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ export SOURCE_FILES="httpx tests"
99
set -x
1010

1111
${PREFIX}ruff --fix $SOURCE_FILES
12-
${PREFIX}black $SOURCE_FILES
12+
${PREFIX}ruff format $SOURCE_FILES

0 commit comments

Comments
 (0)