Skip to content

Commit

Permalink
fix pylint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkdl committed Jun 19, 2024
1 parent 8fd6db1 commit 69853c3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions trio_websocket/_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,11 @@ async def close_connection(connection: WebSocketConnection) -> None:
# all exceptions are cancelled
# prefer raising the one from the user, for traceback reasons
if user_error is not None:
raise user_error
# no reason to raise from e, just to include a bunch of extra
# cancelleds.
raise user_error # pylint: disable=raise-missing-from
# multiple internal Cancelled is not possible afaik
raise e.exceptions[0] # pragma: no cover
raise e.exceptions[0] # pragma: no cover # pylint: disable=raise-missing-from
raise exception_to_raise

# if we have any KeyboardInterrupt in the group, make sure to raise it.
Expand All @@ -232,7 +234,9 @@ async def close_connection(connection: WebSocketConnection) -> None:
raise user_error from e

raise TrioWebsocketInternalError(
"Multiple internal exceptions should not be possible. Please report this as a bug to https://github.com/python-trio/trio-websocket"
"Multiple internal exceptions should not be possible. "
"Please report this as a bug to "
"https://github.com/python-trio/trio-websocket"
) from e # pragma: no cover

finally:
Expand Down

0 comments on commit 69853c3

Please sign in to comment.