Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 29, 2024
1 parent 3ca1dc1 commit 13c13e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/graia/amnesia/builtins/asgi/asgitypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,9 @@ class LifespanShutdownFailedEvent(TypedDict):


class ASGI2Protocol(Protocol):
def __init__(self, scope: Scope) -> None:
...
def __init__(self, scope: Scope) -> None: ...

async def __call__(self, receive: ASGIReceiveCallable, send: ASGISendCallable) -> None:
...
async def __call__(self, receive: ASGIReceiveCallable, send: ASGISendCallable) -> None: ...


ASGI2Application = Type[ASGI2Protocol]
Expand Down
9 changes: 3 additions & 6 deletions src/graia/amnesia/message/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,13 @@ def join(self, *chains: Self | Iterable[Self]) -> Self:
__contains__ = has

@overload
def __getitem__(self, item: type[E]) -> list[E]:
...
def __getitem__(self, item: type[E]) -> list[E]: ...

@overload
def __getitem__(self, item: int) -> Element:
...
def __getitem__(self, item: int) -> Element: ...

@overload
def __getitem__(self, item: slice) -> Self:
...
def __getitem__(self, item: slice) -> Self: ...

def __getitem__(self, item: type[Element] | int | slice) -> Any:
"""取出子消息链, 或元素.
Expand Down

0 comments on commit 13c13e0

Please sign in to comment.