Skip to content

Commit 522b7c8

Browse files
committed
Silence errors from new flake8-bugbear check
PyCQA/flake8-bugbear#525
1 parent 946aabc commit 522b7c8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dramatiq/errors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
class DramatiqError(Exception): # pragma: no cover
2424
"""Base class for all dramatiq errors."""
2525

26-
def __init__(self, message):
26+
def __init__(self, message): # noqa: B042
2727
self.message = message
2828

2929
def __str__(self) -> str:
@@ -33,7 +33,7 @@ def __str__(self) -> str:
3333
class DecodeError(DramatiqError):
3434
"""Raised when a message fails to decode."""
3535

36-
def __init__(self, message, data, error):
36+
def __init__(self, message, data, error): # noqa: B042
3737
super().__init__(message)
3838
self.data = data
3939
self.error = error
@@ -83,6 +83,6 @@ class Retry(DramatiqError):
8383
retried after at least that amount of time (in milliseconds).
8484
"""
8585

86-
def __init__(self, message: str = "", delay: Optional[int] = None):
86+
def __init__(self, message: str = "", delay: Optional[int] = None): # noqa: B042
8787
super().__init__(message)
8888
self.delay = delay

dramatiq/results/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class ResultMissing(ResultError):
3535
class ResultFailure(ResultError):
3636
"""Raised when getting a result from an actor that failed."""
3737

38-
def __init__(self, message="", orig_exc_type="", orig_exc_msg=""):
38+
def __init__(self, message="", orig_exc_type="", orig_exc_msg=""): # noqa: B042
3939
super().__init__(message)
4040

4141
self.orig_exc_type = orig_exc_type

0 commit comments

Comments
 (0)