osbot-utils 2.23.0__py3-none-any.whl → 2.24.0__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.
- osbot_utils/type_safe/steps/Type_Safe__Step__From_Json.py +7 -1
- osbot_utils/version +1 -1
- {osbot_utils-2.23.0.dist-info → osbot_utils-2.24.0.dist-info}/METADATA +2 -2
- {osbot_utils-2.23.0.dist-info → osbot_utils-2.24.0.dist-info}/RECORD +6 -6
- {osbot_utils-2.23.0.dist-info → osbot_utils-2.24.0.dist-info}/LICENSE +0 -0
- {osbot_utils-2.23.0.dist-info → osbot_utils-2.24.0.dist-info}/WHEEL +0 -0
@@ -137,7 +137,13 @@ class Type_Safe__Step__From_Json:
|
|
137
137
|
new_value = Type_Safe__Dict(expected_key_type=key_class, expected_value_type=value_class)
|
138
138
|
|
139
139
|
for dict_key, dict_value in value.items():
|
140
|
-
|
140
|
+
key_origin = type_safe_cache.get_origin(key_class)
|
141
|
+
if key_origin is type:
|
142
|
+
expected_dict_type = get_args(key_class)[0]
|
143
|
+
if dict_key != expected_dict_type and not issubclass(dict_key,expected_dict_type):
|
144
|
+
raise TypeError(f"Expected {expected_dict_type} class for key but got instance: {dict_key}")
|
145
|
+
new__dict_key = get_args(key_class)[0]
|
146
|
+
elif issubclass(key_class, Type_Safe):
|
141
147
|
new__dict_key = self.deserialize_from_dict(key_class(), dict_key)
|
142
148
|
else:
|
143
149
|
new__dict_key = key_class(dict_key)
|
osbot_utils/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
v2.
|
1
|
+
v2.24.0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: osbot_utils
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.24.0
|
4
4
|
Summary: OWASP Security Bot - Utils
|
5
5
|
License: MIT
|
6
6
|
Author: Dinis Cruz
|
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
|
|
23
23
|
|
24
24
|
Powerful Python util methods and classes that simplify common apis and tasks.
|
25
25
|
|
26
|
-

|
27
27
|
[](https://codecov.io/gh/owasp-sbot/OSBot-Utils)
|
28
28
|
|
29
29
|
|
@@ -319,7 +319,7 @@ osbot_utils/type_safe/shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
319
319
|
osbot_utils/type_safe/steps/Type_Safe__Step__Class_Kwargs.py,sha256=snoyJKvZ1crgF2fp0zexwNPnV_E63RfyRIsMAZdrKNY,6995
|
320
320
|
osbot_utils/type_safe/steps/Type_Safe__Step__Default_Kwargs.py,sha256=tzKXDUc0HVP5QvCWsmcPuuZodNvQZ9FeMDNI2x00Ngw,1943
|
321
321
|
osbot_utils/type_safe/steps/Type_Safe__Step__Default_Value.py,sha256=K_tkVQyLUbbWYzDnzoPLCgDBAFYyUjAG4VdLsvjzL1g,4485
|
322
|
-
osbot_utils/type_safe/steps/Type_Safe__Step__From_Json.py,sha256=
|
322
|
+
osbot_utils/type_safe/steps/Type_Safe__Step__From_Json.py,sha256=K1ln_6ZlfioIV9rq68iXZdzrcn-c_PBUUX8f4tLUzuA,12581
|
323
323
|
osbot_utils/type_safe/steps/Type_Safe__Step__Init.py,sha256=v4FD7zxQiOFLiOF1Ma8wZMP8aLgRlXwJZnsIfBu2zeg,1266
|
324
324
|
osbot_utils/type_safe/steps/Type_Safe__Step__Set_Attr.py,sha256=VuKHH9QEYlbAL9R4zwQ5dwexx2sFY6wMx52QmF7eqcg,5219
|
325
325
|
osbot_utils/type_safe/steps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -355,8 +355,8 @@ osbot_utils/utils/Toml.py,sha256=Rxl8gx7mni5CvBAK-Ai02EKw-GwtJdd3yeHT2kMloik,166
|
|
355
355
|
osbot_utils/utils/Version.py,sha256=Ww6ChwTxqp1QAcxOnztkTicShlcx6fbNsWX5xausHrg,422
|
356
356
|
osbot_utils/utils/Zip.py,sha256=pR6sKliUY0KZXmqNzKY2frfW-YVQEVbLKiyqQX_lc-8,14052
|
357
357
|
osbot_utils/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
358
|
-
osbot_utils/version,sha256=
|
359
|
-
osbot_utils-2.
|
360
|
-
osbot_utils-2.
|
361
|
-
osbot_utils-2.
|
362
|
-
osbot_utils-2.
|
358
|
+
osbot_utils/version,sha256=MOhmXbQoerhmm0TRkznaAE74Mf1OvmLhG1RrIItFiI4,8
|
359
|
+
osbot_utils-2.24.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
360
|
+
osbot_utils-2.24.0.dist-info/METADATA,sha256=ntHjYFolklm0hJ6Xu0Qr3C35CZ5adpdTxjDOWqfI3Qk,1329
|
361
|
+
osbot_utils-2.24.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
362
|
+
osbot_utils-2.24.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|