Skip to content

Commit 413a2e6

Browse files
committed
🐛 version 0.13.5
resolve #44
1 parent 56f2b2e commit 413a2e6

File tree

5 files changed

+15
-68
lines changed

5 files changed

+15
-68
lines changed

nonebot/adapters/satori/compat.py

Lines changed: 0 additions & 51 deletions
This file was deleted.

nonebot/adapters/satori/event.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
from typing import TYPE_CHECKING, TypeVar, Optional
55

66
from nonebot.utils import escape_tag
7-
from nonebot.compat import model_dump, type_validate_python
7+
from nonebot.compat import model_dump, model_validator, type_validate_python
88

99
from nonebot.adapters import Event as BaseEvent
1010

1111
from .element import parse
1212
from .models import Role, User
13-
from .compat import model_validator
1413
from .models import Event as SatoriEvent
1514
from .message import Message, RenderMessage
1615
from .models import MessageObject as SatoriMessage

nonebot/adapters/satori/models.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
from typing import IO, Any, Union, Generic, Literal, TypeVar, ClassVar, Optional
88

99
from pydantic import Field, BaseModel
10-
from nonebot.compat import PYDANTIC_V2, ConfigDict, model_dump
10+
from nonebot.compat import PYDANTIC_V2, ConfigDict, model_dump, field_validator, model_validator
1111

1212
from .utils import log
13-
from .compat import field_validator, model_validator
1413

1514

1615
class ChannelType(IntEnum):
@@ -22,7 +21,7 @@ class ChannelType(IntEnum):
2221

2322
class Channel(BaseModel):
2423
id: str
25-
type: ChannelType
24+
type: ChannelType = Field(default=ChannelType.TEXT)
2625
name: Optional[str] = None
2726
parent_id: Optional[str] = None
2827

pdm.lock

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

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[project]
22
name = "nonebot-adapter-satori"
3-
version = "0.13.4"
3+
version = "0.13.5"
44
description = "Satori Protocol Adapter for Nonebot2"
55
authors = [
66
{name = "RF-Tar-Railt",email = "rf_tar_railt@qq.com"},
77
]
88
dependencies = [
9-
"nonebot2>=2.3.0",
9+
"nonebot2>=2.4.2",
1010
]
1111
requires-python = ">=3.9"
1212
readme = "README.md"
@@ -27,7 +27,7 @@ dev = [
2727
"black>=24.1.1",
2828
"ruff>=0.2.1",
2929
"pre-commit>=3.5.0",
30-
"nonebot2[httpx,websockets]>=2.3.0",
30+
"nonebot2[httpx,websockets]>=2.4.2",
3131
"pydantic>=2.7.4",
3232
]
3333
test = [

0 commit comments

Comments
 (0)