soia-client 1.0.6__tar.gz → 1.0.7__tar.gz
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.
Potentially problematic release.
This version of soia-client might be problematic. Click here for more details.
- {soia_client-1.0.6 → soia_client-1.0.7}/PKG-INFO +1 -1
- {soia_client-1.0.6 → soia_client-1.0.7}/pyproject.toml +1 -1
- {soia_client-1.0.6 → soia_client-1.0.7}/soia_client.egg-info/PKG-INFO +1 -1
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/impl/structs.py +10 -10
- {soia_client-1.0.6 → soia_client-1.0.7}/LICENSE +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/README +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/setup.cfg +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soia_client.egg-info/SOURCES.txt +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soia_client.egg-info/dependency_links.txt +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soia_client.egg-info/top_level.txt +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/__init__.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/impl/__init__.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/impl/arrays.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/impl/encoding.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/impl/enums.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/impl/function_maker.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/impl/optionals.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/impl/primitives.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/impl/repr.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/impl/type_adapter.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/keyed_items.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/method.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/module_initializer.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/never.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/serializer.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/serializers.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/spec.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/soialib/timestamp.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/tests/test_module_initializer.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/tests/test_serializers.py +0 -0
- {soia_client-1.0.6 → soia_client-1.0.7}/tests/test_timestamp.py +0 -0
|
@@ -230,7 +230,7 @@ def _make_frozen_class_init_fn(
|
|
|
230
230
|
"""
|
|
231
231
|
|
|
232
232
|
# Set the params.
|
|
233
|
-
params: Params = ["
|
|
233
|
+
params: Params = ["_self"]
|
|
234
234
|
for field in fields:
|
|
235
235
|
params.append(
|
|
236
236
|
Param(
|
|
@@ -254,7 +254,7 @@ def _make_frozen_class_init_fn(
|
|
|
254
254
|
f"{field.field.number + 1} if ",
|
|
255
255
|
field.type.is_not_default_expr(
|
|
256
256
|
arg_expr=field.field.attribute,
|
|
257
|
-
attr_expr=f"
|
|
257
|
+
attr_expr=f"_self.{field.field.attribute}",
|
|
258
258
|
),
|
|
259
259
|
" else ",
|
|
260
260
|
)
|
|
@@ -269,7 +269,7 @@ def _make_frozen_class_init_fn(
|
|
|
269
269
|
attribute = field.field.attribute
|
|
270
270
|
builder.append_ln(
|
|
271
271
|
obj_setattr,
|
|
272
|
-
'(
|
|
272
|
+
'(_self, "',
|
|
273
273
|
attribute,
|
|
274
274
|
'", ',
|
|
275
275
|
field.type.to_frozen_expr(attribute),
|
|
@@ -278,7 +278,7 @@ def _make_frozen_class_init_fn(
|
|
|
278
278
|
# Set array length.
|
|
279
279
|
builder.append_ln(
|
|
280
280
|
obj_setattr,
|
|
281
|
-
f'(
|
|
281
|
+
f'(_self, "_array_len", ',
|
|
282
282
|
array_len_expr(),
|
|
283
283
|
")",
|
|
284
284
|
)
|
|
@@ -288,22 +288,22 @@ def _make_frozen_class_init_fn(
|
|
|
288
288
|
# with regular assignment, and then change back the __class__ attribute.
|
|
289
289
|
builder.append_ln(
|
|
290
290
|
obj_setattr,
|
|
291
|
-
'(
|
|
291
|
+
'(_self, "__class__", ',
|
|
292
292
|
Expr.local("Simple", simple_class),
|
|
293
293
|
")",
|
|
294
294
|
)
|
|
295
295
|
for field in fields:
|
|
296
296
|
attribute = field.field.attribute
|
|
297
297
|
builder.append_ln(
|
|
298
|
-
"
|
|
298
|
+
"_self.",
|
|
299
299
|
attribute,
|
|
300
300
|
" = ",
|
|
301
301
|
field.type.to_frozen_expr(attribute),
|
|
302
302
|
)
|
|
303
303
|
# Set array length.
|
|
304
|
-
builder.append_ln(f"
|
|
304
|
+
builder.append_ln(f"_self._array_len = ", array_len_expr())
|
|
305
305
|
# Change back the __class__.
|
|
306
|
-
builder.append_ln("
|
|
306
|
+
builder.append_ln("_self.__class__ = ", Expr.local("Frozen", frozen_class))
|
|
307
307
|
|
|
308
308
|
return make_function(
|
|
309
309
|
name="__init__",
|
|
@@ -317,7 +317,7 @@ def _make_mutable_class_init_fn(fields: Sequence[_Field]) -> Callable[[Any], Non
|
|
|
317
317
|
Returns the implementation of the __init__() method of the mutable class.
|
|
318
318
|
"""
|
|
319
319
|
|
|
320
|
-
params: Params = ["
|
|
320
|
+
params: Params = ["_self"]
|
|
321
321
|
builder = BodyBuilder()
|
|
322
322
|
for field in fields:
|
|
323
323
|
attribute = field.field.attribute
|
|
@@ -328,7 +328,7 @@ def _make_mutable_class_init_fn(fields: Sequence[_Field]) -> Callable[[Any], Non
|
|
|
328
328
|
)
|
|
329
329
|
)
|
|
330
330
|
builder.append_ln(
|
|
331
|
-
"
|
|
331
|
+
"_self.",
|
|
332
332
|
attribute,
|
|
333
333
|
" = ",
|
|
334
334
|
attribute,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|