Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
1.2.4 : dont inherit from other warnings / exceptions
Browse files Browse the repository at this point in the history
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
  • Loading branch information
Ari Archer committed Apr 15, 2023
1 parent b8d38a3 commit daf87cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion awc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from . import const, exc, util

__version__: typing.Final[str] = "1.2.3"
__version__: typing.Final[str] = "1.2.4"


class Awc:
Expand Down
12 changes: 6 additions & 6 deletions awc/exc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AWCException(Exception):
"""base awc exception"""


class InvalidInstanceURLError(AWCException, requests.exceptions.InvalidURL):
class InvalidInstanceURLError(AWCException):
"""raised when an API instance URL isnt valid"""

instance: str
Expand All @@ -21,7 +21,7 @@ def __init__(self, instance: str) -> None:
self.instance: str = instance


class APIRequestFailedError(AWCException, requests.exceptions.HTTPError):
class APIRequestFailedError(AWCException):
"""raised when a request to an API fails"""

api: str
Expand All @@ -32,15 +32,15 @@ def __init__(self, api: str, response: requests.Response) -> None:
self.response: requests.Response = response


class NoAPIKeyError(AWCException, PermissionError):
class NoAPIKeyError(AWCException):
"""raised when no API key is provided"""


class InvalidAPIKeyError(AWCException, PermissionError):
class InvalidAPIKeyError(AWCException):
"""raised when the API key is invalid"""


class UnexpectedResponseError(AWCException, ValueError):
class UnexpectedResponseError(AWCException):
"""raised when the API returns an unexpected response"""

def __init__(self, value: str, expected: type) -> None:
Expand All @@ -51,7 +51,7 @@ def __init__(self, value: str, expected: type) -> None:
self.expected: type = expected


class ResouceNotFoundError(AWCException, ValueError):
class ResouceNotFoundError(AWCException):
"""raised when the API doesnt return the requested resource"""

def __init__(self, value: typing.Any) -> None:
Expand Down

0 comments on commit daf87cd

Please sign in to comment.