thds.core 1.32.20250307195325__py3-none-any.whl → 1.32.20250307231049__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.
- thds/core/dict_utils.py +6 -12
- {thds.core-1.32.20250307195325.dist-info → thds.core-1.32.20250307231049.dist-info}/METADATA +1 -1
- {thds.core-1.32.20250307195325.dist-info → thds.core-1.32.20250307231049.dist-info}/RECORD +6 -6
- {thds.core-1.32.20250307195325.dist-info → thds.core-1.32.20250307231049.dist-info}/WHEEL +0 -0
- {thds.core-1.32.20250307195325.dist-info → thds.core-1.32.20250307231049.dist-info}/entry_points.txt +0 -0
- {thds.core-1.32.20250307195325.dist-info → thds.core-1.32.20250307231049.dist-info}/top_level.txt +0 -0
thds/core/dict_utils.py
CHANGED
|
@@ -54,7 +54,7 @@ def flatten(d: Mapping, parent_key: str = "", sep: str = DEFAULT_SEP) -> Dict[st
|
|
|
54
54
|
return dict(_flatten_gen(d, parent_key, sep))
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
class DotDict(MutableMapping[str, VT]):
|
|
57
|
+
class DotDict(dict, MutableMapping[str, VT]):
|
|
58
58
|
"""A python dictionary that acts like an object."""
|
|
59
59
|
|
|
60
60
|
_new_to_orig_keys: Dict[str, str] = dict()
|
|
@@ -87,13 +87,16 @@ class DotDict(MutableMapping[str, VT]):
|
|
|
87
87
|
self._construct(mapping=kwargs)
|
|
88
88
|
|
|
89
89
|
def __getattr__(self, key: str) -> VT:
|
|
90
|
-
|
|
90
|
+
try:
|
|
91
|
+
return self[key]
|
|
92
|
+
except KeyError:
|
|
93
|
+
raise AttributeError(key)
|
|
91
94
|
|
|
92
95
|
def __setattr__(self, key: str, value: VT) -> None:
|
|
93
96
|
self.__setitem__(key, value)
|
|
94
97
|
|
|
95
98
|
def __setitem__(self, key: str, value: VT):
|
|
96
|
-
self.
|
|
99
|
+
super(DotDict, self).__setitem__(key, value)
|
|
97
100
|
|
|
98
101
|
def __delattr__(self, key: str) -> None:
|
|
99
102
|
self.__delitem__(key)
|
|
@@ -102,15 +105,6 @@ class DotDict(MutableMapping[str, VT]):
|
|
|
102
105
|
super(DotDict, self).__delitem__(key)
|
|
103
106
|
del self.__dict__[key]
|
|
104
107
|
|
|
105
|
-
def __getitem__(self, key: str) -> VT:
|
|
106
|
-
return self.__dict__[key]
|
|
107
|
-
|
|
108
|
-
def __iter__(self):
|
|
109
|
-
return iter(self.__dict__)
|
|
110
|
-
|
|
111
|
-
def __len__(self) -> int:
|
|
112
|
-
return len(self.__dict__)
|
|
113
|
-
|
|
114
108
|
def to_dict(self, orig_keys: bool = False) -> Dict[str, VT]:
|
|
115
109
|
convert_keys_to_identifiers = self._get_hidden_data("convert_keys_to_identifiers")
|
|
116
110
|
d: Dict[str, VT] = dict()
|
|
@@ -6,7 +6,7 @@ thds/core/cm.py,sha256=WZB8eQU0DaBYj9s97nc3PuCtai9guovfyiQH68zhLzY,1086
|
|
|
6
6
|
thds/core/concurrency.py,sha256=NQunF_tJ_z8cfVyhzkTPlb-nZrgu-vIk9_3XffgscKQ,3520
|
|
7
7
|
thds/core/config.py,sha256=VWymw6pqPRvX7wwsJ0Y-D2gLoCclAHhARmTnuUw7kb0,10014
|
|
8
8
|
thds/core/decos.py,sha256=VpFTKTArXepICxN4U8C8J6Z5KDq-yVjFZQzqs2jeVAk,1341
|
|
9
|
-
thds/core/dict_utils.py,sha256=
|
|
9
|
+
thds/core/dict_utils.py,sha256=MatsjZC9lchfdaDqNAzL2mkTZytDnCAqg56sMm71wbE,6364
|
|
10
10
|
thds/core/env.py,sha256=M36CYkPZ5AUf_-n8EqjsMGwWOzaKEn0KgRwnqUK7jS4,1094
|
|
11
11
|
thds/core/exit_after.py,sha256=0lz63nz2NTiIdyBDYyRa9bQShxQKe7eISy8VhXeW4HU,3485
|
|
12
12
|
thds/core/files.py,sha256=NJlPXj7BejKd_Pa06MOywVv_YapT4bVedfsJHrWX8nI,4579
|
|
@@ -66,8 +66,8 @@ thds/core/sqlite/structured.py,sha256=swCbDoyVT6cE7Kl79Wh_rg5Z1-yrUDJbiVJF4bjset
|
|
|
66
66
|
thds/core/sqlite/types.py,sha256=oUkfoKRYNGDPZRk29s09rc9ha3SCk2SKr_K6WKebBFs,1308
|
|
67
67
|
thds/core/sqlite/upsert.py,sha256=BmKK6fsGVedt43iY-Lp7dnAu8aJ1e9CYlPVEQR2pMj4,5827
|
|
68
68
|
thds/core/sqlite/write.py,sha256=z0219vDkQDCnsV0WLvsj94keItr7H4j7Y_evbcoBrWU,3458
|
|
69
|
-
thds.core-1.32.
|
|
70
|
-
thds.core-1.32.
|
|
71
|
-
thds.core-1.32.
|
|
72
|
-
thds.core-1.32.
|
|
73
|
-
thds.core-1.32.
|
|
69
|
+
thds.core-1.32.20250307231049.dist-info/METADATA,sha256=raWqeoBT-gJ3WV15BLaokHMPXMF8e3FZalmLGp9YIek,2277
|
|
70
|
+
thds.core-1.32.20250307231049.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
71
|
+
thds.core-1.32.20250307231049.dist-info/entry_points.txt,sha256=bOCOVhKZv7azF3FvaWX6uxE6yrjK6FcjqhtxXvLiFY8,161
|
|
72
|
+
thds.core-1.32.20250307231049.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
|
|
73
|
+
thds.core-1.32.20250307231049.dist-info/RECORD,,
|
|
File without changes
|
{thds.core-1.32.20250307195325.dist-info → thds.core-1.32.20250307231049.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{thds.core-1.32.20250307195325.dist-info → thds.core-1.32.20250307231049.dist-info}/top_level.txt
RENAMED
|
File without changes
|