Skip to content

Commit b3b1488

Browse files
committed
fix lint
1 parent 44a5f3e commit b3b1488

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

test/test_aiohttp_client.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ async def _test_http1_manual_window_management_parameters(self):
670670
tls_ctx = ClientTlsContext(tls_ctx_opt)
671671
tls_options = tls_ctx.new_connection_options()
672672
tls_options.set_server_name("httpbin.org")
673-
673+
674674
connection = await AIOHttpClientConnection.new(
675675
host_name="httpbin.org",
676676
port=443,
@@ -692,7 +692,7 @@ async def _test_http2_manual_window_management_parameters(self):
692692
tls_ctx = ClientTlsContext(tls_ctx_opt)
693693
tls_options = tls_ctx.new_connection_options()
694694
tls_options.set_server_name("httpbin.org")
695-
695+
696696
connection = await AIOHttp2ClientConnection.new(
697697
host_name="httpbin.org",
698698
port=443,
@@ -716,16 +716,16 @@ async def _test_connection_has_update_window_method(self):
716716
tls_ctx = ClientTlsContext(tls_ctx_opt)
717717
tls_options = tls_ctx.new_connection_options()
718718
tls_options.set_server_name("httpbin.org")
719-
719+
720720
connection = await AIOHttpClientConnection.new(
721721
host_name="httpbin.org",
722722
port=443,
723723
tls_connection_options=tls_options
724724
)
725-
self.assertTrue(hasattr(connection, 'update_window'),
726-
"Connection missing update_window method")
727-
self.assertTrue(callable(getattr(connection, 'update_window')),
728-
"update_window is not callable")
725+
self.assertTrue(hasattr(connection, 'update_window'),
726+
"Connection missing update_window method")
727+
self.assertTrue(callable(getattr(connection, 'update_window')),
728+
"update_window is not callable")
729729
await connection.close()
730730

731731
def test_connection_has_update_window_method(self):

test/test_http_client.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ def test_http1_manual_window_management_parameters(self):
679679
try:
680680
connection = future.result(timeout=1)
681681
connection.close()
682-
except:
682+
except BaseException:
683683
future.cancel()
684684
except Exception as e:
685685
self.fail(f"HTTP/1.1 flow control parameters rejected: {e}")
@@ -688,7 +688,7 @@ def test_http2_manual_window_management_parameters(self):
688688
"""Test HTTP/2 connection accepts flow control parameters"""
689689
try:
690690
future = Http2ClientConnection.new(
691-
host_name="httpbin.org",
691+
host_name="httpbin.org",
692692
port=443,
693693
tls_connection_options=self.tls_options,
694694
manual_window_management=True,
@@ -701,7 +701,7 @@ def test_http2_manual_window_management_parameters(self):
701701
try:
702702
connection = future.result(timeout=1)
703703
connection.close()
704-
except:
704+
except BaseException:
705705
future.cancel()
706706
except Exception as e:
707707
self.fail(f"HTTP/2 flow control parameters rejected: {e}")
@@ -716,21 +716,21 @@ def test_connection_has_update_window_method(self):
716716

717717
try:
718718
connection = future.result(timeout=self.timeout)
719-
self.assertTrue(hasattr(connection, 'update_window'),
720-
"Connection missing update_window method")
721-
self.assertTrue(callable(getattr(connection, 'update_window')),
722-
"update_window is not callable")
719+
self.assertTrue(hasattr(connection, 'update_window'),
720+
"Connection missing update_window method")
721+
self.assertTrue(callable(getattr(connection, 'update_window')),
722+
"update_window is not callable")
723723
connection.close()
724724
except Exception as e:
725725
self.assertTrue(hasattr(HttpClientConnectionBase, 'update_window'),
726-
"HttpClientConnectionBase missing update_window method")
726+
"HttpClientConnectionBase missing update_window method")
727727

728728
def test_stream_has_update_window_method(self):
729729
"""Test stream has update_window method"""
730730
self.assertTrue(hasattr(HttpClientStreamBase, 'update_window'),
731-
"HttpClientStreamBase missing update_window method")
731+
"HttpClientStreamBase missing update_window method")
732732
self.assertTrue(callable(getattr(HttpClientStreamBase, 'update_window')),
733-
"Stream update_window is not callable")
733+
"Stream update_window is not callable")
734734

735735
def test_h2_manual_window_management_happy_path(self):
736736
"""Test HTTP/2 manual window management happy path"""
@@ -809,8 +809,8 @@ def on_body_with_window_update(http_stream, chunk, **kwargs):
809809
if len(response.body) > 0:
810810
self.assertGreater(len(received_chunks), 0, "No data chunks received")
811811
self.assertGreater(len(window_updates_sent), 0, "No window updates sent")
812-
self.assertEqual(sum(received_chunks), sum(window_updates_sent),
813-
"Window updates don't match received data")
812+
self.assertEqual(sum(received_chunks), sum(window_updates_sent),
813+
"Window updates don't match received data")
814814

815815
connection.close()
816816
except Exception as e:

0 commit comments

Comments
 (0)