Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
CzBiX authored May 28, 2024
1 parent 5149778 commit 7b2e3c1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions httpcore/_async/connection_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ async def handle_async_request(self, request: Request) -> Response:
else:
break # pragma: nocover

except BaseException as exc:
except BaseException:
with self._optional_thread_lock:
# For any exception or cancellation we remove the request from
# the queue, and then re-assign requests to connections.
Expand Down Expand Up @@ -362,7 +362,7 @@ async def __aiter__(self) -> AsyncIterator[bytes]:
try:
async for part in self._stream:
yield part
except BaseException as exc:
except BaseException:
await self.aclose()
raise

Expand Down
4 changes: 2 additions & 2 deletions httpcore/_sync/connection_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def handle_request(self, request: Request) -> Response:
else:
break # pragma: nocover

except BaseException as exc:
except BaseException:
with self._optional_thread_lock:
# For any exception or cancellation we remove the request from
# the queue, and then re-assign requests to connections.
Expand Down Expand Up @@ -362,7 +362,7 @@ def __iter__(self) -> Iterator[bytes]:
try:
for part in self._stream:
yield part
except BaseException as exc:
except BaseException:
self.close()
raise

Expand Down
2 changes: 1 addition & 1 deletion tests/_async/test_connection_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ async def trace(name, kwargs):
"GET", "https://example.com/", extensions={"trace": trace}
)

assert exc_info.__cause__ is cause_exception
assert exc_info.__cause__ is cause_exception # type: ignore[attr-defined]

info = [repr(c) for c in pool.connections]
assert info == []
Expand Down
2 changes: 1 addition & 1 deletion tests/_sync/test_connection_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def trace(name, kwargs):
"GET", "https://example.com/", extensions={"trace": trace}
)

assert exc_info.__cause__ is cause_exception
assert exc_info.__cause__ is cause_exception # type: ignore[attr-defined]

info = [repr(c) for c in pool.connections]
assert info == []
Expand Down

0 comments on commit 7b2e3c1

Please sign in to comment.