Skip to content

Commit

Permalink
style: Format
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Dec 3, 2024
1 parent b41bf46 commit c726fc7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/griffe_pydantic/static.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ def pydantic_validator(func: Function) -> ExprCall | None:
A decorator value (Griffe expression).
"""
for decorator in func.decorators:
if isinstance(decorator.value, ExprCall) and decorator.callable_path in {"pydantic.field_validator", "pydantic.model_validator"}:
if isinstance(decorator.value, ExprCall) and decorator.callable_path in {
"pydantic.field_validator",
"pydantic.model_validator",
}:
return decorator.value
return None

Expand Down

0 comments on commit c726fc7

Please sign in to comment.