Skip to content

[pre-commit.ci] pre-commit autoupdate #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: "23.3.0"
rev: "25.1.0"
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: "5.12.0"
rev: "6.0.1"
hooks:
- id: isort
name: isort (python)
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