From 7ebae277d1be4f3f2ea3c9d286d8973ce234cea0 Mon Sep 17 00:00:00 2001 From: yanyongyu Date: Sat, 25 Dec 2021 17:44:53 +0800 Subject: [PATCH] :fire: remove unused import --- nonebot/adapters/_bot.py | 2 +- nonebot/message.py | 12 +----------- nonebot/typing.py | 2 -- nonebot/utils.py | 2 -- 4 files changed, 2 insertions(+), 16 deletions(-) diff --git a/nonebot/adapters/_bot.py b/nonebot/adapters/_bot.py index e72a0d26..058b9ec8 100644 --- a/nonebot/adapters/_bot.py +++ b/nonebot/adapters/_bot.py @@ -2,7 +2,7 @@ import abc import asyncio from functools import partial from typing_extensions import Protocol -from typing import TYPE_CHECKING, Any, Set, Tuple, Union, Optional +from typing import TYPE_CHECKING, Any, Set, Union, Optional from nonebot.log import logger from nonebot.config import Config diff --git a/nonebot/message.py b/nonebot/message.py index d09a64e0..a3b41a17 100644 --- a/nonebot/message.py +++ b/nonebot/message.py @@ -8,16 +8,7 @@ NoneBot 内部处理并按优先级分发事件给所有事件响应器,提供 import asyncio from datetime import datetime from contextlib import AsyncExitStack -from typing import ( - TYPE_CHECKING, - Any, - Set, - Dict, - List, - Type, - Optional, - Coroutine, -) +from typing import TYPE_CHECKING, Any, Set, Dict, Type, Optional, Coroutine from nonebot import params from nonebot.log import logger @@ -33,7 +24,6 @@ from nonebot.exception import ( ) from nonebot.typing import ( T_State, - T_Handler, T_DependencyCache, T_RunPreProcessor, T_RunPostProcessor, diff --git a/nonebot/typing.py b/nonebot/typing.py index 3e28a3ea..d4ff66b4 100644 --- a/nonebot/typing.py +++ b/nonebot/typing.py @@ -24,10 +24,8 @@ from typing import ( Union, TypeVar, Callable, - NoReturn, Optional, Awaitable, - ForwardRef, ) if TYPE_CHECKING: diff --git a/nonebot/utils.py b/nonebot/utils.py index 5bbcbee1..50044074 100644 --- a/nonebot/utils.py +++ b/nonebot/utils.py @@ -8,11 +8,9 @@ from contextlib import asynccontextmanager from typing_extensions import ParamSpec, get_args, get_origin from typing import ( Any, - Dict, Type, Tuple, Union, - Generic, TypeVar, Callable, Optional,