Skip to content

Commit b8d7382

Browse files
committed
🔖 version 0.62.0
1 parent 090673b commit b8d7382

18 files changed

Lines changed: 195 additions & 191 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,14 @@ ci:
66
autoupdate_schedule: monthly
77
autoupdate_commit_msg: ':arrow_up: auto update by pre-commit hooks'
88
repos:
9-
- repo: https://github.com/pycqa/isort
10-
rev: 5.13.2
11-
hooks:
12-
- id: isort
13-
stages: [pre-commit]
14-
159
- repo: https://github.com/psf/black-pre-commit-mirror
16-
rev: 26.1.0
10+
rev: 26.3.0
1711
hooks:
1812
- id: black
1913
stages: [pre-commit]
2014

2115
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: v0.15.4
16+
rev: v0.15.9
2317
hooks:
2418
- id: ruff
2519
args: [--fix, --exit-non-zero-on-fix]

README.md

Lines changed: 28 additions & 27 deletions
Large diffs are not rendered by default.

pdm.lock

Lines changed: 113 additions & 111 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,24 @@ include = '\.pyi?$'
3939
extend-exclude = '''
4040
'''
4141

42-
[tool.isort]
43-
profile = "black"
44-
line_length = 120
45-
skip_gitignore = true
46-
force_sort_within_sections = false
47-
extra_standard_library = ["typing_extensions"]
42+
#[tool.isort]
43+
#profile = "black"
44+
#line_length = 120
45+
#skip_gitignore = true
46+
#force_sort_within_sections = false
47+
#extra_standard_library = ["typing_extensions"]
4848

4949
[tool.ruff]
5050
line-length = 120
5151
target-version = "py310"
52+
respect-gitignore = true
5253

5354
[tool.ruff.lint]
5455
select = [
5556
"F", # pyflakes
5657
"E", # pycodestyle errors
5758
"W", # pycodestyle warnings
58-
# "I", # isort
59+
"I", # isort
5960
"N", # PEP8-naming
6061
"UP", # pyupgrade
6162
"YTT", # flake8-2020
@@ -148,6 +149,10 @@ ignore = [
148149
]
149150
flake8-quotes = { inline-quotes = "double", multiline-quotes = "double" }
150151

152+
[tool.ruff.lint.isort]
153+
force-sort-within-sections = false
154+
extra-standard-library = ["typing_extensions"]
155+
151156
[tool.ruff.lint.flake8-annotations]
152157
mypy-init-return = true
153158

@@ -166,7 +171,7 @@ reportSelfClsParameterName = false
166171
[tool.pdm.scripts]
167172
test = "pytest -v -W ignore ./tests/"
168173
format = { composite = [
169-
"isort ./src/ ./example/ ./tests/",
174+
"ruff check --select I --fix ./src/ ./example/ ./tests/",
170175
"black ./src/ ./example/ ./tests/",
171176
"ruff check ./src/ ./example/ ./tests/",
172177
] }
@@ -177,7 +182,6 @@ asyncio_default_fixture_loop_scope = "session"
177182

178183
[dependency-groups]
179184
dev = [
180-
"isort==5.13.2",
181185
"black>=25.9.0",
182186
"loguru>=0.7.3",
183187
"ruff>=0.14.0",
@@ -218,6 +222,7 @@ dev = [
218222
"pytest-asyncio==0.26.0",
219223
"nonebot-adapter-bilibili-live>=0.2.4",
220224
"nonebot-adapter-yunhu>=0.1.6",
225+
"nonebot-adapter-vocechat>=0.1.8",
221226
]
222227
test = [
223228
"nonebug>=0.4.3",

src/nonebot_plugin_alconna/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
from .uniseg import patch_matcher_send as patch_matcher_send
142142
from .uniseg import patch_saa as patch_saa
143143

144-
__version__ = "0.61.1"
144+
__version__ = "0.62.0"
145145
__supported_adapters__ = set(m.value for m in SupportAdapterModule.__members__.values()) # noqa: C401
146146
__plugin_meta__ = PluginMetadata(
147147
name="Alconna 插件",

src/nonebot_plugin_alconna/matcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
import inspect
44
import random
55
import weakref
6+
from _weakref import _remove_dead_weakref # type: ignore
67
from collections.abc import Iterable
78
from contextlib import contextmanager
89
from datetime import datetime, timedelta
910
from types import FunctionType
1011
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Literal, NoReturn, Protocol, TypeVar, cast, overload
1112
from typing_extensions import Self
1213

13-
from _weakref import _remove_dead_weakref # type: ignore
1414
from arclet.alconna import Alconna, Arg, Args, ShortcutArgs, command_manager
1515
from arclet.alconna.tools import AlconnaFormat
1616
from arclet.alconna.typing import ShortcutRegWrapper, _AllParamPattern

src/nonebot_plugin_alconna/uniseg/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
from .tools import image_fetch as image_fetch
6565
from .tools import reply_fetch as reply_fetch
6666

67-
__version__ = "0.61.1"
67+
__version__ = "0.62.0"
6868

6969
__plugin_meta__ = PluginMetadata(
7070
name="Universal Segment 插件",

src/nonebot_plugin_alconna/uniseg/adapters/discord/exporter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33

44
from nonebot.adapters import Bot, Event
55
from nonebot.adapters.discord.api import SnowflakeType
6-
from nonebot.adapters.discord.api.model import ActionRow
6+
from nonebot.adapters.discord.api.model import ActionRow, Channel, MessageGet, TextInput
77
from nonebot.adapters.discord.api.model import Button as ButtonModel
8-
from nonebot.adapters.discord.api.model import Channel, MessageGet, TextInput
98
from nonebot.adapters.discord.api.types import ButtonStyle, ChannelType, TextInputStyle
109
from nonebot.adapters.discord.bot import Bot as DiscordBot
1110
from nonebot.adapters.discord.event import DirectMessageCreateEvent, GuildMessageCreateEvent, MessageEvent

src/nonebot_plugin_alconna/uniseg/adapters/github/exporter.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
from nonebot.adapters import Bot, Event
2-
from nonebot.adapters.github.event import CommitCommentCreated # type: ignore
3-
from nonebot.adapters.github.event import IssueCommentCreated # type: ignore
4-
from nonebot.adapters.github.event import PullRequestReviewCommentCreated # type: ignore
2+
from nonebot.adapters.github.event import (
3+
CommitCommentCreated, # type: ignore
4+
IssueCommentCreated, # type: ignore
5+
PullRequestReviewCommentCreated, # type: ignore
6+
)
57
from nonebot.adapters.github.message import Message, MessageSegment # type: ignore
68

79
from nonebot_plugin_alconna.uniseg.constraint import SupportScope

src/nonebot_plugin_alconna/uniseg/adapters/kook/builder.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
from nonebot.adapters.kaiheila import Bot as KaiheilaBot
77
from nonebot.adapters.kaiheila.event import MessageEvent
88
from nonebot.adapters.kaiheila.message import Audio as AudioSegment
9-
from nonebot.adapters.kaiheila.message import Card
10-
from nonebot.adapters.kaiheila.message import File as FileSegment
11-
from nonebot.adapters.kaiheila.message import Image as ImageSegment
129
from nonebot.adapters.kaiheila.message import (
10+
Card,
1311
KMarkdown,
1412
Mention,
1513
MentionAll,
1614
MentionHere,
1715
MentionRole,
1816
MessageSegment,
1917
Quote,
18+
VirtualMessageSegment,
2019
)
20+
from nonebot.adapters.kaiheila.message import File as FileSegment
21+
from nonebot.adapters.kaiheila.message import Image as ImageSegment
2122
from nonebot.adapters.kaiheila.message import Video as VideoSegment
22-
from nonebot.adapters.kaiheila.message import VirtualMessageSegment
2323

2424
from nonebot_plugin_alconna.uniseg.builder import MessageBuilder, build
2525
from nonebot_plugin_alconna.uniseg.constraint import SupportAdapter

0 commit comments

Comments
 (0)