Skip to content

Commit 7d6e699

Browse files
committed
Format stage.py
1 parent 159cc1f commit 7d6e699

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

astrbot/core/pipeline/respond/stage.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,14 @@ class RespondStage(Stage):
3535
Comp.WechatEmoji: lambda comp: comp.md5 is not None, # 微信表情
3636
Comp.Json: lambda comp: bool(comp.data), # Json 卡片
3737
Comp.Share: lambda comp: bool(comp.url) or bool(comp.title),
38-
Comp.Music: lambda comp: (comp.id and comp._type and comp._type != 'custom') or (comp._type == 'custom' and comp.url and comp.audio and comp.title), # 音乐分享
38+
Comp.Music: lambda comp: (
39+
(comp.id and comp._type and comp._type != "custom")
40+
or (comp._type == "custom" and comp.url and comp.audio and comp.title)
41+
), # 音乐分享
3942
Comp.Forward: lambda comp: bool(comp.id), # 合并转发
40-
Comp.Location: lambda comp: bool(comp.lat is not None and comp.lon is not None), # 位置
43+
Comp.Location: lambda comp: bool(
44+
comp.lat is not None and comp.lon is not None
45+
), # 位置
4146
Comp.Contact: lambda comp: bool(comp._type and comp.id), # 推荐好友 or 群
4247
Comp.Shake: lambda _: True, # 窗口抖动(戳一戳)
4348
Comp.Dice: lambda _: True, # 掷骰子魔法表情

0 commit comments

Comments
 (0)