soia-client 1.0.21__py3-none-any.whl → 1.0.22__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.
- soia/_impl/structs.py +10 -3
- {soia_client-1.0.21.dist-info → soia_client-1.0.22.dist-info}/METADATA +1 -1
- {soia_client-1.0.21.dist-info → soia_client-1.0.22.dist-info}/RECORD +6 -6
- {soia_client-1.0.21.dist-info → soia_client-1.0.22.dist-info}/WHEEL +1 -1
- {soia_client-1.0.21.dist-info → soia_client-1.0.22.dist-info}/licenses/LICENSE +0 -0
- {soia_client-1.0.21.dist-info → soia_client-1.0.22.dist-info}/top_level.txt +0 -0
soia/_impl/structs.py
CHANGED
@@ -135,6 +135,7 @@ class StructAdapter(TypeAdapter):
|
|
135
135
|
),
|
136
136
|
)
|
137
137
|
mutable_class.__init__ = cast(Any, _make_mutable_class_init_fn(fields))
|
138
|
+
frozen_class.whole = _make_whole_static_factory_method(frozen_class)
|
138
139
|
|
139
140
|
frozen_class.__eq__ = _make_eq_fn(fields)
|
140
141
|
frozen_class.__hash__ = cast(Any, _make_hash_fn(fields, self.record_hash))
|
@@ -260,7 +261,7 @@ def _make_frozen_class_init_fn(
|
|
260
261
|
fields: Sequence[_Field],
|
261
262
|
frozen_class: type,
|
262
263
|
simple_class: type,
|
263
|
-
) -> Callable[
|
264
|
+
) -> Callable[..., None]:
|
264
265
|
"""
|
265
266
|
Returns the implementation of the __init__() method of the frozen class.
|
266
267
|
"""
|
@@ -354,7 +355,7 @@ def _make_frozen_class_init_fn(
|
|
354
355
|
)
|
355
356
|
|
356
357
|
|
357
|
-
def _make_mutable_class_init_fn(fields: Sequence[_Field]) -> Callable[
|
358
|
+
def _make_mutable_class_init_fn(fields: Sequence[_Field]) -> Callable[..., None]:
|
358
359
|
"""
|
359
360
|
Returns the implementation of the __init__() method of the mutable class.
|
360
361
|
"""
|
@@ -383,6 +384,12 @@ def _make_mutable_class_init_fn(fields: Sequence[_Field]) -> Callable[[Any], Non
|
|
383
384
|
)
|
384
385
|
|
385
386
|
|
387
|
+
def _make_whole_static_factory_method(frozen_class: type) -> Callable[..., Any]:
|
388
|
+
def whole(**kwargs):
|
389
|
+
return frozen_class(**kwargs)
|
390
|
+
return whole
|
391
|
+
|
392
|
+
|
386
393
|
def _make_to_mutable_fn(
|
387
394
|
mutable_class: type,
|
388
395
|
simple_class: type,
|
@@ -526,7 +533,7 @@ def _make_hash_fn(
|
|
526
533
|
)
|
527
534
|
|
528
535
|
|
529
|
-
def _make_repr_fn(fields: Sequence[_Field]) -> Callable[[Any],
|
536
|
+
def _make_repr_fn(fields: Sequence[_Field]) -> Callable[[Any], str]:
|
530
537
|
"""
|
531
538
|
Returns the implementation of the __repr__() method of both the frozen class and the
|
532
539
|
mutable class.
|
@@ -16,11 +16,11 @@ soia/_impl/serializer.py,sha256=28IwkjtUnLpbnPQfVNfJXkApCK4JhXHwLkC5MVhF8xo,3529
|
|
16
16
|
soia/_impl/serializers.py,sha256=IL9jHHMo11pgrL1-crarOEElvTyV5YM6FTcgumjW6IU,2564
|
17
17
|
soia/_impl/service.py,sha256=PsV286BYMoJpXIjeBc__MHHakcqof0Pbb3B_Zha1PZI,11928
|
18
18
|
soia/_impl/service_client.py,sha256=qDntwRyXfLsmXl4ELfOkh-fgv553nrGy72K0JghLM80,2734
|
19
|
-
soia/_impl/structs.py,sha256=
|
19
|
+
soia/_impl/structs.py,sha256=iEO6Mu2I0--oNqvPWxFxXEzZ_0RXNIKndhdzWU5Zqw8,26781
|
20
20
|
soia/_impl/timestamp.py,sha256=lXBNH8mPmzflkNjSKZSBl2XS-ot9N8N92B_zGO2SMtU,4078
|
21
21
|
soia/_impl/type_adapter.py,sha256=RyIyh4Fnt9rMy0HRzC-a2v2JAdZsV9FBzoGEUVygVRE,2101
|
22
|
-
soia_client-1.0.
|
23
|
-
soia_client-1.0.
|
24
|
-
soia_client-1.0.
|
25
|
-
soia_client-1.0.
|
26
|
-
soia_client-1.0.
|
22
|
+
soia_client-1.0.22.dist-info/licenses/LICENSE,sha256=SaAftKkX6hfSOiPdENQPS70tifH3PDHgazq8eK2Pwfw,1064
|
23
|
+
soia_client-1.0.22.dist-info/METADATA,sha256=_UdID63xls10TbxWJdrcdwBELHLP1N_6OwdiMtxC_6M,2122
|
24
|
+
soia_client-1.0.22.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
25
|
+
soia_client-1.0.22.dist-info/top_level.txt,sha256=lsYG9JrvauFe1oIV5zvnwsS9hsx3ztwfK_937op9mxc,5
|
26
|
+
soia_client-1.0.22.dist-info/RECORD,,
|
File without changes
|
File without changes
|