diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index b7232baa..f1f2cf14 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -2,6 +2,9 @@ name: Code Coverage on: push: + branches: + - master + - dev pull_request: jobs: diff --git a/.github/workflows/website-deploy.yml b/.github/workflows/website-deploy.yml index a0ae5991..892065a0 100644 --- a/.github/workflows/website-deploy.yml +++ b/.github/workflows/website-deploy.yml @@ -2,6 +2,9 @@ name: Build Upload Site on: push: + branches: + - master + - dev pull_request_target: jobs: diff --git a/nonebot/config.py b/nonebot/config.py index 4fa4edf9..ef9e8fb1 100644 --- a/nonebot/config.py +++ b/nonebot/config.py @@ -12,16 +12,7 @@ import os from pathlib import Path from datetime import timedelta from ipaddress import IPv4Address -from typing import ( - TYPE_CHECKING, - Any, - Set, - Dict, - Tuple, - Union, - Mapping, - Optional, -) +from typing import TYPE_CHECKING, Any, Set, Dict, Tuple, Union, Mapping, Optional from pydantic import BaseSettings, IPvAnyAddress from pydantic.env_settings import ( diff --git a/nonebot/drivers/aiohttp.py b/nonebot/drivers/aiohttp.py index bdfafaa4..971ce4ac 100644 --- a/nonebot/drivers/aiohttp.py +++ b/nonebot/drivers/aiohttp.py @@ -23,12 +23,7 @@ from nonebot.drivers import Request, Response from nonebot.exception import WebSocketClosed from nonebot.drivers._block_driver import BlockDriver from nonebot.drivers import WebSocket as BaseWebSocket -from nonebot.drivers import ( - HTTPVersion, - ForwardMixin, - ForwardDriver, - combine_driver, -) +from nonebot.drivers import HTTPVersion, ForwardMixin, ForwardDriver, combine_driver try: import aiohttp diff --git a/nonebot/matcher.py b/nonebot/matcher.py index db983319..254334e2 100644 --- a/nonebot/matcher.py +++ b/nonebot/matcher.py @@ -28,13 +28,7 @@ from nonebot.rule import Rule from nonebot.log import logger from nonebot.dependencies import Dependent from nonebot.permission import USER, Permission -from nonebot.adapters import ( - Bot, - Event, - Message, - MessageSegment, - MessageTemplate, -) +from nonebot.adapters import Bot, Event, Message, MessageSegment, MessageTemplate from nonebot.consts import ( ARG_KEY, RECEIVE_KEY, diff --git a/nonebot/permission.py b/nonebot/permission.py index 28f4e632..20a6ffe9 100644 --- a/nonebot/permission.py +++ b/nonebot/permission.py @@ -16,13 +16,7 @@ from nonebot.adapters import Bot, Event from nonebot.dependencies import Dependent from nonebot.exception import SkippedException from nonebot.typing import T_DependencyCache, T_PermissionChecker -from nonebot.params import ( - BotParam, - EventType, - EventParam, - DependParam, - DefaultParam, -) +from nonebot.params import BotParam, EventType, EventParam, DependParam, DefaultParam async def _run_coro_with_catch(coro: Coroutine[Any, Any, Any]): diff --git a/nonebot/plugin/on.py b/nonebot/plugin/on.py index 440b2351..266a0fbc 100644 --- a/nonebot/plugin/on.py +++ b/nonebot/plugin/on.py @@ -13,12 +13,7 @@ from typing import Any, Set, Dict, List, Type, Tuple, Union, Optional from nonebot.matcher import Matcher from nonebot.permission import Permission from nonebot.dependencies import Dependent -from nonebot.typing import ( - T_State, - T_Handler, - T_RuleChecker, - T_PermissionChecker, -) +from nonebot.typing import T_State, T_Handler, T_RuleChecker, T_PermissionChecker from nonebot.rule import ( Rule, ArgumentParser, diff --git a/nonebot/plugin/on.pyi b/nonebot/plugin/on.pyi index 8cf990fd..68f6873a 100644 --- a/nonebot/plugin/on.pyi +++ b/nonebot/plugin/on.pyi @@ -5,12 +5,7 @@ from nonebot.matcher import Matcher from nonebot.permission import Permission from nonebot.dependencies import Dependent from nonebot.rule import Rule, ArgumentParser -from nonebot.typing import ( - T_State, - T_Handler, - T_RuleChecker, - T_PermissionChecker, -) +from nonebot.typing import T_State, T_Handler, T_RuleChecker, T_PermissionChecker def on( type: str = "", diff --git a/tests/test_matcher.py b/tests/test_matcher.py index def49f42..f1d66054 100644 --- a/tests/test_matcher.py +++ b/tests/test_matcher.py @@ -78,10 +78,7 @@ async def test_matcher(app: App, load_plugin): @pytest.mark.asyncio async def test_type_updater(app: App, load_plugin): - from plugins.matcher.matcher_type import ( - test_type_updater, - test_custom_updater, - ) + from plugins.matcher.matcher_type import test_type_updater, test_custom_updater event = make_fake_event()()