pyquoks 2.2.1__py3-none-any.whl → 2.2.1.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.
- pyquoks/data.py +11 -2
- {pyquoks-2.2.1.dist-info → pyquoks-2.2.1.1.dist-info}/METADATA +1 -1
- pyquoks-2.2.1.1.dist-info/RECORD +9 -0
- pyquoks-2.2.1.dist-info/RECORD +0 -9
- {pyquoks-2.2.1.dist-info → pyquoks-2.2.1.1.dist-info}/WHEEL +0 -0
- {pyquoks-2.2.1.dist-info → pyquoks-2.2.1.1.dist-info}/licenses/LICENSE +0 -0
pyquoks/data.py
CHANGED
|
@@ -312,12 +312,16 @@ class ConfigManager(pyquoks.utils._HasRequiredAttributes):
|
|
|
312
312
|
"""
|
|
313
313
|
|
|
314
314
|
for attribute, value in kwargs.items():
|
|
315
|
+
|
|
315
316
|
if attribute not in self._VALUES.keys():
|
|
316
317
|
raise AttributeError(f"{attribute} is not specified!")
|
|
317
318
|
|
|
318
319
|
object_type = self._VALUES.get(attribute)
|
|
319
320
|
|
|
320
|
-
if
|
|
321
|
+
if not isinstance(
|
|
322
|
+
value,
|
|
323
|
+
typing.get_origin(object_type) if typing.get_origin(object_type) else object_type,
|
|
324
|
+
):
|
|
321
325
|
raise AttributeError(
|
|
322
326
|
f"{attribute} has incorrect type! (must be {object_type.__name__})",
|
|
323
327
|
)
|
|
@@ -397,12 +401,17 @@ class DataManager(pyquoks.utils._HasRequiredAttributes):
|
|
|
397
401
|
"""
|
|
398
402
|
|
|
399
403
|
for attribute, value in kwargs.items():
|
|
404
|
+
value: pydantic.BaseModel | list[pydantic.BaseModel]
|
|
405
|
+
|
|
400
406
|
if attribute not in self._OBJECTS.keys():
|
|
401
407
|
raise AttributeError(f"{attribute} is not specified!")
|
|
402
408
|
|
|
403
409
|
object_type = self._OBJECTS.get(attribute)
|
|
404
410
|
|
|
405
|
-
if
|
|
411
|
+
if not isinstance(
|
|
412
|
+
value,
|
|
413
|
+
typing.get_origin(object_type) if typing.get_origin(object_type) else object_type,
|
|
414
|
+
):
|
|
406
415
|
raise AttributeError(
|
|
407
416
|
f"{attribute} has incorrect type! (must be {object_type.__name__})",
|
|
408
417
|
)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
pyquoks/__init__.py,sha256=u62PPaulBuYAxCYvLzsPkJb9hezXHCg6ZONHmnCJf-I,120
|
|
2
|
+
pyquoks/data.py,sha256=xvydnHUAILEK9kqI5UYY8KS36Hf3ORK9ZwgwAt8K318,18132
|
|
3
|
+
pyquoks/localhost.py,sha256=HPixbz33l4ZkLrk__kbb4mekPjJKA78-Lpi3AjCWvgs,1062
|
|
4
|
+
pyquoks/test.py,sha256=Hx3cLng0uDMDVMx-NveLOPlgpX51A00aVELa0sbR5D0,3379
|
|
5
|
+
pyquoks/utils.py,sha256=6uC5QUtPtVt4G5iiP2jog0t-4IUshUQPshJwmsEwmqg,1475
|
|
6
|
+
pyquoks-2.2.1.1.dist-info/licenses/LICENSE,sha256=eEd8UIYxvKUY7vqrV1XTFo70_FQdiW6o1fznseCXRJs,1095
|
|
7
|
+
pyquoks-2.2.1.1.dist-info/METADATA,sha256=PjmiP5rZQ1XNEs7_wUS9KTvB6cEVVUQF_S_vGLzoOjY,1868
|
|
8
|
+
pyquoks-2.2.1.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
9
|
+
pyquoks-2.2.1.1.dist-info/RECORD,,
|
pyquoks-2.2.1.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
pyquoks/__init__.py,sha256=u62PPaulBuYAxCYvLzsPkJb9hezXHCg6ZONHmnCJf-I,120
|
|
2
|
-
pyquoks/data.py,sha256=p9ieX1Uh-ke24WtdOTGhg9jm4-zG55zFwXpvXHX5fwk,17786
|
|
3
|
-
pyquoks/localhost.py,sha256=HPixbz33l4ZkLrk__kbb4mekPjJKA78-Lpi3AjCWvgs,1062
|
|
4
|
-
pyquoks/test.py,sha256=Hx3cLng0uDMDVMx-NveLOPlgpX51A00aVELa0sbR5D0,3379
|
|
5
|
-
pyquoks/utils.py,sha256=6uC5QUtPtVt4G5iiP2jog0t-4IUshUQPshJwmsEwmqg,1475
|
|
6
|
-
pyquoks-2.2.1.dist-info/licenses/LICENSE,sha256=eEd8UIYxvKUY7vqrV1XTFo70_FQdiW6o1fznseCXRJs,1095
|
|
7
|
-
pyquoks-2.2.1.dist-info/METADATA,sha256=zI1GGBVSsdrRTwSA0HhuLKrQ2qNKwtSIBq1aCNuUz6s,1866
|
|
8
|
-
pyquoks-2.2.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
9
|
-
pyquoks-2.2.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|