Skip to content

Commit

Permalink
Remove pyhumps, pydantic already knows how to camelize
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Nov 11, 2024
1 parent 692d9e3 commit 1e53dea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion scraper/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ dependencies = [
"types-requests==2.32.0.20240914",
"kiwixstorage==0.9.0",
"pydantic==2.9.1",
"pyhumps==3.8.0",
"schedule==1.2.2",
"beautifulsoup4==4.12.3",
"types-beautifulsoup4==4.12.0.20240907",
Expand Down
4 changes: 2 additions & 2 deletions scraper/src/mindtouch2zim/ui.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from humps import camelize
from pydantic import BaseModel, ConfigDict
from pydantic.alias_generators import to_camel


class CamelModel(BaseModel):
"""Model to transform Python snake_case into JSON camelCase."""

model_config = ConfigDict(alias_generator=camelize, populate_by_name=True)
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)


class PageModel(CamelModel):
Expand Down

0 comments on commit 1e53dea

Please sign in to comment.