osbot-utils 2.29.0__py3-none-any.whl → 2.30.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 +8 -3
- osbot_utils/version +1 -1
- {osbot_utils-2.29.0.dist-info → osbot_utils-2.30.0.dist-info}/METADATA +2 -2
- {osbot_utils-2.29.0.dist-info → osbot_utils-2.30.0.dist-info}/RECORD +6 -6
- {osbot_utils-2.29.0.dist-info → osbot_utils-2.30.0.dist-info}/LICENSE +0 -0
- {osbot_utils-2.29.0.dist-info → osbot_utils-2.30.0.dist-info}/WHEEL +0 -0
@@ -141,9 +141,14 @@ class Type_Safe__Step__From_Json:
|
|
141
141
|
if key_origin is type:
|
142
142
|
if type(dict_key) is str:
|
143
143
|
dict_key = self.deserialize_type__using_value(dict_key)
|
144
|
-
|
145
|
-
if
|
146
|
-
|
144
|
+
key_class_args = get_args(key_class)
|
145
|
+
if key_class_args:
|
146
|
+
expected_dict_type = key_class_args[0]
|
147
|
+
if dict_key != expected_dict_type and not issubclass(dict_key,expected_dict_type):
|
148
|
+
raise TypeError(f"Expected {expected_dict_type} class for key but got instance: {dict_key}")
|
149
|
+
else:
|
150
|
+
if not isinstance(dict_key, key_class):
|
151
|
+
raise TypeError(f"Expected {key_class} class for key but got instance: {dict_key}")
|
147
152
|
new__dict_key = dict_key
|
148
153
|
elif issubclass(key_class, Type_Safe):
|
149
154
|
new__dict_key = self.deserialize_from_dict(key_class(), dict_key)
|
osbot_utils/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
v2.
|
1
|
+
v2.30.0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: osbot_utils
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.30.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=yy3QrfYd1WMakWvFfDYa-ECajv6hMPY7o0x4xTAHbZs,13042
|
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=yHbqsyTtzLh9SfdLRSqp3t4wKZmWSYYIo9w2bDpbXnw,8
|
359
|
+
osbot_utils-2.30.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
360
|
+
osbot_utils-2.30.0.dist-info/METADATA,sha256=LAH0B4WB2lteq-ABcbqfnZh5LvicUKyoCuVb1TAIz_4,1329
|
361
|
+
osbot_utils-2.30.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
362
|
+
osbot_utils-2.30.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|