]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Upgrade Python type checker mypy (#3654)
authorChristian Clauss <cclauss@me.com>
Thu, 4 Sep 2025 13:48:49 +0000 (15:48 +0200)
committerGitHub <noreply@github.com>
Thu, 4 Sep 2025 13:48:49 +0000 (08:48 -0500)
requirements.txt
tests/client/test_auth.py
tests/client/test_properties.py
tests/client/test_queryparams.py

index 8b5a111a71e654a48300d1cd8f7acdfbcc59f9c0..18480596c8f18bae067badaf673b8fe3c853025d 100644 (file)
@@ -20,7 +20,7 @@ twine==6.0.1
 # Tests & Linting
 coverage[toml]==7.6.1
 cryptography==44.0.1
-mypy==1.13.0
+mypy==1.17.1
 pytest==8.3.4
 ruff==0.12.11
 trio==0.27.0
index 7638b8bd68d4e505dc378185c23265361fcbf92b..72674e6f4b9da2d68d105e49b5613daf3d35ec5e 100644 (file)
@@ -326,7 +326,7 @@ async def test_auth_property() -> None:
     async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:
         assert client.auth is None
 
-        client.auth = ("user", "password123")  # type: ignore
+        client.auth = ("user", "password123")
         assert isinstance(client.auth, httpx.BasicAuth)
 
         url = "https://example.org/"
index eb8709813b706a005eff0fef19e0f1539af0d0cc..f9ca9f247ff07866281d2ad333eec0afb1c737a9 100644 (file)
@@ -3,35 +3,35 @@ import httpx
 
 def test_client_base_url():
     client = httpx.Client()
-    client.base_url = "https://www.example.org/"  # type: ignore
+    client.base_url = "https://www.example.org/"
     assert isinstance(client.base_url, httpx.URL)
     assert client.base_url == "https://www.example.org/"
 
 
 def test_client_base_url_without_trailing_slash():
     client = httpx.Client()
-    client.base_url = "https://www.example.org/path"  # type: ignore
+    client.base_url = "https://www.example.org/path"
     assert isinstance(client.base_url, httpx.URL)
     assert client.base_url == "https://www.example.org/path/"
 
 
 def test_client_base_url_with_trailing_slash():
     client = httpx.Client()
-    client.base_url = "https://www.example.org/path/"  # type: ignore
+    client.base_url = "https://www.example.org/path/"
     assert isinstance(client.base_url, httpx.URL)
     assert client.base_url == "https://www.example.org/path/"
 
 
 def test_client_headers():
     client = httpx.Client()
-    client.headers = {"a": "b"}  # type: ignore
+    client.headers = {"a": "b"}
     assert isinstance(client.headers, httpx.Headers)
     assert client.headers["A"] == "b"
 
 
 def test_client_cookies():
     client = httpx.Client()
-    client.cookies = {"a": "b"}  # type: ignore
+    client.cookies = {"a": "b"}
     assert isinstance(client.cookies, httpx.Cookies)
     mycookies = list(client.cookies.jar)
     assert len(mycookies) == 1
@@ -42,7 +42,7 @@ def test_client_timeout():
     expected_timeout = 12.0
     client = httpx.Client()
 
-    client.timeout = expected_timeout  # type: ignore
+    client.timeout = expected_timeout
 
     assert isinstance(client.timeout, httpx.Timeout)
     assert client.timeout.connect == expected_timeout
index e5acb0ba20b39182b841f9549467d7b2012ac064..1c6d587309fb776b9a582ea9a57ada066f972f26 100644 (file)
@@ -17,7 +17,7 @@ def test_client_queryparams_string():
     assert client.params["a"] == "b"
 
     client = httpx.Client()
-    client.params = "a=b"  # type: ignore
+    client.params = "a=b"
     assert isinstance(client.params, httpx.QueryParams)
     assert client.params["a"] == "b"