Skip to content

Commit 5067703

Browse files
committed
⬆️ update depends
1 parent 3295c58 commit 5067703

File tree

5 files changed

+1012
-1352
lines changed

5 files changed

+1012
-1352
lines changed

.pre-commit-config.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
default_install_hook_types: [pre-commit, prepare-commit-msg]
2+
ci:
3+
autofix_commit_msg: ":rotating_light: auto fix by pre-commit hooks"
4+
autofix_prs: true
5+
autoupdate_branch: master
6+
autoupdate_schedule: monthly
7+
autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks"
8+
repos:
9+
- repo: https://github.com/hadialqattan/pycln
10+
rev: v2.1.3
11+
hooks:
12+
- id: pycln
13+
args: [--config, pyproject.toml]
14+
15+
- repo: https://github.com/pycqa/isort
16+
rev: 5.12.0
17+
hooks:
18+
- id: isort
19+
stages: [commit]
20+
21+
- repo: https://github.com/psf/black
22+
rev: 23.3.0
23+
hooks:
24+
- id: black
25+
stages: [commit]
26+
27+
- repo: https://github.com/nonebot/nonemoji
28+
rev: v0.1.4
29+
hooks:
30+
- id: nonemoji
31+
stages: [prepare-commit-msg]

nonebot_plugin_manager/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,25 @@
44
from nonebot.params import ShellCommandArgs
55
from nonebot.message import run_preprocessor
66
from nonebot.exception import IgnoredException
7-
from nonebot.plugin import on_shell_command, get_loaded_plugins
7+
from nonebot.plugin import PluginMetadata, on_shell_command, get_loaded_plugins
88
from nonebot.adapters.onebot.v11 import Bot, Event, MessageEvent, GroupMessageEvent
99

1010
from .handle import Handle
1111
from .parser import npm_parser
1212
from .manager import plugin_manager
1313

14+
__plugin_meta__ = PluginMetadata(
15+
name="插件管理器",
16+
description="基于 import hook 的插件管理",
17+
usage="""看 README""",
18+
type="application",
19+
homepage="https://github.com/nonepkg/plugin-manager",
20+
supported_adapters={"~onebot.v11"},
21+
)
22+
1423
npm = on_shell_command("npm", parser=npm_parser, priority=1)
1524

25+
1626
# 在 Matcher 运行前检测其是否启用
1727
@run_preprocessor
1828
async def _(matcher: Matcher, bot: Bot, event: Event):

0 commit comments

Comments
 (0)