diff options
author | 2023-05-09 16:01:01 +0100 | |
---|---|---|
committer | 2023-05-09 16:01:01 +0100 | |
commit | c3e23e60278d34658f801bd7d7ed721d5a272637 (patch) | |
tree | e159a0fae7850d706d713cf2b49dfed2140ce655 /bot/utils/exceptions.py | |
parent | Bump sentry-sdk from 1.21.1 to 1.22.1 (#1273) (diff) | |
parent | Move unshared contants inside modules (diff) |
Merge pull request #1270 from python-discord/migrate-to-ruff
Migrate to ruff
Diffstat (limited to 'bot/utils/exceptions.py')
-rw-r--r-- | bot/utils/exceptions.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/bot/utils/exceptions.py b/bot/utils/exceptions.py index 3cd96325..b1a35e63 100644 --- a/bot/utils/exceptions.py +++ b/bot/utils/exceptions.py @@ -1,16 +1,13 @@ -from typing import Optional class UserNotPlayingError(Exception): """Raised when users try to use game commands when they are not playing.""" - pass - class APIError(Exception): """Raised when an external API (eg. Wikipedia) returns an error response.""" - def __init__(self, api: str, status_code: int, error_msg: Optional[str] = None): + def __init__(self, api: str, status_code: int, error_msg: str | None = None): super().__init__() self.api = api self.status_code = status_code |