utg-base 1.5.0__py3-none-any.whl → 1.5.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
utg_base/utils/data.py
CHANGED
|
@@ -24,6 +24,10 @@ def deep_map(data: dict | list, func_cond, func_map, in_place=True):
|
|
|
24
24
|
return data
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
def deep_round(data: dict | list, ndigits: int, in_place=True):
|
|
28
|
+
return deep_map(data, lambda value: isinstance(value, float), lambda value: round(value, ndigits), in_place)
|
|
29
|
+
|
|
30
|
+
|
|
27
31
|
def to_numeric_or_none(*args):
|
|
28
32
|
_is_iterable = isinstance(args[0], Iterable) and not isinstance(args[0], str)
|
|
29
33
|
if _is_iterable:
|
|
@@ -42,12 +42,12 @@ utg_base/references_api/utils.py,sha256=VzQMnGeWC0I-6BkK_9Lo9eSH6wd4C766oQ84n7SB
|
|
|
42
42
|
utg_base/services/__init__.py,sha256=LqtwUiqEZPIbKRGJfve5D5m3ucV6Kw1Nbo5Jnj_hPhY,37
|
|
43
43
|
utg_base/services/base_api.py,sha256=RBwzO6frYs2TeMKkAohUxtH9JhDTgmb9G5BFijajg68,5207
|
|
44
44
|
utg_base/utils/__init__.py,sha256=5XmIPVpOl9Tjtzkx_bBeZD1uCpBE-R3WX6yiJii9Ip0,101
|
|
45
|
-
utg_base/utils/data.py,sha256=
|
|
45
|
+
utg_base/utils/data.py,sha256=gbDEmEcmtaP1iCKEPG5I-q4orl8N3jvVc5eFNkkhG3c,2840
|
|
46
46
|
utg_base/utils/date.py,sha256=thcbK6RgTUYZfs4_vW5ucuu2e8H0rei6tv7SEC72iwM,3612
|
|
47
47
|
utg_base/utils/dict_util.py,sha256=ipdCZO8aTukGQ319OWHb2Ij5MNtV-FioJQ4qCX3Th48,758
|
|
48
48
|
utg_base/utils/response_processors.py,sha256=WdZQL49wOJqCIY2MucAI6sez_llCqih0v_ltQa-mv7k,687
|
|
49
49
|
utg_base/utils/sql.py,sha256=rqIWcSjdjIMszdRnsnhV5TTYB8W17RPOujIQA9rKC_Y,762
|
|
50
50
|
utg_base/utils/translation.py,sha256=HAUB64h0Maw82ehCoi0Yb6V6gj1Y5l5RMsv8_FMoV2U,456
|
|
51
|
-
utg_base-1.5.
|
|
52
|
-
utg_base-1.5.
|
|
53
|
-
utg_base-1.5.
|
|
51
|
+
utg_base-1.5.1.dist-info/METADATA,sha256=vNvfSBSIv7V-dQA2MxM1Fcj-bU6wxSDiBrWAEh9mr1U,881
|
|
52
|
+
utg_base-1.5.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
53
|
+
utg_base-1.5.1.dist-info/RECORD,,
|
|
File without changes
|