Skip to content

Commit

Permalink
🚨 auto fix by pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jan 31, 2025
1 parent 604fb7d commit 8725d75
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions nonebot/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,17 @@ def field_validator(
check_fields: Optional[bool] = None,
):
if mode == "before":
return validator(field, *fields, pre=True, check_fields=check_fields or True, 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 or True, allow_reuse=True)
return validator(
field, *fields, check_fields=check_fields or True, allow_reuse=True
)

def model_fields(model: type[BaseModel]) -> list[ModelField]:
"""Get field list of a model."""
Expand Down

0 comments on commit 8725d75

Please sign in to comment.