omlish 0.0.0.dev447__py3-none-any.whl → 0.0.0.dev493__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.
Potentially problematic release.
This version of omlish might be problematic. Click here for more details.
- omlish/.omlish-manifests.json +12 -0
- omlish/README.md +199 -0
- omlish/__about__.py +21 -16
- omlish/argparse/all.py +17 -9
- omlish/argparse/cli.py +16 -3
- omlish/argparse/utils.py +21 -0
- omlish/asyncs/asyncio/rlock.py +110 -0
- omlish/asyncs/asyncio/sync.py +43 -0
- omlish/asyncs/asyncio/utils.py +2 -0
- omlish/asyncs/sync.py +25 -0
- omlish/bootstrap/_marshal.py +1 -1
- omlish/bootstrap/diag.py +12 -21
- omlish/bootstrap/main.py +2 -5
- omlish/bootstrap/sys.py +27 -28
- omlish/cexts/__init__.py +0 -0
- omlish/cexts/include/omlish/omlish.hh +1 -0
- omlish/collections/__init__.py +13 -1
- omlish/collections/attrregistry.py +210 -0
- omlish/collections/cache/impl.py +1 -0
- omlish/collections/identity.py +1 -0
- omlish/collections/mappings.py +28 -0
- omlish/collections/trie.py +5 -1
- omlish/collections/utils.py +77 -0
- omlish/concurrent/all.py +2 -1
- omlish/concurrent/futures.py +25 -0
- omlish/concurrent/threadlets.py +1 -1
- omlish/daemons/reparent.py +2 -3
- omlish/daemons/spawning.py +2 -3
- omlish/dataclasses/__init__.py +2 -0
- omlish/dataclasses/impl/api/classes/decorator.py +3 -0
- omlish/dataclasses/impl/api/classes/make.py +3 -0
- omlish/dataclasses/impl/concerns/repr.py +15 -2
- omlish/dataclasses/impl/configs.py +97 -37
- omlish/dataclasses/impl/generation/compilation.py +21 -19
- omlish/dataclasses/impl/generation/globals.py +1 -0
- omlish/dataclasses/impl/generation/ops.py +1 -0
- omlish/dataclasses/impl/generation/plans.py +2 -17
- omlish/dataclasses/impl/generation/processor.py +106 -25
- omlish/dataclasses/impl/processing/base.py +8 -0
- omlish/dataclasses/impl/processing/driving.py +19 -7
- omlish/dataclasses/specs.py +1 -0
- omlish/dataclasses/tools/modifiers.py +5 -0
- omlish/diag/_pycharm/runhack.py +1 -1
- omlish/diag/cmds/__init__.py +0 -0
- omlish/diag/{lslocks.py → cmds/lslocks.py} +6 -6
- omlish/diag/{lsof.py → cmds/lsof.py} +6 -6
- omlish/diag/{ps.py → cmds/ps.py} +6 -6
- omlish/diag/pycharm.py +16 -2
- omlish/diag/pydevd.py +58 -40
- omlish/diag/replserver/console.py +1 -1
- omlish/dispatch/__init__.py +18 -12
- omlish/dispatch/methods.py +50 -140
- omlish/dom/rendering.py +1 -1
- omlish/formats/dotenv.py +1 -1
- omlish/formats/json/stream/__init__.py +13 -0
- omlish/funcs/guard.py +225 -0
- omlish/graphs/dot/rendering.py +1 -1
- omlish/http/all.py +44 -4
- omlish/http/clients/asyncs.py +33 -27
- omlish/http/clients/base.py +17 -1
- omlish/http/clients/coro/__init__.py +0 -0
- omlish/http/clients/coro/sync.py +171 -0
- omlish/http/clients/default.py +208 -29
- omlish/http/clients/executor.py +56 -0
- omlish/http/clients/httpx.py +72 -11
- omlish/http/clients/middleware.py +181 -0
- omlish/http/clients/sync.py +33 -27
- omlish/http/clients/syncasync.py +49 -0
- omlish/http/clients/urllib.py +6 -3
- omlish/http/coro/client/connection.py +15 -6
- omlish/http/coro/io.py +2 -0
- omlish/http/flasky/__init__.py +40 -0
- omlish/http/flasky/_compat.py +2 -0
- omlish/http/flasky/api.py +82 -0
- omlish/http/flasky/app.py +203 -0
- omlish/http/flasky/cvs.py +59 -0
- omlish/http/flasky/requests.py +20 -0
- omlish/http/flasky/responses.py +23 -0
- omlish/http/flasky/routes.py +23 -0
- omlish/http/flasky/types.py +15 -0
- omlish/http/urls.py +67 -0
- omlish/inject/__init__.py +57 -29
- omlish/inject/_dataclasses.py +5148 -0
- omlish/inject/binder.py +11 -52
- omlish/inject/eagers.py +2 -0
- omlish/inject/elements.py +27 -0
- omlish/inject/helpers/__init__.py +0 -0
- omlish/inject/{utils.py → helpers/constfn.py} +3 -3
- omlish/inject/{tags.py → helpers/id.py} +2 -2
- omlish/inject/helpers/late.py +76 -0
- omlish/inject/{managed.py → helpers/managed.py} +10 -10
- omlish/inject/helpers/multis.py +143 -0
- omlish/inject/helpers/wrappers.py +54 -0
- omlish/inject/impl/elements.py +54 -21
- omlish/inject/impl/injector.py +29 -25
- omlish/inject/impl/inspect.py +10 -1
- omlish/inject/impl/maysync.py +3 -4
- omlish/inject/impl/multis.py +3 -0
- omlish/inject/impl/sync.py +3 -4
- omlish/inject/injector.py +31 -2
- omlish/inject/inspect.py +35 -0
- omlish/inject/maysync.py +2 -4
- omlish/inject/multis.py +8 -0
- omlish/inject/overrides.py +3 -3
- omlish/inject/privates.py +6 -0
- omlish/inject/providers.py +3 -2
- omlish/inject/sync.py +5 -4
- omlish/io/buffers.py +118 -0
- omlish/io/readers.py +29 -0
- omlish/iterators/transforms.py +2 -2
- omlish/lang/__init__.py +180 -97
- omlish/lang/_asyncs.cc +186 -0
- omlish/lang/asyncs.py +17 -0
- omlish/lang/casing.py +11 -0
- omlish/lang/contextmanagers.py +28 -4
- omlish/lang/functions.py +31 -22
- omlish/lang/imports/_capture.cc +11 -9
- omlish/lang/imports/capture.py +363 -170
- omlish/lang/imports/proxy.py +455 -152
- omlish/lang/lazyglobals.py +22 -9
- omlish/lang/params.py +17 -0
- omlish/lang/recursion.py +0 -1
- omlish/lang/sequences.py +124 -0
- omlish/lifecycles/README.md +30 -0
- omlish/lifecycles/__init__.py +87 -13
- omlish/lifecycles/_dataclasses.py +1388 -0
- omlish/lifecycles/base.py +178 -64
- omlish/lifecycles/contextmanagers.py +113 -4
- omlish/lifecycles/controller.py +150 -87
- omlish/lifecycles/injection.py +143 -0
- omlish/lifecycles/listeners.py +56 -0
- omlish/lifecycles/managed.py +142 -0
- omlish/lifecycles/manager.py +218 -93
- omlish/lifecycles/states.py +2 -0
- omlish/lifecycles/transitions.py +3 -0
- omlish/lifecycles/unwrap.py +57 -0
- omlish/lite/abstract.py +54 -24
- omlish/lite/asyncs.py +2 -2
- omlish/lite/attrops.py +2 -0
- omlish/lite/contextmanagers.py +4 -4
- omlish/lite/dataclasses.py +44 -0
- omlish/lite/maybes.py +8 -0
- omlish/lite/maysync.py +1 -5
- omlish/lite/pycharm.py +1 -1
- omlish/lite/typing.py +24 -0
- omlish/logs/_amalg.py +1 -1
- omlish/logs/all.py +25 -11
- omlish/logs/asyncs.py +73 -0
- omlish/logs/base.py +101 -12
- omlish/logs/contexts.py +4 -1
- omlish/logs/lists.py +125 -0
- omlish/logs/modules.py +19 -1
- omlish/logs/std/loggers.py +6 -1
- omlish/logs/std/noisy.py +11 -9
- omlish/logs/{standard.py → std/standard.py} +3 -4
- omlish/logs/utils.py +17 -2
- omlish/manifests/loading.py +2 -1
- omlish/marshal/__init__.py +33 -13
- omlish/marshal/_dataclasses.py +2774 -0
- omlish/marshal/base/configs.py +12 -0
- omlish/marshal/base/contexts.py +36 -21
- omlish/marshal/base/funcs.py +8 -11
- omlish/marshal/base/options.py +8 -0
- omlish/marshal/base/registries.py +146 -44
- omlish/marshal/base/types.py +40 -16
- omlish/marshal/composite/iterables.py +33 -20
- omlish/marshal/composite/literals.py +20 -18
- omlish/marshal/composite/mappings.py +36 -23
- omlish/marshal/composite/maybes.py +29 -19
- omlish/marshal/composite/newtypes.py +16 -16
- omlish/marshal/composite/optionals.py +14 -14
- omlish/marshal/composite/special.py +15 -15
- omlish/marshal/composite/unions/__init__.py +0 -0
- omlish/marshal/composite/unions/literals.py +93 -0
- omlish/marshal/composite/unions/primitives.py +103 -0
- omlish/marshal/factories/invalidate.py +18 -68
- omlish/marshal/factories/method.py +26 -0
- omlish/marshal/factories/moduleimport/factories.py +22 -65
- omlish/marshal/factories/multi.py +13 -25
- omlish/marshal/factories/recursive.py +42 -56
- omlish/marshal/factories/typecache.py +29 -74
- omlish/marshal/factories/typemap.py +42 -43
- omlish/marshal/objects/dataclasses.py +129 -106
- omlish/marshal/objects/marshal.py +18 -14
- omlish/marshal/objects/namedtuples.py +48 -42
- omlish/marshal/objects/unmarshal.py +19 -15
- omlish/marshal/polymorphism/marshal.py +9 -11
- omlish/marshal/polymorphism/metadata.py +16 -5
- omlish/marshal/polymorphism/standard.py +13 -1
- omlish/marshal/polymorphism/unions.py +15 -105
- omlish/marshal/polymorphism/unmarshal.py +9 -10
- omlish/marshal/singular/enums.py +14 -18
- omlish/marshal/standard.py +10 -6
- omlish/marshal/trivial/any.py +1 -1
- omlish/marshal/trivial/forbidden.py +21 -26
- omlish/metadata.py +23 -1
- omlish/os/forkhooks.py +4 -0
- omlish/os/pidfiles/pinning.py +2 -2
- omlish/reflect/__init__.py +43 -26
- omlish/reflect/ops.py +10 -1
- omlish/reflect/types.py +1 -0
- omlish/secrets/marshal.py +1 -1
- omlish/specs/jmespath/__init__.py +12 -3
- omlish/specs/jmespath/_dataclasses.py +2893 -0
- omlish/specs/jmespath/ast.py +1 -1
- omlish/specs/jsonrpc/__init__.py +13 -0
- omlish/specs/jsonrpc/_marshal.py +32 -23
- omlish/specs/jsonrpc/conns.py +10 -7
- omlish/specs/jsonschema/_marshal.py +1 -1
- omlish/specs/jsonschema/keywords/__init__.py +7 -0
- omlish/specs/jsonschema/keywords/_dataclasses.py +1644 -0
- omlish/specs/openapi/_marshal.py +31 -22
- omlish/sql/__init__.py +24 -5
- omlish/sql/{tabledefs/alchemy.py → alchemy/tabledefs.py} +2 -2
- omlish/sql/api/dbapi.py +1 -1
- omlish/sql/dbapi/__init__.py +15 -0
- omlish/sql/{dbapi.py → dbapi/drivers.py} +2 -2
- omlish/sql/queries/__init__.py +3 -0
- omlish/sql/queries/_marshal.py +2 -2
- omlish/sql/queries/rendering.py +1 -1
- omlish/sql/tabledefs/_marshal.py +1 -1
- omlish/subprocesses/base.py +4 -0
- omlish/subprocesses/editor.py +1 -1
- omlish/sync.py +155 -21
- omlish/term/alt.py +60 -0
- omlish/term/confirm.py +8 -8
- omlish/term/pager.py +235 -0
- omlish/term/terminfo.py +935 -0
- omlish/term/termstate.py +67 -0
- omlish/term/vt100/terminal.py +0 -3
- omlish/testing/pytest/plugins/asyncs/fixtures.py +4 -1
- omlish/testing/pytest/plugins/asyncs/plugin.py +2 -0
- omlish/testing/pytest/plugins/skips.py +2 -1
- omlish/testing/unittest/main.py +3 -3
- omlish/text/docwrap/__init__.py +3 -0
- omlish/text/docwrap/__main__.py +11 -0
- omlish/text/docwrap/api.py +83 -0
- omlish/text/docwrap/cli.py +91 -0
- omlish/text/docwrap/groups.py +84 -0
- omlish/text/docwrap/lists.py +167 -0
- omlish/text/docwrap/parts.py +146 -0
- omlish/text/docwrap/reflowing.py +106 -0
- omlish/text/docwrap/rendering.py +151 -0
- omlish/text/docwrap/utils.py +11 -0
- omlish/text/docwrap/wrapping.py +59 -0
- omlish/text/filecache.py +2 -2
- omlish/text/lorem.py +6 -0
- omlish/text/parts.py +2 -2
- omlish/text/textwrap.py +51 -0
- omlish/typedvalues/marshal.py +85 -59
- omlish/typedvalues/values.py +2 -1
- {omlish-0.0.0.dev447.dist-info → omlish-0.0.0.dev493.dist-info}/METADATA +36 -32
- {omlish-0.0.0.dev447.dist-info → omlish-0.0.0.dev493.dist-info}/RECORD +260 -199
- omlish/dataclasses/impl/generation/mangling.py +0 -18
- omlish/funcs/match.py +0 -227
- omlish/lifecycles/abstract.py +0 -86
- omlish/marshal/factories/match.py +0 -34
- omlish/marshal/factories/simple.py +0 -28
- /omlish/inject/{impl → helpers}/proxy.py +0 -0
- /omlish/inject/impl/{providers2.py → providersmap.py} +0 -0
- /omlish/sql/{abc.py → dbapi/abc.py} +0 -0
- {omlish-0.0.0.dev447.dist-info → omlish-0.0.0.dev493.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev447.dist-info → omlish-0.0.0.dev493.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev447.dist-info → omlish-0.0.0.dev493.dist-info}/licenses/LICENSE +0 -0
- {omlish-0.0.0.dev447.dist-info → omlish-0.0.0.dev493.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,2893 @@
|
|
|
1
|
+
# @omlish-generated
|
|
2
|
+
# type: ignore
|
|
3
|
+
# ruff: noqa
|
|
4
|
+
# flake8: noqa
|
|
5
|
+
import dataclasses
|
|
6
|
+
import reprlib
|
|
7
|
+
import types
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
##
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
REGISTRY = {}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _register(**kwargs):
|
|
17
|
+
def inner(fn):
|
|
18
|
+
REGISTRY[kwargs['plan_repr']] = (kwargs, fn)
|
|
19
|
+
return fn
|
|
20
|
+
return inner
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
##
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@_register(
|
|
27
|
+
plan_repr=(
|
|
28
|
+
"Plans(tup=(CopyPlan(fields=('left', 'right')), EqPlan(fields=('left', 'right')), FrozenPlan(fields=('left', 'r"
|
|
29
|
+
"ight'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('left', 'right'), cache=False), Init"
|
|
30
|
+
"Plan(fields=(InitPlan.Field(name='left', annotation=OpRef(name='init.fields.0.annotation'), default=None, defa"
|
|
31
|
+
"ult_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_"
|
|
32
|
+
"type=None), InitPlan.Field(name='right', annotation=OpRef(name='init.fields.1.annotation'), default=None, defa"
|
|
33
|
+
"ult_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_"
|
|
34
|
+
"type=None)), self_param='self', std_params=('left', 'right'), kw_only_params=(), frozen=True, slots=False, pos"
|
|
35
|
+
"t_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='left', kw_only=False,"
|
|
36
|
+
" fn=None), ReprPlan.Field(name='right', kw_only=False, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
37
|
+
),
|
|
38
|
+
plan_repr_sha1='683a8fba51ac0aaee8d49314879ce436e8ee2d3b',
|
|
39
|
+
op_ref_idents=(
|
|
40
|
+
'__dataclass__init__fields__0__annotation',
|
|
41
|
+
'__dataclass__init__fields__1__annotation',
|
|
42
|
+
),
|
|
43
|
+
cls_names=(
|
|
44
|
+
('omlish.specs.jmespath', 'AndExpression'),
|
|
45
|
+
('omlish.specs.jmespath', 'OrExpression'),
|
|
46
|
+
('omlish.specs.jmespath', 'Pipe'),
|
|
47
|
+
('omlish.specs.jmespath', 'Projection'),
|
|
48
|
+
('omlish.specs.jmespath', 'ValueProjection'),
|
|
49
|
+
),
|
|
50
|
+
)
|
|
51
|
+
def _process_dataclass__683a8fba51ac0aaee8d49314879ce436e8ee2d3b():
|
|
52
|
+
def _process_dataclass(
|
|
53
|
+
*,
|
|
54
|
+
__dataclass__cls,
|
|
55
|
+
__dataclass__init__fields__0__annotation,
|
|
56
|
+
__dataclass__init__fields__1__annotation,
|
|
57
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
58
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
59
|
+
__dataclass__FnValidationError, # noqa
|
|
60
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
61
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
62
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
63
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
64
|
+
__dataclass__None=None, # noqa
|
|
65
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
66
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
67
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
68
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
69
|
+
__dataclass__property=property, # noqa
|
|
70
|
+
):
|
|
71
|
+
def __copy__(self):
|
|
72
|
+
if self.__class__ is not __dataclass__cls:
|
|
73
|
+
raise TypeError(self)
|
|
74
|
+
return __dataclass__cls( # noqa
|
|
75
|
+
left=self.left,
|
|
76
|
+
right=self.right,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
80
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
81
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
82
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
83
|
+
|
|
84
|
+
def __eq__(self, other):
|
|
85
|
+
if self is other:
|
|
86
|
+
return True
|
|
87
|
+
if self.__class__ is not other.__class__:
|
|
88
|
+
return NotImplemented
|
|
89
|
+
return (
|
|
90
|
+
self.left == other.left and
|
|
91
|
+
self.right == other.right
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
95
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
96
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
97
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
98
|
+
|
|
99
|
+
__dataclass___setattr_frozen_fields = {
|
|
100
|
+
'left',
|
|
101
|
+
'right',
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
def __setattr__(self, name, value):
|
|
105
|
+
if (
|
|
106
|
+
type(self) is __dataclass__cls
|
|
107
|
+
or name in __dataclass___setattr_frozen_fields
|
|
108
|
+
):
|
|
109
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
110
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
111
|
+
|
|
112
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
113
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
114
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
115
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
116
|
+
|
|
117
|
+
__dataclass___delattr_frozen_fields = {
|
|
118
|
+
'left',
|
|
119
|
+
'right',
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
def __delattr__(self, name):
|
|
123
|
+
if (
|
|
124
|
+
type(self) is __dataclass__cls
|
|
125
|
+
or name in __dataclass___delattr_frozen_fields
|
|
126
|
+
):
|
|
127
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
128
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
129
|
+
|
|
130
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
131
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
132
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
133
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
134
|
+
|
|
135
|
+
def __hash__(self):
|
|
136
|
+
return hash((
|
|
137
|
+
self.left,
|
|
138
|
+
self.right,
|
|
139
|
+
))
|
|
140
|
+
|
|
141
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
142
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
143
|
+
|
|
144
|
+
def __init__(
|
|
145
|
+
self,
|
|
146
|
+
left: __dataclass__init__fields__0__annotation,
|
|
147
|
+
right: __dataclass__init__fields__1__annotation,
|
|
148
|
+
) -> __dataclass__None:
|
|
149
|
+
__dataclass__object_setattr(self, 'left', left)
|
|
150
|
+
__dataclass__object_setattr(self, 'right', right)
|
|
151
|
+
|
|
152
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
153
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
154
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
155
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
156
|
+
|
|
157
|
+
@__dataclass___recursive_repr()
|
|
158
|
+
def __repr__(self):
|
|
159
|
+
parts = []
|
|
160
|
+
parts.append(f"left={self.left!r}")
|
|
161
|
+
parts.append(f"right={self.right!r}")
|
|
162
|
+
return (
|
|
163
|
+
f"{self.__class__.__qualname__}("
|
|
164
|
+
f"{', '.join(parts)}"
|
|
165
|
+
f")"
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
169
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
170
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
171
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
172
|
+
|
|
173
|
+
return _process_dataclass
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
@_register(
|
|
177
|
+
plan_repr=(
|
|
178
|
+
"Plans(tup=(CopyPlan(fields=('operator', 'left', 'right')), EqPlan(fields=('operator', 'left', 'right')), Froze"
|
|
179
|
+
"nPlan(fields=('operator', 'left', 'right'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=("
|
|
180
|
+
"'operator', 'left', 'right'), cache=False), InitPlan(fields=(InitPlan.Field(name='operator', annotation=OpRef("
|
|
181
|
+
"name='init.fields.0.annotation'), default=None, default_factory=None, init=True, override=False, field_type=Fi"
|
|
182
|
+
"eldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='left', annotation=OpRef(n"
|
|
183
|
+
"ame='init.fields.1.annotation'), default=None, default_factory=None, init=True, override=False, field_type=Fie"
|
|
184
|
+
"ldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='right', annotation=OpRef(n"
|
|
185
|
+
"ame='init.fields.2.annotation'), default=None, default_factory=None, init=True, override=False, field_type=Fie"
|
|
186
|
+
"ldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=('operator', 'le"
|
|
187
|
+
"ft', 'right'), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=("
|
|
188
|
+
")), ReprPlan(fields=(ReprPlan.Field(name='operator', kw_only=False, fn=None), ReprPlan.Field(name='left', kw_o"
|
|
189
|
+
"nly=False, fn=None), ReprPlan.Field(name='right', kw_only=False, fn=None)), id=False, terse=False, default_fn="
|
|
190
|
+
"None)))"
|
|
191
|
+
),
|
|
192
|
+
plan_repr_sha1='9ad32a9de77661d138040ae8b9ef479f313da67b',
|
|
193
|
+
op_ref_idents=(
|
|
194
|
+
'__dataclass__init__fields__0__annotation',
|
|
195
|
+
'__dataclass__init__fields__1__annotation',
|
|
196
|
+
'__dataclass__init__fields__2__annotation',
|
|
197
|
+
),
|
|
198
|
+
cls_names=(
|
|
199
|
+
('omlish.specs.jmespath', 'Arithmetic'),
|
|
200
|
+
),
|
|
201
|
+
)
|
|
202
|
+
def _process_dataclass__9ad32a9de77661d138040ae8b9ef479f313da67b():
|
|
203
|
+
def _process_dataclass(
|
|
204
|
+
*,
|
|
205
|
+
__dataclass__cls,
|
|
206
|
+
__dataclass__init__fields__0__annotation,
|
|
207
|
+
__dataclass__init__fields__1__annotation,
|
|
208
|
+
__dataclass__init__fields__2__annotation,
|
|
209
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
210
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
211
|
+
__dataclass__FnValidationError, # noqa
|
|
212
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
213
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
214
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
215
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
216
|
+
__dataclass__None=None, # noqa
|
|
217
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
218
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
219
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
220
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
221
|
+
__dataclass__property=property, # noqa
|
|
222
|
+
):
|
|
223
|
+
def __copy__(self):
|
|
224
|
+
if self.__class__ is not __dataclass__cls:
|
|
225
|
+
raise TypeError(self)
|
|
226
|
+
return __dataclass__cls( # noqa
|
|
227
|
+
operator=self.operator,
|
|
228
|
+
left=self.left,
|
|
229
|
+
right=self.right,
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
233
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
234
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
235
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
236
|
+
|
|
237
|
+
def __eq__(self, other):
|
|
238
|
+
if self is other:
|
|
239
|
+
return True
|
|
240
|
+
if self.__class__ is not other.__class__:
|
|
241
|
+
return NotImplemented
|
|
242
|
+
return (
|
|
243
|
+
self.operator == other.operator and
|
|
244
|
+
self.left == other.left and
|
|
245
|
+
self.right == other.right
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
249
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
250
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
251
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
252
|
+
|
|
253
|
+
__dataclass___setattr_frozen_fields = {
|
|
254
|
+
'operator',
|
|
255
|
+
'left',
|
|
256
|
+
'right',
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
def __setattr__(self, name, value):
|
|
260
|
+
if (
|
|
261
|
+
type(self) is __dataclass__cls
|
|
262
|
+
or name in __dataclass___setattr_frozen_fields
|
|
263
|
+
):
|
|
264
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
265
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
266
|
+
|
|
267
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
268
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
269
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
270
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
271
|
+
|
|
272
|
+
__dataclass___delattr_frozen_fields = {
|
|
273
|
+
'operator',
|
|
274
|
+
'left',
|
|
275
|
+
'right',
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
def __delattr__(self, name):
|
|
279
|
+
if (
|
|
280
|
+
type(self) is __dataclass__cls
|
|
281
|
+
or name in __dataclass___delattr_frozen_fields
|
|
282
|
+
):
|
|
283
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
284
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
285
|
+
|
|
286
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
287
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
288
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
289
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
290
|
+
|
|
291
|
+
def __hash__(self):
|
|
292
|
+
return hash((
|
|
293
|
+
self.operator,
|
|
294
|
+
self.left,
|
|
295
|
+
self.right,
|
|
296
|
+
))
|
|
297
|
+
|
|
298
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
299
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
300
|
+
|
|
301
|
+
def __init__(
|
|
302
|
+
self,
|
|
303
|
+
operator: __dataclass__init__fields__0__annotation,
|
|
304
|
+
left: __dataclass__init__fields__1__annotation,
|
|
305
|
+
right: __dataclass__init__fields__2__annotation,
|
|
306
|
+
) -> __dataclass__None:
|
|
307
|
+
__dataclass__object_setattr(self, 'operator', operator)
|
|
308
|
+
__dataclass__object_setattr(self, 'left', left)
|
|
309
|
+
__dataclass__object_setattr(self, 'right', right)
|
|
310
|
+
|
|
311
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
312
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
313
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
314
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
315
|
+
|
|
316
|
+
@__dataclass___recursive_repr()
|
|
317
|
+
def __repr__(self):
|
|
318
|
+
parts = []
|
|
319
|
+
parts.append(f"operator={self.operator!r}")
|
|
320
|
+
parts.append(f"left={self.left!r}")
|
|
321
|
+
parts.append(f"right={self.right!r}")
|
|
322
|
+
return (
|
|
323
|
+
f"{self.__class__.__qualname__}("
|
|
324
|
+
f"{', '.join(parts)}"
|
|
325
|
+
f")"
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
329
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
330
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
331
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
332
|
+
|
|
333
|
+
return _process_dataclass
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
@_register(
|
|
337
|
+
plan_repr=(
|
|
338
|
+
"Plans(tup=(CopyPlan(fields=('operator', 'expression')), EqPlan(fields=('operator', 'expression')), FrozenPlan("
|
|
339
|
+
"fields=('operator', 'expression'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('operator"
|
|
340
|
+
"', 'expression'), cache=False), InitPlan(fields=(InitPlan.Field(name='operator', annotation=OpRef(name='init.f"
|
|
341
|
+
"ields.0.annotation'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.INST"
|
|
342
|
+
"ANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='expression', annotation=OpRef(name='i"
|
|
343
|
+
"nit.fields.1.annotation'), default=None, default_factory=None, init=True, override=False, field_type=FieldType"
|
|
344
|
+
".INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=('operator', 'expressi"
|
|
345
|
+
"on'), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprP"
|
|
346
|
+
"lan(fields=(ReprPlan.Field(name='operator', kw_only=False, fn=None), ReprPlan.Field(name='expression', kw_only"
|
|
347
|
+
"=False, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
348
|
+
),
|
|
349
|
+
plan_repr_sha1='cdb3249bff15c580f8a8beab3e47937e31fe71a0',
|
|
350
|
+
op_ref_idents=(
|
|
351
|
+
'__dataclass__init__fields__0__annotation',
|
|
352
|
+
'__dataclass__init__fields__1__annotation',
|
|
353
|
+
),
|
|
354
|
+
cls_names=(
|
|
355
|
+
('omlish.specs.jmespath', 'ArithmeticUnary'),
|
|
356
|
+
),
|
|
357
|
+
)
|
|
358
|
+
def _process_dataclass__cdb3249bff15c580f8a8beab3e47937e31fe71a0():
|
|
359
|
+
def _process_dataclass(
|
|
360
|
+
*,
|
|
361
|
+
__dataclass__cls,
|
|
362
|
+
__dataclass__init__fields__0__annotation,
|
|
363
|
+
__dataclass__init__fields__1__annotation,
|
|
364
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
365
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
366
|
+
__dataclass__FnValidationError, # noqa
|
|
367
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
368
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
369
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
370
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
371
|
+
__dataclass__None=None, # noqa
|
|
372
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
373
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
374
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
375
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
376
|
+
__dataclass__property=property, # noqa
|
|
377
|
+
):
|
|
378
|
+
def __copy__(self):
|
|
379
|
+
if self.__class__ is not __dataclass__cls:
|
|
380
|
+
raise TypeError(self)
|
|
381
|
+
return __dataclass__cls( # noqa
|
|
382
|
+
operator=self.operator,
|
|
383
|
+
expression=self.expression,
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
387
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
388
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
389
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
390
|
+
|
|
391
|
+
def __eq__(self, other):
|
|
392
|
+
if self is other:
|
|
393
|
+
return True
|
|
394
|
+
if self.__class__ is not other.__class__:
|
|
395
|
+
return NotImplemented
|
|
396
|
+
return (
|
|
397
|
+
self.operator == other.operator and
|
|
398
|
+
self.expression == other.expression
|
|
399
|
+
)
|
|
400
|
+
|
|
401
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
402
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
403
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
404
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
405
|
+
|
|
406
|
+
__dataclass___setattr_frozen_fields = {
|
|
407
|
+
'operator',
|
|
408
|
+
'expression',
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
def __setattr__(self, name, value):
|
|
412
|
+
if (
|
|
413
|
+
type(self) is __dataclass__cls
|
|
414
|
+
or name in __dataclass___setattr_frozen_fields
|
|
415
|
+
):
|
|
416
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
417
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
418
|
+
|
|
419
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
420
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
421
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
422
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
423
|
+
|
|
424
|
+
__dataclass___delattr_frozen_fields = {
|
|
425
|
+
'operator',
|
|
426
|
+
'expression',
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
def __delattr__(self, name):
|
|
430
|
+
if (
|
|
431
|
+
type(self) is __dataclass__cls
|
|
432
|
+
or name in __dataclass___delattr_frozen_fields
|
|
433
|
+
):
|
|
434
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
435
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
436
|
+
|
|
437
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
438
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
439
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
440
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
441
|
+
|
|
442
|
+
def __hash__(self):
|
|
443
|
+
return hash((
|
|
444
|
+
self.operator,
|
|
445
|
+
self.expression,
|
|
446
|
+
))
|
|
447
|
+
|
|
448
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
449
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
450
|
+
|
|
451
|
+
def __init__(
|
|
452
|
+
self,
|
|
453
|
+
operator: __dataclass__init__fields__0__annotation,
|
|
454
|
+
expression: __dataclass__init__fields__1__annotation,
|
|
455
|
+
) -> __dataclass__None:
|
|
456
|
+
__dataclass__object_setattr(self, 'operator', operator)
|
|
457
|
+
__dataclass__object_setattr(self, 'expression', expression)
|
|
458
|
+
|
|
459
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
460
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
461
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
462
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
463
|
+
|
|
464
|
+
@__dataclass___recursive_repr()
|
|
465
|
+
def __repr__(self):
|
|
466
|
+
parts = []
|
|
467
|
+
parts.append(f"operator={self.operator!r}")
|
|
468
|
+
parts.append(f"expression={self.expression!r}")
|
|
469
|
+
return (
|
|
470
|
+
f"{self.__class__.__qualname__}("
|
|
471
|
+
f"{', '.join(parts)}"
|
|
472
|
+
f")"
|
|
473
|
+
)
|
|
474
|
+
|
|
475
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
476
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
477
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
478
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
479
|
+
|
|
480
|
+
return _process_dataclass
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
@_register(
|
|
484
|
+
plan_repr=(
|
|
485
|
+
"Plans(tup=(CopyPlan(fields=('name', 'expr')), EqPlan(fields=('name', 'expr')), FrozenPlan(fields=('name', 'exp"
|
|
486
|
+
"r'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('name', 'expr'), cache=False), InitPlan"
|
|
487
|
+
"(fields=(InitPlan.Field(name='name', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_"
|
|
488
|
+
"factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type"
|
|
489
|
+
"=None), InitPlan.Field(name='expr', annotation=OpRef(name='init.fields.1.annotation'), default=None, default_f"
|
|
490
|
+
"actory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type="
|
|
491
|
+
"None)), self_param='self', std_params=('name', 'expr'), kw_only_params=(), frozen=True, slots=False, post_init"
|
|
492
|
+
"_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='name', kw_only=False, fn=No"
|
|
493
|
+
"ne), ReprPlan.Field(name='expr', kw_only=False, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
494
|
+
),
|
|
495
|
+
plan_repr_sha1='fb46b9fb75089de970d1b8ccffb404d02368804a',
|
|
496
|
+
op_ref_idents=(
|
|
497
|
+
'__dataclass__init__fields__0__annotation',
|
|
498
|
+
'__dataclass__init__fields__1__annotation',
|
|
499
|
+
),
|
|
500
|
+
cls_names=(
|
|
501
|
+
('omlish.specs.jmespath', 'Assign'),
|
|
502
|
+
),
|
|
503
|
+
)
|
|
504
|
+
def _process_dataclass__fb46b9fb75089de970d1b8ccffb404d02368804a():
|
|
505
|
+
def _process_dataclass(
|
|
506
|
+
*,
|
|
507
|
+
__dataclass__cls,
|
|
508
|
+
__dataclass__init__fields__0__annotation,
|
|
509
|
+
__dataclass__init__fields__1__annotation,
|
|
510
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
511
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
512
|
+
__dataclass__FnValidationError, # noqa
|
|
513
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
514
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
515
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
516
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
517
|
+
__dataclass__None=None, # noqa
|
|
518
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
519
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
520
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
521
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
522
|
+
__dataclass__property=property, # noqa
|
|
523
|
+
):
|
|
524
|
+
def __copy__(self):
|
|
525
|
+
if self.__class__ is not __dataclass__cls:
|
|
526
|
+
raise TypeError(self)
|
|
527
|
+
return __dataclass__cls( # noqa
|
|
528
|
+
name=self.name,
|
|
529
|
+
expr=self.expr,
|
|
530
|
+
)
|
|
531
|
+
|
|
532
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
533
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
534
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
535
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
536
|
+
|
|
537
|
+
def __eq__(self, other):
|
|
538
|
+
if self is other:
|
|
539
|
+
return True
|
|
540
|
+
if self.__class__ is not other.__class__:
|
|
541
|
+
return NotImplemented
|
|
542
|
+
return (
|
|
543
|
+
self.name == other.name and
|
|
544
|
+
self.expr == other.expr
|
|
545
|
+
)
|
|
546
|
+
|
|
547
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
548
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
549
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
550
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
551
|
+
|
|
552
|
+
__dataclass___setattr_frozen_fields = {
|
|
553
|
+
'name',
|
|
554
|
+
'expr',
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
def __setattr__(self, name, value):
|
|
558
|
+
if (
|
|
559
|
+
type(self) is __dataclass__cls
|
|
560
|
+
or name in __dataclass___setattr_frozen_fields
|
|
561
|
+
):
|
|
562
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
563
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
564
|
+
|
|
565
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
566
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
567
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
568
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
569
|
+
|
|
570
|
+
__dataclass___delattr_frozen_fields = {
|
|
571
|
+
'name',
|
|
572
|
+
'expr',
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
def __delattr__(self, name):
|
|
576
|
+
if (
|
|
577
|
+
type(self) is __dataclass__cls
|
|
578
|
+
or name in __dataclass___delattr_frozen_fields
|
|
579
|
+
):
|
|
580
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
581
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
582
|
+
|
|
583
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
584
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
585
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
586
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
587
|
+
|
|
588
|
+
def __hash__(self):
|
|
589
|
+
return hash((
|
|
590
|
+
self.name,
|
|
591
|
+
self.expr,
|
|
592
|
+
))
|
|
593
|
+
|
|
594
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
595
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
596
|
+
|
|
597
|
+
def __init__(
|
|
598
|
+
self,
|
|
599
|
+
name: __dataclass__init__fields__0__annotation,
|
|
600
|
+
expr: __dataclass__init__fields__1__annotation,
|
|
601
|
+
) -> __dataclass__None:
|
|
602
|
+
__dataclass__object_setattr(self, 'name', name)
|
|
603
|
+
__dataclass__object_setattr(self, 'expr', expr)
|
|
604
|
+
|
|
605
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
606
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
607
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
608
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
609
|
+
|
|
610
|
+
@__dataclass___recursive_repr()
|
|
611
|
+
def __repr__(self):
|
|
612
|
+
parts = []
|
|
613
|
+
parts.append(f"name={self.name!r}")
|
|
614
|
+
parts.append(f"expr={self.expr!r}")
|
|
615
|
+
return (
|
|
616
|
+
f"{self.__class__.__qualname__}("
|
|
617
|
+
f"{', '.join(parts)}"
|
|
618
|
+
f")"
|
|
619
|
+
)
|
|
620
|
+
|
|
621
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
622
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
623
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
624
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
625
|
+
|
|
626
|
+
return _process_dataclass
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
@_register(
|
|
630
|
+
plan_repr=(
|
|
631
|
+
"Plans(tup=(CopyPlan(fields=('name', 'first', 'second')), EqPlan(fields=('name', 'first', 'second')), FrozenPla"
|
|
632
|
+
"n(fields=('name', 'first', 'second'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('name'"
|
|
633
|
+
", 'first', 'second'), cache=False), InitPlan(fields=(InitPlan.Field(name='name', annotation=OpRef(name='init.f"
|
|
634
|
+
"ields.0.annotation'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.INST"
|
|
635
|
+
"ANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='first', annotation=OpRef(name='init.f"
|
|
636
|
+
"ields.1.annotation'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.INST"
|
|
637
|
+
"ANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='second', annotation=OpRef(name='init."
|
|
638
|
+
"fields.2.annotation'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.INS"
|
|
639
|
+
"TANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=('name', 'first', 'second'"
|
|
640
|
+
"), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan"
|
|
641
|
+
"(fields=(ReprPlan.Field(name='name', kw_only=False, fn=None), ReprPlan.Field(name='first', kw_only=False, fn=N"
|
|
642
|
+
"one), ReprPlan.Field(name='second', kw_only=False, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
643
|
+
),
|
|
644
|
+
plan_repr_sha1='17f73a891c5ca759d782b4a50d841d4e19830e44',
|
|
645
|
+
op_ref_idents=(
|
|
646
|
+
'__dataclass__init__fields__0__annotation',
|
|
647
|
+
'__dataclass__init__fields__1__annotation',
|
|
648
|
+
'__dataclass__init__fields__2__annotation',
|
|
649
|
+
),
|
|
650
|
+
cls_names=(
|
|
651
|
+
('omlish.specs.jmespath', 'Comparator'),
|
|
652
|
+
),
|
|
653
|
+
)
|
|
654
|
+
def _process_dataclass__17f73a891c5ca759d782b4a50d841d4e19830e44():
|
|
655
|
+
def _process_dataclass(
|
|
656
|
+
*,
|
|
657
|
+
__dataclass__cls,
|
|
658
|
+
__dataclass__init__fields__0__annotation,
|
|
659
|
+
__dataclass__init__fields__1__annotation,
|
|
660
|
+
__dataclass__init__fields__2__annotation,
|
|
661
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
662
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
663
|
+
__dataclass__FnValidationError, # noqa
|
|
664
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
665
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
666
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
667
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
668
|
+
__dataclass__None=None, # noqa
|
|
669
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
670
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
671
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
672
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
673
|
+
__dataclass__property=property, # noqa
|
|
674
|
+
):
|
|
675
|
+
def __copy__(self):
|
|
676
|
+
if self.__class__ is not __dataclass__cls:
|
|
677
|
+
raise TypeError(self)
|
|
678
|
+
return __dataclass__cls( # noqa
|
|
679
|
+
name=self.name,
|
|
680
|
+
first=self.first,
|
|
681
|
+
second=self.second,
|
|
682
|
+
)
|
|
683
|
+
|
|
684
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
685
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
686
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
687
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
688
|
+
|
|
689
|
+
def __eq__(self, other):
|
|
690
|
+
if self is other:
|
|
691
|
+
return True
|
|
692
|
+
if self.__class__ is not other.__class__:
|
|
693
|
+
return NotImplemented
|
|
694
|
+
return (
|
|
695
|
+
self.name == other.name and
|
|
696
|
+
self.first == other.first and
|
|
697
|
+
self.second == other.second
|
|
698
|
+
)
|
|
699
|
+
|
|
700
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
701
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
702
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
703
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
704
|
+
|
|
705
|
+
__dataclass___setattr_frozen_fields = {
|
|
706
|
+
'name',
|
|
707
|
+
'first',
|
|
708
|
+
'second',
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
def __setattr__(self, name, value):
|
|
712
|
+
if (
|
|
713
|
+
type(self) is __dataclass__cls
|
|
714
|
+
or name in __dataclass___setattr_frozen_fields
|
|
715
|
+
):
|
|
716
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
717
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
718
|
+
|
|
719
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
720
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
721
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
722
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
723
|
+
|
|
724
|
+
__dataclass___delattr_frozen_fields = {
|
|
725
|
+
'name',
|
|
726
|
+
'first',
|
|
727
|
+
'second',
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
def __delattr__(self, name):
|
|
731
|
+
if (
|
|
732
|
+
type(self) is __dataclass__cls
|
|
733
|
+
or name in __dataclass___delattr_frozen_fields
|
|
734
|
+
):
|
|
735
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
736
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
737
|
+
|
|
738
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
739
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
740
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
741
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
742
|
+
|
|
743
|
+
def __hash__(self):
|
|
744
|
+
return hash((
|
|
745
|
+
self.name,
|
|
746
|
+
self.first,
|
|
747
|
+
self.second,
|
|
748
|
+
))
|
|
749
|
+
|
|
750
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
751
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
752
|
+
|
|
753
|
+
def __init__(
|
|
754
|
+
self,
|
|
755
|
+
name: __dataclass__init__fields__0__annotation,
|
|
756
|
+
first: __dataclass__init__fields__1__annotation,
|
|
757
|
+
second: __dataclass__init__fields__2__annotation,
|
|
758
|
+
) -> __dataclass__None:
|
|
759
|
+
__dataclass__object_setattr(self, 'name', name)
|
|
760
|
+
__dataclass__object_setattr(self, 'first', first)
|
|
761
|
+
__dataclass__object_setattr(self, 'second', second)
|
|
762
|
+
|
|
763
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
764
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
765
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
766
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
767
|
+
|
|
768
|
+
@__dataclass___recursive_repr()
|
|
769
|
+
def __repr__(self):
|
|
770
|
+
parts = []
|
|
771
|
+
parts.append(f"name={self.name!r}")
|
|
772
|
+
parts.append(f"first={self.first!r}")
|
|
773
|
+
parts.append(f"second={self.second!r}")
|
|
774
|
+
return (
|
|
775
|
+
f"{self.__class__.__qualname__}("
|
|
776
|
+
f"{', '.join(parts)}"
|
|
777
|
+
f")"
|
|
778
|
+
)
|
|
779
|
+
|
|
780
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
781
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
782
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
783
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
784
|
+
|
|
785
|
+
return _process_dataclass
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
@_register(
|
|
789
|
+
plan_repr=(
|
|
790
|
+
"Plans(tup=(CopyPlan(fields=()), EqPlan(fields=()), FrozenPlan(fields=(), allow_dynamic_dunder_attrs=False), Ha"
|
|
791
|
+
"shPlan(action='add', fields=(), cache=False), InitPlan(fields=(), self_param='self', std_params=(), kw_only_pa"
|
|
792
|
+
"rams=(), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(), i"
|
|
793
|
+
"d=False, terse=False, default_fn=None)))"
|
|
794
|
+
),
|
|
795
|
+
plan_repr_sha1='e1f7edfe11f2b721d6a656c46e698fedc95461bb',
|
|
796
|
+
op_ref_idents=(),
|
|
797
|
+
cls_names=(
|
|
798
|
+
('omlish.specs.jmespath', 'CurrentNode'),
|
|
799
|
+
('omlish.specs.jmespath', 'Identity'),
|
|
800
|
+
('omlish.specs.jmespath', 'LeafNode'),
|
|
801
|
+
('omlish.specs.jmespath', 'Node'),
|
|
802
|
+
('omlish.specs.jmespath', 'RootNode'),
|
|
803
|
+
),
|
|
804
|
+
)
|
|
805
|
+
def _process_dataclass__e1f7edfe11f2b721d6a656c46e698fedc95461bb():
|
|
806
|
+
def _process_dataclass(
|
|
807
|
+
*,
|
|
808
|
+
__dataclass__cls,
|
|
809
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
810
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
811
|
+
__dataclass__FnValidationError, # noqa
|
|
812
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
813
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
814
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
815
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
816
|
+
__dataclass__None=None, # noqa
|
|
817
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
818
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
819
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
820
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
821
|
+
__dataclass__property=property, # noqa
|
|
822
|
+
):
|
|
823
|
+
def __copy__(self):
|
|
824
|
+
if self.__class__ is not __dataclass__cls:
|
|
825
|
+
raise TypeError(self)
|
|
826
|
+
return __dataclass__cls() # noqa
|
|
827
|
+
|
|
828
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
829
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
830
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
831
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
832
|
+
|
|
833
|
+
def __eq__(self, other):
|
|
834
|
+
if self is other:
|
|
835
|
+
return True
|
|
836
|
+
if self.__class__ is not other.__class__:
|
|
837
|
+
return NotImplemented
|
|
838
|
+
return True
|
|
839
|
+
|
|
840
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
841
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
842
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
843
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
844
|
+
|
|
845
|
+
def __setattr__(self, name, value):
|
|
846
|
+
if (
|
|
847
|
+
type(self) is __dataclass__cls
|
|
848
|
+
):
|
|
849
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
850
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
851
|
+
|
|
852
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
853
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
854
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
855
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
856
|
+
|
|
857
|
+
def __delattr__(self, name):
|
|
858
|
+
if (
|
|
859
|
+
type(self) is __dataclass__cls
|
|
860
|
+
):
|
|
861
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
862
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
863
|
+
|
|
864
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
865
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
866
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
867
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
868
|
+
|
|
869
|
+
def __hash__(self):
|
|
870
|
+
return hash(())
|
|
871
|
+
|
|
872
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
873
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
874
|
+
|
|
875
|
+
def __init__(
|
|
876
|
+
self,
|
|
877
|
+
) -> __dataclass__None:
|
|
878
|
+
pass
|
|
879
|
+
|
|
880
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
881
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
882
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
883
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
884
|
+
|
|
885
|
+
@__dataclass___recursive_repr()
|
|
886
|
+
def __repr__(self):
|
|
887
|
+
parts = []
|
|
888
|
+
return (
|
|
889
|
+
f"{self.__class__.__qualname__}("
|
|
890
|
+
f"{', '.join(parts)}"
|
|
891
|
+
f")"
|
|
892
|
+
)
|
|
893
|
+
|
|
894
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
895
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
896
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
897
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
898
|
+
|
|
899
|
+
return _process_dataclass
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
@_register(
|
|
903
|
+
plan_repr=(
|
|
904
|
+
"Plans(tup=(CopyPlan(fields=('expression',)), EqPlan(fields=('expression',)), FrozenPlan(fields=('expression',)"
|
|
905
|
+
", allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('expression',), cache=False), InitPlan(fie"
|
|
906
|
+
"lds=(InitPlan.Field(name='expression', annotation=OpRef(name='init.fields.0.annotation'), default=None, defaul"
|
|
907
|
+
"t_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_ty"
|
|
908
|
+
"pe=None),), self_param='self', std_params=('expression',), kw_only_params=(), frozen=True, slots=False, post_i"
|
|
909
|
+
"nit_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='expression', kw_only=Fal"
|
|
910
|
+
"se, fn=None),), id=False, terse=False, default_fn=None)))"
|
|
911
|
+
),
|
|
912
|
+
plan_repr_sha1='88b2bcfae28e19661d346bbf4c87a846e786b0ea',
|
|
913
|
+
op_ref_idents=(
|
|
914
|
+
'__dataclass__init__fields__0__annotation',
|
|
915
|
+
),
|
|
916
|
+
cls_names=(
|
|
917
|
+
('omlish.specs.jmespath', 'Expref'),
|
|
918
|
+
),
|
|
919
|
+
)
|
|
920
|
+
def _process_dataclass__88b2bcfae28e19661d346bbf4c87a846e786b0ea():
|
|
921
|
+
def _process_dataclass(
|
|
922
|
+
*,
|
|
923
|
+
__dataclass__cls,
|
|
924
|
+
__dataclass__init__fields__0__annotation,
|
|
925
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
926
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
927
|
+
__dataclass__FnValidationError, # noqa
|
|
928
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
929
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
930
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
931
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
932
|
+
__dataclass__None=None, # noqa
|
|
933
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
934
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
935
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
936
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
937
|
+
__dataclass__property=property, # noqa
|
|
938
|
+
):
|
|
939
|
+
def __copy__(self):
|
|
940
|
+
if self.__class__ is not __dataclass__cls:
|
|
941
|
+
raise TypeError(self)
|
|
942
|
+
return __dataclass__cls( # noqa
|
|
943
|
+
expression=self.expression,
|
|
944
|
+
)
|
|
945
|
+
|
|
946
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
947
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
948
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
949
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
950
|
+
|
|
951
|
+
def __eq__(self, other):
|
|
952
|
+
if self is other:
|
|
953
|
+
return True
|
|
954
|
+
if self.__class__ is not other.__class__:
|
|
955
|
+
return NotImplemented
|
|
956
|
+
return (
|
|
957
|
+
self.expression == other.expression
|
|
958
|
+
)
|
|
959
|
+
|
|
960
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
961
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
962
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
963
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
964
|
+
|
|
965
|
+
__dataclass___setattr_frozen_fields = {
|
|
966
|
+
'expression',
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
def __setattr__(self, name, value):
|
|
970
|
+
if (
|
|
971
|
+
type(self) is __dataclass__cls
|
|
972
|
+
or name in __dataclass___setattr_frozen_fields
|
|
973
|
+
):
|
|
974
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
975
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
976
|
+
|
|
977
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
978
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
979
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
980
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
981
|
+
|
|
982
|
+
__dataclass___delattr_frozen_fields = {
|
|
983
|
+
'expression',
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
def __delattr__(self, name):
|
|
987
|
+
if (
|
|
988
|
+
type(self) is __dataclass__cls
|
|
989
|
+
or name in __dataclass___delattr_frozen_fields
|
|
990
|
+
):
|
|
991
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
992
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
993
|
+
|
|
994
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
995
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
996
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
997
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
998
|
+
|
|
999
|
+
def __hash__(self):
|
|
1000
|
+
return hash((
|
|
1001
|
+
self.expression,
|
|
1002
|
+
))
|
|
1003
|
+
|
|
1004
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1005
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1006
|
+
|
|
1007
|
+
def __init__(
|
|
1008
|
+
self,
|
|
1009
|
+
expression: __dataclass__init__fields__0__annotation,
|
|
1010
|
+
) -> __dataclass__None:
|
|
1011
|
+
__dataclass__object_setattr(self, 'expression', expression)
|
|
1012
|
+
|
|
1013
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1014
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1015
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1016
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1017
|
+
|
|
1018
|
+
@__dataclass___recursive_repr()
|
|
1019
|
+
def __repr__(self):
|
|
1020
|
+
parts = []
|
|
1021
|
+
parts.append(f"expression={self.expression!r}")
|
|
1022
|
+
return (
|
|
1023
|
+
f"{self.__class__.__qualname__}("
|
|
1024
|
+
f"{', '.join(parts)}"
|
|
1025
|
+
f")"
|
|
1026
|
+
)
|
|
1027
|
+
|
|
1028
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1029
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1030
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1031
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1032
|
+
|
|
1033
|
+
return _process_dataclass
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
@_register(
|
|
1037
|
+
plan_repr=(
|
|
1038
|
+
"Plans(tup=(CopyPlan(fields=('name',)), EqPlan(fields=('name',)), FrozenPlan(fields=('name',), allow_dynamic_du"
|
|
1039
|
+
"nder_attrs=False), HashPlan(action='add', fields=('name',), cache=False), InitPlan(fields=(InitPlan.Field(name"
|
|
1040
|
+
"='name', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True, ove"
|
|
1041
|
+
"rride=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None),), self_param='self',"
|
|
1042
|
+
" std_params=('name',), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(), valida"
|
|
1043
|
+
"te_fns=()), ReprPlan(fields=(ReprPlan.Field(name='name', kw_only=False, fn=None),), id=False, terse=False, def"
|
|
1044
|
+
"ault_fn=None)))"
|
|
1045
|
+
),
|
|
1046
|
+
plan_repr_sha1='a8c678a92ec79b6aa505feedefe70ee7fef92ccd',
|
|
1047
|
+
op_ref_idents=(
|
|
1048
|
+
'__dataclass__init__fields__0__annotation',
|
|
1049
|
+
),
|
|
1050
|
+
cls_names=(
|
|
1051
|
+
('omlish.specs.jmespath', 'Field'),
|
|
1052
|
+
('omlish.specs.jmespath', 'VariableRef'),
|
|
1053
|
+
),
|
|
1054
|
+
)
|
|
1055
|
+
def _process_dataclass__a8c678a92ec79b6aa505feedefe70ee7fef92ccd():
|
|
1056
|
+
def _process_dataclass(
|
|
1057
|
+
*,
|
|
1058
|
+
__dataclass__cls,
|
|
1059
|
+
__dataclass__init__fields__0__annotation,
|
|
1060
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1061
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1062
|
+
__dataclass__FnValidationError, # noqa
|
|
1063
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1064
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1065
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1066
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1067
|
+
__dataclass__None=None, # noqa
|
|
1068
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1069
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1070
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1071
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1072
|
+
__dataclass__property=property, # noqa
|
|
1073
|
+
):
|
|
1074
|
+
def __copy__(self):
|
|
1075
|
+
if self.__class__ is not __dataclass__cls:
|
|
1076
|
+
raise TypeError(self)
|
|
1077
|
+
return __dataclass__cls( # noqa
|
|
1078
|
+
name=self.name,
|
|
1079
|
+
)
|
|
1080
|
+
|
|
1081
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1082
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1083
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1084
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1085
|
+
|
|
1086
|
+
def __eq__(self, other):
|
|
1087
|
+
if self is other:
|
|
1088
|
+
return True
|
|
1089
|
+
if self.__class__ is not other.__class__:
|
|
1090
|
+
return NotImplemented
|
|
1091
|
+
return (
|
|
1092
|
+
self.name == other.name
|
|
1093
|
+
)
|
|
1094
|
+
|
|
1095
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1096
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1097
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1098
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1099
|
+
|
|
1100
|
+
__dataclass___setattr_frozen_fields = {
|
|
1101
|
+
'name',
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
def __setattr__(self, name, value):
|
|
1105
|
+
if (
|
|
1106
|
+
type(self) is __dataclass__cls
|
|
1107
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1108
|
+
):
|
|
1109
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1110
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1111
|
+
|
|
1112
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1113
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1114
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1115
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1116
|
+
|
|
1117
|
+
__dataclass___delattr_frozen_fields = {
|
|
1118
|
+
'name',
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
def __delattr__(self, name):
|
|
1122
|
+
if (
|
|
1123
|
+
type(self) is __dataclass__cls
|
|
1124
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1125
|
+
):
|
|
1126
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1127
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1128
|
+
|
|
1129
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1130
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1131
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1132
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1133
|
+
|
|
1134
|
+
def __hash__(self):
|
|
1135
|
+
return hash((
|
|
1136
|
+
self.name,
|
|
1137
|
+
))
|
|
1138
|
+
|
|
1139
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1140
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1141
|
+
|
|
1142
|
+
def __init__(
|
|
1143
|
+
self,
|
|
1144
|
+
name: __dataclass__init__fields__0__annotation,
|
|
1145
|
+
) -> __dataclass__None:
|
|
1146
|
+
__dataclass__object_setattr(self, 'name', name)
|
|
1147
|
+
|
|
1148
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1149
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1150
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1151
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1152
|
+
|
|
1153
|
+
@__dataclass___recursive_repr()
|
|
1154
|
+
def __repr__(self):
|
|
1155
|
+
parts = []
|
|
1156
|
+
parts.append(f"name={self.name!r}")
|
|
1157
|
+
return (
|
|
1158
|
+
f"{self.__class__.__qualname__}("
|
|
1159
|
+
f"{', '.join(parts)}"
|
|
1160
|
+
f")"
|
|
1161
|
+
)
|
|
1162
|
+
|
|
1163
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1164
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1165
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1166
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1167
|
+
|
|
1168
|
+
return _process_dataclass
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
@_register(
|
|
1172
|
+
plan_repr=(
|
|
1173
|
+
"Plans(tup=(CopyPlan(fields=('left', 'right', 'comparator')), EqPlan(fields=('left', 'right', 'comparator')), F"
|
|
1174
|
+
"rozenPlan(fields=('left', 'right', 'comparator'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fi"
|
|
1175
|
+
"elds=('left', 'right', 'comparator'), cache=False), InitPlan(fields=(InitPlan.Field(name='left', annotation=Op"
|
|
1176
|
+
"Ref(name='init.fields.0.annotation'), default=None, default_factory=None, init=True, override=False, field_typ"
|
|
1177
|
+
"e=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='right', annotation=Op"
|
|
1178
|
+
"Ref(name='init.fields.1.annotation'), default=None, default_factory=None, init=True, override=False, field_typ"
|
|
1179
|
+
"e=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='comparator', annotati"
|
|
1180
|
+
"on=OpRef(name='init.fields.2.annotation'), default=None, default_factory=None, init=True, override=False, fiel"
|
|
1181
|
+
"d_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=('left"
|
|
1182
|
+
"', 'right', 'comparator'), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(), va"
|
|
1183
|
+
"lidate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='left', kw_only=False, fn=None), ReprPlan.Field(name='rig"
|
|
1184
|
+
"ht', kw_only=False, fn=None), ReprPlan.Field(name='comparator', kw_only=False, fn=None)), id=False, terse=Fals"
|
|
1185
|
+
"e, default_fn=None)))"
|
|
1186
|
+
),
|
|
1187
|
+
plan_repr_sha1='ee40fd21fce658ecb8d6c4a236c24880e69abc90',
|
|
1188
|
+
op_ref_idents=(
|
|
1189
|
+
'__dataclass__init__fields__0__annotation',
|
|
1190
|
+
'__dataclass__init__fields__1__annotation',
|
|
1191
|
+
'__dataclass__init__fields__2__annotation',
|
|
1192
|
+
),
|
|
1193
|
+
cls_names=(
|
|
1194
|
+
('omlish.specs.jmespath', 'FilterProjection'),
|
|
1195
|
+
),
|
|
1196
|
+
)
|
|
1197
|
+
def _process_dataclass__ee40fd21fce658ecb8d6c4a236c24880e69abc90():
|
|
1198
|
+
def _process_dataclass(
|
|
1199
|
+
*,
|
|
1200
|
+
__dataclass__cls,
|
|
1201
|
+
__dataclass__init__fields__0__annotation,
|
|
1202
|
+
__dataclass__init__fields__1__annotation,
|
|
1203
|
+
__dataclass__init__fields__2__annotation,
|
|
1204
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1205
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1206
|
+
__dataclass__FnValidationError, # noqa
|
|
1207
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1208
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1209
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1210
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1211
|
+
__dataclass__None=None, # noqa
|
|
1212
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1213
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1214
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1215
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1216
|
+
__dataclass__property=property, # noqa
|
|
1217
|
+
):
|
|
1218
|
+
def __copy__(self):
|
|
1219
|
+
if self.__class__ is not __dataclass__cls:
|
|
1220
|
+
raise TypeError(self)
|
|
1221
|
+
return __dataclass__cls( # noqa
|
|
1222
|
+
left=self.left,
|
|
1223
|
+
right=self.right,
|
|
1224
|
+
comparator=self.comparator,
|
|
1225
|
+
)
|
|
1226
|
+
|
|
1227
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1228
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1229
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1230
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1231
|
+
|
|
1232
|
+
def __eq__(self, other):
|
|
1233
|
+
if self is other:
|
|
1234
|
+
return True
|
|
1235
|
+
if self.__class__ is not other.__class__:
|
|
1236
|
+
return NotImplemented
|
|
1237
|
+
return (
|
|
1238
|
+
self.left == other.left and
|
|
1239
|
+
self.right == other.right and
|
|
1240
|
+
self.comparator == other.comparator
|
|
1241
|
+
)
|
|
1242
|
+
|
|
1243
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1244
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1245
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1246
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1247
|
+
|
|
1248
|
+
__dataclass___setattr_frozen_fields = {
|
|
1249
|
+
'left',
|
|
1250
|
+
'right',
|
|
1251
|
+
'comparator',
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
def __setattr__(self, name, value):
|
|
1255
|
+
if (
|
|
1256
|
+
type(self) is __dataclass__cls
|
|
1257
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1258
|
+
):
|
|
1259
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1260
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1261
|
+
|
|
1262
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1263
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1264
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1265
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1266
|
+
|
|
1267
|
+
__dataclass___delattr_frozen_fields = {
|
|
1268
|
+
'left',
|
|
1269
|
+
'right',
|
|
1270
|
+
'comparator',
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
def __delattr__(self, name):
|
|
1274
|
+
if (
|
|
1275
|
+
type(self) is __dataclass__cls
|
|
1276
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1277
|
+
):
|
|
1278
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1279
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1280
|
+
|
|
1281
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1282
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1283
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1284
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1285
|
+
|
|
1286
|
+
def __hash__(self):
|
|
1287
|
+
return hash((
|
|
1288
|
+
self.left,
|
|
1289
|
+
self.right,
|
|
1290
|
+
self.comparator,
|
|
1291
|
+
))
|
|
1292
|
+
|
|
1293
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1294
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1295
|
+
|
|
1296
|
+
def __init__(
|
|
1297
|
+
self,
|
|
1298
|
+
left: __dataclass__init__fields__0__annotation,
|
|
1299
|
+
right: __dataclass__init__fields__1__annotation,
|
|
1300
|
+
comparator: __dataclass__init__fields__2__annotation,
|
|
1301
|
+
) -> __dataclass__None:
|
|
1302
|
+
__dataclass__object_setattr(self, 'left', left)
|
|
1303
|
+
__dataclass__object_setattr(self, 'right', right)
|
|
1304
|
+
__dataclass__object_setattr(self, 'comparator', comparator)
|
|
1305
|
+
|
|
1306
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1307
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1308
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1309
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1310
|
+
|
|
1311
|
+
@__dataclass___recursive_repr()
|
|
1312
|
+
def __repr__(self):
|
|
1313
|
+
parts = []
|
|
1314
|
+
parts.append(f"left={self.left!r}")
|
|
1315
|
+
parts.append(f"right={self.right!r}")
|
|
1316
|
+
parts.append(f"comparator={self.comparator!r}")
|
|
1317
|
+
return (
|
|
1318
|
+
f"{self.__class__.__qualname__}("
|
|
1319
|
+
f"{', '.join(parts)}"
|
|
1320
|
+
f")"
|
|
1321
|
+
)
|
|
1322
|
+
|
|
1323
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1324
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1325
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1326
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1327
|
+
|
|
1328
|
+
return _process_dataclass
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
@_register(
|
|
1332
|
+
plan_repr=(
|
|
1333
|
+
"Plans(tup=(CopyPlan(fields=('node',)), EqPlan(fields=('node',)), FrozenPlan(fields=('node',), allow_dynamic_du"
|
|
1334
|
+
"nder_attrs=False), HashPlan(action='add', fields=('node',), cache=False), InitPlan(fields=(InitPlan.Field(name"
|
|
1335
|
+
"='node', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True, ove"
|
|
1336
|
+
"rride=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None),), self_param='self',"
|
|
1337
|
+
" std_params=('node',), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(), valida"
|
|
1338
|
+
"te_fns=()), ReprPlan(fields=(ReprPlan.Field(name='node', kw_only=False, fn=None),), id=False, terse=False, def"
|
|
1339
|
+
"ault_fn=None)))"
|
|
1340
|
+
),
|
|
1341
|
+
plan_repr_sha1='04121723da73369a153101f1c1cd7d127fdcfad7',
|
|
1342
|
+
op_ref_idents=(
|
|
1343
|
+
'__dataclass__init__fields__0__annotation',
|
|
1344
|
+
),
|
|
1345
|
+
cls_names=(
|
|
1346
|
+
('omlish.specs.jmespath', 'Flatten'),
|
|
1347
|
+
),
|
|
1348
|
+
)
|
|
1349
|
+
def _process_dataclass__04121723da73369a153101f1c1cd7d127fdcfad7():
|
|
1350
|
+
def _process_dataclass(
|
|
1351
|
+
*,
|
|
1352
|
+
__dataclass__cls,
|
|
1353
|
+
__dataclass__init__fields__0__annotation,
|
|
1354
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1355
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1356
|
+
__dataclass__FnValidationError, # noqa
|
|
1357
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1358
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1359
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1360
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1361
|
+
__dataclass__None=None, # noqa
|
|
1362
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1363
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1364
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1365
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1366
|
+
__dataclass__property=property, # noqa
|
|
1367
|
+
):
|
|
1368
|
+
def __copy__(self):
|
|
1369
|
+
if self.__class__ is not __dataclass__cls:
|
|
1370
|
+
raise TypeError(self)
|
|
1371
|
+
return __dataclass__cls( # noqa
|
|
1372
|
+
node=self.node,
|
|
1373
|
+
)
|
|
1374
|
+
|
|
1375
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1376
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1377
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1378
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1379
|
+
|
|
1380
|
+
def __eq__(self, other):
|
|
1381
|
+
if self is other:
|
|
1382
|
+
return True
|
|
1383
|
+
if self.__class__ is not other.__class__:
|
|
1384
|
+
return NotImplemented
|
|
1385
|
+
return (
|
|
1386
|
+
self.node == other.node
|
|
1387
|
+
)
|
|
1388
|
+
|
|
1389
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1390
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1391
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1392
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1393
|
+
|
|
1394
|
+
__dataclass___setattr_frozen_fields = {
|
|
1395
|
+
'node',
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
def __setattr__(self, name, value):
|
|
1399
|
+
if (
|
|
1400
|
+
type(self) is __dataclass__cls
|
|
1401
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1402
|
+
):
|
|
1403
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1404
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1405
|
+
|
|
1406
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1407
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1408
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1409
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1410
|
+
|
|
1411
|
+
__dataclass___delattr_frozen_fields = {
|
|
1412
|
+
'node',
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
def __delattr__(self, name):
|
|
1416
|
+
if (
|
|
1417
|
+
type(self) is __dataclass__cls
|
|
1418
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1419
|
+
):
|
|
1420
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1421
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1422
|
+
|
|
1423
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1424
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1425
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1426
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1427
|
+
|
|
1428
|
+
def __hash__(self):
|
|
1429
|
+
return hash((
|
|
1430
|
+
self.node,
|
|
1431
|
+
))
|
|
1432
|
+
|
|
1433
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1434
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1435
|
+
|
|
1436
|
+
def __init__(
|
|
1437
|
+
self,
|
|
1438
|
+
node: __dataclass__init__fields__0__annotation,
|
|
1439
|
+
) -> __dataclass__None:
|
|
1440
|
+
__dataclass__object_setattr(self, 'node', node)
|
|
1441
|
+
|
|
1442
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1443
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1444
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1445
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1446
|
+
|
|
1447
|
+
@__dataclass___recursive_repr()
|
|
1448
|
+
def __repr__(self):
|
|
1449
|
+
parts = []
|
|
1450
|
+
parts.append(f"node={self.node!r}")
|
|
1451
|
+
return (
|
|
1452
|
+
f"{self.__class__.__qualname__}("
|
|
1453
|
+
f"{', '.join(parts)}"
|
|
1454
|
+
f")"
|
|
1455
|
+
)
|
|
1456
|
+
|
|
1457
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1458
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1459
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1460
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1461
|
+
|
|
1462
|
+
return _process_dataclass
|
|
1463
|
+
|
|
1464
|
+
|
|
1465
|
+
@_register(
|
|
1466
|
+
plan_repr=(
|
|
1467
|
+
"Plans(tup=(CopyPlan(fields=('name', 'args')), EqPlan(fields=('name', 'args')), FrozenPlan(fields=('name', 'arg"
|
|
1468
|
+
"s'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('name', 'args'), cache=False), InitPlan"
|
|
1469
|
+
"(fields=(InitPlan.Field(name='name', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_"
|
|
1470
|
+
"factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type"
|
|
1471
|
+
"=None), InitPlan.Field(name='args', annotation=OpRef(name='init.fields.1.annotation'), default=None, default_f"
|
|
1472
|
+
"actory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type="
|
|
1473
|
+
"None)), self_param='self', std_params=('name', 'args'), kw_only_params=(), frozen=True, slots=False, post_init"
|
|
1474
|
+
"_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='name', kw_only=False, fn=No"
|
|
1475
|
+
"ne), ReprPlan.Field(name='args', kw_only=False, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
1476
|
+
),
|
|
1477
|
+
plan_repr_sha1='46b21a57c7f935afb031452a3d30815129505ec6',
|
|
1478
|
+
op_ref_idents=(
|
|
1479
|
+
'__dataclass__init__fields__0__annotation',
|
|
1480
|
+
'__dataclass__init__fields__1__annotation',
|
|
1481
|
+
),
|
|
1482
|
+
cls_names=(
|
|
1483
|
+
('omlish.specs.jmespath', 'FunctionExpression'),
|
|
1484
|
+
),
|
|
1485
|
+
)
|
|
1486
|
+
def _process_dataclass__46b21a57c7f935afb031452a3d30815129505ec6():
|
|
1487
|
+
def _process_dataclass(
|
|
1488
|
+
*,
|
|
1489
|
+
__dataclass__cls,
|
|
1490
|
+
__dataclass__init__fields__0__annotation,
|
|
1491
|
+
__dataclass__init__fields__1__annotation,
|
|
1492
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1493
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1494
|
+
__dataclass__FnValidationError, # noqa
|
|
1495
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1496
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1497
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1498
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1499
|
+
__dataclass__None=None, # noqa
|
|
1500
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1501
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1502
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1503
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1504
|
+
__dataclass__property=property, # noqa
|
|
1505
|
+
):
|
|
1506
|
+
def __copy__(self):
|
|
1507
|
+
if self.__class__ is not __dataclass__cls:
|
|
1508
|
+
raise TypeError(self)
|
|
1509
|
+
return __dataclass__cls( # noqa
|
|
1510
|
+
name=self.name,
|
|
1511
|
+
args=self.args,
|
|
1512
|
+
)
|
|
1513
|
+
|
|
1514
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1515
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1516
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1517
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1518
|
+
|
|
1519
|
+
def __eq__(self, other):
|
|
1520
|
+
if self is other:
|
|
1521
|
+
return True
|
|
1522
|
+
if self.__class__ is not other.__class__:
|
|
1523
|
+
return NotImplemented
|
|
1524
|
+
return (
|
|
1525
|
+
self.name == other.name and
|
|
1526
|
+
self.args == other.args
|
|
1527
|
+
)
|
|
1528
|
+
|
|
1529
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1530
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1531
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1532
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1533
|
+
|
|
1534
|
+
__dataclass___setattr_frozen_fields = {
|
|
1535
|
+
'name',
|
|
1536
|
+
'args',
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
def __setattr__(self, name, value):
|
|
1540
|
+
if (
|
|
1541
|
+
type(self) is __dataclass__cls
|
|
1542
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1543
|
+
):
|
|
1544
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1545
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1546
|
+
|
|
1547
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1548
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1549
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1550
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1551
|
+
|
|
1552
|
+
__dataclass___delattr_frozen_fields = {
|
|
1553
|
+
'name',
|
|
1554
|
+
'args',
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
def __delattr__(self, name):
|
|
1558
|
+
if (
|
|
1559
|
+
type(self) is __dataclass__cls
|
|
1560
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1561
|
+
):
|
|
1562
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1563
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1564
|
+
|
|
1565
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1566
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1567
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1568
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1569
|
+
|
|
1570
|
+
def __hash__(self):
|
|
1571
|
+
return hash((
|
|
1572
|
+
self.name,
|
|
1573
|
+
self.args,
|
|
1574
|
+
))
|
|
1575
|
+
|
|
1576
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1577
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1578
|
+
|
|
1579
|
+
def __init__(
|
|
1580
|
+
self,
|
|
1581
|
+
name: __dataclass__init__fields__0__annotation,
|
|
1582
|
+
args: __dataclass__init__fields__1__annotation,
|
|
1583
|
+
) -> __dataclass__None:
|
|
1584
|
+
__dataclass__object_setattr(self, 'name', name)
|
|
1585
|
+
__dataclass__object_setattr(self, 'args', args)
|
|
1586
|
+
|
|
1587
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1588
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1589
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1590
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1591
|
+
|
|
1592
|
+
@__dataclass___recursive_repr()
|
|
1593
|
+
def __repr__(self):
|
|
1594
|
+
parts = []
|
|
1595
|
+
parts.append(f"name={self.name!r}")
|
|
1596
|
+
parts.append(f"args={self.args!r}")
|
|
1597
|
+
return (
|
|
1598
|
+
f"{self.__class__.__qualname__}("
|
|
1599
|
+
f"{', '.join(parts)}"
|
|
1600
|
+
f")"
|
|
1601
|
+
)
|
|
1602
|
+
|
|
1603
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1604
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1605
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1606
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1607
|
+
|
|
1608
|
+
return _process_dataclass
|
|
1609
|
+
|
|
1610
|
+
|
|
1611
|
+
@_register(
|
|
1612
|
+
plan_repr=(
|
|
1613
|
+
"Plans(tup=(CopyPlan(fields=('index',)), EqPlan(fields=('index',)), FrozenPlan(fields=('index',), allow_dynamic"
|
|
1614
|
+
"_dunder_attrs=False), HashPlan(action='add', fields=('index',), cache=False), InitPlan(fields=(InitPlan.Field("
|
|
1615
|
+
"name='index', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True"
|
|
1616
|
+
", override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None),), self_param='s"
|
|
1617
|
+
"elf', std_params=('index',), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(), "
|
|
1618
|
+
"validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='index', kw_only=False, fn=None),), id=False, terse=Fal"
|
|
1619
|
+
"se, default_fn=None)))"
|
|
1620
|
+
),
|
|
1621
|
+
plan_repr_sha1='58d0143ed6bbec74538c3af1d493d5b4f36423f2',
|
|
1622
|
+
op_ref_idents=(
|
|
1623
|
+
'__dataclass__init__fields__0__annotation',
|
|
1624
|
+
),
|
|
1625
|
+
cls_names=(
|
|
1626
|
+
('omlish.specs.jmespath', 'Index'),
|
|
1627
|
+
),
|
|
1628
|
+
)
|
|
1629
|
+
def _process_dataclass__58d0143ed6bbec74538c3af1d493d5b4f36423f2():
|
|
1630
|
+
def _process_dataclass(
|
|
1631
|
+
*,
|
|
1632
|
+
__dataclass__cls,
|
|
1633
|
+
__dataclass__init__fields__0__annotation,
|
|
1634
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1635
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1636
|
+
__dataclass__FnValidationError, # noqa
|
|
1637
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1638
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1639
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1640
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1641
|
+
__dataclass__None=None, # noqa
|
|
1642
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1643
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1644
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1645
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1646
|
+
__dataclass__property=property, # noqa
|
|
1647
|
+
):
|
|
1648
|
+
def __copy__(self):
|
|
1649
|
+
if self.__class__ is not __dataclass__cls:
|
|
1650
|
+
raise TypeError(self)
|
|
1651
|
+
return __dataclass__cls( # noqa
|
|
1652
|
+
index=self.index,
|
|
1653
|
+
)
|
|
1654
|
+
|
|
1655
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1656
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1657
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1658
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1659
|
+
|
|
1660
|
+
def __eq__(self, other):
|
|
1661
|
+
if self is other:
|
|
1662
|
+
return True
|
|
1663
|
+
if self.__class__ is not other.__class__:
|
|
1664
|
+
return NotImplemented
|
|
1665
|
+
return (
|
|
1666
|
+
self.index == other.index
|
|
1667
|
+
)
|
|
1668
|
+
|
|
1669
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1670
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1671
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1672
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1673
|
+
|
|
1674
|
+
__dataclass___setattr_frozen_fields = {
|
|
1675
|
+
'index',
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
def __setattr__(self, name, value):
|
|
1679
|
+
if (
|
|
1680
|
+
type(self) is __dataclass__cls
|
|
1681
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1682
|
+
):
|
|
1683
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1684
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1685
|
+
|
|
1686
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1687
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1688
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1689
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1690
|
+
|
|
1691
|
+
__dataclass___delattr_frozen_fields = {
|
|
1692
|
+
'index',
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
def __delattr__(self, name):
|
|
1696
|
+
if (
|
|
1697
|
+
type(self) is __dataclass__cls
|
|
1698
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1699
|
+
):
|
|
1700
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1701
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1702
|
+
|
|
1703
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1704
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1705
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1706
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1707
|
+
|
|
1708
|
+
def __hash__(self):
|
|
1709
|
+
return hash((
|
|
1710
|
+
self.index,
|
|
1711
|
+
))
|
|
1712
|
+
|
|
1713
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1714
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1715
|
+
|
|
1716
|
+
def __init__(
|
|
1717
|
+
self,
|
|
1718
|
+
index: __dataclass__init__fields__0__annotation,
|
|
1719
|
+
) -> __dataclass__None:
|
|
1720
|
+
__dataclass__object_setattr(self, 'index', index)
|
|
1721
|
+
|
|
1722
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1723
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1724
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1725
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1726
|
+
|
|
1727
|
+
@__dataclass___recursive_repr()
|
|
1728
|
+
def __repr__(self):
|
|
1729
|
+
parts = []
|
|
1730
|
+
parts.append(f"index={self.index!r}")
|
|
1731
|
+
return (
|
|
1732
|
+
f"{self.__class__.__qualname__}("
|
|
1733
|
+
f"{', '.join(parts)}"
|
|
1734
|
+
f")"
|
|
1735
|
+
)
|
|
1736
|
+
|
|
1737
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1738
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1739
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1740
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1741
|
+
|
|
1742
|
+
return _process_dataclass
|
|
1743
|
+
|
|
1744
|
+
|
|
1745
|
+
@_register(
|
|
1746
|
+
plan_repr=(
|
|
1747
|
+
"Plans(tup=(CopyPlan(fields=('nodes',)), EqPlan(fields=('nodes',)), FrozenPlan(fields=('nodes',), allow_dynamic"
|
|
1748
|
+
"_dunder_attrs=False), HashPlan(action='add', fields=('nodes',), cache=False), InitPlan(fields=(InitPlan.Field("
|
|
1749
|
+
"name='nodes', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True"
|
|
1750
|
+
", override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None),), self_param='s"
|
|
1751
|
+
"elf', std_params=('nodes',), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(), "
|
|
1752
|
+
"validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='nodes', kw_only=False, fn=None),), id=False, terse=Fal"
|
|
1753
|
+
"se, default_fn=None)))"
|
|
1754
|
+
),
|
|
1755
|
+
plan_repr_sha1='95a04b516e507c6ca7803679cc697feffd03c2fe',
|
|
1756
|
+
op_ref_idents=(
|
|
1757
|
+
'__dataclass__init__fields__0__annotation',
|
|
1758
|
+
),
|
|
1759
|
+
cls_names=(
|
|
1760
|
+
('omlish.specs.jmespath', 'IndexExpression'),
|
|
1761
|
+
('omlish.specs.jmespath', 'MultiSelectDict'),
|
|
1762
|
+
('omlish.specs.jmespath', 'MultiSelectList'),
|
|
1763
|
+
),
|
|
1764
|
+
)
|
|
1765
|
+
def _process_dataclass__95a04b516e507c6ca7803679cc697feffd03c2fe():
|
|
1766
|
+
def _process_dataclass(
|
|
1767
|
+
*,
|
|
1768
|
+
__dataclass__cls,
|
|
1769
|
+
__dataclass__init__fields__0__annotation,
|
|
1770
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1771
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1772
|
+
__dataclass__FnValidationError, # noqa
|
|
1773
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1774
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1775
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1776
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1777
|
+
__dataclass__None=None, # noqa
|
|
1778
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1779
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1780
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1781
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1782
|
+
__dataclass__property=property, # noqa
|
|
1783
|
+
):
|
|
1784
|
+
def __copy__(self):
|
|
1785
|
+
if self.__class__ is not __dataclass__cls:
|
|
1786
|
+
raise TypeError(self)
|
|
1787
|
+
return __dataclass__cls( # noqa
|
|
1788
|
+
nodes=self.nodes,
|
|
1789
|
+
)
|
|
1790
|
+
|
|
1791
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1792
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1793
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1794
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1795
|
+
|
|
1796
|
+
def __eq__(self, other):
|
|
1797
|
+
if self is other:
|
|
1798
|
+
return True
|
|
1799
|
+
if self.__class__ is not other.__class__:
|
|
1800
|
+
return NotImplemented
|
|
1801
|
+
return (
|
|
1802
|
+
self.nodes == other.nodes
|
|
1803
|
+
)
|
|
1804
|
+
|
|
1805
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1806
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1807
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1808
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1809
|
+
|
|
1810
|
+
__dataclass___setattr_frozen_fields = {
|
|
1811
|
+
'nodes',
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
def __setattr__(self, name, value):
|
|
1815
|
+
if (
|
|
1816
|
+
type(self) is __dataclass__cls
|
|
1817
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1818
|
+
):
|
|
1819
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1820
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1821
|
+
|
|
1822
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1823
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1824
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1825
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1826
|
+
|
|
1827
|
+
__dataclass___delattr_frozen_fields = {
|
|
1828
|
+
'nodes',
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
def __delattr__(self, name):
|
|
1832
|
+
if (
|
|
1833
|
+
type(self) is __dataclass__cls
|
|
1834
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1835
|
+
):
|
|
1836
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1837
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1838
|
+
|
|
1839
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1840
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1841
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1842
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1843
|
+
|
|
1844
|
+
def __hash__(self):
|
|
1845
|
+
return hash((
|
|
1846
|
+
self.nodes,
|
|
1847
|
+
))
|
|
1848
|
+
|
|
1849
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1850
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1851
|
+
|
|
1852
|
+
def __init__(
|
|
1853
|
+
self,
|
|
1854
|
+
nodes: __dataclass__init__fields__0__annotation,
|
|
1855
|
+
) -> __dataclass__None:
|
|
1856
|
+
__dataclass__object_setattr(self, 'nodes', nodes)
|
|
1857
|
+
|
|
1858
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1859
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1860
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1861
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1862
|
+
|
|
1863
|
+
@__dataclass___recursive_repr()
|
|
1864
|
+
def __repr__(self):
|
|
1865
|
+
parts = []
|
|
1866
|
+
parts.append(f"nodes={self.nodes!r}")
|
|
1867
|
+
return (
|
|
1868
|
+
f"{self.__class__.__qualname__}("
|
|
1869
|
+
f"{', '.join(parts)}"
|
|
1870
|
+
f")"
|
|
1871
|
+
)
|
|
1872
|
+
|
|
1873
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1874
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1875
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1876
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1877
|
+
|
|
1878
|
+
return _process_dataclass
|
|
1879
|
+
|
|
1880
|
+
|
|
1881
|
+
@_register(
|
|
1882
|
+
plan_repr=(
|
|
1883
|
+
"Plans(tup=(CopyPlan(fields=('key_name', 'node')), EqPlan(fields=('key_name', 'node')), FrozenPlan(fields=('key"
|
|
1884
|
+
"_name', 'node'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('key_name', 'node'), cache="
|
|
1885
|
+
"False), InitPlan(fields=(InitPlan.Field(name='key_name', annotation=OpRef(name='init.fields.0.annotation'), de"
|
|
1886
|
+
"fault=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, valid"
|
|
1887
|
+
"ate=None, check_type=None), InitPlan.Field(name='node', annotation=OpRef(name='init.fields.1.annotation'), def"
|
|
1888
|
+
"ault=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, valida"
|
|
1889
|
+
"te=None, check_type=None)), self_param='self', std_params=('key_name', 'node'), kw_only_params=(), frozen=True"
|
|
1890
|
+
", slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='key"
|
|
1891
|
+
"_name', kw_only=False, fn=None), ReprPlan.Field(name='node', kw_only=False, fn=None)), id=False, terse=False, "
|
|
1892
|
+
"default_fn=None)))"
|
|
1893
|
+
),
|
|
1894
|
+
plan_repr_sha1='5c98f4baa29dbd0603b7dae82100421eaccc16c1',
|
|
1895
|
+
op_ref_idents=(
|
|
1896
|
+
'__dataclass__init__fields__0__annotation',
|
|
1897
|
+
'__dataclass__init__fields__1__annotation',
|
|
1898
|
+
),
|
|
1899
|
+
cls_names=(
|
|
1900
|
+
('omlish.specs.jmespath', 'KeyValPair'),
|
|
1901
|
+
),
|
|
1902
|
+
)
|
|
1903
|
+
def _process_dataclass__5c98f4baa29dbd0603b7dae82100421eaccc16c1():
|
|
1904
|
+
def _process_dataclass(
|
|
1905
|
+
*,
|
|
1906
|
+
__dataclass__cls,
|
|
1907
|
+
__dataclass__init__fields__0__annotation,
|
|
1908
|
+
__dataclass__init__fields__1__annotation,
|
|
1909
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1910
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1911
|
+
__dataclass__FnValidationError, # noqa
|
|
1912
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1913
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1914
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1915
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1916
|
+
__dataclass__None=None, # noqa
|
|
1917
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1918
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1919
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1920
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1921
|
+
__dataclass__property=property, # noqa
|
|
1922
|
+
):
|
|
1923
|
+
def __copy__(self):
|
|
1924
|
+
if self.__class__ is not __dataclass__cls:
|
|
1925
|
+
raise TypeError(self)
|
|
1926
|
+
return __dataclass__cls( # noqa
|
|
1927
|
+
key_name=self.key_name,
|
|
1928
|
+
node=self.node,
|
|
1929
|
+
)
|
|
1930
|
+
|
|
1931
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1932
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1933
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1934
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1935
|
+
|
|
1936
|
+
def __eq__(self, other):
|
|
1937
|
+
if self is other:
|
|
1938
|
+
return True
|
|
1939
|
+
if self.__class__ is not other.__class__:
|
|
1940
|
+
return NotImplemented
|
|
1941
|
+
return (
|
|
1942
|
+
self.key_name == other.key_name and
|
|
1943
|
+
self.node == other.node
|
|
1944
|
+
)
|
|
1945
|
+
|
|
1946
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1947
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1948
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1949
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1950
|
+
|
|
1951
|
+
__dataclass___setattr_frozen_fields = {
|
|
1952
|
+
'key_name',
|
|
1953
|
+
'node',
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
def __setattr__(self, name, value):
|
|
1957
|
+
if (
|
|
1958
|
+
type(self) is __dataclass__cls
|
|
1959
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1960
|
+
):
|
|
1961
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1962
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1963
|
+
|
|
1964
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1965
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1966
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1967
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1968
|
+
|
|
1969
|
+
__dataclass___delattr_frozen_fields = {
|
|
1970
|
+
'key_name',
|
|
1971
|
+
'node',
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
def __delattr__(self, name):
|
|
1975
|
+
if (
|
|
1976
|
+
type(self) is __dataclass__cls
|
|
1977
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1978
|
+
):
|
|
1979
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1980
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1981
|
+
|
|
1982
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1983
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1984
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1985
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1986
|
+
|
|
1987
|
+
def __hash__(self):
|
|
1988
|
+
return hash((
|
|
1989
|
+
self.key_name,
|
|
1990
|
+
self.node,
|
|
1991
|
+
))
|
|
1992
|
+
|
|
1993
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1994
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1995
|
+
|
|
1996
|
+
def __init__(
|
|
1997
|
+
self,
|
|
1998
|
+
key_name: __dataclass__init__fields__0__annotation,
|
|
1999
|
+
node: __dataclass__init__fields__1__annotation,
|
|
2000
|
+
) -> __dataclass__None:
|
|
2001
|
+
__dataclass__object_setattr(self, 'key_name', key_name)
|
|
2002
|
+
__dataclass__object_setattr(self, 'node', node)
|
|
2003
|
+
|
|
2004
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2005
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2006
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2007
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2008
|
+
|
|
2009
|
+
@__dataclass___recursive_repr()
|
|
2010
|
+
def __repr__(self):
|
|
2011
|
+
parts = []
|
|
2012
|
+
parts.append(f"key_name={self.key_name!r}")
|
|
2013
|
+
parts.append(f"node={self.node!r}")
|
|
2014
|
+
return (
|
|
2015
|
+
f"{self.__class__.__qualname__}("
|
|
2016
|
+
f"{', '.join(parts)}"
|
|
2017
|
+
f")"
|
|
2018
|
+
)
|
|
2019
|
+
|
|
2020
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2021
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2022
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2023
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2024
|
+
|
|
2025
|
+
return _process_dataclass
|
|
2026
|
+
|
|
2027
|
+
|
|
2028
|
+
@_register(
|
|
2029
|
+
plan_repr=(
|
|
2030
|
+
"Plans(tup=(CopyPlan(fields=('bindings', 'expr')), EqPlan(fields=('bindings', 'expr')), FrozenPlan(fields=('bin"
|
|
2031
|
+
"dings', 'expr'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('bindings', 'expr'), cache="
|
|
2032
|
+
"False), InitPlan(fields=(InitPlan.Field(name='bindings', annotation=OpRef(name='init.fields.0.annotation'), de"
|
|
2033
|
+
"fault=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, valid"
|
|
2034
|
+
"ate=None, check_type=None), InitPlan.Field(name='expr', annotation=OpRef(name='init.fields.1.annotation'), def"
|
|
2035
|
+
"ault=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, valida"
|
|
2036
|
+
"te=None, check_type=None)), self_param='self', std_params=('bindings', 'expr'), kw_only_params=(), frozen=True"
|
|
2037
|
+
", slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='bin"
|
|
2038
|
+
"dings', kw_only=False, fn=None), ReprPlan.Field(name='expr', kw_only=False, fn=None)), id=False, terse=False, "
|
|
2039
|
+
"default_fn=None)))"
|
|
2040
|
+
),
|
|
2041
|
+
plan_repr_sha1='c8a250c76298910f7bf4f1d857d2754886ebd5c1',
|
|
2042
|
+
op_ref_idents=(
|
|
2043
|
+
'__dataclass__init__fields__0__annotation',
|
|
2044
|
+
'__dataclass__init__fields__1__annotation',
|
|
2045
|
+
),
|
|
2046
|
+
cls_names=(
|
|
2047
|
+
('omlish.specs.jmespath', 'LetExpression'),
|
|
2048
|
+
),
|
|
2049
|
+
)
|
|
2050
|
+
def _process_dataclass__c8a250c76298910f7bf4f1d857d2754886ebd5c1():
|
|
2051
|
+
def _process_dataclass(
|
|
2052
|
+
*,
|
|
2053
|
+
__dataclass__cls,
|
|
2054
|
+
__dataclass__init__fields__0__annotation,
|
|
2055
|
+
__dataclass__init__fields__1__annotation,
|
|
2056
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2057
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2058
|
+
__dataclass__FnValidationError, # noqa
|
|
2059
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2060
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2061
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2062
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2063
|
+
__dataclass__None=None, # noqa
|
|
2064
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2065
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2066
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2067
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2068
|
+
__dataclass__property=property, # noqa
|
|
2069
|
+
):
|
|
2070
|
+
def __copy__(self):
|
|
2071
|
+
if self.__class__ is not __dataclass__cls:
|
|
2072
|
+
raise TypeError(self)
|
|
2073
|
+
return __dataclass__cls( # noqa
|
|
2074
|
+
bindings=self.bindings,
|
|
2075
|
+
expr=self.expr,
|
|
2076
|
+
)
|
|
2077
|
+
|
|
2078
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2079
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2080
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2081
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2082
|
+
|
|
2083
|
+
def __eq__(self, other):
|
|
2084
|
+
if self is other:
|
|
2085
|
+
return True
|
|
2086
|
+
if self.__class__ is not other.__class__:
|
|
2087
|
+
return NotImplemented
|
|
2088
|
+
return (
|
|
2089
|
+
self.bindings == other.bindings and
|
|
2090
|
+
self.expr == other.expr
|
|
2091
|
+
)
|
|
2092
|
+
|
|
2093
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2094
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2095
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2096
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2097
|
+
|
|
2098
|
+
__dataclass___setattr_frozen_fields = {
|
|
2099
|
+
'bindings',
|
|
2100
|
+
'expr',
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
def __setattr__(self, name, value):
|
|
2104
|
+
if (
|
|
2105
|
+
type(self) is __dataclass__cls
|
|
2106
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2107
|
+
):
|
|
2108
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2109
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2110
|
+
|
|
2111
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2112
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2113
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2114
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2115
|
+
|
|
2116
|
+
__dataclass___delattr_frozen_fields = {
|
|
2117
|
+
'bindings',
|
|
2118
|
+
'expr',
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
def __delattr__(self, name):
|
|
2122
|
+
if (
|
|
2123
|
+
type(self) is __dataclass__cls
|
|
2124
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2125
|
+
):
|
|
2126
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2127
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2128
|
+
|
|
2129
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2130
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2131
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2132
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2133
|
+
|
|
2134
|
+
def __hash__(self):
|
|
2135
|
+
return hash((
|
|
2136
|
+
self.bindings,
|
|
2137
|
+
self.expr,
|
|
2138
|
+
))
|
|
2139
|
+
|
|
2140
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2141
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2142
|
+
|
|
2143
|
+
def __init__(
|
|
2144
|
+
self,
|
|
2145
|
+
bindings: __dataclass__init__fields__0__annotation,
|
|
2146
|
+
expr: __dataclass__init__fields__1__annotation,
|
|
2147
|
+
) -> __dataclass__None:
|
|
2148
|
+
__dataclass__object_setattr(self, 'bindings', bindings)
|
|
2149
|
+
__dataclass__object_setattr(self, 'expr', expr)
|
|
2150
|
+
|
|
2151
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2152
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2153
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2154
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2155
|
+
|
|
2156
|
+
@__dataclass___recursive_repr()
|
|
2157
|
+
def __repr__(self):
|
|
2158
|
+
parts = []
|
|
2159
|
+
parts.append(f"bindings={self.bindings!r}")
|
|
2160
|
+
parts.append(f"expr={self.expr!r}")
|
|
2161
|
+
return (
|
|
2162
|
+
f"{self.__class__.__qualname__}("
|
|
2163
|
+
f"{', '.join(parts)}"
|
|
2164
|
+
f")"
|
|
2165
|
+
)
|
|
2166
|
+
|
|
2167
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2168
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2169
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2170
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2171
|
+
|
|
2172
|
+
return _process_dataclass
|
|
2173
|
+
|
|
2174
|
+
|
|
2175
|
+
@_register(
|
|
2176
|
+
plan_repr=(
|
|
2177
|
+
"Plans(tup=(CopyPlan(fields=('literal_value',)), EqPlan(fields=('literal_value',)), FrozenPlan(fields=('literal"
|
|
2178
|
+
"_value',), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('literal_value',), cache=False), "
|
|
2179
|
+
"InitPlan(fields=(InitPlan.Field(name='literal_value', annotation=OpRef(name='init.fields.0.annotation'), defau"
|
|
2180
|
+
"lt=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate"
|
|
2181
|
+
"=None, check_type=None),), self_param='self', std_params=('literal_value',), kw_only_params=(), frozen=True, s"
|
|
2182
|
+
"lots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='litera"
|
|
2183
|
+
"l_value', kw_only=False, fn=None),), id=False, terse=False, default_fn=None)))"
|
|
2184
|
+
),
|
|
2185
|
+
plan_repr_sha1='84f3ffbf073b3ca8957fd80ce73aa63d4e81555d',
|
|
2186
|
+
op_ref_idents=(
|
|
2187
|
+
'__dataclass__init__fields__0__annotation',
|
|
2188
|
+
),
|
|
2189
|
+
cls_names=(
|
|
2190
|
+
('omlish.specs.jmespath', 'Literal'),
|
|
2191
|
+
),
|
|
2192
|
+
)
|
|
2193
|
+
def _process_dataclass__84f3ffbf073b3ca8957fd80ce73aa63d4e81555d():
|
|
2194
|
+
def _process_dataclass(
|
|
2195
|
+
*,
|
|
2196
|
+
__dataclass__cls,
|
|
2197
|
+
__dataclass__init__fields__0__annotation,
|
|
2198
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2199
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2200
|
+
__dataclass__FnValidationError, # noqa
|
|
2201
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2202
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2203
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2204
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2205
|
+
__dataclass__None=None, # noqa
|
|
2206
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2207
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2208
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2209
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2210
|
+
__dataclass__property=property, # noqa
|
|
2211
|
+
):
|
|
2212
|
+
def __copy__(self):
|
|
2213
|
+
if self.__class__ is not __dataclass__cls:
|
|
2214
|
+
raise TypeError(self)
|
|
2215
|
+
return __dataclass__cls( # noqa
|
|
2216
|
+
literal_value=self.literal_value,
|
|
2217
|
+
)
|
|
2218
|
+
|
|
2219
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2220
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2221
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2222
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2223
|
+
|
|
2224
|
+
def __eq__(self, other):
|
|
2225
|
+
if self is other:
|
|
2226
|
+
return True
|
|
2227
|
+
if self.__class__ is not other.__class__:
|
|
2228
|
+
return NotImplemented
|
|
2229
|
+
return (
|
|
2230
|
+
self.literal_value == other.literal_value
|
|
2231
|
+
)
|
|
2232
|
+
|
|
2233
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2234
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2235
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2236
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2237
|
+
|
|
2238
|
+
__dataclass___setattr_frozen_fields = {
|
|
2239
|
+
'literal_value',
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
def __setattr__(self, name, value):
|
|
2243
|
+
if (
|
|
2244
|
+
type(self) is __dataclass__cls
|
|
2245
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2246
|
+
):
|
|
2247
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2248
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2249
|
+
|
|
2250
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2251
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2252
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2253
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2254
|
+
|
|
2255
|
+
__dataclass___delattr_frozen_fields = {
|
|
2256
|
+
'literal_value',
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
def __delattr__(self, name):
|
|
2260
|
+
if (
|
|
2261
|
+
type(self) is __dataclass__cls
|
|
2262
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2263
|
+
):
|
|
2264
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2265
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2266
|
+
|
|
2267
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2268
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2269
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2270
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2271
|
+
|
|
2272
|
+
def __hash__(self):
|
|
2273
|
+
return hash((
|
|
2274
|
+
self.literal_value,
|
|
2275
|
+
))
|
|
2276
|
+
|
|
2277
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2278
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2279
|
+
|
|
2280
|
+
def __init__(
|
|
2281
|
+
self,
|
|
2282
|
+
literal_value: __dataclass__init__fields__0__annotation,
|
|
2283
|
+
) -> __dataclass__None:
|
|
2284
|
+
__dataclass__object_setattr(self, 'literal_value', literal_value)
|
|
2285
|
+
|
|
2286
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2287
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2288
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2289
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2290
|
+
|
|
2291
|
+
@__dataclass___recursive_repr()
|
|
2292
|
+
def __repr__(self):
|
|
2293
|
+
parts = []
|
|
2294
|
+
parts.append(f"literal_value={self.literal_value!r}")
|
|
2295
|
+
return (
|
|
2296
|
+
f"{self.__class__.__qualname__}("
|
|
2297
|
+
f"{', '.join(parts)}"
|
|
2298
|
+
f")"
|
|
2299
|
+
)
|
|
2300
|
+
|
|
2301
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2302
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2303
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2304
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2305
|
+
|
|
2306
|
+
return _process_dataclass
|
|
2307
|
+
|
|
2308
|
+
|
|
2309
|
+
@_register(
|
|
2310
|
+
plan_repr=(
|
|
2311
|
+
"Plans(tup=(CopyPlan(fields=('expr',)), EqPlan(fields=('expr',)), FrozenPlan(fields=('expr',), allow_dynamic_du"
|
|
2312
|
+
"nder_attrs=False), HashPlan(action='add', fields=('expr',), cache=False), InitPlan(fields=(InitPlan.Field(name"
|
|
2313
|
+
"='expr', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True, ove"
|
|
2314
|
+
"rride=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None),), self_param='self',"
|
|
2315
|
+
" std_params=('expr',), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(), valida"
|
|
2316
|
+
"te_fns=()), ReprPlan(fields=(ReprPlan.Field(name='expr', kw_only=False, fn=None),), id=False, terse=False, def"
|
|
2317
|
+
"ault_fn=None)))"
|
|
2318
|
+
),
|
|
2319
|
+
plan_repr_sha1='40ccd63db7a447b608d0875571d487f96ef3af93',
|
|
2320
|
+
op_ref_idents=(
|
|
2321
|
+
'__dataclass__init__fields__0__annotation',
|
|
2322
|
+
),
|
|
2323
|
+
cls_names=(
|
|
2324
|
+
('omlish.specs.jmespath', 'NotExpression'),
|
|
2325
|
+
),
|
|
2326
|
+
)
|
|
2327
|
+
def _process_dataclass__40ccd63db7a447b608d0875571d487f96ef3af93():
|
|
2328
|
+
def _process_dataclass(
|
|
2329
|
+
*,
|
|
2330
|
+
__dataclass__cls,
|
|
2331
|
+
__dataclass__init__fields__0__annotation,
|
|
2332
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2333
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2334
|
+
__dataclass__FnValidationError, # noqa
|
|
2335
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2336
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2337
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2338
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2339
|
+
__dataclass__None=None, # noqa
|
|
2340
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2341
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2342
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2343
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2344
|
+
__dataclass__property=property, # noqa
|
|
2345
|
+
):
|
|
2346
|
+
def __copy__(self):
|
|
2347
|
+
if self.__class__ is not __dataclass__cls:
|
|
2348
|
+
raise TypeError(self)
|
|
2349
|
+
return __dataclass__cls( # noqa
|
|
2350
|
+
expr=self.expr,
|
|
2351
|
+
)
|
|
2352
|
+
|
|
2353
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2354
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2355
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2356
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2357
|
+
|
|
2358
|
+
def __eq__(self, other):
|
|
2359
|
+
if self is other:
|
|
2360
|
+
return True
|
|
2361
|
+
if self.__class__ is not other.__class__:
|
|
2362
|
+
return NotImplemented
|
|
2363
|
+
return (
|
|
2364
|
+
self.expr == other.expr
|
|
2365
|
+
)
|
|
2366
|
+
|
|
2367
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2368
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2369
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2370
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2371
|
+
|
|
2372
|
+
__dataclass___setattr_frozen_fields = {
|
|
2373
|
+
'expr',
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
def __setattr__(self, name, value):
|
|
2377
|
+
if (
|
|
2378
|
+
type(self) is __dataclass__cls
|
|
2379
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2380
|
+
):
|
|
2381
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2382
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2383
|
+
|
|
2384
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2385
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2386
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2387
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2388
|
+
|
|
2389
|
+
__dataclass___delattr_frozen_fields = {
|
|
2390
|
+
'expr',
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
def __delattr__(self, name):
|
|
2394
|
+
if (
|
|
2395
|
+
type(self) is __dataclass__cls
|
|
2396
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2397
|
+
):
|
|
2398
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2399
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2400
|
+
|
|
2401
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2402
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2403
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2404
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2405
|
+
|
|
2406
|
+
def __hash__(self):
|
|
2407
|
+
return hash((
|
|
2408
|
+
self.expr,
|
|
2409
|
+
))
|
|
2410
|
+
|
|
2411
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2412
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2413
|
+
|
|
2414
|
+
def __init__(
|
|
2415
|
+
self,
|
|
2416
|
+
expr: __dataclass__init__fields__0__annotation,
|
|
2417
|
+
) -> __dataclass__None:
|
|
2418
|
+
__dataclass__object_setattr(self, 'expr', expr)
|
|
2419
|
+
|
|
2420
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2421
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2422
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2423
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2424
|
+
|
|
2425
|
+
@__dataclass___recursive_repr()
|
|
2426
|
+
def __repr__(self):
|
|
2427
|
+
parts = []
|
|
2428
|
+
parts.append(f"expr={self.expr!r}")
|
|
2429
|
+
return (
|
|
2430
|
+
f"{self.__class__.__qualname__}("
|
|
2431
|
+
f"{', '.join(parts)}"
|
|
2432
|
+
f")"
|
|
2433
|
+
)
|
|
2434
|
+
|
|
2435
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2436
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2437
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2438
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2439
|
+
|
|
2440
|
+
return _process_dataclass
|
|
2441
|
+
|
|
2442
|
+
|
|
2443
|
+
@_register(
|
|
2444
|
+
plan_repr=(
|
|
2445
|
+
"Plans(tup=(CopyPlan(fields=('start', 'end', 'step')), EqPlan(fields=('start', 'end', 'step')), FrozenPlan(fiel"
|
|
2446
|
+
"ds=('start', 'end', 'step'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('start', 'end',"
|
|
2447
|
+
" 'step'), cache=False), InitPlan(fields=(InitPlan.Field(name='start', annotation=OpRef(name='init.fields.0.ann"
|
|
2448
|
+
"otation'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerc"
|
|
2449
|
+
"e=None, validate=None, check_type=None), InitPlan.Field(name='end', annotation=OpRef(name='init.fields.1.annot"
|
|
2450
|
+
"ation'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce="
|
|
2451
|
+
"None, validate=None, check_type=None), InitPlan.Field(name='step', annotation=OpRef(name='init.fields.2.annota"
|
|
2452
|
+
"tion'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=N"
|
|
2453
|
+
"one, validate=None, check_type=None)), self_param='self', std_params=('start', 'end', 'step'), kw_only_params="
|
|
2454
|
+
"(), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan."
|
|
2455
|
+
"Field(name='start', kw_only=False, fn=None), ReprPlan.Field(name='end', kw_only=False, fn=None), ReprPlan.Fiel"
|
|
2456
|
+
"d(name='step', kw_only=False, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
2457
|
+
),
|
|
2458
|
+
plan_repr_sha1='b32606cc73be16bf4f754945264efc4ebda65099',
|
|
2459
|
+
op_ref_idents=(
|
|
2460
|
+
'__dataclass__init__fields__0__annotation',
|
|
2461
|
+
'__dataclass__init__fields__1__annotation',
|
|
2462
|
+
'__dataclass__init__fields__2__annotation',
|
|
2463
|
+
),
|
|
2464
|
+
cls_names=(
|
|
2465
|
+
('omlish.specs.jmespath', 'Slice'),
|
|
2466
|
+
),
|
|
2467
|
+
)
|
|
2468
|
+
def _process_dataclass__b32606cc73be16bf4f754945264efc4ebda65099():
|
|
2469
|
+
def _process_dataclass(
|
|
2470
|
+
*,
|
|
2471
|
+
__dataclass__cls,
|
|
2472
|
+
__dataclass__init__fields__0__annotation,
|
|
2473
|
+
__dataclass__init__fields__1__annotation,
|
|
2474
|
+
__dataclass__init__fields__2__annotation,
|
|
2475
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2476
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2477
|
+
__dataclass__FnValidationError, # noqa
|
|
2478
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2479
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2480
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2481
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2482
|
+
__dataclass__None=None, # noqa
|
|
2483
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2484
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2485
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2486
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2487
|
+
__dataclass__property=property, # noqa
|
|
2488
|
+
):
|
|
2489
|
+
def __copy__(self):
|
|
2490
|
+
if self.__class__ is not __dataclass__cls:
|
|
2491
|
+
raise TypeError(self)
|
|
2492
|
+
return __dataclass__cls( # noqa
|
|
2493
|
+
start=self.start,
|
|
2494
|
+
end=self.end,
|
|
2495
|
+
step=self.step,
|
|
2496
|
+
)
|
|
2497
|
+
|
|
2498
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2499
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2500
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2501
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2502
|
+
|
|
2503
|
+
def __eq__(self, other):
|
|
2504
|
+
if self is other:
|
|
2505
|
+
return True
|
|
2506
|
+
if self.__class__ is not other.__class__:
|
|
2507
|
+
return NotImplemented
|
|
2508
|
+
return (
|
|
2509
|
+
self.start == other.start and
|
|
2510
|
+
self.end == other.end and
|
|
2511
|
+
self.step == other.step
|
|
2512
|
+
)
|
|
2513
|
+
|
|
2514
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2515
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2516
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2517
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2518
|
+
|
|
2519
|
+
__dataclass___setattr_frozen_fields = {
|
|
2520
|
+
'start',
|
|
2521
|
+
'end',
|
|
2522
|
+
'step',
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
|
+
def __setattr__(self, name, value):
|
|
2526
|
+
if (
|
|
2527
|
+
type(self) is __dataclass__cls
|
|
2528
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2529
|
+
):
|
|
2530
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2531
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2532
|
+
|
|
2533
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2534
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2535
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2536
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2537
|
+
|
|
2538
|
+
__dataclass___delattr_frozen_fields = {
|
|
2539
|
+
'start',
|
|
2540
|
+
'end',
|
|
2541
|
+
'step',
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
def __delattr__(self, name):
|
|
2545
|
+
if (
|
|
2546
|
+
type(self) is __dataclass__cls
|
|
2547
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2548
|
+
):
|
|
2549
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2550
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2551
|
+
|
|
2552
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2553
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2554
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2555
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2556
|
+
|
|
2557
|
+
def __hash__(self):
|
|
2558
|
+
return hash((
|
|
2559
|
+
self.start,
|
|
2560
|
+
self.end,
|
|
2561
|
+
self.step,
|
|
2562
|
+
))
|
|
2563
|
+
|
|
2564
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2565
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2566
|
+
|
|
2567
|
+
def __init__(
|
|
2568
|
+
self,
|
|
2569
|
+
start: __dataclass__init__fields__0__annotation,
|
|
2570
|
+
end: __dataclass__init__fields__1__annotation,
|
|
2571
|
+
step: __dataclass__init__fields__2__annotation,
|
|
2572
|
+
) -> __dataclass__None:
|
|
2573
|
+
__dataclass__object_setattr(self, 'start', start)
|
|
2574
|
+
__dataclass__object_setattr(self, 'end', end)
|
|
2575
|
+
__dataclass__object_setattr(self, 'step', step)
|
|
2576
|
+
|
|
2577
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2578
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2579
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2580
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2581
|
+
|
|
2582
|
+
@__dataclass___recursive_repr()
|
|
2583
|
+
def __repr__(self):
|
|
2584
|
+
parts = []
|
|
2585
|
+
parts.append(f"start={self.start!r}")
|
|
2586
|
+
parts.append(f"end={self.end!r}")
|
|
2587
|
+
parts.append(f"step={self.step!r}")
|
|
2588
|
+
return (
|
|
2589
|
+
f"{self.__class__.__qualname__}("
|
|
2590
|
+
f"{', '.join(parts)}"
|
|
2591
|
+
f")"
|
|
2592
|
+
)
|
|
2593
|
+
|
|
2594
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2595
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2596
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2597
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2598
|
+
|
|
2599
|
+
return _process_dataclass
|
|
2600
|
+
|
|
2601
|
+
|
|
2602
|
+
@_register(
|
|
2603
|
+
plan_repr=(
|
|
2604
|
+
"Plans(tup=(CopyPlan(fields=('children_nodes',)), EqPlan(fields=('children_nodes',)), FrozenPlan(fields=('child"
|
|
2605
|
+
"ren_nodes',), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('children_nodes',), cache=Fals"
|
|
2606
|
+
"e), InitPlan(fields=(InitPlan.Field(name='children_nodes', annotation=OpRef(name='init.fields.0.annotation'), "
|
|
2607
|
+
"default=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, val"
|
|
2608
|
+
"idate=None, check_type=None),), self_param='self', std_params=('children_nodes',), kw_only_params=(), frozen=T"
|
|
2609
|
+
"rue, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='"
|
|
2610
|
+
"children_nodes', kw_only=False, fn=None),), id=False, terse=False, default_fn=None)))"
|
|
2611
|
+
),
|
|
2612
|
+
plan_repr_sha1='d958b10b4f15409b30504a103e6c94dfe8c47b9d',
|
|
2613
|
+
op_ref_idents=(
|
|
2614
|
+
'__dataclass__init__fields__0__annotation',
|
|
2615
|
+
),
|
|
2616
|
+
cls_names=(
|
|
2617
|
+
('omlish.specs.jmespath', 'Subexpression'),
|
|
2618
|
+
),
|
|
2619
|
+
)
|
|
2620
|
+
def _process_dataclass__d958b10b4f15409b30504a103e6c94dfe8c47b9d():
|
|
2621
|
+
def _process_dataclass(
|
|
2622
|
+
*,
|
|
2623
|
+
__dataclass__cls,
|
|
2624
|
+
__dataclass__init__fields__0__annotation,
|
|
2625
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2626
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2627
|
+
__dataclass__FnValidationError, # noqa
|
|
2628
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2629
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2630
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2631
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2632
|
+
__dataclass__None=None, # noqa
|
|
2633
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2634
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2635
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2636
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2637
|
+
__dataclass__property=property, # noqa
|
|
2638
|
+
):
|
|
2639
|
+
def __copy__(self):
|
|
2640
|
+
if self.__class__ is not __dataclass__cls:
|
|
2641
|
+
raise TypeError(self)
|
|
2642
|
+
return __dataclass__cls( # noqa
|
|
2643
|
+
children_nodes=self.children_nodes,
|
|
2644
|
+
)
|
|
2645
|
+
|
|
2646
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2647
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2648
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2649
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2650
|
+
|
|
2651
|
+
def __eq__(self, other):
|
|
2652
|
+
if self is other:
|
|
2653
|
+
return True
|
|
2654
|
+
if self.__class__ is not other.__class__:
|
|
2655
|
+
return NotImplemented
|
|
2656
|
+
return (
|
|
2657
|
+
self.children_nodes == other.children_nodes
|
|
2658
|
+
)
|
|
2659
|
+
|
|
2660
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2661
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2662
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2663
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2664
|
+
|
|
2665
|
+
__dataclass___setattr_frozen_fields = {
|
|
2666
|
+
'children_nodes',
|
|
2667
|
+
}
|
|
2668
|
+
|
|
2669
|
+
def __setattr__(self, name, value):
|
|
2670
|
+
if (
|
|
2671
|
+
type(self) is __dataclass__cls
|
|
2672
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2673
|
+
):
|
|
2674
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2675
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2676
|
+
|
|
2677
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2678
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2679
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2680
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2681
|
+
|
|
2682
|
+
__dataclass___delattr_frozen_fields = {
|
|
2683
|
+
'children_nodes',
|
|
2684
|
+
}
|
|
2685
|
+
|
|
2686
|
+
def __delattr__(self, name):
|
|
2687
|
+
if (
|
|
2688
|
+
type(self) is __dataclass__cls
|
|
2689
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2690
|
+
):
|
|
2691
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2692
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2693
|
+
|
|
2694
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2695
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2696
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2697
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2698
|
+
|
|
2699
|
+
def __hash__(self):
|
|
2700
|
+
return hash((
|
|
2701
|
+
self.children_nodes,
|
|
2702
|
+
))
|
|
2703
|
+
|
|
2704
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2705
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2706
|
+
|
|
2707
|
+
def __init__(
|
|
2708
|
+
self,
|
|
2709
|
+
children_nodes: __dataclass__init__fields__0__annotation,
|
|
2710
|
+
) -> __dataclass__None:
|
|
2711
|
+
__dataclass__object_setattr(self, 'children_nodes', children_nodes)
|
|
2712
|
+
|
|
2713
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2714
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2715
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2716
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2717
|
+
|
|
2718
|
+
@__dataclass___recursive_repr()
|
|
2719
|
+
def __repr__(self):
|
|
2720
|
+
parts = []
|
|
2721
|
+
parts.append(f"children_nodes={self.children_nodes!r}")
|
|
2722
|
+
return (
|
|
2723
|
+
f"{self.__class__.__qualname__}("
|
|
2724
|
+
f"{', '.join(parts)}"
|
|
2725
|
+
f")"
|
|
2726
|
+
)
|
|
2727
|
+
|
|
2728
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2729
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2730
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2731
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2732
|
+
|
|
2733
|
+
return _process_dataclass
|
|
2734
|
+
|
|
2735
|
+
|
|
2736
|
+
@_register(
|
|
2737
|
+
plan_repr=(
|
|
2738
|
+
"Plans(tup=(CopyPlan(fields=('condition', 'if_truthy', 'if_falsy')), EqPlan(fields=('condition', 'if_truthy', '"
|
|
2739
|
+
"if_falsy')), FrozenPlan(fields=('condition', 'if_truthy', 'if_falsy'), allow_dynamic_dunder_attrs=False), Hash"
|
|
2740
|
+
"Plan(action='add', fields=('condition', 'if_truthy', 'if_falsy'), cache=False), InitPlan(fields=(InitPlan.Fiel"
|
|
2741
|
+
"d(name='condition', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, ini"
|
|
2742
|
+
"t=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan."
|
|
2743
|
+
"Field(name='if_truthy', annotation=OpRef(name='init.fields.1.annotation'), default=None, default_factory=None,"
|
|
2744
|
+
" init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitP"
|
|
2745
|
+
"lan.Field(name='if_falsy', annotation=OpRef(name='init.fields.2.annotation'), default=None, default_factory=No"
|
|
2746
|
+
"ne, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), s"
|
|
2747
|
+
"elf_param='self', std_params=('condition', 'if_truthy', 'if_falsy'), kw_only_params=(), frozen=True, slots=Fal"
|
|
2748
|
+
"se, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='condition', kw"
|
|
2749
|
+
"_only=False, fn=None), ReprPlan.Field(name='if_truthy', kw_only=False, fn=None), ReprPlan.Field(name='if_falsy"
|
|
2750
|
+
"', kw_only=False, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
2751
|
+
),
|
|
2752
|
+
plan_repr_sha1='f81e930fc657b10385e84befd8ddeba424da3fc1',
|
|
2753
|
+
op_ref_idents=(
|
|
2754
|
+
'__dataclass__init__fields__0__annotation',
|
|
2755
|
+
'__dataclass__init__fields__1__annotation',
|
|
2756
|
+
'__dataclass__init__fields__2__annotation',
|
|
2757
|
+
),
|
|
2758
|
+
cls_names=(
|
|
2759
|
+
('omlish.specs.jmespath', 'TernaryOperator'),
|
|
2760
|
+
),
|
|
2761
|
+
)
|
|
2762
|
+
def _process_dataclass__f81e930fc657b10385e84befd8ddeba424da3fc1():
|
|
2763
|
+
def _process_dataclass(
|
|
2764
|
+
*,
|
|
2765
|
+
__dataclass__cls,
|
|
2766
|
+
__dataclass__init__fields__0__annotation,
|
|
2767
|
+
__dataclass__init__fields__1__annotation,
|
|
2768
|
+
__dataclass__init__fields__2__annotation,
|
|
2769
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2770
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2771
|
+
__dataclass__FnValidationError, # noqa
|
|
2772
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2773
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2774
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2775
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2776
|
+
__dataclass__None=None, # noqa
|
|
2777
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2778
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2779
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2780
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2781
|
+
__dataclass__property=property, # noqa
|
|
2782
|
+
):
|
|
2783
|
+
def __copy__(self):
|
|
2784
|
+
if self.__class__ is not __dataclass__cls:
|
|
2785
|
+
raise TypeError(self)
|
|
2786
|
+
return __dataclass__cls( # noqa
|
|
2787
|
+
condition=self.condition,
|
|
2788
|
+
if_truthy=self.if_truthy,
|
|
2789
|
+
if_falsy=self.if_falsy,
|
|
2790
|
+
)
|
|
2791
|
+
|
|
2792
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2793
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2794
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2795
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2796
|
+
|
|
2797
|
+
def __eq__(self, other):
|
|
2798
|
+
if self is other:
|
|
2799
|
+
return True
|
|
2800
|
+
if self.__class__ is not other.__class__:
|
|
2801
|
+
return NotImplemented
|
|
2802
|
+
return (
|
|
2803
|
+
self.condition == other.condition and
|
|
2804
|
+
self.if_truthy == other.if_truthy and
|
|
2805
|
+
self.if_falsy == other.if_falsy
|
|
2806
|
+
)
|
|
2807
|
+
|
|
2808
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2809
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2810
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2811
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2812
|
+
|
|
2813
|
+
__dataclass___setattr_frozen_fields = {
|
|
2814
|
+
'condition',
|
|
2815
|
+
'if_truthy',
|
|
2816
|
+
'if_falsy',
|
|
2817
|
+
}
|
|
2818
|
+
|
|
2819
|
+
def __setattr__(self, name, value):
|
|
2820
|
+
if (
|
|
2821
|
+
type(self) is __dataclass__cls
|
|
2822
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2823
|
+
):
|
|
2824
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2825
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2826
|
+
|
|
2827
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2828
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2829
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2830
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2831
|
+
|
|
2832
|
+
__dataclass___delattr_frozen_fields = {
|
|
2833
|
+
'condition',
|
|
2834
|
+
'if_truthy',
|
|
2835
|
+
'if_falsy',
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2838
|
+
def __delattr__(self, name):
|
|
2839
|
+
if (
|
|
2840
|
+
type(self) is __dataclass__cls
|
|
2841
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2842
|
+
):
|
|
2843
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2844
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2845
|
+
|
|
2846
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2847
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2848
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2849
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2850
|
+
|
|
2851
|
+
def __hash__(self):
|
|
2852
|
+
return hash((
|
|
2853
|
+
self.condition,
|
|
2854
|
+
self.if_truthy,
|
|
2855
|
+
self.if_falsy,
|
|
2856
|
+
))
|
|
2857
|
+
|
|
2858
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2859
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2860
|
+
|
|
2861
|
+
def __init__(
|
|
2862
|
+
self,
|
|
2863
|
+
condition: __dataclass__init__fields__0__annotation,
|
|
2864
|
+
if_truthy: __dataclass__init__fields__1__annotation,
|
|
2865
|
+
if_falsy: __dataclass__init__fields__2__annotation,
|
|
2866
|
+
) -> __dataclass__None:
|
|
2867
|
+
__dataclass__object_setattr(self, 'condition', condition)
|
|
2868
|
+
__dataclass__object_setattr(self, 'if_truthy', if_truthy)
|
|
2869
|
+
__dataclass__object_setattr(self, 'if_falsy', if_falsy)
|
|
2870
|
+
|
|
2871
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2872
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2873
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2874
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2875
|
+
|
|
2876
|
+
@__dataclass___recursive_repr()
|
|
2877
|
+
def __repr__(self):
|
|
2878
|
+
parts = []
|
|
2879
|
+
parts.append(f"condition={self.condition!r}")
|
|
2880
|
+
parts.append(f"if_truthy={self.if_truthy!r}")
|
|
2881
|
+
parts.append(f"if_falsy={self.if_falsy!r}")
|
|
2882
|
+
return (
|
|
2883
|
+
f"{self.__class__.__qualname__}("
|
|
2884
|
+
f"{', '.join(parts)}"
|
|
2885
|
+
f")"
|
|
2886
|
+
)
|
|
2887
|
+
|
|
2888
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2889
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2890
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2891
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2892
|
+
|
|
2893
|
+
return _process_dataclass
|