]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Upgrade Python formatter ruff (#3651)
authorChristian Clauss <cclauss@me.com>
Wed, 3 Sep 2025 11:17:26 +0000 (13:17 +0200)
committerGitHub <noreply@github.com>
Wed, 3 Sep 2025 11:17:26 +0000 (06:17 -0500)
httpx/_exceptions.py
httpx/_urls.py
requirements.txt
tests/test_content.py

index 77f45a6d3986d15626fc8a5fd459d6a3e0fbe466..dd7fb6cdb3bfa2efd3de0d80bdbdb3c9d8d838af 100644 (file)
@@ -331,9 +331,7 @@ class StreamClosed(StreamError):
     """
 
     def __init__(self) -> None:
-        message = (
-            "Attempted to read or stream content, but the stream has " "been closed."
-        )
+        message = "Attempted to read or stream content, but the stream has been closed."
         super().__init__(message)
 
 
index 147a8fa333acaf31618d37ba2896e3a5bf5e4d02..301d0874d55961649626b9c68194a99b946f8581 100644 (file)
@@ -379,7 +379,7 @@ class URL:
 
         if ":" in userinfo:
             # Mask any password component.
-            userinfo = f'{userinfo.split(":")[0]}:[secure]'
+            userinfo = f"{userinfo.split(':')[0]}:[secure]"
 
         authority = "".join(
             [
index 646cb813d7eec2be6ad07807e09c11e2bac2a0ec..8b5a111a71e654a48300d1cd8f7acdfbcc59f9c0 100644 (file)
@@ -22,7 +22,7 @@ coverage[toml]==7.6.1
 cryptography==44.0.1
 mypy==1.13.0
 pytest==8.3.4
-ruff==0.8.1
+ruff==0.12.11
 trio==0.27.0
 trio-typing==0.10.0
 trustme==1.2.0
index f63ec18a6b8f94d29ae09dfad84b36987c78c1ac..9bfe9837220101f18ea36e3089f06feaa70fa7fd 100644 (file)
@@ -489,18 +489,18 @@ def test_response_invalid_argument():
 def test_ensure_ascii_false_with_french_characters():
     data = {"greeting": "Bonjour, ça va ?"}
     response = httpx.Response(200, json=data)
-    assert (
-        "ça va" in response.text
-    ), "ensure_ascii=False should preserve French accented characters"
+    assert "ça va" in response.text, (
+        "ensure_ascii=False should preserve French accented characters"
+    )
     assert response.headers["Content-Type"] == "application/json"
 
 
 def test_separators_for_compact_json():
     data = {"clé": "valeur", "liste": [1, 2, 3]}
     response = httpx.Response(200, json=data)
-    assert (
-        response.text == '{"clé":"valeur","liste":[1,2,3]}'
-    ), "separators=(',', ':') should produce a compact representation"
+    assert response.text == '{"clé":"valeur","liste":[1,2,3]}', (
+        "separators=(',', ':') should produce a compact representation"
+    )
     assert response.headers["Content-Type"] == "application/json"