omlish 0.0.0.dev332__py3-none-any.whl → 0.0.0.dev333__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/funcs/match.py +1 -3
- omlish/marshal/global_.py +1 -1
- omlish/typedvalues/marshal.py +26 -12
- {omlish-0.0.0.dev332.dist-info → omlish-0.0.0.dev333.dist-info}/METADATA +1 -1
- {omlish-0.0.0.dev332.dist-info → omlish-0.0.0.dev333.dist-info}/RECORD +10 -10
- {omlish-0.0.0.dev332.dist-info → omlish-0.0.0.dev333.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev332.dist-info → omlish-0.0.0.dev333.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev332.dist-info → omlish-0.0.0.dev333.dist-info}/licenses/LICENSE +0 -0
- {omlish-0.0.0.dev332.dist-info → omlish-0.0.0.dev333.dist-info}/top_level.txt +0 -0
omlish/__about__.py
CHANGED
omlish/funcs/match.py
CHANGED
@@ -196,9 +196,7 @@ cached = CachedMatchFn
|
|
196
196
|
class MatchFnClass(MatchFn[P, T]):
|
197
197
|
_cls_match_fn: ta.ClassVar[MultiMatchFn]
|
198
198
|
|
199
|
-
|
200
|
-
super().__init__()
|
201
|
-
self.__match_fn: MatchFn[P, T] | None = None
|
199
|
+
__match_fn: MatchFn[P, T] | None = None
|
202
200
|
|
203
201
|
@property
|
204
202
|
def _match_fn(self) -> MatchFn[P, T]:
|
omlish/marshal/global_.py
CHANGED
@@ -29,7 +29,7 @@ def global_marshaler_factory() -> MarshalerFactory:
|
|
29
29
|
return new_standard_marshaler_factory()
|
30
30
|
|
31
31
|
|
32
|
-
def marshal(obj: ta.Any, ty:
|
32
|
+
def marshal(obj: ta.Any, ty: ta.Any | None = None, **kwargs: ta.Any) -> Value:
|
33
33
|
mc = MarshalContext(GLOBAL_REGISTRY, factory=global_marshaler_factory(), **kwargs)
|
34
34
|
return mc.make(ty if ty is not None else type(obj)).marshal(mc, obj)
|
35
35
|
|
omlish/typedvalues/marshal.py
CHANGED
@@ -96,30 +96,44 @@ def _build_typed_values_impls(rty: rfl.Type) -> msh.Impls:
|
|
96
96
|
return msh.Impls(tv_impls)
|
97
97
|
|
98
98
|
|
99
|
+
#
|
100
|
+
|
101
|
+
|
102
|
+
def build_typed_values_marshaler(ctx: msh.MarshalContext, rty: rfl.Type) -> msh.Marshaler:
|
103
|
+
tv_m = msh.make_polymorphism_marshaler(
|
104
|
+
msh.Impls(_build_typed_values_impls(rty)),
|
105
|
+
msh.WrapperTypeTagging(),
|
106
|
+
ctx,
|
107
|
+
)
|
108
|
+
return msh.IterableMarshaler(tv_m)
|
109
|
+
|
110
|
+
|
99
111
|
class TypedValuesMarshalerFactory(msh.MarshalerFactoryMatchClass):
|
100
112
|
@mfs.simple(lambda _, ctx, rty: isinstance(rty, rfl.Generic) and rty.cls is TypedValues)
|
101
113
|
def _build(self, ctx: msh.MarshalContext, rty: rfl.Type) -> msh.Marshaler:
|
102
|
-
|
103
|
-
msh.Impls(_build_typed_values_impls(rty)),
|
104
|
-
msh.WrapperTypeTagging(),
|
105
|
-
ctx,
|
106
|
-
)
|
107
|
-
return msh.IterableMarshaler(tv_m)
|
114
|
+
return build_typed_values_marshaler(ctx, rty)
|
108
115
|
|
109
116
|
@mfs.simple(lambda _, ctx, rty: rty is TypedValues)
|
110
117
|
def _build_concrete(self, ctx: msh.MarshalContext, rty: rfl.Type) -> msh.Marshaler:
|
111
118
|
raise NotImplementedError
|
112
119
|
|
113
120
|
|
121
|
+
#
|
122
|
+
|
123
|
+
|
124
|
+
def build_typed_values_unmarshaler(ctx: msh.UnmarshalContext, rty: rfl.Type) -> msh.Unmarshaler:
|
125
|
+
tv_u = msh.make_polymorphism_unmarshaler(
|
126
|
+
msh.Impls(_build_typed_values_impls(rty)),
|
127
|
+
msh.WrapperTypeTagging(),
|
128
|
+
ctx,
|
129
|
+
)
|
130
|
+
return msh.IterableUnmarshaler(lambda it: TypedValues(*it), tv_u) # noqa
|
131
|
+
|
132
|
+
|
114
133
|
class TypedValuesUnmarshalerFactory(msh.UnmarshalerFactoryMatchClass):
|
115
134
|
@mfs.simple(lambda _, ctx, rty: isinstance(rty, rfl.Generic) and rty.cls is TypedValues)
|
116
135
|
def _build(self, ctx: msh.UnmarshalContext, rty: rfl.Type) -> msh.Unmarshaler:
|
117
|
-
|
118
|
-
msh.Impls(_build_typed_values_impls(rty)),
|
119
|
-
msh.WrapperTypeTagging(),
|
120
|
-
ctx,
|
121
|
-
)
|
122
|
-
return msh.IterableUnmarshaler(lambda it: TypedValues(*it), tv_u) # noqa
|
136
|
+
return build_typed_values_unmarshaler(ctx, rty)
|
123
137
|
|
124
138
|
@mfs.simple(lambda _, ctx, rty: rty is TypedValues)
|
125
139
|
def _build_concrete(self, ctx: msh.UnmarshalContext, rty: rfl.Type) -> msh.Unmarshaler:
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.manifests.json,sha256=orgsRvtpHu8tdhaCvlP9v3P495OJopYYiHKjK68WtWg,8587
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=0dheu23lnr3-QXTXqGmht7cpWFrK2XfZybnSnnz1y88,3478
|
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
|
@@ -300,7 +300,7 @@ omlish/formats/toml/parser.py,sha256=0laC7Br_Colk8QxgmuU_pPg6fhcAQ2rMB2saSlLm9S0
|
|
300
300
|
omlish/formats/toml/writer.py,sha256=HIp6XvriXaPTLqyLe-fkIiEf1Pyhsp0TcOg5rFBpO3g,3226
|
301
301
|
omlish/funcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
302
302
|
omlish/funcs/genmachine.py,sha256=D9dChaliNBIjYE6lJP5ctcVQUCffNBhceyaaLvBJ7ns,2578
|
303
|
-
omlish/funcs/match.py,sha256=
|
303
|
+
omlish/funcs/match.py,sha256=MAzpWkdIvhdoQTm-R2ivRDkfG8--RmdusiRF137cKEM,6085
|
304
304
|
omlish/funcs/pairs.py,sha256=VCkZjDmJGtR76BsejsHNfb4TcpHCtkkmak-zWDFchAo,3904
|
305
305
|
omlish/funcs/pipes.py,sha256=E7Sz8Aj8ke_vCs5AMNwg1I36kRdHVGTnzxVQaDyn43U,2490
|
306
306
|
omlish/graphs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -492,7 +492,7 @@ omlish/marshal/__init__.py,sha256=7jIXe9wQv-if1iRUuU6a4MdHScTLFFL8X2JwHaNTAxI,33
|
|
492
492
|
omlish/marshal/base.py,sha256=Q0ZRsz5z0NTI6PeWPc9mdMstJryDDbeIAdpKH9-SDps,11427
|
493
493
|
omlish/marshal/errors.py,sha256=g5XJyTHd__8lfwQ4KwgK-E5WR6MoNTMrqKP2U_QRQQQ,307
|
494
494
|
omlish/marshal/factories.py,sha256=Q926jSVjaQLEmStnHLhm_c_vqEysN1LnDCwAsFLIzXw,2970
|
495
|
-
omlish/marshal/global_.py,sha256=
|
495
|
+
omlish/marshal/global_.py,sha256=Dv3a6lLU7ikgvcpvfjrG1BZFC4u-zcDvQUT1buphAVU,1380
|
496
496
|
omlish/marshal/naming.py,sha256=7jQ204u_Kpc3-OGr-ctUHSv997DdWYRLh643qLHJhks,852
|
497
497
|
omlish/marshal/proxy.py,sha256=puKJpwPpuDlMOIrKMcLTRLJyMiL6n_Xs-p59AuDEymA,543
|
498
498
|
omlish/marshal/registries.py,sha256=FvC6qXHCizNB2QmU_N3orxW7iqfGYkiUXYYdTRWS6HA,2353
|
@@ -854,12 +854,12 @@ omlish/typedvalues/collection.py,sha256=TjNuEEyTXbGfbsk7nvBB_Jhgz94R5JSs0u6ocNAl
|
|
854
854
|
omlish/typedvalues/consumer.py,sha256=peDQAgriSyBx_Hc8QHAhEgYy0oSS52qQ_7Tqdssl2AE,4375
|
855
855
|
omlish/typedvalues/generic.py,sha256=ft-x4X3k1oFirtYnDfsvrI3ZQikWM8lGLrvrOEbcGq0,742
|
856
856
|
omlish/typedvalues/holder.py,sha256=vu-umn-h1nvUqmtV5T9ZfQ_OoOYsERu8PhI2N48Ryns,1133
|
857
|
-
omlish/typedvalues/marshal.py,sha256=
|
857
|
+
omlish/typedvalues/marshal.py,sha256=AtBz7Jq-BfW8vwM7HSxSpR85JAXmxK2T0xDblmm1HI0,4956
|
858
858
|
omlish/typedvalues/reflect.py,sha256=PAvKW6T4cW7u--iX80w3HWwZUS3SmIZ2_lQjT65uAyk,1026
|
859
859
|
omlish/typedvalues/values.py,sha256=ym46I-q2QJ_6l4UlERqv3yj87R-kp8nCKMRph0xQ3UA,1307
|
860
|
-
omlish-0.0.0.
|
861
|
-
omlish-0.0.0.
|
862
|
-
omlish-0.0.0.
|
863
|
-
omlish-0.0.0.
|
864
|
-
omlish-0.0.0.
|
865
|
-
omlish-0.0.0.
|
860
|
+
omlish-0.0.0.dev333.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
861
|
+
omlish-0.0.0.dev333.dist-info/METADATA,sha256=eG_IP0glYv3_nrLZkSatlDLoDZLzvPIG7okIfT8_P5Y,4416
|
862
|
+
omlish-0.0.0.dev333.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
863
|
+
omlish-0.0.0.dev333.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
864
|
+
omlish-0.0.0.dev333.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
865
|
+
omlish-0.0.0.dev333.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|