Skip to content

Commit

Permalink
chore: ruff ARG001 rule
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Sep 14, 2024
1 parent 9edd9a3 commit 53850ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions yapw/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def halt(
If the ``callback`` function raises an exception, shut down the client in the main thread, without acknowledgment.
"""

def errback(exception: Exception) -> None:
def errback(_exception: Exception) -> None:
logger.exception("Unhandled exception when consuming %r, shutting down gracefully", body)
add_callback_threadsafe(state.connection, state.interrupt)

Expand All @@ -119,7 +119,7 @@ def discard(
If the ``callback`` function raises an exception, nack the message, without requeueing.
"""

def errback(exception: Exception) -> None:
def errback(_exception: Exception) -> None:
logger.exception("Unhandled exception when consuming %r, discarding message", body)
nack(state, channel, method.delivery_tag, requeue=False)

Expand All @@ -139,7 +139,7 @@ def requeue(
If the ``callback`` function raises an exception, nack the message, requeueing it unless it was redelivered.
"""

def errback(exception: Exception) -> None:
def errback(_exception: Exception) -> None:
requeue = not method.redelivered
logger.exception("Unhandled exception when consuming %r (requeue=%r)", body, requeue)
nack(state, channel, method.delivery_tag, requeue=requeue)
Expand Down

0 comments on commit 53850ff

Please sign in to comment.