Skip to content

Commit 939e119

Browse files
🚨 auto fix by pre-commit hooks
1 parent 81d50c7 commit 939e119

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

src/nonebot_plugin_alconna/pattern.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ def converter(self, _seg: Segment):
124124

125125
@deprecated("Use `select().first` instead.")
126126
def select_first(
127-
seg: Union[type[segment.TS], BasePattern[segment.TS, Segment, Any]]
127+
seg: Union[type[segment.TS], BasePattern[segment.TS, Segment, Any]],
128128
) -> BasePattern[segment.TS, Segment, Literal[MatchMode.TYPE_CONVERT]]:
129129
return select(seg).first
130130

131131

132132
@deprecated("Use `select().last` instead.")
133133
def select_last(
134-
seg: Union[type[segment.TS], BasePattern[segment.TS, Segment, Any]]
134+
seg: Union[type[segment.TS], BasePattern[segment.TS, Segment, Any]],
135135
) -> BasePattern[segment.TS, Segment, Literal[MatchMode.TYPE_CONVERT]]:
136136
return select(seg).last
137137

src/nonebot_plugin_alconna/uniseg/exporter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,19 @@ async def _auto_fallback(seg: Segment, bot: Union[Bot, None]):
103103

104104
@overload
105105
def export(
106-
func: Callable[[Any, TS, Union[Bot, None]], Awaitable[TMS]]
106+
func: Callable[[Any, TS, Union[Bot, None]], Awaitable[TMS]],
107107
) -> Callable[[Any, TS, Union[Bot, None]], Awaitable[TMS]]: ...
108108

109109

110110
@overload
111111
def export(
112-
func: Callable[[Any, TS, Union[Bot, None]], Awaitable[list[TMS]]]
112+
func: Callable[[Any, TS, Union[Bot, None]], Awaitable[list[TMS]]],
113113
) -> Callable[[Any, TS, Union[Bot, None]], Awaitable[list[TMS]]]: ...
114114

115115

116116
@overload
117117
def export(
118-
func: Callable[[Any, TS, Union[Bot, None]], Awaitable[Union[TMS, list[TMS]]]]
118+
func: Callable[[Any, TS, Union[Bot, None]], Awaitable[Union[TMS, list[TMS]]]],
119119
) -> Callable[[Any, TS, Union[Bot, None]], Awaitable[Union[TMS, list[TMS]]]]: ...
120120

121121

@@ -124,7 +124,7 @@ def export(
124124
Callable[[Any, TS, Union[Bot, None]], Awaitable[TMS]],
125125
Callable[[Any, TS, Union[Bot, None]], Awaitable[list[TMS]]],
126126
Callable[[Any, TS, Union[Bot, None]], Awaitable[Union[TMS, list[TMS]]]],
127-
]
127+
],
128128
):
129129
sig = inspect.signature(func)
130130
func.__export_target__ = sig.parameters["seg"].annotation

src/nonebot_plugin_alconna/uniseg/segment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ def _handler(
10381038
["MessageExporter", TS, Union[Bot, None], Union[bool, FallbackStrategy]],
10391039
Awaitable[list[MessageSegment]],
10401040
],
1041-
]
1041+
],
10421042
):
10431043
cls.EXPORTERS[custom_type] = func # type: ignore
10441044
return func

tests/test_buttons.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ async def _(row: int):
9595
)
9696

9797
async with app.test_matcher(matcher) as ctx:
98-
from nonebot.adapters.qq.models import Action
98+
from nonebot.adapters.qq.models import (
99+
Action,
100+
)
99101
from nonebot.adapters.qq.models import Button as QQButton
100102
from nonebot.adapters.qq import Bot, Adapter, Message, MessageSegment
101103
from nonebot.adapters.qq.models import (

tests/test_qq.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
from nonebug import App
55
from arclet.alconna import Args, Alconna
66
from nonebot import on_message, get_adapter
7-
from nonebot.adapters.qq.models import Action
7+
from nonebot.adapters.qq.models import (
8+
Action,
9+
)
810
from nonebot.adapters.qq.models import Button as QQButton
911
from nonebot.adapters.qq import Bot, Adapter, Message, MessageSegment
1012
from nonebot.adapters.qq.models import (

0 commit comments

Comments
 (0)