Skip to content

Commit

Permalink
Remove unnecessary parenthesis when raising exceptions (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
agners authored Mar 14, 2024
1 parent 61bf822 commit 8962a93
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion matter_server/client/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async def receive_message_or_raise(self) -> MessageType:
raise ConnectionClosed("Connection was closed.")

if ws_msg.type == WSMsgType.ERROR:
raise ConnectionFailed()
raise ConnectionFailed

if ws_msg.type != WSMsgType.TEXT:
raise InvalidMessage(
Expand Down
2 changes: 1 addition & 1 deletion matter_server/server/client_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ async def _run_handler(
try:
args = parse_arguments(handler.signature, handler.type_hints, msg.args)
except (TypeError, KeyError, ValueError) as err:
raise InvalidArguments() from err
raise InvalidArguments from err
result = handler.target(**args)
if asyncio.iscoroutine(result):
result = await result
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ ignore = [
"RUF012", # TEMPORARY DISABLED
"TCH001", # TEMPORARY DISABLED
"ANN102", # TEMPORARY DISABLED
"RSE102", # TEMPORARY DISABLED
"B007", # TEMPORARY DISABLED
"SIM102", # TEMPORARY DISABLED
"C901", # TEMPORARY DISABLED
Expand Down

0 comments on commit 8962a93

Please sign in to comment.