mirror of
https://github.com/nonebot/nonebot2.git
synced 2026-02-26 20:54:44 +00:00
💥 Remove: 移除 Python 3.9 支持 (#3860)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import TypeVar, Union
|
||||
from typing import TypeVar
|
||||
|
||||
from nonebot.adapters import Bot
|
||||
|
||||
@@ -28,7 +28,7 @@ async def sub_bot(b: FooBot) -> FooBot:
|
||||
class BarBot(Bot): ...
|
||||
|
||||
|
||||
async def union_bot(b: Union[FooBot, BarBot]) -> Union[FooBot, BarBot]:
|
||||
async def union_bot(b: FooBot | BarBot) -> FooBot | BarBot:
|
||||
return b
|
||||
|
||||
|
||||
@@ -46,4 +46,4 @@ async def generic_bot_none(b: CB) -> CB:
|
||||
return b
|
||||
|
||||
|
||||
async def not_bot(b: Union[int, Bot]): ...
|
||||
async def not_bot(b: int | Bot): ...
|
||||
|
||||
Reference in New Issue
Block a user