Skip to content

Commit b067431

Browse files
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
1 parent ef53d73 commit b067431

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/fastapi_cli/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def resolve(cls, entrypoint: Optional[str] = None) -> "FastAPIConfig":
4646
# Pydantic v2 uses model_validate, v1 uses parse_obj
4747
# Use getattr to avoid mypy errors with different Pydantic versions
4848
if PYDANTIC_V2:
49-
validate_fn = getattr(cls, "model_validate")
49+
validate_fn = cls.model_validate
5050
else:
51-
validate_fn = getattr(cls, "parse_obj")
51+
validate_fn = cls.parse_obj
5252
return validate_fn(config) # type: ignore[no-any-return]

0 commit comments

Comments
 (0)