Upgrade Python type checker mypy (#3654)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Christian Clauss · committed by GitHub · parent 15e9759 · Browse files · 4 files·+9 added−9 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+9 added−9 removed
- tests:+8 added−8 removed
- other:+1 added−1 removed
Provenance
- Commit
b55d463- Tree
d342a7d- Author
Christian Clauss <cclauss@me.com>- Committer
GitHub <noreply@github.com>- Parent
15e9759
4 files changed+9 added−9 removed
modified:tests/client/test_auth.py+1 added-1 removed
324 unmodified lines325 326 async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:327 assert client.auth is None328 329- client.auth = ("user", "password123") # type: ignore329+ client.auth = ("user", "password123")330 assert isinstance(client.auth, httpx.BasicAuth)331 332 url = "https://example.org/"333 response = await client.get(url)439 unmodified linesmodified:tests/client/test_properties.py+6 added-6 removed
1 unmodified line2 3 4 def test_client_base_url():5 client = httpx.Client()6- client.base_url = "https://www.example.org/" # type: ignore6+ client.base_url = "https://www.example.org/"7 assert isinstance(client.base_url, httpx.URL)8 assert client.base_url == "https://www.example.org/"9 10 11 def test_client_base_url_without_trailing_slash():12 client = httpx.Client()13- client.base_url = "https://www.example.org/path" # type: ignore13+ client.base_url = "https://www.example.org/path"14 assert isinstance(client.base_url, httpx.URL)15 assert client.base_url == "https://www.example.org/path/"16 17 18 def test_client_base_url_with_trailing_slash():19 client = httpx.Client()20- client.base_url = "https://www.example.org/path/" # type: ignore20+ client.base_url = "https://www.example.org/path/"21 assert isinstance(client.base_url, httpx.URL)22 assert client.base_url == "https://www.example.org/path/"23 24 25 def test_client_headers():26 client = httpx.Client()27- client.headers = {"a": "b"} # type: ignore27+ client.headers = {"a": "b"}28 assert isinstance(client.headers, httpx.Headers)29 assert client.headers["A"] == "b"30 31 32 def test_client_cookies():33 client = httpx.Client()34- client.cookies = {"a": "b"} # type: ignore34+ client.cookies = {"a": "b"}35 assert isinstance(client.cookies, httpx.Cookies)36 mycookies = list(client.cookies.jar)37 assert len(mycookies) == 138 assert mycookies[0].name == "a" and mycookies[0].value == "b"2 unmodified lines41 def test_client_timeout():42 expected_timeout = 12.043 client = httpx.Client()44 45- client.timeout = expected_timeout # type: ignore45+ client.timeout = expected_timeout46 47 assert isinstance(client.timeout, httpx.Timeout)48 assert client.timeout.connect == expected_timeout49 assert client.timeout.read == expected_timeout19 unmodified linesmodified:tests/client/test_queryparams.py+1 added-1 removed
15 unmodified lines16 assert isinstance(client.params, httpx.QueryParams)17 assert client.params["a"] == "b"18 19 client = httpx.Client()20- client.params = "a=b" # type: ignore20+ client.params = "a=b"21 assert isinstance(client.params, httpx.QueryParams)22 assert client.params["a"] == "b"23 24 11 unmodified linesmodified:requirements.txt+1 added-1 removed
18 unmodified lines19 20 # Tests & Linting21 coverage[toml]==7.6.122 cryptography==44.0.123-mypy==1.13.023+mypy==1.17.124 pytest==8.3.425 ruff==0.12.1126 trio==0.27.027 trio-typing==0.10.02 unmodified lines