Skip to content

Commit 7b640c9

Browse files
committed
refactor(lint): address link issues
1 parent 9aaf130 commit 7b640c9

4 files changed

Lines changed: 16 additions & 11 deletions

File tree

pubnub/request_handlers/async_httpx.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,11 @@ async def async_request(self, options_func, cancellation_event):
137137
'headers': request_headers,
138138
'url': full_url,
139139
'follow_redirects': options.allow_redirects,
140-
'timeout': httpx.Timeout(connect=options.connect_timeout,
141-
read=options.request_timeout,
142-
write=options.connect_timeout,
143-
pool=options.connect_timeout),
140+
'timeout': httpx.Timeout(
141+
connect=options.connect_timeout,
142+
read=options.request_timeout,
143+
write=options.connect_timeout,
144+
pool=options.connect_timeout),
144145
}
145146
if options.is_post() or options.is_patch():
146147
request_arguments['content'] = options.data

pubnub/request_handlers/httpx.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,11 @@ def _invoke_request(self, p_options, e_options, base_origin):
346346
"method": e_options.method_string,
347347
"headers": request_headers,
348348
"url": httpx.URL(url, query=e_options.query_string.encode("utf-8")),
349-
"timeout": httpx.Timeout(connect=e_options.connect_timeout,
350-
read=e_options.request_timeout,
351-
write=e_options.connect_timeout,
352-
pool=e_options.connect_timeout),
349+
"timeout": httpx.Timeout(
350+
connect=e_options.connect_timeout,
351+
read=e_options.request_timeout,
352+
write=e_options.connect_timeout,
353+
pool=e_options.connect_timeout),
353354
"follow_redirects": e_options.allow_redirects
354355
}
355356

tests/integrational/native_threads/test_subscribe.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ def test_cg_subscribe_unsubscribe(self):
182182
if result is None:
183183
self.fail("Remove channel from channel group operation timeout or failed")
184184
if cg_remove_operation.status is not None and cg_remove_operation.status.is_error():
185-
self.fail(f"Remove channel from channel group operation failed with error: {cg_remove_operation.status}")
185+
self.fail(
186+
f"Remove channel from channel group failed: {cg_remove_operation.status}"
187+
)
186188
assert isinstance(result, PNChannelGroupsRemoveChannelResult)
187189
finally:
188190
pubnub.stop()
@@ -239,7 +241,9 @@ def test_subscribe_cg_publish_unsubscribe(self):
239241
if result is None:
240242
self.fail("Remove channel from channel group operation timeout or failed")
241243
if non_subscribe_listener.status is not None and non_subscribe_listener.status.is_error():
242-
self.fail(f"Remove channel from channel group operation failed with error: {non_subscribe_listener.status}")
244+
self.fail(
245+
f"Remove channel from channel group failed: {non_subscribe_listener.status}"
246+
)
243247
assert isinstance(result, PNChannelGroupsRemoveChannelResult)
244248
finally:
245249
pubnub.stop()

tests/unit/test_wall_clock_deadline.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ class TestHttpxRequestHandlerCleanup(unittest.TestCase):
360360
def test_close_stops_watchdog(self):
361361
"""HttpxRequestHandler.close() should stop the watchdog thread."""
362362
from pubnub.request_handlers.httpx import HttpxRequestHandler
363-
from tests.helper import pnconf_copy
364363

365364
handler = HttpxRequestHandler(MagicMock())
366365
# Start the watchdog by setting a deadline

0 commit comments

Comments
 (0)