omlish 0.0.0.dev417__py3-none-any.whl → 0.0.0.dev418__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.
- omlish/__about__.py +2 -2
- omlish/dataclasses/impl/configs.py +1 -1
- omlish/inject/__init__.py +12 -0
- omlish/marshal/__init__.py +22 -16
- omlish/marshal/base/funcs.py +57 -0
- omlish/marshal/base/types.py +0 -22
- omlish/marshal/objects/dataclasses.py +29 -4
- omlish/text/templating.py +9 -7
- omlish/typedvalues/__init__.py +39 -32
- {omlish-0.0.0.dev417.dist-info → omlish-0.0.0.dev418.dist-info}/METADATA +1 -1
- {omlish-0.0.0.dev417.dist-info → omlish-0.0.0.dev418.dist-info}/RECORD +15 -15
- omlish/marshal/factories/func.py +0 -28
- {omlish-0.0.0.dev417.dist-info → omlish-0.0.0.dev418.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev417.dist-info → omlish-0.0.0.dev418.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev417.dist-info → omlish-0.0.0.dev418.dist-info}/licenses/LICENSE +0 -0
- {omlish-0.0.0.dev417.dist-info → omlish-0.0.0.dev418.dist-info}/top_level.txt +0 -0
omlish/__about__.py
CHANGED
omlish/inject/__init__.py
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
"""
|
2
2
|
~> https://github.com/google/guice/commit/70248eafa90cd70a68b293763e53f6aec656e73c
|
3
3
|
"""
|
4
|
+
from .. import dataclasses as _dc
|
5
|
+
|
6
|
+
|
7
|
+
_dc.init_package(
|
8
|
+
globals(),
|
9
|
+
codegen=True,
|
10
|
+
)
|
11
|
+
|
12
|
+
|
13
|
+
##
|
14
|
+
|
15
|
+
|
4
16
|
from .binder import ( # noqa
|
5
17
|
bind,
|
6
18
|
bind_as_fn,
|
omlish/marshal/__init__.py
CHANGED
@@ -16,7 +16,19 @@ See:
|
|
16
16
|
- https://github.com/Fatal1ty/mashumaro
|
17
17
|
- https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/serializers.md#custom-serializers
|
18
18
|
"""
|
19
|
-
from .. import
|
19
|
+
from .. import dataclasses as _dc # noqa
|
20
|
+
|
21
|
+
|
22
|
+
_dc.init_package(
|
23
|
+
globals(),
|
24
|
+
codegen=True,
|
25
|
+
)
|
26
|
+
|
27
|
+
|
28
|
+
##
|
29
|
+
|
30
|
+
|
31
|
+
from .. import lang as _lang # noqa
|
20
32
|
|
21
33
|
|
22
34
|
with _lang.auto_proxy_init(globals()) as _api_cap:
|
@@ -39,6 +51,14 @@ with _lang.auto_proxy_init(globals()) as _api_cap:
|
|
39
51
|
UnhandledTypeError,
|
40
52
|
)
|
41
53
|
|
54
|
+
from .base.funcs import ( # noqa
|
55
|
+
FuncMarshaler,
|
56
|
+
FuncUnmarshaler,
|
57
|
+
|
58
|
+
FuncMarshalerFactory,
|
59
|
+
FuncUnmarshalerFactory,
|
60
|
+
)
|
61
|
+
|
42
62
|
from .base.options import ( # noqa
|
43
63
|
Option,
|
44
64
|
)
|
@@ -63,8 +83,7 @@ with _lang.auto_proxy_init(globals()) as _api_cap:
|
|
63
83
|
MarshalerFactory,
|
64
84
|
UnmarshalerFactory,
|
65
85
|
|
66
|
-
|
67
|
-
UnmarshalerFactory_,
|
86
|
+
Marshaling,
|
68
87
|
)
|
69
88
|
|
70
89
|
from .base.values import ( # noqa
|
@@ -115,11 +134,6 @@ with _lang.auto_proxy_init(globals()) as _api_cap:
|
|
115
134
|
TypeCacheUnmarshalerFactory,
|
116
135
|
)
|
117
136
|
|
118
|
-
from .factories.func import ( # noqa
|
119
|
-
FuncMarshaler,
|
120
|
-
FuncUnmarshaler,
|
121
|
-
)
|
122
|
-
|
123
137
|
from .factories.recursive import ( # noqa
|
124
138
|
RecursiveMarshalerFactory,
|
125
139
|
RecursiveUnmarshalerFactory,
|
@@ -241,11 +255,3 @@ with _lang.auto_proxy_init(globals()) as _api_cap:
|
|
241
255
|
|
242
256
|
install_standard_factories,
|
243
257
|
)
|
244
|
-
|
245
|
-
|
246
|
-
##
|
247
|
-
|
248
|
-
|
249
|
-
from .. import lang as _lang
|
250
|
-
|
251
|
-
_lang.trigger_conditional_imports(__package__)
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import dataclasses as dc
|
2
|
+
import typing as ta
|
3
|
+
|
4
|
+
from ... import lang
|
5
|
+
from ... import reflect as rfl
|
6
|
+
from ...funcs import match as mfs
|
7
|
+
from .contexts import MarshalContext
|
8
|
+
from .contexts import UnmarshalContext
|
9
|
+
from .types import Marshaler
|
10
|
+
from .types import MarshalerFactory
|
11
|
+
from .types import MarshalerMaker
|
12
|
+
from .types import Unmarshaler
|
13
|
+
from .types import UnmarshalerFactory
|
14
|
+
from .types import UnmarshalerMaker
|
15
|
+
from .values import Value
|
16
|
+
|
17
|
+
|
18
|
+
##
|
19
|
+
|
20
|
+
|
21
|
+
@dc.dataclass(frozen=True)
|
22
|
+
class FuncMarshaler(Marshaler, lang.Final):
|
23
|
+
fn: ta.Callable[[MarshalContext, ta.Any], Value]
|
24
|
+
|
25
|
+
def marshal(self, ctx: MarshalContext, o: ta.Any) -> Value:
|
26
|
+
return self.fn(ctx, o)
|
27
|
+
|
28
|
+
|
29
|
+
@dc.dataclass(frozen=True)
|
30
|
+
class FuncUnmarshaler(Unmarshaler, lang.Final):
|
31
|
+
fn: ta.Callable[[UnmarshalContext, Value], ta.Any]
|
32
|
+
|
33
|
+
def unmarshal(self, ctx: UnmarshalContext, v: Value) -> ta.Any:
|
34
|
+
return self.fn(ctx, v)
|
35
|
+
|
36
|
+
|
37
|
+
##
|
38
|
+
|
39
|
+
|
40
|
+
@dc.dataclass(frozen=True)
|
41
|
+
class FuncMarshalerFactory(MarshalerFactory): # noqa
|
42
|
+
guard: ta.Callable[[MarshalContext, rfl.Type], bool]
|
43
|
+
fn: ta.Callable[[MarshalContext, rfl.Type], Marshaler]
|
44
|
+
|
45
|
+
@lang.cached_property
|
46
|
+
def make_marshaler(self) -> MarshalerMaker:
|
47
|
+
return mfs.simple(self.guard, self.fn)
|
48
|
+
|
49
|
+
|
50
|
+
@dc.dataclass(frozen=True)
|
51
|
+
class FuncUnmarshalerFactory(UnmarshalerFactory): # noqa
|
52
|
+
guard: ta.Callable[[UnmarshalContext, rfl.Type], bool]
|
53
|
+
fn: ta.Callable[[UnmarshalContext, rfl.Type], Unmarshaler]
|
54
|
+
|
55
|
+
@lang.cached_property
|
56
|
+
def make_unmarshaler(self) -> UnmarshalerMaker:
|
57
|
+
return mfs.simple(self.guard, self.fn)
|
omlish/marshal/base/types.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import abc
|
2
|
-
import dataclasses as dc
|
3
2
|
import typing as ta
|
4
3
|
|
5
4
|
from ... import lang
|
@@ -53,27 +52,6 @@ class UnmarshalerFactory(lang.Abstract):
|
|
53
52
|
##
|
54
53
|
|
55
54
|
|
56
|
-
@dc.dataclass(frozen=True)
|
57
|
-
class MarshalerFactory_(MarshalerFactory): # noqa
|
58
|
-
fn: MarshalerMaker
|
59
|
-
|
60
|
-
@property
|
61
|
-
def make_marshaler(self) -> MarshalerMaker:
|
62
|
-
return self.fn
|
63
|
-
|
64
|
-
|
65
|
-
@dc.dataclass(frozen=True)
|
66
|
-
class UnmarshalerFactory_(UnmarshalerFactory): # noqa
|
67
|
-
fn: UnmarshalerMaker
|
68
|
-
|
69
|
-
@property
|
70
|
-
def make_unmarshaler(self) -> UnmarshalerMaker:
|
71
|
-
return self.fn
|
72
|
-
|
73
|
-
|
74
|
-
##
|
75
|
-
|
76
|
-
|
77
55
|
class Marshaling(lang.Abstract):
|
78
56
|
@abc.abstractmethod
|
79
57
|
def config_registry(self) -> ConfigRegistry:
|
@@ -1,5 +1,6 @@
|
|
1
1
|
"""
|
2
2
|
TODO:
|
3
|
+
- clean up yeesh
|
3
4
|
- tangled with objects - Field/ObjectMetadata defined over there but unused
|
4
5
|
"""
|
5
6
|
import typing as ta
|
@@ -158,11 +159,17 @@ def get_dataclass_field_infos(
|
|
158
159
|
return FieldInfos(ret)
|
159
160
|
|
160
161
|
|
161
|
-
def _make_field_obj(
|
162
|
+
def _make_field_obj(
|
163
|
+
ctx,
|
164
|
+
ty,
|
165
|
+
obj,
|
166
|
+
fac,
|
167
|
+
fac_attr,
|
168
|
+
):
|
162
169
|
if obj is not None:
|
163
170
|
return obj
|
164
171
|
if fac is not None:
|
165
|
-
return fac(ctx, ty)
|
172
|
+
return getattr(fac, fac_attr)(ctx, ty)
|
166
173
|
return ctx.make(ty)
|
167
174
|
|
168
175
|
|
@@ -210,7 +217,16 @@ class DataclassMarshalerFactory(AbstractDataclassFactory, SimpleMarshalerFactory
|
|
210
217
|
fis = self._get_field_infos(ty, ctx.options)
|
211
218
|
|
212
219
|
fields = [
|
213
|
-
(
|
220
|
+
(
|
221
|
+
fi,
|
222
|
+
_make_field_obj(
|
223
|
+
ctx,
|
224
|
+
fi.type,
|
225
|
+
fi.metadata.marshaler,
|
226
|
+
fi.metadata.marshaler_factory,
|
227
|
+
'make_marshaler',
|
228
|
+
),
|
229
|
+
)
|
214
230
|
for fi in fis
|
215
231
|
if fi.name not in dc_md.specials.set
|
216
232
|
]
|
@@ -262,7 +278,16 @@ class DataclassUnmarshalerFactory(AbstractDataclassFactory, SimpleUnmarshalerFac
|
|
262
278
|
ret.extend(e_ns)
|
263
279
|
|
264
280
|
else:
|
265
|
-
tup = (
|
281
|
+
tup = (
|
282
|
+
fi,
|
283
|
+
_make_field_obj(
|
284
|
+
ctx,
|
285
|
+
fi.type,
|
286
|
+
fi.metadata.unmarshaler,
|
287
|
+
fi.metadata.unmarshaler_factory,
|
288
|
+
'make_unmarshaler',
|
289
|
+
),
|
290
|
+
)
|
266
291
|
|
267
292
|
for pfx in prefixes:
|
268
293
|
for un in fi.unmarshal_names:
|
omlish/text/templating.py
CHANGED
@@ -9,16 +9,18 @@ import string
|
|
9
9
|
import typing as ta
|
10
10
|
|
11
11
|
from .. import lang
|
12
|
-
from .minja import MinjaTemplate
|
13
|
-
from .minja import MinjaTemplateParam
|
14
|
-
from .minja import compile_minja_template
|
15
12
|
|
16
13
|
|
17
14
|
if ta.TYPE_CHECKING:
|
18
15
|
import jinja2
|
16
|
+
|
17
|
+
from . import minja
|
18
|
+
|
19
19
|
else:
|
20
20
|
jinja2 = lang.proxy_import('jinja2')
|
21
21
|
|
22
|
+
minja = lang.proxy_import('.minja', __package__)
|
23
|
+
|
22
24
|
|
23
25
|
##
|
24
26
|
|
@@ -97,7 +99,7 @@ pep292_templater = Pep292Templater.from_string
|
|
97
99
|
|
98
100
|
@dc.dataclass(frozen=True)
|
99
101
|
class MinjaTemplater(Templater):
|
100
|
-
tmpl: MinjaTemplate
|
102
|
+
tmpl: 'minja.MinjaTemplate'
|
101
103
|
|
102
104
|
ENV_IDENT: ta.ClassVar[str] = 'env'
|
103
105
|
|
@@ -110,12 +112,12 @@ class MinjaTemplater(Templater):
|
|
110
112
|
src: str,
|
111
113
|
**ns: ta.Any,
|
112
114
|
) -> 'MinjaTemplater':
|
113
|
-
tmpl = compile_minja_template(
|
115
|
+
tmpl = minja.compile_minja_template(
|
114
116
|
src,
|
115
117
|
[
|
116
|
-
MinjaTemplateParam(cls.ENV_IDENT),
|
118
|
+
minja.MinjaTemplateParam(cls.ENV_IDENT),
|
117
119
|
*[
|
118
|
-
MinjaTemplateParam.new(k, v)
|
120
|
+
minja.MinjaTemplateParam.new(k, v)
|
119
121
|
for k, v in ns.items()
|
120
122
|
],
|
121
123
|
],
|
omlish/typedvalues/__init__.py
CHANGED
@@ -1,49 +1,55 @@
|
|
1
|
-
from
|
2
|
-
TypedValuesAccessor,
|
3
|
-
)
|
1
|
+
from .. import lang as _lang
|
4
2
|
|
5
|
-
from .collection import ( # noqa
|
6
|
-
DuplicateUniqueTypedValueError,
|
7
3
|
|
8
|
-
|
4
|
+
with _lang.auto_proxy_init(globals()) as _api_cap:
|
5
|
+
##
|
9
6
|
|
10
|
-
|
11
|
-
|
12
|
-
)
|
7
|
+
from .accessor import ( # noqa
|
8
|
+
TypedValuesAccessor,
|
9
|
+
)
|
13
10
|
|
14
|
-
from .
|
15
|
-
|
11
|
+
from .collection import ( # noqa
|
12
|
+
DuplicateUniqueTypedValueError,
|
16
13
|
|
17
|
-
|
14
|
+
TypedValues,
|
18
15
|
|
19
|
-
|
20
|
-
|
16
|
+
collect,
|
17
|
+
as_collection,
|
18
|
+
)
|
21
19
|
|
22
|
-
from .
|
23
|
-
|
24
|
-
)
|
20
|
+
from .consumer import ( # noqa
|
21
|
+
UnconsumedTypedValuesError,
|
25
22
|
|
26
|
-
|
27
|
-
TypedValueHolder,
|
28
|
-
)
|
23
|
+
TypedValuesConsumer,
|
29
24
|
|
30
|
-
|
31
|
-
|
32
|
-
)
|
25
|
+
consume,
|
26
|
+
)
|
33
27
|
|
34
|
-
from .
|
35
|
-
|
36
|
-
)
|
28
|
+
from .generic import ( # noqa
|
29
|
+
TypedValueGeneric,
|
30
|
+
)
|
37
31
|
|
38
|
-
from .
|
39
|
-
|
32
|
+
from .holder import ( # noqa
|
33
|
+
TypedValueHolder,
|
34
|
+
)
|
40
35
|
|
41
|
-
|
36
|
+
from .of_ import ( # noqa
|
37
|
+
of,
|
38
|
+
)
|
42
39
|
|
43
|
-
|
40
|
+
from .reflect import ( # noqa
|
41
|
+
reflect_typed_values_impls,
|
42
|
+
)
|
44
43
|
|
45
|
-
|
46
|
-
|
44
|
+
from .values import ( # noqa
|
45
|
+
TypedValue,
|
46
|
+
|
47
|
+
UniqueTypedValue,
|
48
|
+
|
49
|
+
ScalarTypedValue,
|
50
|
+
|
51
|
+
UniqueScalarTypedValue,
|
52
|
+
)
|
47
53
|
|
48
54
|
|
49
55
|
##
|
@@ -51,4 +57,5 @@ from .values import ( # noqa
|
|
51
57
|
|
52
58
|
from .. import marshal as _msh
|
53
59
|
|
60
|
+
|
54
61
|
_msh.register_global_module_import('.marshal', __package__)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.manifests.json,sha256=FLw7xkPiSXuImZgqSP8BwrEib2R1doSzUPLUkc-QUIA,8410
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=E7iojn9stTJMHyoeJLNlAbIfcUFXWRFTEiaSQK7iYOo,3568
|
3
3
|
omlish/__init__.py,sha256=SsyiITTuK0v74XpKV8dqNaCmjOlan1JZKrHQv5rWKPA,253
|
4
4
|
omlish/c3.py,sha256=rer-TPOFDU6fYq_AWio_AmA-ckZ8JDY5shIzQ_yXfzA,8414
|
5
5
|
omlish/cached.py,sha256=MLap_p0rdGoDIMVhXVHm1tsbcWobJF0OanoodV03Ju8,542
|
@@ -143,7 +143,7 @@ omlish/dataclasses/inspect.py,sha256=EpVb50CsEUWpn70gkjBa-hI1mr5_VubHTERsofgE-Lw
|
|
143
143
|
omlish/dataclasses/reflection.py,sha256=6BD2FUiOEtpi_2JREWyVzemjbBJdBMUm8XxQ9SVIKGs,2799
|
144
144
|
omlish/dataclasses/specs.py,sha256=VOY2uCjxLhemBuLd1VXz5KJXmZ48NL3sMJxzOhXmau8,6191
|
145
145
|
omlish/dataclasses/impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
146
|
-
omlish/dataclasses/impl/configs.py,sha256
|
146
|
+
omlish/dataclasses/impl/configs.py,sha256=zRPlcpsELHHRVs9eJwcVp3fcIajHOS54ebPfxSzGQD8,1389
|
147
147
|
omlish/dataclasses/impl/utils.py,sha256=jAD6IIILo70aD_s60CaqRU2YvpZxBKy4K5EG-MTiqVo,1871
|
148
148
|
omlish/dataclasses/impl/api/__init__.py,sha256=k5iS9QOwf_f4iOfGffYhnqDOcmEIwEUUTp00u11kIPM,455
|
149
149
|
omlish/dataclasses/impl/api/classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -358,7 +358,7 @@ omlish/http/coro/server/fdio.py,sha256=qZE4g5y4XESsTObSKyVggI-yzig57gSGJb4Z0rcHv
|
|
358
358
|
omlish/http/coro/server/server.py,sha256=5gvueSCUzqBqQRf0GJ6wGroD9DiWxQNi6N17MlEtBLU,18660
|
359
359
|
omlish/http/coro/server/simple.py,sha256=j1RZ3niKrgGM2qFnjdYWn_eniZzay5j49Ca4L3u8vO4,3296
|
360
360
|
omlish/http/coro/server/sockets.py,sha256=24gU6wpIZuzYWKQD8UsHyYfTZlbcUFvkqXq5KVgWpQo,2261
|
361
|
-
omlish/inject/__init__.py,sha256=
|
361
|
+
omlish/inject/__init__.py,sha256=dRTx6sIuWzUD7enaWRCOoehTz4g26nRblb8N-gpiwUQ,2074
|
362
362
|
omlish/inject/binder.py,sha256=woOK7I5fk4K4kDF684Ia003jE_lviGQXacNKAmXqx5M,5114
|
363
363
|
omlish/inject/bindings.py,sha256=PlvOnUREjvc6F8nOJdzl1k9SAf80icRB4qWFqDop87M,536
|
364
364
|
omlish/inject/eagers.py,sha256=JBY7PcjXt-Rg9scQ1ol9xpcoTLXkXC_Ie9uwTWdzUkA,340
|
@@ -523,7 +523,7 @@ omlish/manifests/globals.py,sha256=kVqQ-fT4kc7xWzLHoI731GviitFPv2v2yqw-p7t7Exs,2
|
|
523
523
|
omlish/manifests/loading.py,sha256=Br1OyI23pis_FfYju9xoacms608lzB1Zh_IqdVw_7vg,17201
|
524
524
|
omlish/manifests/static.py,sha256=9BaPBLkuzxHmg5A-5k9BjjBFINCdmFOIu06dMFgCfz4,497
|
525
525
|
omlish/manifests/types.py,sha256=NeOGuIVrcbqjCDbQ3MnCxxHAgHnw0CkWJsBzo230PWE,453
|
526
|
-
omlish/marshal/__init__.py,sha256=
|
526
|
+
omlish/marshal/__init__.py,sha256=aGlc6p9MzfGAmtvicXHpxEpuATNOGxHoiO3tmZCpM18,5906
|
527
527
|
omlish/marshal/globals.py,sha256=Q6G18hcUwUDDNnpyRPnR5Tn_XZpZCSIEXo09nYSOaNU,2236
|
528
528
|
omlish/marshal/naming.py,sha256=Mk5YrbES836_KflNNRoc5Ajd96iMYLQIMERKx1KpT4g,865
|
529
529
|
omlish/marshal/standard.py,sha256=6L4FK7QVgVFAf2jkTQlCvN-15DWK49VCNlNwCBea3-8,6674
|
@@ -531,10 +531,11 @@ omlish/marshal/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
531
531
|
omlish/marshal/base/configs.py,sha256=y_JRghQgu8mJjPspSZcJQLhjevEuJE2kyxCdu3wGKvo,271
|
532
532
|
omlish/marshal/base/contexts.py,sha256=greDE5d4xHrY7NWTSwEgrBh_BSeALAqBqx2-xcAMoIg,2256
|
533
533
|
omlish/marshal/base/errors.py,sha256=jmN3vl_U_hB6L0wAvuO7ORG27vXF7KEUk-1TxxK2mYA,308
|
534
|
+
omlish/marshal/base/funcs.py,sha256=OeSb8T3R0HZmEnAI4lOhI1HPRurTAezzV3TZWdGGK9s,1558
|
534
535
|
omlish/marshal/base/options.py,sha256=OoDErPmI0kswnqAtr7QYndlPYhIqIDarx833tKFT2R4,23
|
535
536
|
omlish/marshal/base/overrides.py,sha256=543hP4_y2JRThUOamCE0dPfgucbepVV8e_YF-_PJk6U,993
|
536
537
|
omlish/marshal/base/registries.py,sha256=lEpnKnIo0AANOk_PQ6nlEOpPcVa554I3zF0EsT8WuXU,3311
|
537
|
-
omlish/marshal/base/types.py,sha256=
|
538
|
+
omlish/marshal/base/types.py,sha256=DBczbVhz9z9zM4uux43KUnCEJUIW_JqVNyXMxPd--Cs,2472
|
538
539
|
omlish/marshal/base/values.py,sha256=QF6OateG5kjRPHYza08wscThhg20oryf-aVQrxjfkC0,212
|
539
540
|
omlish/marshal/composite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
540
541
|
omlish/marshal/composite/iterables.py,sha256=2VU3sh5TBKMVF1cWPXhDeuELPQzrAYovmTNHzoFLeS4,2704
|
@@ -546,7 +547,6 @@ omlish/marshal/composite/optionals.py,sha256=A-0GUaTL5585mxdNO_FcpnP2KFmJ64MkAwM
|
|
546
547
|
omlish/marshal/composite/special.py,sha256=325cEkzGw2XoMq6W0CvvO7n2Dx9I3mDsjdlZ2tN4Bfs,1402
|
547
548
|
omlish/marshal/composite/wrapped.py,sha256=xC8k21wJOpSkpAn7794hBTPBRw-HPC9sOF3WRlUh_BA,785
|
548
549
|
omlish/marshal/factories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
549
|
-
omlish/marshal/factories/func.py,sha256=6F5Ud9GdplQNR1CEwkT2n5SRx4glmgcNZBBPTc9QmdM,727
|
550
550
|
omlish/marshal/factories/invalidate.py,sha256=Jo0aGNg94LqkexVYnbwxeOscgiLC1ap_kzAgWPvRaKE,3053
|
551
551
|
omlish/marshal/factories/match.py,sha256=MALwOa2FyD4PpHfG-iLBdn8-3FMx_wI123RD4xfd79w,893
|
552
552
|
omlish/marshal/factories/multi.py,sha256=0chkODC3AGz4wxDq82V69clGRtk1Wjc6O_yOGZxn6bQ,1479
|
@@ -558,7 +558,7 @@ omlish/marshal/factories/moduleimport/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCe
|
|
558
558
|
omlish/marshal/factories/moduleimport/configs.py,sha256=8g6FSPmyo0IOYSWYp5kqfJACZxL9SvzlHzrSzucNZyg,538
|
559
559
|
omlish/marshal/factories/moduleimport/factories.py,sha256=LpiH27t6O8x1x-j9v2P5vD8H9TABgVS8Xe9xE4yPGRg,3136
|
560
560
|
omlish/marshal/objects/__init__.py,sha256=F4wej8L_tedC8ETYxAnmKfdPR9TjsqIus9Z3nZofYuc,182
|
561
|
-
omlish/marshal/objects/dataclasses.py,sha256=
|
561
|
+
omlish/marshal/objects/dataclasses.py,sha256=JbtI0aciUH6_eqw9qDz2O9NlbndgSvV9Cxn7SrPG7xM,9511
|
562
562
|
omlish/marshal/objects/helpers.py,sha256=hj5I1pILt3QFSVkYJNrSO3wiCaalAopEYWPL17Ip4zs,1102
|
563
563
|
omlish/marshal/objects/marshal.py,sha256=9Z19aasMNsDn8KBHmUT-XnoP23c5r50CYo0z4IBfUf0,2680
|
564
564
|
omlish/marshal/objects/metadata.py,sha256=maGqyQl0GE9xWK17DQjXxhZWRh3nRwH4fgklrA8XVQI,3392
|
@@ -842,7 +842,7 @@ omlish/text/mangle.py,sha256=k7mYavVgxJ2ENV2wfjw3c9u3hqH5NeVpjoxYbyaYC0Y,2796
|
|
842
842
|
omlish/text/minja.py,sha256=7UKNalkWpTG_364OIo7p5ym--uiNPR2RFBW_W8rrO4I,9194
|
843
843
|
omlish/text/parts.py,sha256=MpiCUyfpcL4PLb2Etj8V7Yj4qofhy0xVwBrIL6RfNdg,6646
|
844
844
|
omlish/text/random.py,sha256=8feS5JE_tSjYlMl-lp0j93kCfzBae9AM2cXlRLebXMA,199
|
845
|
-
omlish/text/templating.py,sha256=
|
845
|
+
omlish/text/templating.py,sha256=i-HU7W-GtKdnBhEG3mnSey5ig7vV0q02D3pVzMoOzJY,3318
|
846
846
|
omlish/text/antlr/__init__.py,sha256=88bMl_28cfSKslgOkMGYXqALgsHz3KC4LFvAVtzj7k8,89
|
847
847
|
omlish/text/antlr/delimit.py,sha256=wvpZ-FlVoGwRjBALKT1in9cIriIwvyFqmHxgliNJEi8,3472
|
848
848
|
omlish/text/antlr/dot.py,sha256=-WHO-xDSv-Ir00TZ4sVIwunKYtZkRveaQ4m5FKj_bRs,962
|
@@ -913,7 +913,7 @@ omlish/text/antlr/_runtime/xpath/XPathLexer.py,sha256=WvGKQjQnu7pX5C4CFKtsCzba2B
|
|
913
913
|
omlish/text/antlr/_runtime/xpath/__init__.py,sha256=lMd_BbXYdlDhZQN_q0TKN978XW5G0pq618F0NaLkpFE,71
|
914
914
|
omlish/text/go/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
915
915
|
omlish/text/go/quoting.py,sha256=zbcPEDWsdj7GAemtu0x8nwMqpIu2C_5iInSwn6mMWlE,9142
|
916
|
-
omlish/typedvalues/__init__.py,sha256=
|
916
|
+
omlish/typedvalues/__init__.py,sha256=F3cUtl4Cm1StZxRBkFIRjuw3wPjEch8HdQZVG3a9AyU,948
|
917
917
|
omlish/typedvalues/accessor.py,sha256=2PQVoFrrCTOcZACAQ28GOvF9xhKyKz27GMSfS0xq5Pc,3184
|
918
918
|
omlish/typedvalues/collection.py,sha256=CK4Vk9kJqAt2V8o6I4zGyv2u9DKov12uSvsGdqEd2Ws,5793
|
919
919
|
omlish/typedvalues/consumer.py,sha256=lDOE-O_sgGbOvbcBg2g5ZRaV2WixnuEYxFsJBaj18oU,4690
|
@@ -923,9 +923,9 @@ omlish/typedvalues/marshal.py,sha256=AtBz7Jq-BfW8vwM7HSxSpR85JAXmxK2T0xDblmm1HI0
|
|
923
923
|
omlish/typedvalues/of_.py,sha256=UXkxSj504WI2UrFlqdZJbu2hyDwBhL7XVrc2qdR02GQ,1309
|
924
924
|
omlish/typedvalues/reflect.py,sha256=PAvKW6T4cW7u--iX80w3HWwZUS3SmIZ2_lQjT65uAyk,1026
|
925
925
|
omlish/typedvalues/values.py,sha256=ym46I-q2QJ_6l4UlERqv3yj87R-kp8nCKMRph0xQ3UA,1307
|
926
|
-
omlish-0.0.0.
|
927
|
-
omlish-0.0.0.
|
928
|
-
omlish-0.0.0.
|
929
|
-
omlish-0.0.0.
|
930
|
-
omlish-0.0.0.
|
931
|
-
omlish-0.0.0.
|
926
|
+
omlish-0.0.0.dev418.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
927
|
+
omlish-0.0.0.dev418.dist-info/METADATA,sha256=URtPO-TW-SiCQpfOPv3fapEkG9oDcAdN3CIm5RCsbvA,19244
|
928
|
+
omlish-0.0.0.dev418.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
929
|
+
omlish-0.0.0.dev418.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
930
|
+
omlish-0.0.0.dev418.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
931
|
+
omlish-0.0.0.dev418.dist-info/RECORD,,
|
omlish/marshal/factories/func.py
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
import typing as ta
|
2
|
-
|
3
|
-
from ... import dataclasses as dc
|
4
|
-
from ... import lang
|
5
|
-
from ..base.contexts import MarshalContext
|
6
|
-
from ..base.contexts import UnmarshalContext
|
7
|
-
from ..base.types import Marshaler
|
8
|
-
from ..base.types import Unmarshaler
|
9
|
-
from ..base.values import Value
|
10
|
-
|
11
|
-
|
12
|
-
##
|
13
|
-
|
14
|
-
|
15
|
-
@dc.dataclass(frozen=True)
|
16
|
-
class FuncMarshaler(Marshaler, lang.Final):
|
17
|
-
fn: ta.Callable[[MarshalContext, ta.Any], Value]
|
18
|
-
|
19
|
-
def marshal(self, ctx: MarshalContext, o: ta.Any) -> Value:
|
20
|
-
return self.fn(ctx, o)
|
21
|
-
|
22
|
-
|
23
|
-
@dc.dataclass(frozen=True)
|
24
|
-
class FuncUnmarshaler(Unmarshaler, lang.Final):
|
25
|
-
fn: ta.Callable[[UnmarshalContext, Value], ta.Any]
|
26
|
-
|
27
|
-
def unmarshal(self, ctx: UnmarshalContext, v: Value) -> ta.Any:
|
28
|
-
return self.fn(ctx, v)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|