Skip to content

Commit

Permalink
refactor: Replace inflection dependency with pyhumps
Browse files Browse the repository at this point in the history
* [`inflection` last version](https://pypi.org/project/inflection/) is from 2020/08/20
* [`pyhumps` last version](https://pypi.org/project/pyhumps/) is from 2022/10/21

Related:

* #2490 (comment)
  • Loading branch information
edgarrmondragon committed Jun 26, 2024
1 parent cceb643 commit 1e146c9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
26 changes: 13 additions & 13 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ cryptography = ">=3.4.6"
fs = ">=2.4.16"
importlib-metadata = {version = "<8.0.0", python = "<3.12"}
importlib-resources = {version = ">=5.12.0,!=6.2.0,!=6.3.0,!=6.3.1", python = "<3.9"}
inflection = ">=0.5.1"
joblib = ">=1.3.0"
jsonpath-ng = ">=1.5.3"
jsonschema = ">=4.16.0"
packaging = ">=23.1"
pendulum = ">=2.1.0,<4"
pyhumps = ">=3.8.0"
PyJWT = "~=2.4"
python-dateutil = ">=2.8.2"
python-dotenv = ">=0.20"
Expand Down
4 changes: 2 additions & 2 deletions singer_sdk/helpers/_flattening.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import typing as t
from copy import deepcopy

import inflection
import humps
import simplejson as json

DEFAULT_FLATTENING_SEPARATOR = "__"
Expand Down Expand Up @@ -67,7 +67,7 @@ def flatten_key(key_name: str, parent_keys: list[str], separator: str = "__") ->
reduced_key = re.sub(
r"[a-z]",
"",
inflection.camelize(inflected_key[reducer_index]),
humps.camelize(inflected_key[reducer_index]),
)
inflected_key[reducer_index] = (
reduced_key if len(reduced_key) > 1 else inflected_key[reducer_index][:3]
Expand Down

0 comments on commit 1e146c9

Please sign in to comment.