Browse Source

Remove useless whitespace

pull/10109/head
dolfies 4 years ago
parent
commit
9b9ee194c8
  1. 16
      discord/errors.py

16
discord/errors.py

@ -35,8 +35,6 @@ if TYPE_CHECKING:
except ModuleNotFoundError: except ModuleNotFoundError:
_ResponseType = ClientResponse _ResponseType = ClientResponse
from .interactions import Interaction
__all__ = ( __all__ = (
'DiscordException', 'DiscordException',
'ClientException', 'ClientException',
@ -48,6 +46,7 @@ __all__ = (
'DiscordServerError', 'DiscordServerError',
'InvalidData', 'InvalidData',
'InvalidArgument', 'InvalidArgument',
'AuthFailure',
'LoginFailure', 'LoginFailure',
) )
@ -57,7 +56,6 @@ class DiscordException(Exception):
Ideally speaking, this could be caught to handle any exceptions raised from this library. Ideally speaking, this could be caught to handle any exceptions raised from this library.
""" """
pass pass
@ -66,19 +64,16 @@ class ClientException(DiscordException):
These are usually for exceptions that happened due to user input. These are usually for exceptions that happened due to user input.
""" """
pass pass
class NoMoreItems(DiscordException): class NoMoreItems(DiscordException):
"""Exception that is raised when an async iteration operation has no more items.""" """Exception that is raised when an async iteration operation has no more items."""
pass pass
class GatewayNotFound(DiscordException): class GatewayNotFound(DiscordException):
"""An exception that is raised when the gateway for Discord could not be found""" """An exception that is raised when the gateway for Discord could not be found"""
def __init__(self): def __init__(self):
message = 'The gateway to connect to Discord was not found.' message = 'The gateway to connect to Discord was not found.'
super().__init__(message) super().__init__(message)
@ -120,7 +115,6 @@ class HTTPException(DiscordException):
json: Dict[any, any] json: Dict[any, any]
The raw error JSON. The raw error JSON.
""" """
def __init__(self, response: _ResponseType, message: Optional[Union[str, Dict[str, Any]]]): def __init__(self, response: _ResponseType, message: Optional[Union[str, Dict[str, Any]]]):
self.response: _ResponseType = response self.response: _ResponseType = response
self.status: int = response.status # type: ignore self.status: int = response.status # type: ignore
@ -153,7 +147,6 @@ class Forbidden(HTTPException):
Subclass of :exc:`HTTPException` Subclass of :exc:`HTTPException`
""" """
pass pass
@ -162,7 +155,6 @@ class NotFound(HTTPException):
Subclass of :exc:`HTTPException` Subclass of :exc:`HTTPException`
""" """
pass pass
@ -173,7 +165,6 @@ class DiscordServerError(HTTPException):
.. versionadded:: 1.5 .. versionadded:: 1.5
""" """
pass pass
@ -181,7 +172,6 @@ class InvalidData(ClientException):
"""Exception that's raised when the library encounters unknown """Exception that's raised when the library encounters unknown
or invalid data from Discord. or invalid data from Discord.
""" """
pass pass
@ -193,7 +183,6 @@ class InvalidArgument(ClientException):
``TypeError`` except inherited from :exc:`ClientException` and thus ``TypeError`` except inherited from :exc:`ClientException` and thus
:exc:`DiscordException`. :exc:`DiscordException`.
""" """
pass pass
@ -202,9 +191,9 @@ class AuthFailure(ClientException):
fails to log you in from improper credentials or some other misc. fails to log you in from improper credentials or some other misc.
failure. failure.
""" """
pass pass
LoginFailure = AuthFailure LoginFailure = AuthFailure
@ -219,7 +208,6 @@ class ConnectionClosed(ClientException):
reason: :class:`str` reason: :class:`str`
The reason provided for the closure. The reason provided for the closure.
""" """
def __init__(self, socket: ClientWebSocketResponse, *, code: Optional[int] = None): def __init__(self, socket: ClientWebSocketResponse, *, code: Optional[int] = None):
# This exception is just the same exception except # This exception is just the same exception except
# reconfigured to subclass ClientException for users # reconfigured to subclass ClientException for users

Loading…
Cancel
Save