Fix code style issues with Black

This commit is contained in:
Lint Action
2021-09-05 21:34:20 +00:00
parent a23dae8604
commit 7513c2138f
108 changed files with 5369 additions and 4858 deletions

View File

@@ -32,11 +32,10 @@ if TYPE_CHECKING:
from types import TracebackType
TypingT = TypeVar('TypingT', bound='Typing')
TypingT = TypeVar("TypingT", bound="Typing")
__all__ = ("Typing",)
__all__ = (
'Typing',
)
def _typing_done_callback(fut: asyncio.Future) -> None:
# just retrieve any exception and call it a day
@@ -45,6 +44,7 @@ def _typing_done_callback(fut: asyncio.Future) -> None:
except (asyncio.CancelledError, Exception):
pass
class Typing:
def __init__(self, messageable: Messageable) -> None:
self.loop: asyncio.AbstractEventLoop = messageable._state.loop
@@ -67,7 +67,8 @@ class Typing:
self.task.add_done_callback(_typing_done_callback)
return self
def __exit__(self,
def __exit__(
self,
exc_type: Optional[Type[BaseException]],
exc_value: Optional[BaseException],
traceback: Optional[TracebackType],
@@ -79,7 +80,8 @@ class Typing:
await channel._state.http.send_typing(channel.id)
return self.__enter__()
async def __aexit__(self,
async def __aexit__(
self,
exc_type: Optional[Type[BaseException]],
exc_value: Optional[BaseException],
traceback: Optional[TracebackType],