mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-26 07:41:20 +00:00
⬆️ auto update by pre-commit hooks (#2565)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
07e6c3f977
commit
4dae23d3bb
@ -12,20 +12,17 @@ async def legacy_event(event):
|
||||
return event
|
||||
|
||||
|
||||
async def not_legacy_event(event: int):
|
||||
...
|
||||
async def not_legacy_event(event: int): ...
|
||||
|
||||
|
||||
class FooEvent(Event):
|
||||
...
|
||||
class FooEvent(Event): ...
|
||||
|
||||
|
||||
async def sub_event(e: FooEvent) -> FooEvent:
|
||||
return e
|
||||
|
||||
|
||||
class BarEvent(Event):
|
||||
...
|
||||
class BarEvent(Event): ...
|
||||
|
||||
|
||||
async def union_event(e: Union[FooEvent, BarEvent]) -> Union[FooEvent, BarEvent]:
|
||||
@ -46,8 +43,7 @@ async def generic_event_none(e: CE) -> CE:
|
||||
return e
|
||||
|
||||
|
||||
async def not_event(e: Union[int, Event]):
|
||||
...
|
||||
async def not_event(e: Union[int, Event]): ...
|
||||
|
||||
|
||||
async def event_type(t: str = EventType()) -> str:
|
||||
|
Reference in New Issue
Block a user