Skip to content

Commit

Permalink
Fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
hypergonial committed Jan 7, 2024
1 parent c4df7dc commit 0feca94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions arc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def subscribe(self, event_type: type[EventT], callback: EventCallbackT[EventT])
The event type to subscribe to.
`EventT` must be a subclass of `hikari.events.base_events.Event`.
callback : t.Callable[t.Concatenate[EventT, ...], t.Awaitable[None]]
callback : t.Callable[EventT], t.Awaitable[None]]
The callback to call when the event is dispatched.
"""
self.app.event_manager.subscribe(event_type, callback) # pyright: ignore reportGeneralTypeIssues
Expand All @@ -158,7 +158,7 @@ def unsubscribe(self, event_type: type[EventT], callback: EventCallbackT[EventT]
----------
event_type : type[EventT]
The event type to unsubscribe from.
callback : t.Callable[t.Concatenate[EventT, ...], t.Awaitable[None]]
callback : t.Callable[[EventT], t.Awaitable[None]]
The callback to unsubscribe.
"""
self.app.event_manager.unsubscribe(event_type, callback) # pyright: ignore reportGeneralTypeIssues
Expand All @@ -178,7 +178,7 @@ def listen(self, *event_types: t.Type[EventT]) -> t.Callable[[EventCallbackT[Eve
Returns
-------
t.Callable[t.Callable[t.Concatenate[EventT, ...], t.Awaitable[None]]], t.Callable[t.Concatenate[EventT, ...], t.Awaitable[None]]]
t.Callable[t.Callable[[EventT], t.Awaitable[None]]], t.Callable[[EventT], t.Awaitable[None]]]
A decorator for a coroutine function that passes it to
`EventManager.subscribe` before returning the function
reference.
Expand Down
2 changes: 1 addition & 1 deletion arc/internal/sigparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def parse_command_signature( # noqa: C901
return options


def parse_event_signature(func: t.Callable[t.Concatenate[EventT, ...], t.Awaitable[None]]) -> list[type[EventT]]:
def parse_event_signature(func: t.Callable[[EventT], t.Awaitable[None]]) -> list[type[EventT]]:
"""Parse an event callback function's signature and return the event type, ignore other type hints."""
hints = t.get_type_hints(func)

Expand Down

0 comments on commit 0feca94

Please sign in to comment.