Skip to content

Commit

Permalink
🐛 version 0.12.3
Browse files Browse the repository at this point in the history
fix pydantic compat
resolve #26
  • Loading branch information
RF-Tar-Railt committed Jun 18, 2024
1 parent c0973fa commit 3916c18
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 93 deletions.
4 changes: 2 additions & 2 deletions nonebot/adapters/satori/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def field_validator(
check_fields: Optional[bool] = None,
):
if mode == "before":
return validator(__field, *fields, pre=True, check_fields=check_fields, allow_reuse=True)
return validator(__field, *fields, pre=True, check_fields=check_fields or True, allow_reuse=True)
else:
return validator(__field, *fields, check_fields=check_fields, allow_reuse=True)
return validator(__field, *fields, check_fields=check_fields or True, allow_reuse=True)

@overload
def model_validator(*, mode: Literal["before"]): ...
Expand Down
2 changes: 1 addition & 1 deletion nonebot/adapters/satori/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class PageResult(GenericModel, Generic[T]):
class Config:
extra = "allow"

class PageDequeResult(PageResult[T]):
class PageDequeResult(PageResult[T], Generic[T]):
prev: Optional[str] = None


Expand Down
Loading

0 comments on commit 3916c18

Please sign in to comment.