dycw-utilities 0.150.7__py3-none-any.whl → 0.150.8__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.
- {dycw_utilities-0.150.7.dist-info → dycw_utilities-0.150.8.dist-info}/METADATA +1 -1
- {dycw_utilities-0.150.7.dist-info → dycw_utilities-0.150.8.dist-info}/RECORD +7 -7
- utilities/__init__.py +1 -1
- utilities/text.py +20 -1
- {dycw_utilities-0.150.7.dist-info → dycw_utilities-0.150.8.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.150.7.dist-info → dycw_utilities-0.150.8.dist-info}/entry_points.txt +0 -0
- {dycw_utilities-0.150.7.dist-info → dycw_utilities-0.150.8.dist-info}/licenses/LICENSE +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
utilities/__init__.py,sha256=
|
1
|
+
utilities/__init__.py,sha256=YVjGN81XwOvDb88xy84S4gzjgPT1NkOE5z4MHUAmlJk,60
|
2
2
|
utilities/altair.py,sha256=92E2lCdyHY4Zb-vCw6rEJIsWdKipuu-Tu2ab1ufUfAk,9079
|
3
3
|
utilities/asyncio.py,sha256=2m2a2C-Qgc6OHTTHL332-t66A7xDITt_SORT7a1DJWo,16792
|
4
4
|
utilities/atomicwrites.py,sha256=xcOWenTBRS0oat3kg7Sqe51AohNThMQ2ixPL7QCG8hw,5795
|
@@ -71,7 +71,7 @@ utilities/sqlalchemy_polars.py,sha256=18AoEbeNJUKF3-5hroNy9J5LQwS_QJAXbMfKc9sCht
|
|
71
71
|
utilities/statsmodels.py,sha256=koyiBHvpMcSiBfh99wFUfSggLNx7cuAw3rwyfAhoKpQ,3410
|
72
72
|
utilities/string.py,sha256=MB0X6UPTUc06JdAdj-PctZ238IXeCjE5dAJibNw6ZrU,587
|
73
73
|
utilities/tempfile.py,sha256=HxB2BF28CcecDJLQ3Bx2Ej-Pb6RJc6W9ngSpB9CnP4k,2018
|
74
|
-
utilities/text.py,sha256=
|
74
|
+
utilities/text.py,sha256=bupgC6ILTjmcJKSUGloStzmWuj2Ke0knvVKE2mWLwAM,11619
|
75
75
|
utilities/threading.py,sha256=GvBOp4CyhHfN90wGXZuA2VKe9fGzMaEa7oCl4f3nnPU,1009
|
76
76
|
utilities/timer.py,sha256=oXfTii6ymu57niP0BDGZjFD55LEHi2a19kqZKiTgaFQ,2588
|
77
77
|
utilities/traceback.py,sha256=zofhzIedpUHrzDNiRJDVzm_wuu_tlTQvVqK4quxVlgM,9151
|
@@ -89,8 +89,8 @@ utilities/zoneinfo.py,sha256=oEH-nL3t4h9uawyZqWDtNtDAl6M-CLpLYGI_nI6DulM,1971
|
|
89
89
|
utilities/pytest_plugins/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
|
90
90
|
utilities/pytest_plugins/pytest_randomly.py,sha256=NXzCcGKbpgYouz5yehKb4jmxmi2SexKKpgF4M65bi10,414
|
91
91
|
utilities/pytest_plugins/pytest_regressions.py,sha256=Iwhfv_OJH7UCPZCfoh7ugZ2Xjqjil-BBBsOb8sDwiGI,1471
|
92
|
-
dycw_utilities-0.150.
|
93
|
-
dycw_utilities-0.150.
|
94
|
-
dycw_utilities-0.150.
|
95
|
-
dycw_utilities-0.150.
|
96
|
-
dycw_utilities-0.150.
|
92
|
+
dycw_utilities-0.150.8.dist-info/METADATA,sha256=OiyG-fA0Ts1JGZX-Nwyk2LDSBdYUanaWWVN-9th7WH0,1696
|
93
|
+
dycw_utilities-0.150.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
94
|
+
dycw_utilities-0.150.8.dist-info/entry_points.txt,sha256=BOD_SoDxwsfJYOLxhrSXhHP_T7iw-HXI9f2WVkzYxvQ,135
|
95
|
+
dycw_utilities-0.150.8.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
|
96
|
+
dycw_utilities-0.150.8.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/text.py
CHANGED
@@ -9,7 +9,7 @@ from re import IGNORECASE, Match, escape, search
|
|
9
9
|
from textwrap import dedent
|
10
10
|
from threading import get_ident
|
11
11
|
from time import time_ns
|
12
|
-
from typing import TYPE_CHECKING, Any, Literal, overload, override
|
12
|
+
from typing import TYPE_CHECKING, Any, ClassVar, Literal, overload, override
|
13
13
|
from uuid import uuid4
|
14
14
|
|
15
15
|
from utilities.iterables import CheckDuplicatesError, check_duplicates, transpose
|
@@ -385,6 +385,24 @@ def _escape_separator(*, separator: str = DEFAULT_SEPARATOR) -> str:
|
|
385
385
|
##
|
386
386
|
|
387
387
|
|
388
|
+
class secret_str(str): # noqa: N801
|
389
|
+
"""A string with an obfuscated representation."""
|
390
|
+
|
391
|
+
__slots__ = ()
|
392
|
+
_REPR: ClassVar[str] = "***"
|
393
|
+
|
394
|
+
@override
|
395
|
+
def __repr__(self) -> str:
|
396
|
+
return self._REPR
|
397
|
+
|
398
|
+
@override
|
399
|
+
def __str__(self) -> str:
|
400
|
+
return self._REPR
|
401
|
+
|
402
|
+
|
403
|
+
##
|
404
|
+
|
405
|
+
|
388
406
|
def str_encode(obj: Any, /) -> bytes:
|
389
407
|
"""Return the string representation of the object encoded as bytes."""
|
390
408
|
return str(obj).encode()
|
@@ -424,6 +442,7 @@ __all__ = [
|
|
424
442
|
"parse_bool",
|
425
443
|
"parse_none",
|
426
444
|
"repr_encode",
|
445
|
+
"secret_str",
|
427
446
|
"snake_case",
|
428
447
|
"split_key_value_pairs",
|
429
448
|
"split_str",
|
File without changes
|
File without changes
|
File without changes
|