Skip to content

Commit 4b8b76c

Browse files
committed
format: 使用StrEnum替换kook适配器中的(str,enum)
1 parent 516d9e2 commit 4b8b76c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

astrbot/core/platform/sources/kook/kook_types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import json
2-
from enum import Enum, IntEnum
2+
from enum import IntEnum, StrEnum
33
from typing import Annotated, Any, Literal
44

55
from pydantic import BaseModel, ConfigDict, Field, model_validator
@@ -36,7 +36,7 @@ class KookMessageType(IntEnum):
3636
SYSTEM = 255
3737

3838

39-
class KookModuleType(str, Enum):
39+
class KookModuleType(StrEnum):
4040
PLAIN_TEXT = "plain-text"
4141
KMARKDOWN = "kmarkdown"
4242
IMAGE = "image"
@@ -311,7 +311,7 @@ class KookMessageSignal(IntEnum):
311311
"""server->client resume ack"""
312312

313313

314-
class KookChannelType(str, Enum):
314+
class KookChannelType(StrEnum):
315315
GROUP = "GROUP"
316316
PERSON = "PERSON"
317317
BROADCAST = "BROADCAST"

0 commit comments

Comments
 (0)