diff options
| author | Rapptz <[email protected]> | 2021-08-22 02:28:37 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-08-22 02:28:37 -0400 |
| commit | 6268cad40297e6eeaddf64653ae8978171dddd76 (patch) | |
| tree | 3ca87feef3f4430ad899d6c0cc150cfce6737de2 /discord | |
| parent | Add typing metadata (diff) | |
| download | discord.py-6268cad40297e6eeaddf64653ae8978171dddd76.tar.xz discord.py-6268cad40297e6eeaddf64653ae8978171dddd76.zip | |
ResponseType type alias is private
Diffstat (limited to 'discord')
| -rw-r--r-- | discord/errors.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/discord/errors.py b/discord/errors.py index 398cdc55..bc2398d5 100644 --- a/discord/errors.py +++ b/discord/errors.py @@ -31,9 +31,9 @@ if TYPE_CHECKING: try: from requests import Response - ResponseType = Union[ClientResponse, Response] + _ResponseType = Union[ClientResponse, Response] except ModuleNotFoundError: - ResponseType = ClientResponse + _ResponseType = ClientResponse from .interactions import Interaction @@ -123,8 +123,8 @@ class HTTPException(DiscordException): The Discord specific error code for the failure. """ - def __init__(self, response: ResponseType, message: Optional[Union[str, Dict[str, Any]]]): - self.response: ResponseType = response + def __init__(self, response: _ResponseType, message: Optional[Union[str, Dict[str, Any]]]): + self.response: _ResponseType = response self.status: int = response.status # type: ignore self.code: int self.text: str |