Fix flake8-bugbear B042 violations in exception classes

This commit is contained in:
Alex Janousek
2025-10-24 14:03:35 -04:00
parent 6a4b69a493
commit 1357664dbd
12 changed files with 57 additions and 28 deletions

View File

@@ -18,6 +18,7 @@ class TokenError(Exception):
else TOKEN_ERROR_DEFAULT_ERROR_MESSAGE
)
self.token = token
super().__init__(self.message, token)
class TokenExpiredError(TokenError):
@@ -48,6 +49,7 @@ class APIError(Exception):
def __init__(self, response: Response = None, message: str = None):
self.response = response
self._message = message
super().__init__(response, message)
def __str__(self):
return f"{self.status_code} - {self.message}"