mirror of
https://github.com/GSA/notifications-admin.git
synced 2025-12-11 15:43:45 -05:00
Bump flake8-bugbear from 24.12.12 to 25.10.21 (#3046)
* Bump flake8-bugbear from 24.12.12 to 25.10.21 Bumps [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) from 24.12.12 to 25.10.21. - [Release notes](https://github.com/PyCQA/flake8-bugbear/releases) - [Commits](https://github.com/PyCQA/flake8-bugbear/compare/24.12.12...25.10.21) --- updated-dependencies: - dependency-name: flake8-bugbear dependency-version: 25.10.21 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Fix B042 warnings from flake8-bugbear 25.10.21 upgrade --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alex Janousek <alex.janousek@gsa.gov>
This commit is contained in:
@@ -11,13 +11,14 @@ TOKEN_ERROR_DEFAULT_ERROR_MESSAGE = "Invalid token: " + TOKEN_ERROR_GUIDANCE
|
||||
|
||||
|
||||
class TokenError(Exception):
|
||||
def __init__(self, message=None, token=None):
|
||||
def __init__(self, message=None, token=None): # noqa: B042
|
||||
self.message = (
|
||||
message + ". " + TOKEN_ERROR_GUIDANCE
|
||||
if message
|
||||
else TOKEN_ERROR_DEFAULT_ERROR_MESSAGE
|
||||
)
|
||||
self.token = token
|
||||
super().__init__(self.message)
|
||||
|
||||
|
||||
class TokenExpiredError(TokenError):
|
||||
@@ -45,9 +46,10 @@ class TokenIssuedAtError(TokenDecodeError):
|
||||
|
||||
|
||||
class APIError(Exception):
|
||||
def __init__(self, response: Response = None, message: str = None):
|
||||
def __init__(self, response: Response = None, message: str = None): # noqa: B042
|
||||
self.response = response
|
||||
self._message = message
|
||||
super().__init__(message or REQUEST_ERROR_MESSAGE)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.status_code} - {self.message}"
|
||||
|
||||
Reference in New Issue
Block a user