Skip to content

Commit d67d09b

Browse files
hramezanisethmlarson
authored andcommitted
Bump mypy version
1 parent 20032ec commit d67d09b

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

mypy-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mypy==1.11.1
1+
mypy==1.13.0
22
idna>=2.0.0
33
cryptography>=1.3.4
44
pytest>=6.2

test/test_response.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def test_cache_content_preload_false(self) -> None:
176176

177177
assert not r._body
178178
assert r.data == b"foo"
179-
assert r._body == b"foo"
179+
assert r._body == b"foo" # type: ignore[comparison-overlap]
180180
assert r.data == b"foo"
181181

182182
def test_default(self) -> None:
@@ -807,7 +807,7 @@ def test_io_not_autoclose_bufferedreader(self) -> None:
807807
def test_io_textiowrapper(self) -> None:
808808
fp = BytesIO(b"\xc3\xa4\xc3\xb6\xc3\xbc\xc3\x9f")
809809
resp = HTTPResponse(fp, preload_content=False)
810-
br = TextIOWrapper(resp, encoding="utf8") # type: ignore[arg-type]
810+
br = TextIOWrapper(resp, encoding="utf8") # type: ignore[type-var]
811811

812812
assert br.read() == "äöüß"
813813

@@ -821,14 +821,14 @@ def test_io_textiowrapper(self) -> None:
821821
)
822822
resp = HTTPResponse(fp, preload_content=False)
823823
with pytest.raises(ValueError, match="I/O operation on closed file.?"):
824-
list(TextIOWrapper(resp)) # type: ignore[arg-type]
824+
list(TextIOWrapper(resp)) # type: ignore[type-var]
825825

826826
def test_io_not_autoclose_textiowrapper(self) -> None:
827827
fp = BytesIO(
828828
b"\xc3\xa4\xc3\xb6\xc3\xbc\xc3\x9f\n\xce\xb1\xce\xb2\xce\xb3\xce\xb4"
829829
)
830830
resp = HTTPResponse(fp, preload_content=False, auto_close=False)
831-
reader = TextIOWrapper(resp, encoding="utf8") # type: ignore[arg-type]
831+
reader = TextIOWrapper(resp, encoding="utf8") # type: ignore[type-var]
832832
assert list(reader) == ["äöüß\n", "αβγδ"]
833833

834834
assert not reader.closed

test/test_ssltransport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def test_tls_in_tls_makefile_raw_rw_binary(self, buffering: int | None) -> None:
448448
proxy_sock, self.client_context, server_hostname="localhost"
449449
) as destination_sock:
450450
file = destination_sock.makefile("rwb", buffering)
451-
file.write(sample_request()) # type: ignore[call-overload]
451+
file.write(sample_request()) # type: ignore[arg-type]
452452
file.flush()
453453

454454
response = bytearray(65536)

test/with_dummyserver/test_proxy_poolmanager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def assert_is_verified(pm: ProxyManager, *, proxy: bool, target: bool) -> None:
4949
pool.pool.queue[-1] if pool.pool is not None else None
5050
) # retrieve last connection entry
5151

52+
assert connection is not None
5253
assert connection.proxy_is_verified is proxy
5354
assert connection.is_verified is target
5455

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy