omlish 0.0.0.dev198__py3-none-any.whl → 0.0.0.dev199__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
omlish/__about__.py CHANGED
@@ -1,5 +1,5 @@
1
- __version__ = '0.0.0.dev198'
2
- __revision__ = '83b207af0d6565ce4a694c6219f9c156206d6716'
1
+ __version__ = '0.0.0.dev199'
2
+ __revision__ = '19849595c30a781a42e5587cf2915dd1fcc1211a'
3
3
 
4
4
 
5
5
  #
omlish/codecs/registry.py CHANGED
@@ -124,8 +124,13 @@ REGISTRY = CodecRegistry(
124
124
  ],
125
125
  )
126
126
 
127
- register = REGISTRY.register
128
- lookup = REGISTRY.lookup
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 = rfl.type_(ta.Any), # noqa
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=bytes,
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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omlish
3
- Version: 0.0.0.dev198
3
+ Version: 0.0.0.dev199
4
4
  Summary: omlish
5
5
  Author: wrmsr
6
6
  License: BSD-3-Clause
@@ -1,5 +1,5 @@
1
1
  omlish/.manifests.json,sha256=dyIpveH7Z8OnQp2pTn6NVv7LCDXVrozJWAzbk8PBavg,7950
2
- omlish/__about__.py,sha256=2l-ZMOw9Ow1ATtnEq25MKztlw3j8x4D9r2OdqjJH9WQ,3409
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=8ySUG-kwGJoUN1HCRnz8VjcykB0wlIzoWF5WTAE1ny0,3860
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=6AbKIz_gl_om36-7qsutybYzK8cJP3LzwC9YJlwCPOA,1590
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.dev198.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
611
- omlish-0.0.0.dev198.dist-info/METADATA,sha256=DdG84lagt0fqcKUx-5Y5WBbViQubCiig7xFSBZNQu_o,4264
612
- omlish-0.0.0.dev198.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
613
- omlish-0.0.0.dev198.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
614
- omlish-0.0.0.dev198.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
615
- omlish-0.0.0.dev198.dist-info/RECORD,,
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,,