omlish 0.0.0.dev197__py3-none-any.whl → 0.0.0.dev199__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/codecs/registry.py +7 -2
- omlish/formats/codecs.py +5 -2
- {omlish-0.0.0.dev197.dist-info → omlish-0.0.0.dev199.dist-info}/METADATA +1 -1
- {omlish-0.0.0.dev197.dist-info → omlish-0.0.0.dev199.dist-info}/RECORD +9 -9
- {omlish-0.0.0.dev197.dist-info → omlish-0.0.0.dev199.dist-info}/LICENSE +0 -0
- {omlish-0.0.0.dev197.dist-info → omlish-0.0.0.dev199.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev197.dist-info → omlish-0.0.0.dev199.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev197.dist-info → omlish-0.0.0.dev199.dist-info}/top_level.txt +0 -0
omlish/__about__.py
CHANGED
omlish/codecs/registry.py
CHANGED
@@ -124,8 +124,13 @@ REGISTRY = CodecRegistry(
|
|
124
124
|
],
|
125
125
|
)
|
126
126
|
|
127
|
-
|
128
|
-
|
127
|
+
|
128
|
+
def register(*codecs: Codec | LazyLoadedCodec) -> CodecRegistry:
|
129
|
+
return REGISTRY.register(*codecs)
|
130
|
+
|
131
|
+
|
132
|
+
def lookup(name_or_alias: str) -> Codec:
|
133
|
+
return REGISTRY.lookup(name_or_alias)
|
129
134
|
|
130
135
|
|
131
136
|
##
|
omlish/formats/codecs.py
CHANGED
@@ -20,7 +20,8 @@ def make_object_codec(
|
|
20
20
|
dumps: ta.Callable,
|
21
21
|
loads: ta.Callable,
|
22
22
|
*,
|
23
|
-
input: rfl.Type
|
23
|
+
input: rfl.Type, # noqa
|
24
|
+
output: rfl.Type = rfl.type_(ta.Any),
|
24
25
|
aliases: ta.Collection[str] | None = None,
|
25
26
|
) -> ObjectCodecT:
|
26
27
|
return cls(
|
@@ -28,7 +29,7 @@ def make_object_codec(
|
|
28
29
|
aliases=aliases,
|
29
30
|
|
30
31
|
input=input,
|
31
|
-
output=
|
32
|
+
output=output,
|
32
33
|
|
33
34
|
new=lambda: codecs.FnPairEagerCodec.of(dumps, loads),
|
34
35
|
)
|
@@ -52,6 +53,7 @@ def make_bytes_object_codec(
|
|
52
53
|
name,
|
53
54
|
dumps,
|
54
55
|
loads,
|
56
|
+
input=bytes,
|
55
57
|
**kwargs,
|
56
58
|
)
|
57
59
|
|
@@ -74,6 +76,7 @@ def make_str_object_codec(
|
|
74
76
|
name,
|
75
77
|
dumps,
|
76
78
|
loads,
|
79
|
+
input=str,
|
77
80
|
**kwargs,
|
78
81
|
)
|
79
82
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.manifests.json,sha256=dyIpveH7Z8OnQp2pTn6NVv7LCDXVrozJWAzbk8PBavg,7950
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=5dGYq3bnMhCNzQiqCyBYVrYz1wa-t6EDj7KPBgzN0nU,3409
|
3
3
|
omlish/__init__.py,sha256=SsyiITTuK0v74XpKV8dqNaCmjOlan1JZKrHQv5rWKPA,253
|
4
4
|
omlish/c3.py,sha256=ubu7lHwss5V4UznbejAI0qXhXahrU01MysuHOZI9C4U,8116
|
5
5
|
omlish/cached.py,sha256=UI-XTFBwA6YXWJJJeBn-WkwBkfzDjLBBaZf4nIJA9y0,510
|
@@ -121,7 +121,7 @@ omlish/codecs/base.py,sha256=uFrDvP7SZdeBbpuUzGHvyOdFNAmhjkBG2cVaVydRsjw,2221
|
|
121
121
|
omlish/codecs/bytes.py,sha256=jlZ87OmZ52HhQDNyL87R3OIviK2qV5iU2jZYOTOLWjk,2157
|
122
122
|
omlish/codecs/chain.py,sha256=DrBi5vbaFfObfoppo6alwOmyW2XbrH2051cjExwr2Gs,527
|
123
123
|
omlish/codecs/funcs.py,sha256=p4imNt7TobyZVXWC-WhntHVu9KfJrO4QwdtPRh-cVOk,850
|
124
|
-
omlish/codecs/registry.py,sha256=
|
124
|
+
omlish/codecs/registry.py,sha256=Ald3fs707cJsUovYjNmxdT2zAQworvDxwMFk7DBT8r0,3995
|
125
125
|
omlish/codecs/standard.py,sha256=eiZ4u9ep0XrA4Z_D1zJI0vmWyuN8HLrX4Se_r_Cq_ZM,60
|
126
126
|
omlish/codecs/text.py,sha256=JzrdwMpQPo2NBBg3K1EZszzQy5vEWmd82SIerJd4yeQ,5723
|
127
127
|
omlish/collections/__init__.py,sha256=zeUvcAz073ekko37QKya6sElTMfKTuF1bKrdbMtaRpI,2142
|
@@ -220,7 +220,7 @@ omlish/docker/timebomb.py,sha256=A_pgIDaXKsQwPiikrCTgIJl91gwYqkPGFY6j-Naq07Q,342
|
|
220
220
|
omlish/formats/__init__.py,sha256=T0AG1gFnqQ5JiHN0UPQjQ-7g5tnxMIG-mgOvMYExYAM,21
|
221
221
|
omlish/formats/cbor.py,sha256=o_Hbe4kthO9CeXK-FySrw0dHVlrdyTo2Y8PpGRDfZ3c,514
|
222
222
|
omlish/formats/cloudpickle.py,sha256=16si4yUp_pAdDWGECAWf6HLA2PwSANGGgDoMLGZUem8,579
|
223
|
-
omlish/formats/codecs.py,sha256=
|
223
|
+
omlish/formats/codecs.py,sha256=ip4TLOyWAaUyEJmrIOzuLMtjRdgaMEsC6JeAlcCVi28,1657
|
224
224
|
omlish/formats/dotenv.py,sha256=qoDG4Ayu7B-8LjBBhcmNiLZW0_9LgCi3Ri2aPo9DEQ8,19314
|
225
225
|
omlish/formats/json5.py,sha256=odpZIShlUpv19aACWe58SoMPcv0AHKIa6zSMjlKgaMI,515
|
226
226
|
omlish/formats/pickle.py,sha256=jdp4E9WH9qVPBE3sSqbqDtUo18RbTSIiSpSzJ-IEVZw,529
|
@@ -607,9 +607,9 @@ omlish/text/indent.py,sha256=YjtJEBYWuk8--b9JU_T6q4yxV85_TR7VEVr5ViRCFwk,1336
|
|
607
607
|
omlish/text/minja.py,sha256=jZC-fp3Xuhx48ppqsf2Sf1pHbC0t8XBB7UpUUoOk2Qw,5751
|
608
608
|
omlish/text/parts.py,sha256=7vPF1aTZdvLVYJ4EwBZVzRSy8XB3YqPd7JwEnNGGAOo,6495
|
609
609
|
omlish/text/random.py,sha256=jNWpqiaKjKyTdMXC-pWAsSC10AAP-cmRRPVhm59ZWLk,194
|
610
|
-
omlish-0.0.0.
|
611
|
-
omlish-0.0.0.
|
612
|
-
omlish-0.0.0.
|
613
|
-
omlish-0.0.0.
|
614
|
-
omlish-0.0.0.
|
615
|
-
omlish-0.0.0.
|
610
|
+
omlish-0.0.0.dev199.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
611
|
+
omlish-0.0.0.dev199.dist-info/METADATA,sha256=5CdSnaX-AfmSBPr7KAcB65m0NC5yoHNFYaPcJSXYTI0,4264
|
612
|
+
omlish-0.0.0.dev199.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
|
613
|
+
omlish-0.0.0.dev199.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
614
|
+
omlish-0.0.0.dev199.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
615
|
+
omlish-0.0.0.dev199.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|