🏷️ add pre-commit flow

This commit is contained in:
yanyongyu
2022-01-15 21:27:43 +08:00
parent cc343c981f
commit 93aec6d3f6
26 changed files with 226 additions and 77 deletions

View File

@ -10,6 +10,7 @@ from typing import Set, Dict, List, Union, Iterable, Optional, Sequence
from nonebot.log import logger
from nonebot.utils import escape_tag
from . import _managers, _current_plugin
from .plugin import Plugin, _new_plugin, _confirm_plugin

View File

@ -5,7 +5,6 @@ from types import ModuleType
from typing import Any, Set, Dict, List, Type, Tuple, Union, Optional
from nonebot.matcher import Matcher
from .manager import _current_plugin
from nonebot.permission import Permission
from nonebot.dependencies import Dependent
from nonebot.typing import (
@ -25,6 +24,8 @@ from nonebot.rule import (
shell_command,
)
from .manager import _current_plugin
def _store_matcher(matcher: Type[Matcher]) -> None:
plugin = _current_plugin.get()

View File

@ -2,9 +2,10 @@ from types import ModuleType
from dataclasses import field, dataclass
from typing import TYPE_CHECKING, Set, Dict, Type, Optional
from .export import Export
from nonebot.matcher import Matcher
from .export import Export
if TYPE_CHECKING:
from .manager import PluginManager