Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw committed Jul 12, 2023
1 parent 2a46fb0 commit ea55fe5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fastapi_utils/api_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class APIModel(BaseModel):

model_config = ConfigDict(
from_attributes=True,
allow_population_by_field_name=True,
populate_by_name=True,
alias_generator=partial(snake2camel, start_lower=True),
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_api_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ class Model(APIModel):
some_field: str

assert Model(some_field="a").some_field == "a"
assert Model(someField="a").some_field == "a" # type: ignore[call-arg]
assert Model(someField="a").some_field == "a"

0 comments on commit ea55fe5

Please sign in to comment.