omlish 0.0.0.dev282__py3-none-any.whl → 0.0.0.dev283__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/collections/__init__.py +1 -1
- omlish/collections/mappings.py +9 -0
- omlish/collections/utils.py +10 -1
- omlish/dataclasses/__init__.py +1 -1
- omlish/dataclasses/impl/{exceptions.py → errors.py} +3 -0
- omlish/dataclasses/impl/fields.py +1 -1
- omlish/dataclasses/impl/init.py +1 -1
- omlish/inject/__init__.py +1 -1
- omlish/inject/impl/elements.py +2 -2
- omlish/inject/impl/injector.py +2 -2
- omlish/inject/impl/inspect.py +1 -1
- omlish/inject/impl/scopes.py +2 -2
- omlish/lang/__init__.py +3 -2
- omlish/lang/comparison.py +3 -0
- omlish/lang/enums.py +8 -0
- omlish/lang/objects.py +44 -15
- omlish/marshal/__init__.py +1 -1
- omlish/marshal/base.py +1 -1
- omlish/marshal/{exceptions.py → errors.py} +3 -0
- omlish/marshal/trivial/forbidden.py +1 -1
- omlish/specs/jmespath/__init__.py +1 -1
- omlish/specs/jmespath/cli.py +5 -5
- omlish/specs/jmespath/functions.py +6 -6
- omlish/specs/jmespath/lexer.py +2 -2
- omlish/specs/jmespath/parser.py +3 -3
- omlish/specs/jmespath/visitor.py +1 -1
- {omlish-0.0.0.dev282.dist-info → omlish-0.0.0.dev283.dist-info}/METADATA +1 -1
- {omlish-0.0.0.dev282.dist-info → omlish-0.0.0.dev283.dist-info}/RECORD +36 -37
- omlish/dataclasses/impl/descriptors.py +0 -93
- omlish/lang/exceptions.py +0 -2
- /omlish/collections/{exceptions.py → errors.py} +0 -0
- /omlish/inject/{exceptions.py → errors.py} +0 -0
- /omlish/specs/jmespath/{exceptions.py → errors.py} +0 -0
- {omlish-0.0.0.dev282.dist-info → omlish-0.0.0.dev283.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev282.dist-info → omlish-0.0.0.dev283.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev282.dist-info → omlish-0.0.0.dev283.dist-info}/licenses/LICENSE +0 -0
- {omlish-0.0.0.dev282.dist-info → omlish-0.0.0.dev283.dist-info}/top_level.txt +0 -0
omlish/__about__.py
CHANGED
omlish/collections/__init__.py
CHANGED
omlish/collections/mappings.py
CHANGED
@@ -23,6 +23,9 @@ def multikey_dict(dct: ta.Mapping[ta.Iterable[K] | K, V], *, deep: bool = False)
|
|
23
23
|
return ret
|
24
24
|
|
25
25
|
|
26
|
+
##
|
27
|
+
|
28
|
+
|
26
29
|
def guarded_map_update(
|
27
30
|
dst: ta.MutableMapping[ta.Any, ta.Any],
|
28
31
|
*srcs: ta.Mapping[ta.Any, ta.Any],
|
@@ -35,6 +38,9 @@ def guarded_map_update(
|
|
35
38
|
return dst
|
36
39
|
|
37
40
|
|
41
|
+
##
|
42
|
+
|
43
|
+
|
38
44
|
class TypeMap(ta.Generic[T]):
|
39
45
|
def __init__(self, items: ta.Iterable[T] = ()) -> None:
|
40
46
|
super().__init__()
|
@@ -99,6 +105,9 @@ class DynamicTypeMap(ta.Generic[V]):
|
|
99
105
|
return ret
|
100
106
|
|
101
107
|
|
108
|
+
##
|
109
|
+
|
110
|
+
|
102
111
|
class MissingDict(dict[K, V]):
|
103
112
|
def __init__(self, missing_fn: ta.Callable[[K], V]) -> None:
|
104
113
|
if not callable(missing_fn):
|
omlish/collections/utils.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import typing as ta
|
2
2
|
|
3
3
|
from .. import lang
|
4
|
-
from .
|
4
|
+
from .errors import DuplicateKeyError
|
5
5
|
from .identity import IdentityKeyDict
|
6
6
|
from .identity import IdentitySet
|
7
7
|
|
@@ -30,6 +30,9 @@ def partition(items: ta.Iterable[T], pred: ta.Callable[[T], bool]) -> PartitionR
|
|
30
30
|
return PartitionResult(t, f)
|
31
31
|
|
32
32
|
|
33
|
+
##
|
34
|
+
|
35
|
+
|
33
36
|
def unique(
|
34
37
|
it: ta.Iterable[T],
|
35
38
|
*,
|
@@ -52,6 +55,9 @@ def unique(
|
|
52
55
|
return ret
|
53
56
|
|
54
57
|
|
58
|
+
##
|
59
|
+
|
60
|
+
|
55
61
|
def make_map(
|
56
62
|
kvs: ta.Iterable[tuple[K, V]],
|
57
63
|
*,
|
@@ -82,6 +88,9 @@ def make_map_by(
|
|
82
88
|
)
|
83
89
|
|
84
90
|
|
91
|
+
##
|
92
|
+
|
93
|
+
|
85
94
|
def multi_map(kvs: ta.Iterable[tuple[K, V]], *, identity: bool = False) -> ta.MutableMapping[K, list[V]]:
|
86
95
|
d: ta.MutableMapping[K, list[V]] = IdentityKeyDict() if identity else {}
|
87
96
|
l: list[V]
|
omlish/dataclasses/__init__.py
CHANGED
@@ -8,7 +8,7 @@ import typing as ta
|
|
8
8
|
|
9
9
|
from ... import check as check_
|
10
10
|
from ... import lang
|
11
|
-
from .
|
11
|
+
from .errors import FieldValidationError
|
12
12
|
from .internals import FIELDS_ATTR
|
13
13
|
from .internals import FieldType
|
14
14
|
from .internals import is_classvar
|
omlish/dataclasses/impl/init.py
CHANGED
omlish/inject/__init__.py
CHANGED
omlish/inject/impl/elements.py
CHANGED
@@ -29,8 +29,8 @@ from ..bindings import Binding
|
|
29
29
|
from ..eagers import Eager
|
30
30
|
from ..elements import Element
|
31
31
|
from ..elements import Elements
|
32
|
-
from ..
|
33
|
-
from ..
|
32
|
+
from ..errors import ConflictingKeyError
|
33
|
+
from ..errors import UnboundKeyError
|
34
34
|
from ..keys import Key
|
35
35
|
from ..listeners import ProvisionListenerBinding
|
36
36
|
from ..multis import MapBinding
|
omlish/inject/impl/injector.py
CHANGED
@@ -23,8 +23,8 @@ import weakref
|
|
23
23
|
from ... import check
|
24
24
|
from ... import lang
|
25
25
|
from ..elements import Elements
|
26
|
-
from ..
|
27
|
-
from ..
|
26
|
+
from ..errors import CyclicDependencyError
|
27
|
+
from ..errors import UnboundKeyError
|
28
28
|
from ..injector import Injector
|
29
29
|
from ..inspect import KwargsTarget
|
30
30
|
from ..keys import Key
|
omlish/inject/impl/inspect.py
CHANGED
@@ -12,7 +12,7 @@ import weakref
|
|
12
12
|
|
13
13
|
from ... import check
|
14
14
|
from ... import reflect as rfl
|
15
|
-
from ..
|
15
|
+
from ..errors import ConflictingKeyError
|
16
16
|
from ..inspect import Kwarg
|
17
17
|
from ..inspect import KwargsTarget
|
18
18
|
from ..keys import Key
|
omlish/inject/impl/scopes.py
CHANGED
@@ -15,8 +15,8 @@ from ... import lang
|
|
15
15
|
from ..bindings import Binding
|
16
16
|
from ..elements import Elements
|
17
17
|
from ..elements import as_elements
|
18
|
-
from ..
|
19
|
-
from ..
|
18
|
+
from ..errors import ScopeAlreadyOpenError
|
19
|
+
from ..errors import ScopeNotOpenError
|
20
20
|
from ..injector import Injector
|
21
21
|
from ..keys import Key
|
22
22
|
from ..providers import FnProvider
|
omlish/lang/__init__.py
CHANGED
@@ -122,8 +122,8 @@ from .descriptors import ( # noqa
|
|
122
122
|
update_wrapper,
|
123
123
|
)
|
124
124
|
|
125
|
-
from .
|
126
|
-
|
125
|
+
from .enums import ( # noqa
|
126
|
+
enum_name_repr,
|
127
127
|
)
|
128
128
|
|
129
129
|
from .functions import ( # noqa
|
@@ -201,6 +201,7 @@ from .maybes import ( # noqa
|
|
201
201
|
)
|
202
202
|
|
203
203
|
from .objects import ( # noqa
|
204
|
+
AttrRepr,
|
204
205
|
SimpleProxy,
|
205
206
|
anon_object,
|
206
207
|
arg_repr,
|
omlish/lang/comparison.py
CHANGED
omlish/lang/enums.py
ADDED
omlish/lang/objects.py
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
"""
|
2
|
+
TODO:
|
3
|
+
- reprlib / recur guard (merge w/ defs.py)
|
4
|
+
"""
|
5
|
+
import dataclasses as dc
|
1
6
|
import types
|
2
7
|
import typing as ta
|
3
8
|
import weakref
|
@@ -11,21 +16,45 @@ T = ta.TypeVar('T')
|
|
11
16
|
##
|
12
17
|
|
13
18
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
19
|
+
@dc.dataclass(frozen=True)
|
20
|
+
class AttrRepr:
|
21
|
+
attrs: ta.Sequence[str]
|
22
|
+
|
23
|
+
_: dc.KW_ONLY
|
24
|
+
|
25
|
+
with_module: bool = False
|
26
|
+
use_qualname: bool = False
|
27
|
+
with_id: bool = False
|
28
|
+
value_filter: ta.Callable[[ta.Any], bool] | None = None
|
29
|
+
|
30
|
+
@classmethod
|
31
|
+
def of(cls, *attrs: str, **kwargs: ta.Any) -> 'AttrRepr':
|
32
|
+
return cls(attrs, **kwargs)
|
33
|
+
|
34
|
+
def __call__(self, obj: ta.Any) -> str:
|
35
|
+
vs = ', '.join(
|
36
|
+
f'{attr}={v!r}'
|
37
|
+
for attr in self.attrs
|
38
|
+
for v in [getattr(obj, attr)]
|
39
|
+
if self.value_filter is None or self.value_filter(v)
|
40
|
+
)
|
41
|
+
return (
|
42
|
+
f'{obj.__class__.__module__ + "." if self.with_module else ""}'
|
43
|
+
f'{obj.__class__.__qualname__ if self.use_qualname else obj.__class__.__name__}'
|
44
|
+
f'{("@" + hex(id(obj))[2:]) if self.with_id else ""}'
|
45
|
+
f'({vs})'
|
46
|
+
)
|
47
|
+
|
48
|
+
def __get__(self, instance, owner):
|
49
|
+
if instance is None:
|
50
|
+
return self
|
51
|
+
def __repr__(other): # noqa
|
52
|
+
return self(other)
|
53
|
+
return __repr__.__get__(instance, owner)
|
54
|
+
|
55
|
+
|
56
|
+
def attr_repr(obj: ta.Any, *attrs: str, **kwargs: ta.Any) -> str:
|
57
|
+
return AttrRepr(attrs, **kwargs)(obj)
|
29
58
|
|
30
59
|
|
31
60
|
def arg_repr(*args: ta.Any, **kwargs: ta.Any) -> str:
|
omlish/marshal/__init__.py
CHANGED
omlish/marshal/base.py
CHANGED
@@ -92,7 +92,7 @@ from .. import dataclasses as dc
|
|
92
92
|
from .. import lang
|
93
93
|
from .. import reflect as rfl
|
94
94
|
from ..funcs import match as mfs
|
95
|
-
from .
|
95
|
+
from .errors import UnhandledTypeError
|
96
96
|
from .factories import RecursiveTypeFactory
|
97
97
|
from .factories import TypeCacheFactory
|
98
98
|
from .factories import TypeMapFactory
|
@@ -9,7 +9,7 @@ from ..base import SimpleMarshalerFactory
|
|
9
9
|
from ..base import SimpleUnmarshalerFactory
|
10
10
|
from ..base import UnmarshalContext
|
11
11
|
from ..base import Unmarshaler
|
12
|
-
from ..
|
12
|
+
from ..errors import ForbiddenTypeError
|
13
13
|
|
14
14
|
|
15
15
|
C = ta.TypeVar('C')
|
@@ -27,7 +27,7 @@ See:
|
|
27
27
|
- https://github.com/jmespath-community/jmespath.spec/discussions?discussions_q=label%3Ajep-candidate
|
28
28
|
- https://github.com/jmespath-community/jmespath.spec/discussions/97
|
29
29
|
""" # noqa
|
30
|
-
from . import
|
30
|
+
from . import errors # noqa
|
31
31
|
from . import functions # noqa
|
32
32
|
from . import lexer # noqa
|
33
33
|
from . import parser # noqa
|
omlish/specs/jmespath/cli.py
CHANGED
@@ -5,11 +5,11 @@ import typing as ta
|
|
5
5
|
|
6
6
|
from ...formats import json
|
7
7
|
from .ast import Node
|
8
|
-
from .
|
9
|
-
from .
|
10
|
-
from .
|
11
|
-
from .
|
12
|
-
from .
|
8
|
+
from .errors import ArityError
|
9
|
+
from .errors import JmespathTypeError
|
10
|
+
from .errors import JmespathValueError
|
11
|
+
from .errors import ParseError
|
12
|
+
from .errors import UnknownFunctionError
|
13
13
|
from .parser import compile # noqa
|
14
14
|
from .parser import search
|
15
15
|
from .visitor import node_type
|
@@ -5,12 +5,12 @@ import math
|
|
5
5
|
import re
|
6
6
|
import typing as ta
|
7
7
|
|
8
|
-
from .
|
9
|
-
from .
|
10
|
-
from .
|
11
|
-
from .
|
12
|
-
from .
|
13
|
-
from .
|
8
|
+
from .errors import ArityError
|
9
|
+
from .errors import JmespathError
|
10
|
+
from .errors import JmespathTypeError
|
11
|
+
from .errors import JmespathValueError
|
12
|
+
from .errors import UnknownFunctionError
|
13
|
+
from .errors import VariadicArityError
|
14
14
|
|
15
15
|
|
16
16
|
T = ta.TypeVar('T')
|
omlish/specs/jmespath/lexer.py
CHANGED
omlish/specs/jmespath/parser.py
CHANGED
@@ -57,9 +57,9 @@ from .ast import Subexpression
|
|
57
57
|
from .ast import UnaryArithmeticOperator
|
58
58
|
from .ast import ValueProjection
|
59
59
|
from .ast import VariableRef
|
60
|
-
from .
|
61
|
-
from .
|
62
|
-
from .
|
60
|
+
from .errors import IncompleteExpressionError
|
61
|
+
from .errors import LexerError
|
62
|
+
from .errors import ParseError
|
63
63
|
from .lexer import Lexer
|
64
64
|
from .lexer import Token
|
65
65
|
from .visitor import GraphvizVisitor
|
omlish/specs/jmespath/visitor.py
CHANGED
@@ -36,7 +36,7 @@ from .ast import Subexpression
|
|
36
36
|
from .ast import UnaryArithmeticOperator
|
37
37
|
from .ast import ValueProjection
|
38
38
|
from .ast import VariableRef
|
39
|
-
from .
|
39
|
+
from .errors import UndefinedVariableError
|
40
40
|
from .functions import DefaultFunctions
|
41
41
|
from .functions import Functions
|
42
42
|
from .scope import ScopedChainDict
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.manifests.json,sha256=pjGUyLHaoWpPqRP3jz2u1fC1qoRc2lvrEcpU_Ax2tdg,8253
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=kGtaWxdAPsKYT5u54Mbhf5a1ANaAyiX7TC9CA15-xmA,3380
|
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
|
@@ -144,18 +144,18 @@ omlish/codecs/funcs.py,sha256=p4imNt7TobyZVXWC-WhntHVu9KfJrO4QwdtPRh-cVOk,850
|
|
144
144
|
omlish/codecs/registry.py,sha256=2FnO5YP7ui1LzkguwESY0MP3WIdwgPTIJTM_4RyTOEg,3896
|
145
145
|
omlish/codecs/standard.py,sha256=eiZ4u9ep0XrA4Z_D1zJI0vmWyuN8HLrX4Se_r_Cq_ZM,60
|
146
146
|
omlish/codecs/text.py,sha256=JzrdwMpQPo2NBBg3K1EZszzQy5vEWmd82SIerJd4yeQ,5723
|
147
|
-
omlish/collections/__init__.py,sha256=
|
147
|
+
omlish/collections/__init__.py,sha256=siU1M4MpCWECesuYyqjIWZuMaOyJT5-LyhvALhTwdIo,2234
|
148
148
|
omlish/collections/abc.py,sha256=ikTJlJ5dhXjU6tlNsI0Wm0_7GaIEpe3mftpvdGY_nc8,2620
|
149
149
|
omlish/collections/coerce.py,sha256=tAls15v_7p5bUN33R7Zbko87KW5toWHl9fRialCqyNY,7030
|
150
|
-
omlish/collections/
|
150
|
+
omlish/collections/errors.py,sha256=shcS-NCnEUudF8qC_SmO2TQyjivKlS4TDjaz_faqQ0c,44
|
151
151
|
omlish/collections/frozen.py,sha256=LMbAHYDENIQk1hvjCTvpnx66m1TalrHa4CSn8n_tsXQ,4142
|
152
152
|
omlish/collections/hasheq.py,sha256=swOBPEnU_C0SU3VqWJX9mr0BfZLD0A-4Ke9Vahj3fE4,3669
|
153
153
|
omlish/collections/identity.py,sha256=xtoczgBPYzr6r2lJS-eti2kEnN8rVDvNGDCG3TA6vRo,3405
|
154
|
-
omlish/collections/mappings.py,sha256=
|
154
|
+
omlish/collections/mappings.py,sha256=iXb7oq1rCQak0KgzblgrzWCJLrkfJAYHFvl9lprOVUI,2804
|
155
155
|
omlish/collections/ordered.py,sha256=7zTbrAt12rf6i33XHkQERKar258fJacaw_WbtGEBgWo,2338
|
156
156
|
omlish/collections/ranked.py,sha256=rg6DL36oOUiG5JQEAkGnT8b6f9mSndQlIovtt8GQj_w,2229
|
157
157
|
omlish/collections/unmodifiable.py,sha256=X7kKhPFdZF4m28SfLDxZL-riWlhbZffdPv35aTP30YM,4753
|
158
|
-
omlish/collections/utils.py,sha256=
|
158
|
+
omlish/collections/utils.py,sha256=voqecDPFuqSLN8IwJDKyy-HnecEU4JYOXxd1HAaEuMY,2900
|
159
159
|
omlish/collections/cache/__init__.py,sha256=D1gO71VcwxFTZP9gAc9isHfg_TEdalwhsJcgGLvS9hg,233
|
160
160
|
omlish/collections/cache/descriptor.py,sha256=F9aRsF-xOUcNMzTwIWrUpKTjop1Z-oItQqJDwVaR0FU,5026
|
161
161
|
omlish/collections/cache/impl.py,sha256=Y18OcAsNL6dIWuk89UlZBpqq0iBU-P4VDio6eis43Us,14760
|
@@ -202,7 +202,7 @@ omlish/daemons/services.py,sha256=YYp2SMkJ71WgzOcYSXjWHeAyKKxu3j1dfuJvWkl0Dgw,34
|
|
202
202
|
omlish/daemons/spawning.py,sha256=psR73zOYjMKTqNpx1bMib8uU9wAZz62tw5TaWHrTdyY,5337
|
203
203
|
omlish/daemons/targets.py,sha256=00KmtlknMhQ5PyyVAhWl3rpeTMPym0GxvHHq6mYPZ7c,3051
|
204
204
|
omlish/daemons/waiting.py,sha256=RfgD1L33QQVbD2431dkKZGE4w6DUcGvYeRXXi8puAP4,1676
|
205
|
-
omlish/dataclasses/__init__.py,sha256
|
205
|
+
omlish/dataclasses/__init__.py,sha256=jXxXgpwRkNBIDA8mWapOT_u3dOa8EU2tG6CAttbhlt4,1725
|
206
206
|
omlish/dataclasses/static.py,sha256=6pZG2iTR9NN8pKm-5ukDABnaVlTKFOzMwkg-rbxURoo,7691
|
207
207
|
omlish/dataclasses/utils.py,sha256=BTXYyH0enSEP5kWxMnPTJ8_UPd7h4wF2RVPITNC8H4M,3872
|
208
208
|
omlish/dataclasses/impl/LICENSE,sha256=Oy-B_iHRgcSZxZolbI4ZaEVdZonSaaqFNzv7avQdo78,13936
|
@@ -210,12 +210,11 @@ omlish/dataclasses/impl/__init__.py,sha256=zqGBC5gSbjJxaqG_zS1LL1PX-zAfhIua8UqOE
|
|
210
210
|
omlish/dataclasses/impl/api.py,sha256=BkwGQYBdl9D8sq9pNmraqOfr5F0fpYF_CbD_s0ESEU8,7007
|
211
211
|
omlish/dataclasses/impl/as_.py,sha256=CD-t7hkC1EP2F_jvZKIA_cVoDuwZ-Ln_xC4fJumPYX0,2598
|
212
212
|
omlish/dataclasses/impl/copy.py,sha256=Tn8_n6Vohs-w4otbGdubBEvhd3TsSTaM3EfNGdS2LYo,591
|
213
|
-
omlish/dataclasses/impl/
|
214
|
-
omlish/dataclasses/impl/
|
215
|
-
omlish/dataclasses/impl/fields.py,sha256=jM2Rvu6DQOfRUrZBMOeJMda-CT5JKXQvJKzoIU_LFxc,6897
|
213
|
+
omlish/dataclasses/impl/errors.py,sha256=vL1VKqbjQXGPfvYUz7gQfhnWJKe7JJqUN4QK96pitPA,1280
|
214
|
+
omlish/dataclasses/impl/fields.py,sha256=TLhHUvEX9P8cxwkLlB6jbIpRlQYaqCnVUaaP8VSUNJk,6893
|
216
215
|
omlish/dataclasses/impl/frozen.py,sha256=x87DSM8FIMZ3c_BIUE8NooCkExFjPsabeqIueEP5qKs,2988
|
217
216
|
omlish/dataclasses/impl/hashing.py,sha256=0Gr6XIRkKy4pr-mdHblIlQCy3mBxycjMqJk3oZDw43s,3215
|
218
|
-
omlish/dataclasses/impl/init.py,sha256=
|
217
|
+
omlish/dataclasses/impl/init.py,sha256=7pC392bJD-yzlerO1DlvTUtOPsVvGmlPWIv_zTylTto,6405
|
219
218
|
omlish/dataclasses/impl/internals.py,sha256=UvZYjrLT1S8ntyxJ_vRPIkPOF00K8HatGAygErgoXTU,2990
|
220
219
|
omlish/dataclasses/impl/main.py,sha256=bWnqEDOfITjEwkLokTvOegp88KaQXJFun3krgxt3aE0,2647
|
221
220
|
omlish/dataclasses/impl/metaclass.py,sha256=rhcMHNJYISgMkC95Yq14aLEs48iK9Rzma5yb7-4mPIk,4965
|
@@ -356,12 +355,12 @@ omlish/http/coro/fdio.py,sha256=bd9K4EYVWbXV3e3npDPXI9DuDAruJiyDmrgFpgNcjzY,4035
|
|
356
355
|
omlish/http/coro/server.py,sha256=30FTcJG8kuFeThf0HJYpTzMZN-giLTBP7wr5Wl3b9X0,18285
|
357
356
|
omlish/http/coro/simple.py,sha256=inWA_ss6Nz5Rqmy4dL9_SGah4anYoDecDTRQqVIGYeY,3200
|
358
357
|
omlish/http/coro/sockets.py,sha256=rtpZZ-XCOfC5tXr4Fmo1HSn-8f5nxfIOlJaPUkQeDyU,1654
|
359
|
-
omlish/inject/__init__.py,sha256=
|
358
|
+
omlish/inject/__init__.py,sha256=RFq24cDesOTDPXIafMzVl_LprMGFGhSjXoQOIb9CKng,1887
|
360
359
|
omlish/inject/binder.py,sha256=3-6KMOcSgFE5bvthy3YUrRzCX5w7YSGmdJ3Tv2yXZGw,4022
|
361
360
|
omlish/inject/bindings.py,sha256=KTjm3aXcywnYhFyIL8aaW6ijSuiFMd3WjFSiCMU5Wrk,530
|
362
361
|
omlish/inject/eagers.py,sha256=3kGf56-DWviFNTl5mnaeSptkdkBJuCrK-7JiQFIEU-4,334
|
363
362
|
omlish/inject/elements.py,sha256=Jq2SwWFRw2WFK9sFzyrlcE8iB6kfykNoxtyWv2yChk8,1417
|
364
|
-
omlish/inject/
|
363
|
+
omlish/inject/errors.py,sha256=_wkN2tF55gQzmMOMKJC_9jYHBZzaBiCDcyqI9Sf2UZs,626
|
365
364
|
omlish/inject/injector.py,sha256=fyvaRoJXo_oibx1_IiGkncP9oXnZSKtDm7-ULNKRXHE,1071
|
366
365
|
omlish/inject/inspect.py,sha256=Uq4KMloGWF_YS2mgZbrx-JXhZQnYHHKJSr68i9yoBVc,597
|
367
366
|
omlish/inject/keys.py,sha256=BGcSiitwHa1mbbfYsd49H26zQJTgPf5ZEBaweMhiPAE,659
|
@@ -377,15 +376,15 @@ omlish/inject/types.py,sha256=Z-ZEdgtCpHBNrbxxKaMVvfeD7hYXdL4rC7A9_VGxZ6g,256
|
|
377
376
|
omlish/inject/utils.py,sha256=Gc2qq45KgkyqDt03WSvOEZBCiuqQ6ESwplx5ZRBcY5M,413
|
378
377
|
omlish/inject/impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
379
378
|
omlish/inject/impl/bindings.py,sha256=8H586RCgmvwq53XBL9WMbb-1-Tdw_hh9zxIDCwcHA1c,414
|
380
|
-
omlish/inject/impl/elements.py,sha256=
|
381
|
-
omlish/inject/impl/injector.py,sha256=
|
382
|
-
omlish/inject/impl/inspect.py,sha256=
|
379
|
+
omlish/inject/impl/elements.py,sha256=PM_055moROskSTQqmohEa6I0tt1OQ-VRNArXCMG6vyk,5947
|
380
|
+
omlish/inject/impl/injector.py,sha256=LJGmK1g6fiLSE1AFc6lTzgmvA-IQ11dlsKkGcMR7uKQ,7557
|
381
|
+
omlish/inject/impl/inspect.py,sha256=reXkNsjyvJXva5379tHTWklVK0vzqGLP0BgI_4VVPgQ,3116
|
383
382
|
omlish/inject/impl/multis.py,sha256=j2QHSpJp0jPv10yZEZJwi0w62kXFQ25gkHa026xv4-Q,2053
|
384
383
|
omlish/inject/impl/origins.py,sha256=-cdcwz3BWb5LuC9Yn5ynYOwyPsKH06-kCc-3U0PxZ5w,1640
|
385
384
|
omlish/inject/impl/privates.py,sha256=alpCYyk5VJ9lJknbRH2nLVNFYVvFhkj-VC1Vco3zCFQ,2613
|
386
385
|
omlish/inject/impl/providers.py,sha256=QnwhsujJFIHC0JTgd2Wlo1kP53i3CWTrj1nKU2DNxwg,2375
|
387
386
|
omlish/inject/impl/proxy.py,sha256=gyCME_W48Zrl7QJMKiIPwGpSctf5fhvh4ZldgtA9MEE,1641
|
388
|
-
omlish/inject/impl/scopes.py,sha256=
|
387
|
+
omlish/inject/impl/scopes.py,sha256=XSLK93qBg-v2iN4uLtO3npKH_J7i3yjMpV6r3NOYcRA,5917
|
389
388
|
omlish/io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
390
389
|
omlish/io/abc.py,sha256=M40QB2udYpCEqmlxCcHv6FlJYJY6ymmJQBlaklYv0U8,1256
|
391
390
|
omlish/io/buffers.py,sha256=9PcGefTq4Lj-qGQK4-fI67SLRBHZ-OkiY3x2pU38-e0,7279
|
@@ -420,21 +419,21 @@ omlish/iterators/iterators.py,sha256=iTQQwBE6Wzoy36dnbPIws17zbjE3zNN4KwVw4Fzh-gY
|
|
420
419
|
omlish/iterators/recipes.py,sha256=53mkexitMhkwXQZbL6DrhpT0WePQ_56uXd5Jaw3DfzI,467
|
421
420
|
omlish/iterators/tools.py,sha256=Pi4ybXytUXVZ3xwK89xpPImQfYYId9p1vIFQvVqVLqA,2551
|
422
421
|
omlish/iterators/unique.py,sha256=0jAX3kwzVfRNhe0Tmh7kVP_Q2WBIn8POo_O-rgFV0rQ,1390
|
423
|
-
omlish/lang/__init__.py,sha256=
|
422
|
+
omlish/lang/__init__.py,sha256=L5CtSSwM3wQ5G5qK-DBIyMwhSMJlM6i5Yg_YJg9YJ8s,5183
|
424
423
|
omlish/lang/attrs.py,sha256=fofCKN0X8TMu1yGqHpLpNLih9r9HWl3D3Vn3b6O791w,3891
|
425
424
|
omlish/lang/clsdct.py,sha256=HAGIvBSbCefzRjXriwYSBLO7QHKRv2UsE78jixOb-fA,1828
|
426
425
|
omlish/lang/collections.py,sha256=aGi0j6VzVe2nz4l357Y4RD5_XNl8OJbmM5qM6BclrrY,1895
|
427
|
-
omlish/lang/comparison.py,sha256=
|
426
|
+
omlish/lang/comparison.py,sha256=MOwEG0Yny-jBPHO9kQto9FSRyeNpQW24UABsghkrHxY,1356
|
428
427
|
omlish/lang/contextmanagers.py,sha256=UPH6daYwSP9cH5AfSVsJyEHk1UURMGhVPM5ZRhp_Hvw,7576
|
429
428
|
omlish/lang/datetimes.py,sha256=mrTtA67JYpfQwSlzdPcBtvm6dAyYM_dXNnlxFwFQH0M,228
|
430
429
|
omlish/lang/descriptors.py,sha256=zBtgO9LjdSTGHNUgiIqswh78WOVoGH6KzS0NbgB1Wls,6572
|
431
|
-
omlish/lang/
|
430
|
+
omlish/lang/enums.py,sha256=F9tflHfaAoV2MpyuhZzpfX9-H55M3zNa9hCszsngEo8,111
|
432
431
|
omlish/lang/functions.py,sha256=kSdVUJZmRcncMdU43rcQLZ5E2NMcRz6X6pppwLNHiWk,5762
|
433
432
|
omlish/lang/generators.py,sha256=5tbjVAywiZH6oAdj1sJLRMtIkC9y3rAkecLT7Z3m7_g,5251
|
434
433
|
omlish/lang/imports.py,sha256=Gdl6xCF89xiMOE1yDmdvKWamLq8HX-XPianO58Jdpmw,9218
|
435
434
|
omlish/lang/iterables.py,sha256=HOjcxOwyI5bBApDLsxRAGGhTTmw7fdZl2kEckxRVl-0,1994
|
436
435
|
omlish/lang/maybes.py,sha256=IPlfurHCebyDamB2scqP-JmUODN1TWr7ZL1T7qz6Jzo,3421
|
437
|
-
omlish/lang/objects.py,sha256=
|
436
|
+
omlish/lang/objects.py,sha256=LLN6N6a8toq1iw2FZVhlWod7frA_FVLVPbbb_n7P_3U,6704
|
438
437
|
omlish/lang/outcomes.py,sha256=mpFy_VoM-b74L1aCFsjsZVUHx_icZ1AHMOKeVesjOp4,8628
|
439
438
|
omlish/lang/params.py,sha256=QmNVBfJsfxjDG5ilDPgHV7sK4UwRztkSQdLTo0umb8I,6648
|
440
439
|
omlish/lang/resolving.py,sha256=ei9LDyJexsMMHB9z8diUkNmynWhd_da7h7TqrMYM6lA,1611
|
@@ -500,9 +499,9 @@ omlish/manifests/base.py,sha256=D1WvJYcBR_njkc0gpALpFCWh1h3agb9qgqphnbbPlm4,935
|
|
500
499
|
omlish/manifests/load.py,sha256=9mdsS3egmSX9pymO-m-y2Fhs4p6ruOdbsYaKT1-1Hwg,6655
|
501
500
|
omlish/manifests/static.py,sha256=7YwOVh_Ek9_aTrWsWNO8kWS10_j4K7yv3TpXZSHsvDY,501
|
502
501
|
omlish/manifests/types.py,sha256=IOt9dOe0r8okCHSL82ryi3sn4VZ6AT80g_QQR6oZtCE,306
|
503
|
-
omlish/marshal/__init__.py,sha256=
|
504
|
-
omlish/marshal/base.py,sha256=
|
505
|
-
omlish/marshal/
|
502
|
+
omlish/marshal/__init__.py,sha256=vZX1PPOJZ9kFafZySmvCoxH6YT3qJ0pUj94vVUD7QOc,3368
|
503
|
+
omlish/marshal/base.py,sha256=Q0ZRsz5z0NTI6PeWPc9mdMstJryDDbeIAdpKH9-SDps,11427
|
504
|
+
omlish/marshal/errors.py,sha256=g5XJyTHd__8lfwQ4KwgK-E5WR6MoNTMrqKP2U_QRQQQ,307
|
506
505
|
omlish/marshal/factories.py,sha256=Q926jSVjaQLEmStnHLhm_c_vqEysN1LnDCwAsFLIzXw,2970
|
507
506
|
omlish/marshal/global_.py,sha256=sdBC6PbP77iUAYZ9GIYyAFrbmg14bp6iU3f1l5tpOSE,1378
|
508
507
|
omlish/marshal/naming.py,sha256=lIklR_Od4x1ghltAgOzqcKhHs-leeSv2YmFhCHO7GIs,613
|
@@ -539,7 +538,7 @@ omlish/marshal/singular/primitives.py,sha256=EZi2AIi_Onw1pekAiL4ujz4w-ASuOGWCu4M
|
|
539
538
|
omlish/marshal/singular/uuids.py,sha256=rBMn2zwbw8tJoObeyg7E-D3l3OymLg-pguNUqLKGRN0,923
|
540
539
|
omlish/marshal/trivial/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
541
540
|
omlish/marshal/trivial/any.py,sha256=YjbHgUtwktXuFfkPCSQIxdwC6tA70CPA3-msAE4slKs,791
|
542
|
-
omlish/marshal/trivial/forbidden.py,sha256=
|
541
|
+
omlish/marshal/trivial/forbidden.py,sha256=w-U_tZB7X0IuFpV4j1DxCQmOL02InmZSICROtq-w3-s,1033
|
543
542
|
omlish/marshal/trivial/nop.py,sha256=EoxaCbfkLbDfSGdE_xJbH1ghIeYwaptmqq3OGHKgmAg,471
|
544
543
|
omlish/math/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
545
544
|
omlish/math/bits.py,sha256=LC3dTgrvodNbfxy9dvlya61eQuDEy0azzQLCvEbFHj4,3476
|
@@ -622,16 +621,16 @@ omlish/specs/irc/protocol/rendering.py,sha256=PDhl5dIU9xffmIO3vHWTPh17Cb-E34vIkF
|
|
622
621
|
omlish/specs/irc/protocol/tags.py,sha256=_HnzjPCGhLses_P3Os5ReuVdRacmanTb8kEeCxsfqWE,2779
|
623
622
|
omlish/specs/irc/protocol/utils.py,sha256=8VZavx37IospJvhwjnP39sYSiBwzcxNyCJ_doxrtM-Y,687
|
624
623
|
omlish/specs/jmespath/LICENSE,sha256=IH-ZZlZkS8XMkf_ubNVD1aYHQ2l_wd0tmHtXrCcYpRU,1113
|
625
|
-
omlish/specs/jmespath/__init__.py,sha256=
|
624
|
+
omlish/specs/jmespath/__init__.py,sha256=qRnTX6yt0nnuog1nOQZ5sSYgZ1aZcCMHCSFPfuL9KhE,2083
|
626
625
|
omlish/specs/jmespath/__main__.py,sha256=wIXm6bs08etNG_GZlN2rBkADPb0rKfL2HSkm8spnpxw,200
|
627
626
|
omlish/specs/jmespath/ast.py,sha256=XhcUGodHIdsY3-hVZEfpeW6LBehRjLbxVFXkMfZhRdk,5386
|
628
|
-
omlish/specs/jmespath/cli.py,sha256=
|
629
|
-
omlish/specs/jmespath/
|
630
|
-
omlish/specs/jmespath/functions.py,sha256=
|
631
|
-
omlish/specs/jmespath/lexer.py,sha256=
|
632
|
-
omlish/specs/jmespath/parser.py,sha256=
|
627
|
+
omlish/specs/jmespath/cli.py,sha256=ThesJo0mWt5NXy0DK0-21QDLO894N0voXN0fG6QCHCw,2142
|
628
|
+
omlish/specs/jmespath/errors.py,sha256=Co1HiUBPFNwFgZY3FV_ayuZoSgZIAmDcImImxauYNxc,4435
|
629
|
+
omlish/specs/jmespath/functions.py,sha256=YnuwlgkcbUJWlqOvSpN3LGXZpF0fpImKa--FLkA7-qc,22571
|
630
|
+
omlish/specs/jmespath/lexer.py,sha256=WGxkwQe_dcHWcJcGg9q6K-8_Q0oRdWkw09dYGFNTHbk,12639
|
631
|
+
omlish/specs/jmespath/parser.py,sha256=yfkydotVR4LBhrUTsptL_kLYDoGZrRN9zSEs_76kvZM,24441
|
633
632
|
omlish/specs/jmespath/scope.py,sha256=UyDsl9rv_c8DCjJBuVIA2ESu1jrgYvuwEKiaJDQKnT0,1590
|
634
|
-
omlish/specs/jmespath/visitor.py,sha256=
|
633
|
+
omlish/specs/jmespath/visitor.py,sha256=4jCK_WDf7mBwxAZY2AKAcLOJICQZCSL7Gny8-IplicA,16565
|
635
634
|
omlish/specs/jsonrpc/__init__.py,sha256=QQwr-jkgvwr1ZMlNwl5W1TuHcxx8RuzQVFwWwNhp5sM,515
|
636
635
|
omlish/specs/jsonrpc/errors.py,sha256=-Zgmlo6bV6J8w5f8h9axQgLquIFBHDgIwcpufEH5NsE,707
|
637
636
|
omlish/specs/jsonrpc/marshal.py,sha256=HM736piPGnBZrg8CMLDX-L5fZpegyF6l6JUjzLoSDtk,1852
|
@@ -789,9 +788,9 @@ omlish/typedvalues/holder.py,sha256=4SwRezsmuDDEO5gENGx8kTm30pblF5UktoEAu02i-Gk,
|
|
789
788
|
omlish/typedvalues/marshal.py,sha256=eWMrmuzPk3pX5AlILc5YBvuJBUHRQA_vwkxRm5aHiGs,4209
|
790
789
|
omlish/typedvalues/reflect.py,sha256=y_7IY8_4cLVRvD3ug-_-cDaO5RtzC1rLVFzkeAPALf8,683
|
791
790
|
omlish/typedvalues/values.py,sha256=Acyf6xSdNHxrkRXLXrFqJouk35YOveso1VqTbyPwQW4,1223
|
792
|
-
omlish-0.0.0.
|
793
|
-
omlish-0.0.0.
|
794
|
-
omlish-0.0.0.
|
795
|
-
omlish-0.0.0.
|
796
|
-
omlish-0.0.0.
|
797
|
-
omlish-0.0.0.
|
791
|
+
omlish-0.0.0.dev283.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
792
|
+
omlish-0.0.0.dev283.dist-info/METADATA,sha256=WAhCPvqakVe4jVCoG1hK3V7rG55GZz9zefVlVObxqCo,4198
|
793
|
+
omlish-0.0.0.dev283.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
794
|
+
omlish-0.0.0.dev283.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
795
|
+
omlish-0.0.0.dev283.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
796
|
+
omlish-0.0.0.dev283.dist-info/RECORD,,
|
@@ -1,93 +0,0 @@
|
|
1
|
-
import abc
|
2
|
-
import dataclasses as dc
|
3
|
-
import typing as ta
|
4
|
-
|
5
|
-
from ... import defs
|
6
|
-
|
7
|
-
|
8
|
-
class AbstractFieldDescriptor(abc.ABC):
|
9
|
-
def __init__(
|
10
|
-
self,
|
11
|
-
*,
|
12
|
-
default: ta.Any = dc.MISSING,
|
13
|
-
frozen: bool = False,
|
14
|
-
name: str | None = None,
|
15
|
-
pre_set: ta.Callable[[ta.Any, ta.Any], ta.Any] | None = None,
|
16
|
-
post_set: ta.Callable[[ta.Any, ta.Any], None] | None = None,
|
17
|
-
) -> None:
|
18
|
-
super().__init__()
|
19
|
-
|
20
|
-
self._default = default
|
21
|
-
self._frozen = frozen
|
22
|
-
self._name = name
|
23
|
-
self._pre_set = pre_set
|
24
|
-
self._post_set = post_set
|
25
|
-
|
26
|
-
defs.repr('name')
|
27
|
-
defs.getter('default', 'frozen', 'name', 'pre_set', 'post_set')
|
28
|
-
|
29
|
-
def __set_name__(self, owner, name):
|
30
|
-
if self._name is None:
|
31
|
-
self._name = name
|
32
|
-
|
33
|
-
def __get__(self, instance, owner=None):
|
34
|
-
if instance is not None:
|
35
|
-
try:
|
36
|
-
return self._get(instance)
|
37
|
-
except AttributeError:
|
38
|
-
pass
|
39
|
-
if self._default is not dc.MISSING:
|
40
|
-
return self._default
|
41
|
-
raise AttributeError(self._name)
|
42
|
-
|
43
|
-
@abc.abstractmethod
|
44
|
-
def _get(self, instance):
|
45
|
-
raise NotImplementedError
|
46
|
-
|
47
|
-
def __set__(self, instance, value):
|
48
|
-
if self._frozen:
|
49
|
-
raise dc.FrozenInstanceError(f'cannot assign to field {self._name!r}')
|
50
|
-
if self._pre_set is not None:
|
51
|
-
value = self._pre_set(instance, value)
|
52
|
-
self._set(instance, value)
|
53
|
-
if self._post_set is not None:
|
54
|
-
self._post_set(instance, value)
|
55
|
-
|
56
|
-
@abc.abstractmethod
|
57
|
-
def _set(self, instance, value):
|
58
|
-
raise NotImplementedError
|
59
|
-
|
60
|
-
def __delete__(self, instance):
|
61
|
-
if self._frozen:
|
62
|
-
raise dc.FrozenInstanceError(f'cannot delete field {self._name!r}')
|
63
|
-
self._del(instance)
|
64
|
-
|
65
|
-
@abc.abstractmethod
|
66
|
-
def _del(self, instance):
|
67
|
-
raise NotImplementedError
|
68
|
-
|
69
|
-
|
70
|
-
class PyFieldDescriptor(AbstractFieldDescriptor):
|
71
|
-
def __init__(
|
72
|
-
self,
|
73
|
-
attr: str,
|
74
|
-
**kwargs: ta.Any,
|
75
|
-
) -> None:
|
76
|
-
super().__init__(**kwargs)
|
77
|
-
|
78
|
-
self._attr = attr
|
79
|
-
|
80
|
-
defs.repr('attr', 'name')
|
81
|
-
defs.getter('attr')
|
82
|
-
|
83
|
-
def _get(self, instance):
|
84
|
-
return getattr(instance, self._attr)
|
85
|
-
|
86
|
-
def _set(self, instance, value):
|
87
|
-
setattr(instance, self._attr, value)
|
88
|
-
|
89
|
-
def _del(self, instance):
|
90
|
-
delattr(instance, self._attr)
|
91
|
-
|
92
|
-
|
93
|
-
FieldDescriptor = PyFieldDescriptor
|
omlish/lang/exceptions.py
DELETED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|