omlish 0.0.0.dev447__py3-none-any.whl → 0.0.0.dev484__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/__about__.py +15 -15
- 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/processor.py +105 -24
- omlish/dataclasses/impl/processing/base.py +8 -0
- omlish/dataclasses/impl/processing/driving.py +8 -8
- omlish/dataclasses/specs.py +1 -0
- omlish/dataclasses/tools/modifiers.py +5 -0
- 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 +38 -18
- omlish/inject/_dataclasses.py +4986 -0
- omlish/inject/binder.py +4 -48
- 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/multis.py +143 -0
- omlish/inject/helpers/wrappers.py +54 -0
- omlish/inject/impl/elements.py +47 -17
- omlish/inject/impl/injector.py +20 -19
- 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 +178 -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/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 +6 -0
- omlish/logs/all.py +1 -1
- omlish/logs/utils.py +1 -1
- 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/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/{tabledefs/alchemy.py → alchemy/tabledefs.py} +2 -2
- 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/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 +86 -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.dev484.dist-info}/METADATA +29 -28
- {omlish-0.0.0.dev447.dist-info → omlish-0.0.0.dev484.dist-info}/RECORD +222 -171
- omlish/dataclasses/impl/generation/mangling.py +0 -18
- omlish/funcs/match.py +0 -227
- omlish/marshal/factories/match.py +0 -34
- omlish/marshal/factories/simple.py +0 -28
- /omlish/inject/impl/{providers2.py → providersmap.py} +0 -0
- {omlish-0.0.0.dev447.dist-info → omlish-0.0.0.dev484.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev447.dist-info → omlish-0.0.0.dev484.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev447.dist-info → omlish-0.0.0.dev484.dist-info}/licenses/LICENSE +0 -0
- {omlish-0.0.0.dev447.dist-info → omlish-0.0.0.dev484.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,2774 @@
|
|
|
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=('dct', 'specials')), EqPlan(fields=('dct', 'specials')), FrozenPlan(fields=('dct',"
|
|
29
|
+
" 'specials'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('dct', 'specials'), cache=Fals"
|
|
30
|
+
"e), InitPlan(fields=(InitPlan.Field(name='dct', annotation=OpRef(name='init.fields.0.annotation'), default=Non"
|
|
31
|
+
"e, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None,"
|
|
32
|
+
" check_type=None), InitPlan.Field(name='specials', annotation=OpRef(name='init.fields.1.annotation'), default="
|
|
33
|
+
"OpRef(name='init.fields.1.default'), default_factory=None, init=True, override=False, field_type=FieldType.INS"
|
|
34
|
+
"TANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=('dct',), kw_only_params=("
|
|
35
|
+
"'specials',), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields="
|
|
36
|
+
"(ReprPlan.Field(name='dct', kw_only=False, fn=None), ReprPlan.Field(name='specials', kw_only=True, fn=None)), "
|
|
37
|
+
"id=False, terse=False, default_fn=None)))"
|
|
38
|
+
),
|
|
39
|
+
plan_repr_sha1='1be8e124c66f00c82a764169ffbcb93f04b0b647',
|
|
40
|
+
op_ref_idents=(
|
|
41
|
+
'__dataclass__init__fields__0__annotation',
|
|
42
|
+
'__dataclass__init__fields__1__annotation',
|
|
43
|
+
'__dataclass__init__fields__1__default',
|
|
44
|
+
),
|
|
45
|
+
cls_names=(
|
|
46
|
+
('omlish.marshal.standard', 'SimpleObjectMarshalerFactory'),
|
|
47
|
+
('omlish.marshal.standard', 'SimpleObjectUnmarshalerFactory'),
|
|
48
|
+
),
|
|
49
|
+
)
|
|
50
|
+
def _process_dataclass__1be8e124c66f00c82a764169ffbcb93f04b0b647():
|
|
51
|
+
def _process_dataclass(
|
|
52
|
+
*,
|
|
53
|
+
__dataclass__cls,
|
|
54
|
+
__dataclass__init__fields__0__annotation,
|
|
55
|
+
__dataclass__init__fields__1__annotation,
|
|
56
|
+
__dataclass__init__fields__1__default,
|
|
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
|
+
dct=self.dct,
|
|
76
|
+
specials=self.specials,
|
|
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.dct == other.dct and
|
|
91
|
+
self.specials == other.specials
|
|
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
|
+
'dct',
|
|
101
|
+
'specials',
|
|
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
|
+
'dct',
|
|
119
|
+
'specials',
|
|
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.dct,
|
|
138
|
+
self.specials,
|
|
139
|
+
))
|
|
140
|
+
|
|
141
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
142
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
143
|
+
|
|
144
|
+
def __init__(
|
|
145
|
+
self,
|
|
146
|
+
dct: __dataclass__init__fields__0__annotation,
|
|
147
|
+
*,
|
|
148
|
+
specials: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
149
|
+
) -> __dataclass__None:
|
|
150
|
+
__dataclass__object_setattr(self, 'dct', dct)
|
|
151
|
+
__dataclass__object_setattr(self, 'specials', specials)
|
|
152
|
+
|
|
153
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
154
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
155
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
156
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
157
|
+
|
|
158
|
+
@__dataclass___recursive_repr()
|
|
159
|
+
def __repr__(self):
|
|
160
|
+
parts = []
|
|
161
|
+
parts.append(f"dct={self.dct!r}")
|
|
162
|
+
parts.append(f"specials={self.specials!r}")
|
|
163
|
+
return (
|
|
164
|
+
f"{self.__class__.__qualname__}("
|
|
165
|
+
f"{', '.join(parts)}"
|
|
166
|
+
f")"
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
170
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
171
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
172
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
173
|
+
|
|
174
|
+
return _process_dataclass
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
@_register(
|
|
178
|
+
plan_repr=(
|
|
179
|
+
"Plans(tup=(CopyPlan(fields=('omit_if', 'default', 'embed', 'generic_replace', 'no_marshal', 'no_unmarshal')), "
|
|
180
|
+
"EqPlan(fields=('omit_if', 'default', 'embed', 'generic_replace', 'no_marshal', 'no_unmarshal')), FrozenPlan(fi"
|
|
181
|
+
"elds=('omit_if', 'default', 'embed', 'generic_replace', 'no_marshal', 'no_unmarshal'), allow_dynamic_dunder_at"
|
|
182
|
+
"trs=False), HashPlan(action='add', fields=('omit_if', 'default', 'embed', 'generic_replace', 'no_marshal', 'no"
|
|
183
|
+
"_unmarshal'), cache=False), InitPlan(fields=(InitPlan.Field(name='omit_if', annotation=OpRef(name='init.fields"
|
|
184
|
+
".0.annotation'), default=OpRef(name='init.fields.0.default'), default_factory=None, init=True, override=False,"
|
|
185
|
+
" field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='default', a"
|
|
186
|
+
"nnotation=OpRef(name='init.fields.1.annotation'), default=OpRef(name='init.fields.1.default'), default_factory"
|
|
187
|
+
"=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=OpRef("
|
|
188
|
+
"name='init.fields.1.check_type')), InitPlan.Field(name='embed', annotation=OpRef(name='init.fields.2.annotatio"
|
|
189
|
+
"n'), default=OpRef(name='init.fields.2.default'), default_factory=None, init=True, override=False, field_type="
|
|
190
|
+
"FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='generic_replace', annot"
|
|
191
|
+
"ation=OpRef(name='init.fields.3.annotation'), default=OpRef(name='init.fields.3.default'), default_factory=Non"
|
|
192
|
+
"e, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), Ini"
|
|
193
|
+
"tPlan.Field(name='no_marshal', annotation=OpRef(name='init.fields.4.annotation'), default=OpRef(name='init.fie"
|
|
194
|
+
"lds.4.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, "
|
|
195
|
+
"validate=None, check_type=None), InitPlan.Field(name='no_unmarshal', annotation=OpRef(name='init.fields.5.anno"
|
|
196
|
+
"tation'), default=OpRef(name='init.fields.5.default'), default_factory=None, init=True, override=False, field_"
|
|
197
|
+
"type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=(), kw_o"
|
|
198
|
+
"nly_params=('omit_if', 'default', 'embed', 'generic_replace', 'no_marshal', 'no_unmarshal'), frozen=True, slot"
|
|
199
|
+
"s=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='omit_if',"
|
|
200
|
+
" kw_only=True, fn=None), ReprPlan.Field(name='default', kw_only=True, fn=None), ReprPlan.Field(name='embed', k"
|
|
201
|
+
"w_only=True, fn=None), ReprPlan.Field(name='generic_replace', kw_only=True, fn=None), ReprPlan.Field(name='no_"
|
|
202
|
+
"marshal', kw_only=True, fn=None), ReprPlan.Field(name='no_unmarshal', kw_only=True, fn=None)), id=False, terse"
|
|
203
|
+
"=False, default_fn=None)))"
|
|
204
|
+
),
|
|
205
|
+
plan_repr_sha1='2c74992a67cabe7397fb3d1cc57b660ca4f1462c',
|
|
206
|
+
op_ref_idents=(
|
|
207
|
+
'__dataclass__init__fields__0__annotation',
|
|
208
|
+
'__dataclass__init__fields__0__default',
|
|
209
|
+
'__dataclass__init__fields__1__annotation',
|
|
210
|
+
'__dataclass__init__fields__1__check_type',
|
|
211
|
+
'__dataclass__init__fields__1__default',
|
|
212
|
+
'__dataclass__init__fields__2__annotation',
|
|
213
|
+
'__dataclass__init__fields__2__default',
|
|
214
|
+
'__dataclass__init__fields__3__annotation',
|
|
215
|
+
'__dataclass__init__fields__3__default',
|
|
216
|
+
'__dataclass__init__fields__4__annotation',
|
|
217
|
+
'__dataclass__init__fields__4__default',
|
|
218
|
+
'__dataclass__init__fields__5__annotation',
|
|
219
|
+
'__dataclass__init__fields__5__default',
|
|
220
|
+
),
|
|
221
|
+
cls_names=(
|
|
222
|
+
('omlish.marshal.standard', 'FieldOptions'),
|
|
223
|
+
),
|
|
224
|
+
)
|
|
225
|
+
def _process_dataclass__2c74992a67cabe7397fb3d1cc57b660ca4f1462c():
|
|
226
|
+
def _process_dataclass(
|
|
227
|
+
*,
|
|
228
|
+
__dataclass__cls,
|
|
229
|
+
__dataclass__init__fields__0__annotation,
|
|
230
|
+
__dataclass__init__fields__0__default,
|
|
231
|
+
__dataclass__init__fields__1__annotation,
|
|
232
|
+
__dataclass__init__fields__1__check_type,
|
|
233
|
+
__dataclass__init__fields__1__default,
|
|
234
|
+
__dataclass__init__fields__2__annotation,
|
|
235
|
+
__dataclass__init__fields__2__default,
|
|
236
|
+
__dataclass__init__fields__3__annotation,
|
|
237
|
+
__dataclass__init__fields__3__default,
|
|
238
|
+
__dataclass__init__fields__4__annotation,
|
|
239
|
+
__dataclass__init__fields__4__default,
|
|
240
|
+
__dataclass__init__fields__5__annotation,
|
|
241
|
+
__dataclass__init__fields__5__default,
|
|
242
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
243
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
244
|
+
__dataclass__FnValidationError, # noqa
|
|
245
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
246
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
247
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
248
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
249
|
+
__dataclass__None=None, # noqa
|
|
250
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
251
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
252
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
253
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
254
|
+
__dataclass__property=property, # noqa
|
|
255
|
+
):
|
|
256
|
+
def __copy__(self):
|
|
257
|
+
if self.__class__ is not __dataclass__cls:
|
|
258
|
+
raise TypeError(self)
|
|
259
|
+
return __dataclass__cls( # noqa
|
|
260
|
+
omit_if=self.omit_if,
|
|
261
|
+
default=self.default,
|
|
262
|
+
embed=self.embed,
|
|
263
|
+
generic_replace=self.generic_replace,
|
|
264
|
+
no_marshal=self.no_marshal,
|
|
265
|
+
no_unmarshal=self.no_unmarshal,
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
269
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
270
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
271
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
272
|
+
|
|
273
|
+
def __eq__(self, other):
|
|
274
|
+
if self is other:
|
|
275
|
+
return True
|
|
276
|
+
if self.__class__ is not other.__class__:
|
|
277
|
+
return NotImplemented
|
|
278
|
+
return (
|
|
279
|
+
self.omit_if == other.omit_if and
|
|
280
|
+
self.default == other.default and
|
|
281
|
+
self.embed == other.embed and
|
|
282
|
+
self.generic_replace == other.generic_replace and
|
|
283
|
+
self.no_marshal == other.no_marshal and
|
|
284
|
+
self.no_unmarshal == other.no_unmarshal
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
288
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
289
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
290
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
291
|
+
|
|
292
|
+
__dataclass___setattr_frozen_fields = {
|
|
293
|
+
'omit_if',
|
|
294
|
+
'default',
|
|
295
|
+
'embed',
|
|
296
|
+
'generic_replace',
|
|
297
|
+
'no_marshal',
|
|
298
|
+
'no_unmarshal',
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
def __setattr__(self, name, value):
|
|
302
|
+
if (
|
|
303
|
+
type(self) is __dataclass__cls
|
|
304
|
+
or name in __dataclass___setattr_frozen_fields
|
|
305
|
+
):
|
|
306
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
307
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
308
|
+
|
|
309
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
310
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
311
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
312
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
313
|
+
|
|
314
|
+
__dataclass___delattr_frozen_fields = {
|
|
315
|
+
'omit_if',
|
|
316
|
+
'default',
|
|
317
|
+
'embed',
|
|
318
|
+
'generic_replace',
|
|
319
|
+
'no_marshal',
|
|
320
|
+
'no_unmarshal',
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
def __delattr__(self, name):
|
|
324
|
+
if (
|
|
325
|
+
type(self) is __dataclass__cls
|
|
326
|
+
or name in __dataclass___delattr_frozen_fields
|
|
327
|
+
):
|
|
328
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
329
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
330
|
+
|
|
331
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
332
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
333
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
334
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
335
|
+
|
|
336
|
+
def __hash__(self):
|
|
337
|
+
return hash((
|
|
338
|
+
self.omit_if,
|
|
339
|
+
self.default,
|
|
340
|
+
self.embed,
|
|
341
|
+
self.generic_replace,
|
|
342
|
+
self.no_marshal,
|
|
343
|
+
self.no_unmarshal,
|
|
344
|
+
))
|
|
345
|
+
|
|
346
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
347
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
348
|
+
|
|
349
|
+
def __init__(
|
|
350
|
+
self,
|
|
351
|
+
*,
|
|
352
|
+
omit_if: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
353
|
+
default: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
354
|
+
embed: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
355
|
+
generic_replace: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
356
|
+
no_marshal: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
357
|
+
no_unmarshal: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
358
|
+
) -> __dataclass__None:
|
|
359
|
+
if not __dataclass__isinstance(default, __dataclass__init__fields__1__check_type):
|
|
360
|
+
raise __dataclass__FieldTypeValidationError(
|
|
361
|
+
obj=self,
|
|
362
|
+
type=__dataclass__init__fields__1__check_type,
|
|
363
|
+
field='default',
|
|
364
|
+
value=default,
|
|
365
|
+
)
|
|
366
|
+
__dataclass__object_setattr(self, 'omit_if', omit_if)
|
|
367
|
+
__dataclass__object_setattr(self, 'default', default)
|
|
368
|
+
__dataclass__object_setattr(self, 'embed', embed)
|
|
369
|
+
__dataclass__object_setattr(self, 'generic_replace', generic_replace)
|
|
370
|
+
__dataclass__object_setattr(self, 'no_marshal', no_marshal)
|
|
371
|
+
__dataclass__object_setattr(self, 'no_unmarshal', no_unmarshal)
|
|
372
|
+
|
|
373
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
374
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
375
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
376
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
377
|
+
|
|
378
|
+
@__dataclass___recursive_repr()
|
|
379
|
+
def __repr__(self):
|
|
380
|
+
parts = []
|
|
381
|
+
parts.append(f"omit_if={self.omit_if!r}")
|
|
382
|
+
parts.append(f"default={self.default!r}")
|
|
383
|
+
parts.append(f"embed={self.embed!r}")
|
|
384
|
+
parts.append(f"generic_replace={self.generic_replace!r}")
|
|
385
|
+
parts.append(f"no_marshal={self.no_marshal!r}")
|
|
386
|
+
parts.append(f"no_unmarshal={self.no_unmarshal!r}")
|
|
387
|
+
return (
|
|
388
|
+
f"{self.__class__.__qualname__}("
|
|
389
|
+
f"{', '.join(parts)}"
|
|
390
|
+
f")"
|
|
391
|
+
)
|
|
392
|
+
|
|
393
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
394
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
395
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
396
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
397
|
+
|
|
398
|
+
return _process_dataclass
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
@_register(
|
|
402
|
+
plan_repr=(
|
|
403
|
+
"Plans(tup=(CopyPlan(fields=('impls', 'tt', 'allow_partial')), EqPlan(fields=('impls', 'tt', 'allow_partial')),"
|
|
404
|
+
" FrozenPlan(fields=('impls', 'tt', 'allow_partial'), allow_dynamic_dunder_attrs=False), HashPlan(action='add',"
|
|
405
|
+
" fields=('impls', 'tt', 'allow_partial'), cache=False), InitPlan(fields=(InitPlan.Field(name='impls', annotati"
|
|
406
|
+
"on=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True, override=False, fiel"
|
|
407
|
+
"d_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='tt', annotation="
|
|
408
|
+
"OpRef(name='init.fields.1.annotation'), default=OpRef(name='init.fields.1.default'), default_factory=None, ini"
|
|
409
|
+
"t=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan."
|
|
410
|
+
"Field(name='allow_partial', annotation=OpRef(name='init.fields.2.annotation'), default=OpRef(name='init.fields"
|
|
411
|
+
".2.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, val"
|
|
412
|
+
"idate=None, check_type=None)), self_param='self', std_params=('impls', 'tt'), kw_only_params=('allow_partial',"
|
|
413
|
+
"), frozen=True, slots=False, post_init_params=None, init_fns=(OpRef(name='init.init_fns.0'),), validate_fns=()"
|
|
414
|
+
"), ReprPlan(fields=(ReprPlan.Field(name='impls', kw_only=False, fn=None), ReprPlan.Field(name='tt', kw_only=Fa"
|
|
415
|
+
"lse, fn=None), ReprPlan.Field(name='allow_partial', kw_only=True, fn=None)), id=False, terse=False, default_fn"
|
|
416
|
+
"=None)))"
|
|
417
|
+
),
|
|
418
|
+
plan_repr_sha1='330f034b24c077e4e7e82f9f8846225a1064a3bf',
|
|
419
|
+
op_ref_idents=(
|
|
420
|
+
'__dataclass__init__fields__0__annotation',
|
|
421
|
+
'__dataclass__init__fields__1__annotation',
|
|
422
|
+
'__dataclass__init__fields__1__default',
|
|
423
|
+
'__dataclass__init__fields__2__annotation',
|
|
424
|
+
'__dataclass__init__fields__2__default',
|
|
425
|
+
'__dataclass__init__init_fns__0',
|
|
426
|
+
),
|
|
427
|
+
cls_names=(
|
|
428
|
+
('omlish.marshal.polymorphism.standard', 'PolymorphismUnionMarshalerFactory'),
|
|
429
|
+
('omlish.marshal.polymorphism.standard', 'PolymorphismUnionUnmarshalerFactory'),
|
|
430
|
+
('omlish.marshal.polymorphism.standard', '_BasePolymorphismUnionFactory'),
|
|
431
|
+
),
|
|
432
|
+
)
|
|
433
|
+
def _process_dataclass__330f034b24c077e4e7e82f9f8846225a1064a3bf():
|
|
434
|
+
def _process_dataclass(
|
|
435
|
+
*,
|
|
436
|
+
__dataclass__cls,
|
|
437
|
+
__dataclass__init__fields__0__annotation,
|
|
438
|
+
__dataclass__init__fields__1__annotation,
|
|
439
|
+
__dataclass__init__fields__1__default,
|
|
440
|
+
__dataclass__init__fields__2__annotation,
|
|
441
|
+
__dataclass__init__fields__2__default,
|
|
442
|
+
__dataclass__init__init_fns__0,
|
|
443
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
444
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
445
|
+
__dataclass__FnValidationError, # noqa
|
|
446
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
447
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
448
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
449
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
450
|
+
__dataclass__None=None, # noqa
|
|
451
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
452
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
453
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
454
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
455
|
+
__dataclass__property=property, # noqa
|
|
456
|
+
):
|
|
457
|
+
def __copy__(self):
|
|
458
|
+
if self.__class__ is not __dataclass__cls:
|
|
459
|
+
raise TypeError(self)
|
|
460
|
+
return __dataclass__cls( # noqa
|
|
461
|
+
impls=self.impls,
|
|
462
|
+
tt=self.tt,
|
|
463
|
+
allow_partial=self.allow_partial,
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
467
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
468
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
469
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
470
|
+
|
|
471
|
+
def __eq__(self, other):
|
|
472
|
+
if self is other:
|
|
473
|
+
return True
|
|
474
|
+
if self.__class__ is not other.__class__:
|
|
475
|
+
return NotImplemented
|
|
476
|
+
return (
|
|
477
|
+
self.impls == other.impls and
|
|
478
|
+
self.tt == other.tt and
|
|
479
|
+
self.allow_partial == other.allow_partial
|
|
480
|
+
)
|
|
481
|
+
|
|
482
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
483
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
484
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
485
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
486
|
+
|
|
487
|
+
__dataclass___setattr_frozen_fields = {
|
|
488
|
+
'impls',
|
|
489
|
+
'tt',
|
|
490
|
+
'allow_partial',
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
def __setattr__(self, name, value):
|
|
494
|
+
if (
|
|
495
|
+
type(self) is __dataclass__cls
|
|
496
|
+
or name in __dataclass___setattr_frozen_fields
|
|
497
|
+
):
|
|
498
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
499
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
500
|
+
|
|
501
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
502
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
503
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
504
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
505
|
+
|
|
506
|
+
__dataclass___delattr_frozen_fields = {
|
|
507
|
+
'impls',
|
|
508
|
+
'tt',
|
|
509
|
+
'allow_partial',
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
def __delattr__(self, name):
|
|
513
|
+
if (
|
|
514
|
+
type(self) is __dataclass__cls
|
|
515
|
+
or name in __dataclass___delattr_frozen_fields
|
|
516
|
+
):
|
|
517
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
518
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
519
|
+
|
|
520
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
521
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
522
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
523
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
524
|
+
|
|
525
|
+
def __hash__(self):
|
|
526
|
+
return hash((
|
|
527
|
+
self.impls,
|
|
528
|
+
self.tt,
|
|
529
|
+
self.allow_partial,
|
|
530
|
+
))
|
|
531
|
+
|
|
532
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
533
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
534
|
+
|
|
535
|
+
def __init__(
|
|
536
|
+
self,
|
|
537
|
+
impls: __dataclass__init__fields__0__annotation,
|
|
538
|
+
tt: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
539
|
+
*,
|
|
540
|
+
allow_partial: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
541
|
+
) -> __dataclass__None:
|
|
542
|
+
__dataclass__object_setattr(self, 'impls', impls)
|
|
543
|
+
__dataclass__object_setattr(self, 'tt', tt)
|
|
544
|
+
__dataclass__object_setattr(self, 'allow_partial', allow_partial)
|
|
545
|
+
__dataclass__init__init_fns__0(self)
|
|
546
|
+
|
|
547
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
548
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
549
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
550
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
551
|
+
|
|
552
|
+
@__dataclass___recursive_repr()
|
|
553
|
+
def __repr__(self):
|
|
554
|
+
parts = []
|
|
555
|
+
parts.append(f"impls={self.impls!r}")
|
|
556
|
+
parts.append(f"tt={self.tt!r}")
|
|
557
|
+
parts.append(f"allow_partial={self.allow_partial!r}")
|
|
558
|
+
return (
|
|
559
|
+
f"{self.__class__.__qualname__}("
|
|
560
|
+
f"{', '.join(parts)}"
|
|
561
|
+
f")"
|
|
562
|
+
)
|
|
563
|
+
|
|
564
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
565
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
566
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
567
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
568
|
+
|
|
569
|
+
return _process_dataclass
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
@_register(
|
|
573
|
+
plan_repr=(
|
|
574
|
+
"Plans(tup=(CopyPlan(fields=('field_naming', 'unknown_field', 'source_field', 'field_defaults', 'ignore_unknown"
|
|
575
|
+
"')), EqPlan(fields=('field_naming', 'unknown_field', 'source_field', 'field_defaults', 'ignore_unknown')), Fro"
|
|
576
|
+
"zenPlan(fields=('field_naming', 'unknown_field', 'source_field', 'field_defaults', 'ignore_unknown'), allow_dy"
|
|
577
|
+
"namic_dunder_attrs=False), HashPlan(action='add', fields=('field_naming', 'unknown_field', 'source_field', 'fi"
|
|
578
|
+
"eld_defaults', 'ignore_unknown'), cache=False), InitPlan(fields=(InitPlan.Field(name='field_naming', annotatio"
|
|
579
|
+
"n=OpRef(name='init.fields.0.annotation'), default=OpRef(name='init.fields.0.default'), default_factory=None, i"
|
|
580
|
+
"nit=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPla"
|
|
581
|
+
"n.Field(name='unknown_field', annotation=OpRef(name='init.fields.1.annotation'), default=OpRef(name='init.fiel"
|
|
582
|
+
"ds.1.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, v"
|
|
583
|
+
"alidate=None, check_type=None), InitPlan.Field(name='source_field', annotation=OpRef(name='init.fields.2.annot"
|
|
584
|
+
"ation'), default=OpRef(name='init.fields.2.default'), default_factory=None, init=True, override=False, field_t"
|
|
585
|
+
"ype=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='field_defaults', an"
|
|
586
|
+
"notation=OpRef(name='init.fields.3.annotation'), default=OpRef(name='init.fields.3.default'), default_factory="
|
|
587
|
+
"None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), "
|
|
588
|
+
"InitPlan.Field(name='ignore_unknown', annotation=OpRef(name='init.fields.4.annotation'), default=OpRef(name='i"
|
|
589
|
+
"nit.fields.4.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce"
|
|
590
|
+
"=None, validate=None, check_type=None)), self_param='self', std_params=(), kw_only_params=('field_naming', 'un"
|
|
591
|
+
"known_field', 'source_field', 'field_defaults', 'ignore_unknown'), frozen=True, slots=False, post_init_params="
|
|
592
|
+
"None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='field_naming', kw_only=True, fn=Non"
|
|
593
|
+
"e), ReprPlan.Field(name='unknown_field', kw_only=True, fn=None), ReprPlan.Field(name='source_field', kw_only=T"
|
|
594
|
+
"rue, fn=None), ReprPlan.Field(name='field_defaults', kw_only=True, fn=None), ReprPlan.Field(name='ignore_unkno"
|
|
595
|
+
"wn', kw_only=True, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
596
|
+
),
|
|
597
|
+
plan_repr_sha1='3a02ae2ce08461319189d2ccea7ecf32459e24c3',
|
|
598
|
+
op_ref_idents=(
|
|
599
|
+
'__dataclass__init__fields__0__annotation',
|
|
600
|
+
'__dataclass__init__fields__0__default',
|
|
601
|
+
'__dataclass__init__fields__1__annotation',
|
|
602
|
+
'__dataclass__init__fields__1__default',
|
|
603
|
+
'__dataclass__init__fields__2__annotation',
|
|
604
|
+
'__dataclass__init__fields__2__default',
|
|
605
|
+
'__dataclass__init__fields__3__annotation',
|
|
606
|
+
'__dataclass__init__fields__3__default',
|
|
607
|
+
'__dataclass__init__fields__4__annotation',
|
|
608
|
+
'__dataclass__init__fields__4__default',
|
|
609
|
+
),
|
|
610
|
+
cls_names=(
|
|
611
|
+
('omlish.marshal.standard', 'ObjectMetadata'),
|
|
612
|
+
),
|
|
613
|
+
)
|
|
614
|
+
def _process_dataclass__3a02ae2ce08461319189d2ccea7ecf32459e24c3():
|
|
615
|
+
def _process_dataclass(
|
|
616
|
+
*,
|
|
617
|
+
__dataclass__cls,
|
|
618
|
+
__dataclass__init__fields__0__annotation,
|
|
619
|
+
__dataclass__init__fields__0__default,
|
|
620
|
+
__dataclass__init__fields__1__annotation,
|
|
621
|
+
__dataclass__init__fields__1__default,
|
|
622
|
+
__dataclass__init__fields__2__annotation,
|
|
623
|
+
__dataclass__init__fields__2__default,
|
|
624
|
+
__dataclass__init__fields__3__annotation,
|
|
625
|
+
__dataclass__init__fields__3__default,
|
|
626
|
+
__dataclass__init__fields__4__annotation,
|
|
627
|
+
__dataclass__init__fields__4__default,
|
|
628
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
629
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
630
|
+
__dataclass__FnValidationError, # noqa
|
|
631
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
632
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
633
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
634
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
635
|
+
__dataclass__None=None, # noqa
|
|
636
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
637
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
638
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
639
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
640
|
+
__dataclass__property=property, # noqa
|
|
641
|
+
):
|
|
642
|
+
def __copy__(self):
|
|
643
|
+
if self.__class__ is not __dataclass__cls:
|
|
644
|
+
raise TypeError(self)
|
|
645
|
+
return __dataclass__cls( # noqa
|
|
646
|
+
field_naming=self.field_naming,
|
|
647
|
+
unknown_field=self.unknown_field,
|
|
648
|
+
source_field=self.source_field,
|
|
649
|
+
field_defaults=self.field_defaults,
|
|
650
|
+
ignore_unknown=self.ignore_unknown,
|
|
651
|
+
)
|
|
652
|
+
|
|
653
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
654
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
655
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
656
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
657
|
+
|
|
658
|
+
def __eq__(self, other):
|
|
659
|
+
if self is other:
|
|
660
|
+
return True
|
|
661
|
+
if self.__class__ is not other.__class__:
|
|
662
|
+
return NotImplemented
|
|
663
|
+
return (
|
|
664
|
+
self.field_naming == other.field_naming and
|
|
665
|
+
self.unknown_field == other.unknown_field and
|
|
666
|
+
self.source_field == other.source_field and
|
|
667
|
+
self.field_defaults == other.field_defaults and
|
|
668
|
+
self.ignore_unknown == other.ignore_unknown
|
|
669
|
+
)
|
|
670
|
+
|
|
671
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
672
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
673
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
674
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
675
|
+
|
|
676
|
+
__dataclass___setattr_frozen_fields = {
|
|
677
|
+
'field_naming',
|
|
678
|
+
'unknown_field',
|
|
679
|
+
'source_field',
|
|
680
|
+
'field_defaults',
|
|
681
|
+
'ignore_unknown',
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
def __setattr__(self, name, value):
|
|
685
|
+
if (
|
|
686
|
+
type(self) is __dataclass__cls
|
|
687
|
+
or name in __dataclass___setattr_frozen_fields
|
|
688
|
+
):
|
|
689
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
690
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
691
|
+
|
|
692
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
693
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
694
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
695
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
696
|
+
|
|
697
|
+
__dataclass___delattr_frozen_fields = {
|
|
698
|
+
'field_naming',
|
|
699
|
+
'unknown_field',
|
|
700
|
+
'source_field',
|
|
701
|
+
'field_defaults',
|
|
702
|
+
'ignore_unknown',
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
def __delattr__(self, name):
|
|
706
|
+
if (
|
|
707
|
+
type(self) is __dataclass__cls
|
|
708
|
+
or name in __dataclass___delattr_frozen_fields
|
|
709
|
+
):
|
|
710
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
711
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
712
|
+
|
|
713
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
714
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
715
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
716
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
717
|
+
|
|
718
|
+
def __hash__(self):
|
|
719
|
+
return hash((
|
|
720
|
+
self.field_naming,
|
|
721
|
+
self.unknown_field,
|
|
722
|
+
self.source_field,
|
|
723
|
+
self.field_defaults,
|
|
724
|
+
self.ignore_unknown,
|
|
725
|
+
))
|
|
726
|
+
|
|
727
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
728
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
729
|
+
|
|
730
|
+
def __init__(
|
|
731
|
+
self,
|
|
732
|
+
*,
|
|
733
|
+
field_naming: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
734
|
+
unknown_field: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
735
|
+
source_field: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
736
|
+
field_defaults: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
737
|
+
ignore_unknown: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
738
|
+
) -> __dataclass__None:
|
|
739
|
+
__dataclass__object_setattr(self, 'field_naming', field_naming)
|
|
740
|
+
__dataclass__object_setattr(self, 'unknown_field', unknown_field)
|
|
741
|
+
__dataclass__object_setattr(self, 'source_field', source_field)
|
|
742
|
+
__dataclass__object_setattr(self, 'field_defaults', field_defaults)
|
|
743
|
+
__dataclass__object_setattr(self, 'ignore_unknown', ignore_unknown)
|
|
744
|
+
|
|
745
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
746
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
747
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
748
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
749
|
+
|
|
750
|
+
@__dataclass___recursive_repr()
|
|
751
|
+
def __repr__(self):
|
|
752
|
+
parts = []
|
|
753
|
+
parts.append(f"field_naming={self.field_naming!r}")
|
|
754
|
+
parts.append(f"unknown_field={self.unknown_field!r}")
|
|
755
|
+
parts.append(f"source_field={self.source_field!r}")
|
|
756
|
+
parts.append(f"field_defaults={self.field_defaults!r}")
|
|
757
|
+
parts.append(f"ignore_unknown={self.ignore_unknown!r}")
|
|
758
|
+
return (
|
|
759
|
+
f"{self.__class__.__qualname__}("
|
|
760
|
+
f"{', '.join(parts)}"
|
|
761
|
+
f")"
|
|
762
|
+
)
|
|
763
|
+
|
|
764
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
765
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
766
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
767
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
768
|
+
|
|
769
|
+
return _process_dataclass
|
|
770
|
+
|
|
771
|
+
|
|
772
|
+
@_register(
|
|
773
|
+
plan_repr=(
|
|
774
|
+
"Plans(tup=(CopyPlan(fields=('m',)), EqPlan(fields=('m',)), FrozenPlan(fields=('m',), allow_dynamic_dunder_attr"
|
|
775
|
+
"s=False), HashPlan(action='add', fields=('m',), cache=False), InitPlan(fields=(InitPlan.Field(name='m', annota"
|
|
776
|
+
"tion=OpRef(name='init.fields.0.annotation'), default=None, default_factory=OpRef(name='init.fields.0.default_f"
|
|
777
|
+
"actory'), init=True, override=False, field_type=FieldType.INSTANCE, coerce=OpRef(name='init.fields.0.coerce'),"
|
|
778
|
+
" validate=None, check_type=None),), self_param='self', std_params=('m',), kw_only_params=(), frozen=True, slot"
|
|
779
|
+
"s=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='m', kw_on"
|
|
780
|
+
"ly=False, fn=None),), id=False, terse=False, default_fn=None)))"
|
|
781
|
+
),
|
|
782
|
+
plan_repr_sha1='473310c5275aa58689237746102f8285e35fbee6',
|
|
783
|
+
op_ref_idents=(
|
|
784
|
+
'__dataclass__init__fields__0__annotation',
|
|
785
|
+
'__dataclass__init__fields__0__coerce',
|
|
786
|
+
'__dataclass__init__fields__0__default_factory',
|
|
787
|
+
),
|
|
788
|
+
cls_names=(
|
|
789
|
+
('omlish.marshal.standard', 'TypeMapMarshalerFactory'),
|
|
790
|
+
),
|
|
791
|
+
)
|
|
792
|
+
def _process_dataclass__473310c5275aa58689237746102f8285e35fbee6():
|
|
793
|
+
def _process_dataclass(
|
|
794
|
+
*,
|
|
795
|
+
__dataclass__cls,
|
|
796
|
+
__dataclass__init__fields__0__annotation,
|
|
797
|
+
__dataclass__init__fields__0__coerce,
|
|
798
|
+
__dataclass__init__fields__0__default_factory,
|
|
799
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
800
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
801
|
+
__dataclass__FnValidationError, # noqa
|
|
802
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
803
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
804
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
805
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
806
|
+
__dataclass__None=None, # noqa
|
|
807
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
808
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
809
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
810
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
811
|
+
__dataclass__property=property, # noqa
|
|
812
|
+
):
|
|
813
|
+
def __copy__(self):
|
|
814
|
+
if self.__class__ is not __dataclass__cls:
|
|
815
|
+
raise TypeError(self)
|
|
816
|
+
return __dataclass__cls( # noqa
|
|
817
|
+
m=self.m,
|
|
818
|
+
)
|
|
819
|
+
|
|
820
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
821
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
822
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
823
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
824
|
+
|
|
825
|
+
def __eq__(self, other):
|
|
826
|
+
if self is other:
|
|
827
|
+
return True
|
|
828
|
+
if self.__class__ is not other.__class__:
|
|
829
|
+
return NotImplemented
|
|
830
|
+
return (
|
|
831
|
+
self.m == other.m
|
|
832
|
+
)
|
|
833
|
+
|
|
834
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
835
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
836
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
837
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
838
|
+
|
|
839
|
+
__dataclass___setattr_frozen_fields = {
|
|
840
|
+
'm',
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
def __setattr__(self, name, value):
|
|
844
|
+
if (
|
|
845
|
+
type(self) is __dataclass__cls
|
|
846
|
+
or name in __dataclass___setattr_frozen_fields
|
|
847
|
+
):
|
|
848
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
849
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
850
|
+
|
|
851
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
852
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
853
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
854
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
855
|
+
|
|
856
|
+
__dataclass___delattr_frozen_fields = {
|
|
857
|
+
'm',
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
def __delattr__(self, name):
|
|
861
|
+
if (
|
|
862
|
+
type(self) is __dataclass__cls
|
|
863
|
+
or name in __dataclass___delattr_frozen_fields
|
|
864
|
+
):
|
|
865
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
866
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
867
|
+
|
|
868
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
869
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
870
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
871
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
872
|
+
|
|
873
|
+
def __hash__(self):
|
|
874
|
+
return hash((
|
|
875
|
+
self.m,
|
|
876
|
+
))
|
|
877
|
+
|
|
878
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
879
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
880
|
+
|
|
881
|
+
def __init__(
|
|
882
|
+
self,
|
|
883
|
+
m: __dataclass__init__fields__0__annotation = __dataclass__HAS_DEFAULT_FACTORY,
|
|
884
|
+
) -> __dataclass__None:
|
|
885
|
+
if m is __dataclass__HAS_DEFAULT_FACTORY:
|
|
886
|
+
m = __dataclass__init__fields__0__default_factory()
|
|
887
|
+
m = __dataclass__init__fields__0__coerce(m)
|
|
888
|
+
__dataclass__object_setattr(self, 'm', m)
|
|
889
|
+
|
|
890
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
891
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
892
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
893
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
894
|
+
|
|
895
|
+
@__dataclass___recursive_repr()
|
|
896
|
+
def __repr__(self):
|
|
897
|
+
parts = []
|
|
898
|
+
parts.append(f"m={self.m!r}")
|
|
899
|
+
return (
|
|
900
|
+
f"{self.__class__.__qualname__}("
|
|
901
|
+
f"{', '.join(parts)}"
|
|
902
|
+
f")"
|
|
903
|
+
)
|
|
904
|
+
|
|
905
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
906
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
907
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
908
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
909
|
+
|
|
910
|
+
return _process_dataclass
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
@_register(
|
|
914
|
+
plan_repr=(
|
|
915
|
+
"Plans(tup=(CopyPlan(fields=('name', 'type', 'marshal_name', 'unmarshal_names', 'metadata', 'options')), EqPlan"
|
|
916
|
+
"(fields=('name', 'type', 'marshal_name', 'unmarshal_names', 'metadata', 'options')), FrozenPlan(fields=('name'"
|
|
917
|
+
", 'type', 'marshal_name', 'unmarshal_names', 'metadata', 'options'), allow_dynamic_dunder_attrs=False), HashPl"
|
|
918
|
+
"an(action='add', fields=('name', 'type', 'marshal_name', 'unmarshal_names', 'metadata', 'options'), cache=Fals"
|
|
919
|
+
"e), InitPlan(fields=(InitPlan.Field(name='name', annotation=OpRef(name='init.fields.0.annotation'), default=No"
|
|
920
|
+
"ne, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None"
|
|
921
|
+
", check_type=None), InitPlan.Field(name='type', annotation=OpRef(name='init.fields.1.annotation'), default=Non"
|
|
922
|
+
"e, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None,"
|
|
923
|
+
" check_type=None), InitPlan.Field(name='marshal_name', annotation=OpRef(name='init.fields.2.annotation'), defa"
|
|
924
|
+
"ult=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validat"
|
|
925
|
+
"e=None, check_type=None), InitPlan.Field(name='unmarshal_names', annotation=OpRef(name='init.fields.3.annotati"
|
|
926
|
+
"on'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=Non"
|
|
927
|
+
"e, validate=None, check_type=None), InitPlan.Field(name='metadata', annotation=OpRef(name='init.fields.4.annot"
|
|
928
|
+
"ation'), default=OpRef(name='init.fields.4.default'), default_factory=None, init=True, override=False, field_t"
|
|
929
|
+
"ype=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='options', annotatio"
|
|
930
|
+
"n=OpRef(name='init.fields.5.annotation'), default=OpRef(name='init.fields.5.default'), default_factory=None, i"
|
|
931
|
+
"nit=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_p"
|
|
932
|
+
"aram='self', std_params=(), kw_only_params=('name', 'type', 'marshal_name', 'unmarshal_names', 'metadata', 'op"
|
|
933
|
+
"tions'), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(Repr"
|
|
934
|
+
"Plan.Field(name='name', kw_only=True, fn=None), ReprPlan.Field(name='type', kw_only=True, fn=None), ReprPlan.F"
|
|
935
|
+
"ield(name='marshal_name', kw_only=True, fn=None), ReprPlan.Field(name='unmarshal_names', kw_only=True, fn=None"
|
|
936
|
+
"), ReprPlan.Field(name='metadata', kw_only=True, fn=None), ReprPlan.Field(name='options', kw_only=True, fn=Non"
|
|
937
|
+
"e)), id=False, terse=False, default_fn=None)))"
|
|
938
|
+
),
|
|
939
|
+
plan_repr_sha1='52efba591171513abf94b0833a0c230d4abd829e',
|
|
940
|
+
op_ref_idents=(
|
|
941
|
+
'__dataclass__init__fields__0__annotation',
|
|
942
|
+
'__dataclass__init__fields__1__annotation',
|
|
943
|
+
'__dataclass__init__fields__2__annotation',
|
|
944
|
+
'__dataclass__init__fields__3__annotation',
|
|
945
|
+
'__dataclass__init__fields__4__annotation',
|
|
946
|
+
'__dataclass__init__fields__4__default',
|
|
947
|
+
'__dataclass__init__fields__5__annotation',
|
|
948
|
+
'__dataclass__init__fields__5__default',
|
|
949
|
+
),
|
|
950
|
+
cls_names=(
|
|
951
|
+
('omlish.marshal.standard', 'FieldInfo'),
|
|
952
|
+
),
|
|
953
|
+
)
|
|
954
|
+
def _process_dataclass__52efba591171513abf94b0833a0c230d4abd829e():
|
|
955
|
+
def _process_dataclass(
|
|
956
|
+
*,
|
|
957
|
+
__dataclass__cls,
|
|
958
|
+
__dataclass__init__fields__0__annotation,
|
|
959
|
+
__dataclass__init__fields__1__annotation,
|
|
960
|
+
__dataclass__init__fields__2__annotation,
|
|
961
|
+
__dataclass__init__fields__3__annotation,
|
|
962
|
+
__dataclass__init__fields__4__annotation,
|
|
963
|
+
__dataclass__init__fields__4__default,
|
|
964
|
+
__dataclass__init__fields__5__annotation,
|
|
965
|
+
__dataclass__init__fields__5__default,
|
|
966
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
967
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
968
|
+
__dataclass__FnValidationError, # noqa
|
|
969
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
970
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
971
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
972
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
973
|
+
__dataclass__None=None, # noqa
|
|
974
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
975
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
976
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
977
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
978
|
+
__dataclass__property=property, # noqa
|
|
979
|
+
):
|
|
980
|
+
def __copy__(self):
|
|
981
|
+
if self.__class__ is not __dataclass__cls:
|
|
982
|
+
raise TypeError(self)
|
|
983
|
+
return __dataclass__cls( # noqa
|
|
984
|
+
name=self.name,
|
|
985
|
+
type=self.type,
|
|
986
|
+
marshal_name=self.marshal_name,
|
|
987
|
+
unmarshal_names=self.unmarshal_names,
|
|
988
|
+
metadata=self.metadata,
|
|
989
|
+
options=self.options,
|
|
990
|
+
)
|
|
991
|
+
|
|
992
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
993
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
994
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
995
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
996
|
+
|
|
997
|
+
def __eq__(self, other):
|
|
998
|
+
if self is other:
|
|
999
|
+
return True
|
|
1000
|
+
if self.__class__ is not other.__class__:
|
|
1001
|
+
return NotImplemented
|
|
1002
|
+
return (
|
|
1003
|
+
self.name == other.name and
|
|
1004
|
+
self.type == other.type and
|
|
1005
|
+
self.marshal_name == other.marshal_name and
|
|
1006
|
+
self.unmarshal_names == other.unmarshal_names and
|
|
1007
|
+
self.metadata == other.metadata and
|
|
1008
|
+
self.options == other.options
|
|
1009
|
+
)
|
|
1010
|
+
|
|
1011
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1012
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1013
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1014
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1015
|
+
|
|
1016
|
+
__dataclass___setattr_frozen_fields = {
|
|
1017
|
+
'name',
|
|
1018
|
+
'type',
|
|
1019
|
+
'marshal_name',
|
|
1020
|
+
'unmarshal_names',
|
|
1021
|
+
'metadata',
|
|
1022
|
+
'options',
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
def __setattr__(self, name, value):
|
|
1026
|
+
if (
|
|
1027
|
+
type(self) is __dataclass__cls
|
|
1028
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1029
|
+
):
|
|
1030
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1031
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1032
|
+
|
|
1033
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1034
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1035
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1036
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1037
|
+
|
|
1038
|
+
__dataclass___delattr_frozen_fields = {
|
|
1039
|
+
'name',
|
|
1040
|
+
'type',
|
|
1041
|
+
'marshal_name',
|
|
1042
|
+
'unmarshal_names',
|
|
1043
|
+
'metadata',
|
|
1044
|
+
'options',
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
def __delattr__(self, name):
|
|
1048
|
+
if (
|
|
1049
|
+
type(self) is __dataclass__cls
|
|
1050
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1051
|
+
):
|
|
1052
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1053
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1054
|
+
|
|
1055
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1056
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1057
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1058
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1059
|
+
|
|
1060
|
+
def __hash__(self):
|
|
1061
|
+
return hash((
|
|
1062
|
+
self.name,
|
|
1063
|
+
self.type,
|
|
1064
|
+
self.marshal_name,
|
|
1065
|
+
self.unmarshal_names,
|
|
1066
|
+
self.metadata,
|
|
1067
|
+
self.options,
|
|
1068
|
+
))
|
|
1069
|
+
|
|
1070
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1071
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1072
|
+
|
|
1073
|
+
def __init__(
|
|
1074
|
+
self,
|
|
1075
|
+
*,
|
|
1076
|
+
name: __dataclass__init__fields__0__annotation,
|
|
1077
|
+
type: __dataclass__init__fields__1__annotation,
|
|
1078
|
+
marshal_name: __dataclass__init__fields__2__annotation,
|
|
1079
|
+
unmarshal_names: __dataclass__init__fields__3__annotation,
|
|
1080
|
+
metadata: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
1081
|
+
options: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
1082
|
+
) -> __dataclass__None:
|
|
1083
|
+
__dataclass__object_setattr(self, 'name', name)
|
|
1084
|
+
__dataclass__object_setattr(self, 'type', type)
|
|
1085
|
+
__dataclass__object_setattr(self, 'marshal_name', marshal_name)
|
|
1086
|
+
__dataclass__object_setattr(self, 'unmarshal_names', unmarshal_names)
|
|
1087
|
+
__dataclass__object_setattr(self, 'metadata', metadata)
|
|
1088
|
+
__dataclass__object_setattr(self, 'options', options)
|
|
1089
|
+
|
|
1090
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1091
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1092
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1093
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1094
|
+
|
|
1095
|
+
@__dataclass___recursive_repr()
|
|
1096
|
+
def __repr__(self):
|
|
1097
|
+
parts = []
|
|
1098
|
+
parts.append(f"name={self.name!r}")
|
|
1099
|
+
parts.append(f"type={self.type!r}")
|
|
1100
|
+
parts.append(f"marshal_name={self.marshal_name!r}")
|
|
1101
|
+
parts.append(f"unmarshal_names={self.unmarshal_names!r}")
|
|
1102
|
+
parts.append(f"metadata={self.metadata!r}")
|
|
1103
|
+
parts.append(f"options={self.options!r}")
|
|
1104
|
+
return (
|
|
1105
|
+
f"{self.__class__.__qualname__}("
|
|
1106
|
+
f"{', '.join(parts)}"
|
|
1107
|
+
f")"
|
|
1108
|
+
)
|
|
1109
|
+
|
|
1110
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1111
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1112
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1113
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1114
|
+
|
|
1115
|
+
return _process_dataclass
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
@_register(
|
|
1119
|
+
plan_repr=(
|
|
1120
|
+
"Plans(tup=(CopyPlan(fields=('ty',)), EqPlan(fields=('ty',)), FrozenPlan(fields=('ty',), allow_dynamic_dunder_a"
|
|
1121
|
+
"ttrs=False), HashPlan(action='add', fields=('ty',), cache=False), InitPlan(fields=(InitPlan.Field(name='ty', a"
|
|
1122
|
+
"nnotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True, override=Fals"
|
|
1123
|
+
"e, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None),), self_param='self', std_param"
|
|
1124
|
+
"s=('ty',), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), "
|
|
1125
|
+
"ReprPlan(fields=(ReprPlan.Field(name='ty', kw_only=False, fn=None),), id=False, terse=False, default_fn=None))"
|
|
1126
|
+
")"
|
|
1127
|
+
),
|
|
1128
|
+
plan_repr_sha1='5fb811b6a8837cb3b84359f812a39e560d257d5f',
|
|
1129
|
+
op_ref_idents=(
|
|
1130
|
+
'__dataclass__init__fields__0__annotation',
|
|
1131
|
+
),
|
|
1132
|
+
cls_names=(
|
|
1133
|
+
('omlish.marshal.singular.base64', 'Base64MarshalerUnmarshaler'),
|
|
1134
|
+
('omlish.marshal.standard', 'PrimitiveMarshalerUnmarshaler'),
|
|
1135
|
+
),
|
|
1136
|
+
)
|
|
1137
|
+
def _process_dataclass__5fb811b6a8837cb3b84359f812a39e560d257d5f():
|
|
1138
|
+
def _process_dataclass(
|
|
1139
|
+
*,
|
|
1140
|
+
__dataclass__cls,
|
|
1141
|
+
__dataclass__init__fields__0__annotation,
|
|
1142
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1143
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1144
|
+
__dataclass__FnValidationError, # noqa
|
|
1145
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1146
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1147
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1148
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1149
|
+
__dataclass__None=None, # noqa
|
|
1150
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1151
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1152
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1153
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1154
|
+
__dataclass__property=property, # noqa
|
|
1155
|
+
):
|
|
1156
|
+
def __copy__(self):
|
|
1157
|
+
if self.__class__ is not __dataclass__cls:
|
|
1158
|
+
raise TypeError(self)
|
|
1159
|
+
return __dataclass__cls( # noqa
|
|
1160
|
+
ty=self.ty,
|
|
1161
|
+
)
|
|
1162
|
+
|
|
1163
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1164
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1165
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1166
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1167
|
+
|
|
1168
|
+
def __eq__(self, other):
|
|
1169
|
+
if self is other:
|
|
1170
|
+
return True
|
|
1171
|
+
if self.__class__ is not other.__class__:
|
|
1172
|
+
return NotImplemented
|
|
1173
|
+
return (
|
|
1174
|
+
self.ty == other.ty
|
|
1175
|
+
)
|
|
1176
|
+
|
|
1177
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1178
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1179
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1180
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1181
|
+
|
|
1182
|
+
__dataclass___setattr_frozen_fields = {
|
|
1183
|
+
'ty',
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
def __setattr__(self, name, value):
|
|
1187
|
+
if (
|
|
1188
|
+
type(self) is __dataclass__cls
|
|
1189
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1190
|
+
):
|
|
1191
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1192
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1193
|
+
|
|
1194
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1195
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1196
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1197
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1198
|
+
|
|
1199
|
+
__dataclass___delattr_frozen_fields = {
|
|
1200
|
+
'ty',
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
def __delattr__(self, name):
|
|
1204
|
+
if (
|
|
1205
|
+
type(self) is __dataclass__cls
|
|
1206
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1207
|
+
):
|
|
1208
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1209
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1210
|
+
|
|
1211
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1212
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1213
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1214
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1215
|
+
|
|
1216
|
+
def __hash__(self):
|
|
1217
|
+
return hash((
|
|
1218
|
+
self.ty,
|
|
1219
|
+
))
|
|
1220
|
+
|
|
1221
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1222
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1223
|
+
|
|
1224
|
+
def __init__(
|
|
1225
|
+
self,
|
|
1226
|
+
ty: __dataclass__init__fields__0__annotation,
|
|
1227
|
+
) -> __dataclass__None:
|
|
1228
|
+
__dataclass__object_setattr(self, 'ty', ty)
|
|
1229
|
+
|
|
1230
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1231
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1232
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1233
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1234
|
+
|
|
1235
|
+
@__dataclass___recursive_repr()
|
|
1236
|
+
def __repr__(self):
|
|
1237
|
+
parts = []
|
|
1238
|
+
parts.append(f"ty={self.ty!r}")
|
|
1239
|
+
return (
|
|
1240
|
+
f"{self.__class__.__qualname__}("
|
|
1241
|
+
f"{', '.join(parts)}"
|
|
1242
|
+
f")"
|
|
1243
|
+
)
|
|
1244
|
+
|
|
1245
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1246
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1247
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1248
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1249
|
+
|
|
1250
|
+
return _process_dataclass
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
@_register(
|
|
1254
|
+
plan_repr=(
|
|
1255
|
+
"Plans(tup=(CopyPlan(fields=('fields', 'specials', 'attr_getter')), EqPlan(fields=('fields', 'specials', 'attr_"
|
|
1256
|
+
"getter')), FrozenPlan(fields=('fields', 'specials', 'attr_getter'), allow_dynamic_dunder_attrs=False), HashPla"
|
|
1257
|
+
"n(action='add', fields=('fields', 'specials', 'attr_getter'), cache=False), InitPlan(fields=(InitPlan.Field(na"
|
|
1258
|
+
"me='fields', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True,"
|
|
1259
|
+
" override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(n"
|
|
1260
|
+
"ame='specials', annotation=OpRef(name='init.fields.1.annotation'), default=OpRef(name='init.fields.1.default')"
|
|
1261
|
+
", default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, "
|
|
1262
|
+
"check_type=None), InitPlan.Field(name='attr_getter', annotation=OpRef(name='init.fields.2.annotation'), defaul"
|
|
1263
|
+
"t=OpRef(name='init.fields.2.default'), default_factory=None, init=True, override=False, field_type=FieldType.I"
|
|
1264
|
+
"NSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=('fields',), kw_only_par"
|
|
1265
|
+
"ams=('specials', 'attr_getter'), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()"
|
|
1266
|
+
"), ReprPlan(fields=(ReprPlan.Field(name='fields', kw_only=False, fn=None), ReprPlan.Field(name='specials', kw_"
|
|
1267
|
+
"only=True, fn=None), ReprPlan.Field(name='attr_getter', kw_only=True, fn=None)), id=False, terse=False, defaul"
|
|
1268
|
+
"t_fn=None)))"
|
|
1269
|
+
),
|
|
1270
|
+
plan_repr_sha1='8efaa231a8242879f7cbb39c769901e1908abe12',
|
|
1271
|
+
op_ref_idents=(
|
|
1272
|
+
'__dataclass__init__fields__0__annotation',
|
|
1273
|
+
'__dataclass__init__fields__1__annotation',
|
|
1274
|
+
'__dataclass__init__fields__1__default',
|
|
1275
|
+
'__dataclass__init__fields__2__annotation',
|
|
1276
|
+
'__dataclass__init__fields__2__default',
|
|
1277
|
+
),
|
|
1278
|
+
cls_names=(
|
|
1279
|
+
('omlish.marshal.standard', 'ObjectMarshaler'),
|
|
1280
|
+
),
|
|
1281
|
+
)
|
|
1282
|
+
def _process_dataclass__8efaa231a8242879f7cbb39c769901e1908abe12():
|
|
1283
|
+
def _process_dataclass(
|
|
1284
|
+
*,
|
|
1285
|
+
__dataclass__cls,
|
|
1286
|
+
__dataclass__init__fields__0__annotation,
|
|
1287
|
+
__dataclass__init__fields__1__annotation,
|
|
1288
|
+
__dataclass__init__fields__1__default,
|
|
1289
|
+
__dataclass__init__fields__2__annotation,
|
|
1290
|
+
__dataclass__init__fields__2__default,
|
|
1291
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1292
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1293
|
+
__dataclass__FnValidationError, # noqa
|
|
1294
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1295
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1296
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1297
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1298
|
+
__dataclass__None=None, # noqa
|
|
1299
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1300
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1301
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1302
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1303
|
+
__dataclass__property=property, # noqa
|
|
1304
|
+
):
|
|
1305
|
+
def __copy__(self):
|
|
1306
|
+
if self.__class__ is not __dataclass__cls:
|
|
1307
|
+
raise TypeError(self)
|
|
1308
|
+
return __dataclass__cls( # noqa
|
|
1309
|
+
fields=self.fields,
|
|
1310
|
+
specials=self.specials,
|
|
1311
|
+
attr_getter=self.attr_getter,
|
|
1312
|
+
)
|
|
1313
|
+
|
|
1314
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1315
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1316
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1317
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1318
|
+
|
|
1319
|
+
def __eq__(self, other):
|
|
1320
|
+
if self is other:
|
|
1321
|
+
return True
|
|
1322
|
+
if self.__class__ is not other.__class__:
|
|
1323
|
+
return NotImplemented
|
|
1324
|
+
return (
|
|
1325
|
+
self.fields == other.fields and
|
|
1326
|
+
self.specials == other.specials and
|
|
1327
|
+
self.attr_getter == other.attr_getter
|
|
1328
|
+
)
|
|
1329
|
+
|
|
1330
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1331
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1332
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1333
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1334
|
+
|
|
1335
|
+
__dataclass___setattr_frozen_fields = {
|
|
1336
|
+
'fields',
|
|
1337
|
+
'specials',
|
|
1338
|
+
'attr_getter',
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
def __setattr__(self, name, value):
|
|
1342
|
+
if (
|
|
1343
|
+
type(self) is __dataclass__cls
|
|
1344
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1345
|
+
):
|
|
1346
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1347
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1348
|
+
|
|
1349
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1350
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1351
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1352
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1353
|
+
|
|
1354
|
+
__dataclass___delattr_frozen_fields = {
|
|
1355
|
+
'fields',
|
|
1356
|
+
'specials',
|
|
1357
|
+
'attr_getter',
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
def __delattr__(self, name):
|
|
1361
|
+
if (
|
|
1362
|
+
type(self) is __dataclass__cls
|
|
1363
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1364
|
+
):
|
|
1365
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1366
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1367
|
+
|
|
1368
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1369
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1370
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1371
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1372
|
+
|
|
1373
|
+
def __hash__(self):
|
|
1374
|
+
return hash((
|
|
1375
|
+
self.fields,
|
|
1376
|
+
self.specials,
|
|
1377
|
+
self.attr_getter,
|
|
1378
|
+
))
|
|
1379
|
+
|
|
1380
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1381
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1382
|
+
|
|
1383
|
+
def __init__(
|
|
1384
|
+
self,
|
|
1385
|
+
fields: __dataclass__init__fields__0__annotation,
|
|
1386
|
+
*,
|
|
1387
|
+
specials: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
1388
|
+
attr_getter: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
1389
|
+
) -> __dataclass__None:
|
|
1390
|
+
__dataclass__object_setattr(self, 'fields', fields)
|
|
1391
|
+
__dataclass__object_setattr(self, 'specials', specials)
|
|
1392
|
+
__dataclass__object_setattr(self, 'attr_getter', attr_getter)
|
|
1393
|
+
|
|
1394
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1395
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1396
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1397
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1398
|
+
|
|
1399
|
+
@__dataclass___recursive_repr()
|
|
1400
|
+
def __repr__(self):
|
|
1401
|
+
parts = []
|
|
1402
|
+
parts.append(f"fields={self.fields!r}")
|
|
1403
|
+
parts.append(f"specials={self.specials!r}")
|
|
1404
|
+
parts.append(f"attr_getter={self.attr_getter!r}")
|
|
1405
|
+
return (
|
|
1406
|
+
f"{self.__class__.__qualname__}("
|
|
1407
|
+
f"{', '.join(parts)}"
|
|
1408
|
+
f")"
|
|
1409
|
+
)
|
|
1410
|
+
|
|
1411
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1412
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1413
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1414
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1415
|
+
|
|
1416
|
+
return _process_dataclass
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
@_register(
|
|
1420
|
+
plan_repr=(
|
|
1421
|
+
"Plans(tup=(CopyPlan(fields=('v_ty', 'l', 'x')), EqPlan(fields=('v_ty', 'l', 'x')), FrozenPlan(fields=('v_ty', "
|
|
1422
|
+
"'l', 'x'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('v_ty', 'l', 'x'), cache=False), "
|
|
1423
|
+
"InitPlan(fields=(InitPlan.Field(name='v_ty', annotation=OpRef(name='init.fields.0.annotation'), default=None, "
|
|
1424
|
+
"default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, ch"
|
|
1425
|
+
"eck_type=None), InitPlan.Field(name='l', annotation=OpRef(name='init.fields.1.annotation'), default=None, defa"
|
|
1426
|
+
"ult_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_"
|
|
1427
|
+
"type=None), InitPlan.Field(name='x', annotation=OpRef(name='init.fields.2.annotation'), default=None, default_"
|
|
1428
|
+
"factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type"
|
|
1429
|
+
"=None)), self_param='self', std_params=('v_ty', 'l', 'x'), kw_only_params=(), frozen=True, slots=False, post_i"
|
|
1430
|
+
"nit_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='v_ty', kw_only=False, fn"
|
|
1431
|
+
"=None), ReprPlan.Field(name='l', kw_only=False, fn=None), ReprPlan.Field(name='x', kw_only=False, fn=None)), i"
|
|
1432
|
+
"d=False, terse=False, default_fn=None)))"
|
|
1433
|
+
),
|
|
1434
|
+
plan_repr_sha1='aa08307883613da816f90047c1bb03f6cdc155a2',
|
|
1435
|
+
op_ref_idents=(
|
|
1436
|
+
'__dataclass__init__fields__0__annotation',
|
|
1437
|
+
'__dataclass__init__fields__1__annotation',
|
|
1438
|
+
'__dataclass__init__fields__2__annotation',
|
|
1439
|
+
),
|
|
1440
|
+
cls_names=(
|
|
1441
|
+
('omlish.marshal.standard', 'LiteralUnionMarshaler'),
|
|
1442
|
+
('omlish.marshal.standard', 'LiteralUnionUnmarshaler'),
|
|
1443
|
+
),
|
|
1444
|
+
)
|
|
1445
|
+
def _process_dataclass__aa08307883613da816f90047c1bb03f6cdc155a2():
|
|
1446
|
+
def _process_dataclass(
|
|
1447
|
+
*,
|
|
1448
|
+
__dataclass__cls,
|
|
1449
|
+
__dataclass__init__fields__0__annotation,
|
|
1450
|
+
__dataclass__init__fields__1__annotation,
|
|
1451
|
+
__dataclass__init__fields__2__annotation,
|
|
1452
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1453
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1454
|
+
__dataclass__FnValidationError, # noqa
|
|
1455
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1456
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1457
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1458
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1459
|
+
__dataclass__None=None, # noqa
|
|
1460
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1461
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1462
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1463
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1464
|
+
__dataclass__property=property, # noqa
|
|
1465
|
+
):
|
|
1466
|
+
def __copy__(self):
|
|
1467
|
+
if self.__class__ is not __dataclass__cls:
|
|
1468
|
+
raise TypeError(self)
|
|
1469
|
+
return __dataclass__cls( # noqa
|
|
1470
|
+
v_ty=self.v_ty,
|
|
1471
|
+
l=self.l,
|
|
1472
|
+
x=self.x,
|
|
1473
|
+
)
|
|
1474
|
+
|
|
1475
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1476
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1477
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1478
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1479
|
+
|
|
1480
|
+
def __eq__(self, other):
|
|
1481
|
+
if self is other:
|
|
1482
|
+
return True
|
|
1483
|
+
if self.__class__ is not other.__class__:
|
|
1484
|
+
return NotImplemented
|
|
1485
|
+
return (
|
|
1486
|
+
self.v_ty == other.v_ty and
|
|
1487
|
+
self.l == other.l and
|
|
1488
|
+
self.x == other.x
|
|
1489
|
+
)
|
|
1490
|
+
|
|
1491
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1492
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1493
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1494
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1495
|
+
|
|
1496
|
+
__dataclass___setattr_frozen_fields = {
|
|
1497
|
+
'v_ty',
|
|
1498
|
+
'l',
|
|
1499
|
+
'x',
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
def __setattr__(self, name, value):
|
|
1503
|
+
if (
|
|
1504
|
+
type(self) is __dataclass__cls
|
|
1505
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1506
|
+
):
|
|
1507
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1508
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1509
|
+
|
|
1510
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1511
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1512
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1513
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1514
|
+
|
|
1515
|
+
__dataclass___delattr_frozen_fields = {
|
|
1516
|
+
'v_ty',
|
|
1517
|
+
'l',
|
|
1518
|
+
'x',
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
def __delattr__(self, name):
|
|
1522
|
+
if (
|
|
1523
|
+
type(self) is __dataclass__cls
|
|
1524
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1525
|
+
):
|
|
1526
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1527
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1528
|
+
|
|
1529
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1530
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1531
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1532
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1533
|
+
|
|
1534
|
+
def __hash__(self):
|
|
1535
|
+
return hash((
|
|
1536
|
+
self.v_ty,
|
|
1537
|
+
self.l,
|
|
1538
|
+
self.x,
|
|
1539
|
+
))
|
|
1540
|
+
|
|
1541
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1542
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1543
|
+
|
|
1544
|
+
def __init__(
|
|
1545
|
+
self,
|
|
1546
|
+
v_ty: __dataclass__init__fields__0__annotation,
|
|
1547
|
+
l: __dataclass__init__fields__1__annotation,
|
|
1548
|
+
x: __dataclass__init__fields__2__annotation,
|
|
1549
|
+
) -> __dataclass__None:
|
|
1550
|
+
__dataclass__object_setattr(self, 'v_ty', v_ty)
|
|
1551
|
+
__dataclass__object_setattr(self, 'l', l)
|
|
1552
|
+
__dataclass__object_setattr(self, 'x', x)
|
|
1553
|
+
|
|
1554
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1555
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1556
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1557
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1558
|
+
|
|
1559
|
+
@__dataclass___recursive_repr()
|
|
1560
|
+
def __repr__(self):
|
|
1561
|
+
parts = []
|
|
1562
|
+
parts.append(f"v_ty={self.v_ty!r}")
|
|
1563
|
+
parts.append(f"l={self.l!r}")
|
|
1564
|
+
parts.append(f"x={self.x!r}")
|
|
1565
|
+
return (
|
|
1566
|
+
f"{self.__class__.__qualname__}("
|
|
1567
|
+
f"{', '.join(parts)}"
|
|
1568
|
+
f")"
|
|
1569
|
+
)
|
|
1570
|
+
|
|
1571
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1572
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1573
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1574
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1575
|
+
|
|
1576
|
+
return _process_dataclass
|
|
1577
|
+
|
|
1578
|
+
|
|
1579
|
+
@_register(
|
|
1580
|
+
plan_repr=(
|
|
1581
|
+
"Plans(tup=(CopyPlan(fields=('tys',)), EqPlan(fields=('tys',)), FrozenPlan(fields=('tys',), allow_dynamic_dunde"
|
|
1582
|
+
"r_attrs=False), HashPlan(action='add', fields=('tys',), cache=False), InitPlan(fields=(InitPlan.Field(name='ty"
|
|
1583
|
+
"s', annotation=OpRef(name='init.fields.0.annotation'), default=OpRef(name='init.fields.0.default'), default_fa"
|
|
1584
|
+
"ctory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=N"
|
|
1585
|
+
"one),), self_param='self', std_params=('tys',), kw_only_params=(), frozen=True, slots=False, post_init_params="
|
|
1586
|
+
"None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='tys', kw_only=False, fn=None),), id"
|
|
1587
|
+
"=False, terse=False, default_fn=None)))"
|
|
1588
|
+
),
|
|
1589
|
+
plan_repr_sha1='b5727e74a7047b8747632a1bea03a771a8a8aef4',
|
|
1590
|
+
op_ref_idents=(
|
|
1591
|
+
'__dataclass__init__fields__0__annotation',
|
|
1592
|
+
'__dataclass__init__fields__0__default',
|
|
1593
|
+
),
|
|
1594
|
+
cls_names=(
|
|
1595
|
+
('omlish.marshal.standard', 'PrimitiveUnionMarshalerFactory'),
|
|
1596
|
+
('omlish.marshal.standard', 'PrimitiveUnionUnmarshalerFactory'),
|
|
1597
|
+
),
|
|
1598
|
+
)
|
|
1599
|
+
def _process_dataclass__b5727e74a7047b8747632a1bea03a771a8a8aef4():
|
|
1600
|
+
def _process_dataclass(
|
|
1601
|
+
*,
|
|
1602
|
+
__dataclass__cls,
|
|
1603
|
+
__dataclass__init__fields__0__annotation,
|
|
1604
|
+
__dataclass__init__fields__0__default,
|
|
1605
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1606
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1607
|
+
__dataclass__FnValidationError, # noqa
|
|
1608
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1609
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1610
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1611
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1612
|
+
__dataclass__None=None, # noqa
|
|
1613
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1614
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1615
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1616
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1617
|
+
__dataclass__property=property, # noqa
|
|
1618
|
+
):
|
|
1619
|
+
def __copy__(self):
|
|
1620
|
+
if self.__class__ is not __dataclass__cls:
|
|
1621
|
+
raise TypeError(self)
|
|
1622
|
+
return __dataclass__cls( # noqa
|
|
1623
|
+
tys=self.tys,
|
|
1624
|
+
)
|
|
1625
|
+
|
|
1626
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1627
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1628
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1629
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1630
|
+
|
|
1631
|
+
def __eq__(self, other):
|
|
1632
|
+
if self is other:
|
|
1633
|
+
return True
|
|
1634
|
+
if self.__class__ is not other.__class__:
|
|
1635
|
+
return NotImplemented
|
|
1636
|
+
return (
|
|
1637
|
+
self.tys == other.tys
|
|
1638
|
+
)
|
|
1639
|
+
|
|
1640
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1641
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1642
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1643
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1644
|
+
|
|
1645
|
+
__dataclass___setattr_frozen_fields = {
|
|
1646
|
+
'tys',
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
def __setattr__(self, name, value):
|
|
1650
|
+
if (
|
|
1651
|
+
type(self) is __dataclass__cls
|
|
1652
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1653
|
+
):
|
|
1654
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1655
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1656
|
+
|
|
1657
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1658
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1659
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1660
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1661
|
+
|
|
1662
|
+
__dataclass___delattr_frozen_fields = {
|
|
1663
|
+
'tys',
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
def __delattr__(self, name):
|
|
1667
|
+
if (
|
|
1668
|
+
type(self) is __dataclass__cls
|
|
1669
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1670
|
+
):
|
|
1671
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1672
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1673
|
+
|
|
1674
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1675
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1676
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1677
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1678
|
+
|
|
1679
|
+
def __hash__(self):
|
|
1680
|
+
return hash((
|
|
1681
|
+
self.tys,
|
|
1682
|
+
))
|
|
1683
|
+
|
|
1684
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1685
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1686
|
+
|
|
1687
|
+
def __init__(
|
|
1688
|
+
self,
|
|
1689
|
+
tys: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
1690
|
+
) -> __dataclass__None:
|
|
1691
|
+
__dataclass__object_setattr(self, 'tys', tys)
|
|
1692
|
+
|
|
1693
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1694
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1695
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1696
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1697
|
+
|
|
1698
|
+
@__dataclass___recursive_repr()
|
|
1699
|
+
def __repr__(self):
|
|
1700
|
+
parts = []
|
|
1701
|
+
parts.append(f"tys={self.tys!r}")
|
|
1702
|
+
return (
|
|
1703
|
+
f"{self.__class__.__qualname__}("
|
|
1704
|
+
f"{', '.join(parts)}"
|
|
1705
|
+
f")"
|
|
1706
|
+
)
|
|
1707
|
+
|
|
1708
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1709
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1710
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1711
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1712
|
+
|
|
1713
|
+
return _process_dataclass
|
|
1714
|
+
|
|
1715
|
+
|
|
1716
|
+
@_register(
|
|
1717
|
+
plan_repr=(
|
|
1718
|
+
"Plans(tup=(CopyPlan(fields=('name', 'alts', 'options', 'marshaler', 'marshaler_factory', 'unmarshaler', 'unmar"
|
|
1719
|
+
"shaler_factory')), EqPlan(fields=('name', 'alts', 'options', 'marshaler', 'marshaler_factory', 'unmarshaler', "
|
|
1720
|
+
"'unmarshaler_factory')), FrozenPlan(fields=('name', 'alts', 'options', 'marshaler', 'marshaler_factory', 'unma"
|
|
1721
|
+
"rshaler', 'unmarshaler_factory'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('name', 'a"
|
|
1722
|
+
"lts', 'options', 'marshaler', 'marshaler_factory', 'unmarshaler', 'unmarshaler_factory'), cache=False), InitPl"
|
|
1723
|
+
"an(fields=(InitPlan.Field(name='name', annotation=OpRef(name='init.fields.0.annotation'), default=OpRef(name='"
|
|
1724
|
+
"init.fields.0.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerc"
|
|
1725
|
+
"e=None, validate=None, check_type=None), InitPlan.Field(name='alts', annotation=OpRef(name='init.fields.1.anno"
|
|
1726
|
+
"tation'), default=OpRef(name='init.fields.1.default'), default_factory=None, init=True, override=False, field_"
|
|
1727
|
+
"type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='options', annotati"
|
|
1728
|
+
"on=OpRef(name='init.fields.2.annotation'), default=OpRef(name='init.fields.2.default'), default_factory=None, "
|
|
1729
|
+
"init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPl"
|
|
1730
|
+
"an.Field(name='marshaler', annotation=OpRef(name='init.fields.3.annotation'), default=OpRef(name='init.fields."
|
|
1731
|
+
"3.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, vali"
|
|
1732
|
+
"date=None, check_type=OpRef(name='init.fields.3.check_type')), InitPlan.Field(name='marshaler_factory', annota"
|
|
1733
|
+
"tion=OpRef(name='init.fields.4.annotation'), default=OpRef(name='init.fields.4.default'), default_factory=None"
|
|
1734
|
+
", init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), Init"
|
|
1735
|
+
"Plan.Field(name='unmarshaler', annotation=OpRef(name='init.fields.5.annotation'), default=OpRef(name='init.fie"
|
|
1736
|
+
"lds.5.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, "
|
|
1737
|
+
"validate=None, check_type=OpRef(name='init.fields.5.check_type')), InitPlan.Field(name='unmarshaler_factory', "
|
|
1738
|
+
"annotation=OpRef(name='init.fields.6.annotation'), default=OpRef(name='init.fields.6.default'), default_factor"
|
|
1739
|
+
"y=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)"
|
|
1740
|
+
"), self_param='self', std_params=(), kw_only_params=('name', 'alts', 'options', 'marshaler', 'marshaler_factor"
|
|
1741
|
+
"y', 'unmarshaler', 'unmarshaler_factory'), frozen=True, slots=False, post_init_params=None, init_fns=(), valid"
|
|
1742
|
+
"ate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='name', kw_only=True, fn=None), ReprPlan.Field(name='alts', "
|
|
1743
|
+
"kw_only=True, fn=None), ReprPlan.Field(name='options', kw_only=True, fn=None), ReprPlan.Field(name='marshaler'"
|
|
1744
|
+
", kw_only=True, fn=None), ReprPlan.Field(name='marshaler_factory', kw_only=True, fn=None), ReprPlan.Field(name"
|
|
1745
|
+
"='unmarshaler', kw_only=True, fn=None), ReprPlan.Field(name='unmarshaler_factory', kw_only=True, fn=None)), id"
|
|
1746
|
+
"=False, terse=False, default_fn=None)))"
|
|
1747
|
+
),
|
|
1748
|
+
plan_repr_sha1='bad93a176f34458732d6dbbd403a7930767b3796',
|
|
1749
|
+
op_ref_idents=(
|
|
1750
|
+
'__dataclass__init__fields__0__annotation',
|
|
1751
|
+
'__dataclass__init__fields__0__default',
|
|
1752
|
+
'__dataclass__init__fields__1__annotation',
|
|
1753
|
+
'__dataclass__init__fields__1__default',
|
|
1754
|
+
'__dataclass__init__fields__2__annotation',
|
|
1755
|
+
'__dataclass__init__fields__2__default',
|
|
1756
|
+
'__dataclass__init__fields__3__annotation',
|
|
1757
|
+
'__dataclass__init__fields__3__check_type',
|
|
1758
|
+
'__dataclass__init__fields__3__default',
|
|
1759
|
+
'__dataclass__init__fields__4__annotation',
|
|
1760
|
+
'__dataclass__init__fields__4__default',
|
|
1761
|
+
'__dataclass__init__fields__5__annotation',
|
|
1762
|
+
'__dataclass__init__fields__5__check_type',
|
|
1763
|
+
'__dataclass__init__fields__5__default',
|
|
1764
|
+
'__dataclass__init__fields__6__annotation',
|
|
1765
|
+
'__dataclass__init__fields__6__default',
|
|
1766
|
+
),
|
|
1767
|
+
cls_names=(
|
|
1768
|
+
('omlish.marshal.standard', 'FieldMetadata'),
|
|
1769
|
+
),
|
|
1770
|
+
)
|
|
1771
|
+
def _process_dataclass__bad93a176f34458732d6dbbd403a7930767b3796():
|
|
1772
|
+
def _process_dataclass(
|
|
1773
|
+
*,
|
|
1774
|
+
__dataclass__cls,
|
|
1775
|
+
__dataclass__init__fields__0__annotation,
|
|
1776
|
+
__dataclass__init__fields__0__default,
|
|
1777
|
+
__dataclass__init__fields__1__annotation,
|
|
1778
|
+
__dataclass__init__fields__1__default,
|
|
1779
|
+
__dataclass__init__fields__2__annotation,
|
|
1780
|
+
__dataclass__init__fields__2__default,
|
|
1781
|
+
__dataclass__init__fields__3__annotation,
|
|
1782
|
+
__dataclass__init__fields__3__check_type,
|
|
1783
|
+
__dataclass__init__fields__3__default,
|
|
1784
|
+
__dataclass__init__fields__4__annotation,
|
|
1785
|
+
__dataclass__init__fields__4__default,
|
|
1786
|
+
__dataclass__init__fields__5__annotation,
|
|
1787
|
+
__dataclass__init__fields__5__check_type,
|
|
1788
|
+
__dataclass__init__fields__5__default,
|
|
1789
|
+
__dataclass__init__fields__6__annotation,
|
|
1790
|
+
__dataclass__init__fields__6__default,
|
|
1791
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1792
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1793
|
+
__dataclass__FnValidationError, # noqa
|
|
1794
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1795
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1796
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1797
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1798
|
+
__dataclass__None=None, # noqa
|
|
1799
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1800
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1801
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1802
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1803
|
+
__dataclass__property=property, # noqa
|
|
1804
|
+
):
|
|
1805
|
+
def __copy__(self):
|
|
1806
|
+
if self.__class__ is not __dataclass__cls:
|
|
1807
|
+
raise TypeError(self)
|
|
1808
|
+
return __dataclass__cls( # noqa
|
|
1809
|
+
name=self.name,
|
|
1810
|
+
alts=self.alts,
|
|
1811
|
+
options=self.options,
|
|
1812
|
+
marshaler=self.marshaler,
|
|
1813
|
+
marshaler_factory=self.marshaler_factory,
|
|
1814
|
+
unmarshaler=self.unmarshaler,
|
|
1815
|
+
unmarshaler_factory=self.unmarshaler_factory,
|
|
1816
|
+
)
|
|
1817
|
+
|
|
1818
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1819
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1820
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1821
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1822
|
+
|
|
1823
|
+
def __eq__(self, other):
|
|
1824
|
+
if self is other:
|
|
1825
|
+
return True
|
|
1826
|
+
if self.__class__ is not other.__class__:
|
|
1827
|
+
return NotImplemented
|
|
1828
|
+
return (
|
|
1829
|
+
self.name == other.name and
|
|
1830
|
+
self.alts == other.alts and
|
|
1831
|
+
self.options == other.options and
|
|
1832
|
+
self.marshaler == other.marshaler and
|
|
1833
|
+
self.marshaler_factory == other.marshaler_factory and
|
|
1834
|
+
self.unmarshaler == other.unmarshaler and
|
|
1835
|
+
self.unmarshaler_factory == other.unmarshaler_factory
|
|
1836
|
+
)
|
|
1837
|
+
|
|
1838
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1839
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1840
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1841
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1842
|
+
|
|
1843
|
+
__dataclass___setattr_frozen_fields = {
|
|
1844
|
+
'name',
|
|
1845
|
+
'alts',
|
|
1846
|
+
'options',
|
|
1847
|
+
'marshaler',
|
|
1848
|
+
'marshaler_factory',
|
|
1849
|
+
'unmarshaler',
|
|
1850
|
+
'unmarshaler_factory',
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
def __setattr__(self, name, value):
|
|
1854
|
+
if (
|
|
1855
|
+
type(self) is __dataclass__cls
|
|
1856
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1857
|
+
):
|
|
1858
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1859
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1860
|
+
|
|
1861
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1862
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1863
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1864
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1865
|
+
|
|
1866
|
+
__dataclass___delattr_frozen_fields = {
|
|
1867
|
+
'name',
|
|
1868
|
+
'alts',
|
|
1869
|
+
'options',
|
|
1870
|
+
'marshaler',
|
|
1871
|
+
'marshaler_factory',
|
|
1872
|
+
'unmarshaler',
|
|
1873
|
+
'unmarshaler_factory',
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
def __delattr__(self, name):
|
|
1877
|
+
if (
|
|
1878
|
+
type(self) is __dataclass__cls
|
|
1879
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1880
|
+
):
|
|
1881
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1882
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1883
|
+
|
|
1884
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1885
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1886
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1887
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1888
|
+
|
|
1889
|
+
def __hash__(self):
|
|
1890
|
+
return hash((
|
|
1891
|
+
self.name,
|
|
1892
|
+
self.alts,
|
|
1893
|
+
self.options,
|
|
1894
|
+
self.marshaler,
|
|
1895
|
+
self.marshaler_factory,
|
|
1896
|
+
self.unmarshaler,
|
|
1897
|
+
self.unmarshaler_factory,
|
|
1898
|
+
))
|
|
1899
|
+
|
|
1900
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1901
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1902
|
+
|
|
1903
|
+
def __init__(
|
|
1904
|
+
self,
|
|
1905
|
+
*,
|
|
1906
|
+
name: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
1907
|
+
alts: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
1908
|
+
options: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
1909
|
+
marshaler: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
1910
|
+
marshaler_factory: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
1911
|
+
unmarshaler: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
1912
|
+
unmarshaler_factory: __dataclass__init__fields__6__annotation = __dataclass__init__fields__6__default,
|
|
1913
|
+
) -> __dataclass__None:
|
|
1914
|
+
if not __dataclass__isinstance(marshaler, __dataclass__init__fields__3__check_type):
|
|
1915
|
+
raise __dataclass__FieldTypeValidationError(
|
|
1916
|
+
obj=self,
|
|
1917
|
+
type=__dataclass__init__fields__3__check_type,
|
|
1918
|
+
field='marshaler',
|
|
1919
|
+
value=marshaler,
|
|
1920
|
+
)
|
|
1921
|
+
if not __dataclass__isinstance(unmarshaler, __dataclass__init__fields__5__check_type):
|
|
1922
|
+
raise __dataclass__FieldTypeValidationError(
|
|
1923
|
+
obj=self,
|
|
1924
|
+
type=__dataclass__init__fields__5__check_type,
|
|
1925
|
+
field='unmarshaler',
|
|
1926
|
+
value=unmarshaler,
|
|
1927
|
+
)
|
|
1928
|
+
__dataclass__object_setattr(self, 'name', name)
|
|
1929
|
+
__dataclass__object_setattr(self, 'alts', alts)
|
|
1930
|
+
__dataclass__object_setattr(self, 'options', options)
|
|
1931
|
+
__dataclass__object_setattr(self, 'marshaler', marshaler)
|
|
1932
|
+
__dataclass__object_setattr(self, 'marshaler_factory', marshaler_factory)
|
|
1933
|
+
__dataclass__object_setattr(self, 'unmarshaler', unmarshaler)
|
|
1934
|
+
__dataclass__object_setattr(self, 'unmarshaler_factory', unmarshaler_factory)
|
|
1935
|
+
|
|
1936
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1937
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1938
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1939
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1940
|
+
|
|
1941
|
+
@__dataclass___recursive_repr()
|
|
1942
|
+
def __repr__(self):
|
|
1943
|
+
parts = []
|
|
1944
|
+
parts.append(f"name={self.name!r}")
|
|
1945
|
+
parts.append(f"alts={self.alts!r}")
|
|
1946
|
+
parts.append(f"options={self.options!r}")
|
|
1947
|
+
parts.append(f"marshaler={self.marshaler!r}")
|
|
1948
|
+
parts.append(f"marshaler_factory={self.marshaler_factory!r}")
|
|
1949
|
+
parts.append(f"unmarshaler={self.unmarshaler!r}")
|
|
1950
|
+
parts.append(f"unmarshaler_factory={self.unmarshaler_factory!r}")
|
|
1951
|
+
return (
|
|
1952
|
+
f"{self.__class__.__qualname__}("
|
|
1953
|
+
f"{', '.join(parts)}"
|
|
1954
|
+
f")"
|
|
1955
|
+
)
|
|
1956
|
+
|
|
1957
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1958
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1959
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1960
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1961
|
+
|
|
1962
|
+
return _process_dataclass
|
|
1963
|
+
|
|
1964
|
+
|
|
1965
|
+
@_register(
|
|
1966
|
+
plan_repr=(
|
|
1967
|
+
"Plans(tup=(CopyPlan(fields=('u',)), EqPlan(fields=('u',)), FrozenPlan(fields=('u',), allow_dynamic_dunder_attr"
|
|
1968
|
+
"s=False), HashPlan(action='add', fields=('u',), cache=False), InitPlan(fields=(InitPlan.Field(name='u', annota"
|
|
1969
|
+
"tion=OpRef(name='init.fields.0.annotation'), default=None, default_factory=OpRef(name='init.fields.0.default_f"
|
|
1970
|
+
"actory'), init=True, override=False, field_type=FieldType.INSTANCE, coerce=OpRef(name='init.fields.0.coerce'),"
|
|
1971
|
+
" validate=None, check_type=None),), self_param='self', std_params=('u',), kw_only_params=(), frozen=True, slot"
|
|
1972
|
+
"s=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='u', kw_on"
|
|
1973
|
+
"ly=False, fn=None),), id=False, terse=False, default_fn=None)))"
|
|
1974
|
+
),
|
|
1975
|
+
plan_repr_sha1='c94d23c43d187cd3725f98ba417a2d32b630defb',
|
|
1976
|
+
op_ref_idents=(
|
|
1977
|
+
'__dataclass__init__fields__0__annotation',
|
|
1978
|
+
'__dataclass__init__fields__0__coerce',
|
|
1979
|
+
'__dataclass__init__fields__0__default_factory',
|
|
1980
|
+
),
|
|
1981
|
+
cls_names=(
|
|
1982
|
+
('omlish.marshal.standard', 'TypeMapUnmarshalerFactory'),
|
|
1983
|
+
),
|
|
1984
|
+
)
|
|
1985
|
+
def _process_dataclass__c94d23c43d187cd3725f98ba417a2d32b630defb():
|
|
1986
|
+
def _process_dataclass(
|
|
1987
|
+
*,
|
|
1988
|
+
__dataclass__cls,
|
|
1989
|
+
__dataclass__init__fields__0__annotation,
|
|
1990
|
+
__dataclass__init__fields__0__coerce,
|
|
1991
|
+
__dataclass__init__fields__0__default_factory,
|
|
1992
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1993
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1994
|
+
__dataclass__FnValidationError, # noqa
|
|
1995
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1996
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1997
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1998
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1999
|
+
__dataclass__None=None, # noqa
|
|
2000
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2001
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2002
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2003
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2004
|
+
__dataclass__property=property, # noqa
|
|
2005
|
+
):
|
|
2006
|
+
def __copy__(self):
|
|
2007
|
+
if self.__class__ is not __dataclass__cls:
|
|
2008
|
+
raise TypeError(self)
|
|
2009
|
+
return __dataclass__cls( # noqa
|
|
2010
|
+
u=self.u,
|
|
2011
|
+
)
|
|
2012
|
+
|
|
2013
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2014
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2015
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2016
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2017
|
+
|
|
2018
|
+
def __eq__(self, other):
|
|
2019
|
+
if self is other:
|
|
2020
|
+
return True
|
|
2021
|
+
if self.__class__ is not other.__class__:
|
|
2022
|
+
return NotImplemented
|
|
2023
|
+
return (
|
|
2024
|
+
self.u == other.u
|
|
2025
|
+
)
|
|
2026
|
+
|
|
2027
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2028
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2029
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2030
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2031
|
+
|
|
2032
|
+
__dataclass___setattr_frozen_fields = {
|
|
2033
|
+
'u',
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
def __setattr__(self, name, value):
|
|
2037
|
+
if (
|
|
2038
|
+
type(self) is __dataclass__cls
|
|
2039
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2040
|
+
):
|
|
2041
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2042
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2043
|
+
|
|
2044
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2045
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2046
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2047
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2048
|
+
|
|
2049
|
+
__dataclass___delattr_frozen_fields = {
|
|
2050
|
+
'u',
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
def __delattr__(self, name):
|
|
2054
|
+
if (
|
|
2055
|
+
type(self) is __dataclass__cls
|
|
2056
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2057
|
+
):
|
|
2058
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2059
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2060
|
+
|
|
2061
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2062
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2063
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2064
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2065
|
+
|
|
2066
|
+
def __hash__(self):
|
|
2067
|
+
return hash((
|
|
2068
|
+
self.u,
|
|
2069
|
+
))
|
|
2070
|
+
|
|
2071
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2072
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2073
|
+
|
|
2074
|
+
def __init__(
|
|
2075
|
+
self,
|
|
2076
|
+
u: __dataclass__init__fields__0__annotation = __dataclass__HAS_DEFAULT_FACTORY,
|
|
2077
|
+
) -> __dataclass__None:
|
|
2078
|
+
if u is __dataclass__HAS_DEFAULT_FACTORY:
|
|
2079
|
+
u = __dataclass__init__fields__0__default_factory()
|
|
2080
|
+
u = __dataclass__init__fields__0__coerce(u)
|
|
2081
|
+
__dataclass__object_setattr(self, 'u', u)
|
|
2082
|
+
|
|
2083
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2084
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2085
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2086
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2087
|
+
|
|
2088
|
+
@__dataclass___recursive_repr()
|
|
2089
|
+
def __repr__(self):
|
|
2090
|
+
parts = []
|
|
2091
|
+
parts.append(f"u={self.u!r}")
|
|
2092
|
+
return (
|
|
2093
|
+
f"{self.__class__.__qualname__}("
|
|
2094
|
+
f"{', '.join(parts)}"
|
|
2095
|
+
f")"
|
|
2096
|
+
)
|
|
2097
|
+
|
|
2098
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2099
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2100
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2101
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2102
|
+
|
|
2103
|
+
return _process_dataclass
|
|
2104
|
+
|
|
2105
|
+
|
|
2106
|
+
@_register(
|
|
2107
|
+
plan_repr=(
|
|
2108
|
+
"Plans(tup=(CopyPlan(fields=('lst',)), EqPlan(fields=('lst',)), FrozenPlan(fields=('lst',), allow_dynamic_dunde"
|
|
2109
|
+
"r_attrs=False), HashPlan(action='add', fields=('lst',), cache=False), InitPlan(fields=(InitPlan.Field(name='ls"
|
|
2110
|
+
"t', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True, override"
|
|
2111
|
+
"=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None),), self_param='self', std_"
|
|
2112
|
+
"params=('lst',), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(OpRef(name='ini"
|
|
2113
|
+
"t.init_fns.0'), OpRef(name='init.init_fns.1'), OpRef(name='init.init_fns.2')), validate_fns=()), ReprPlan(fiel"
|
|
2114
|
+
"ds=(ReprPlan.Field(name='lst', kw_only=False, fn=None),), id=False, terse=False, default_fn=None)))"
|
|
2115
|
+
),
|
|
2116
|
+
plan_repr_sha1='d79af82ecd003199ceaa4594c2592f2dbb8ba386',
|
|
2117
|
+
op_ref_idents=(
|
|
2118
|
+
'__dataclass__init__fields__0__annotation',
|
|
2119
|
+
'__dataclass__init__init_fns__0',
|
|
2120
|
+
'__dataclass__init__init_fns__1',
|
|
2121
|
+
'__dataclass__init__init_fns__2',
|
|
2122
|
+
),
|
|
2123
|
+
cls_names=(
|
|
2124
|
+
('omlish.marshal.standard', 'FieldInfos'),
|
|
2125
|
+
),
|
|
2126
|
+
)
|
|
2127
|
+
def _process_dataclass__d79af82ecd003199ceaa4594c2592f2dbb8ba386():
|
|
2128
|
+
def _process_dataclass(
|
|
2129
|
+
*,
|
|
2130
|
+
__dataclass__cls,
|
|
2131
|
+
__dataclass__init__fields__0__annotation,
|
|
2132
|
+
__dataclass__init__init_fns__0,
|
|
2133
|
+
__dataclass__init__init_fns__1,
|
|
2134
|
+
__dataclass__init__init_fns__2,
|
|
2135
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2136
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2137
|
+
__dataclass__FnValidationError, # noqa
|
|
2138
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2139
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2140
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2141
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2142
|
+
__dataclass__None=None, # noqa
|
|
2143
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2144
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2145
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2146
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2147
|
+
__dataclass__property=property, # noqa
|
|
2148
|
+
):
|
|
2149
|
+
def __copy__(self):
|
|
2150
|
+
if self.__class__ is not __dataclass__cls:
|
|
2151
|
+
raise TypeError(self)
|
|
2152
|
+
return __dataclass__cls( # noqa
|
|
2153
|
+
lst=self.lst,
|
|
2154
|
+
)
|
|
2155
|
+
|
|
2156
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2157
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2158
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2159
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2160
|
+
|
|
2161
|
+
def __eq__(self, other):
|
|
2162
|
+
if self is other:
|
|
2163
|
+
return True
|
|
2164
|
+
if self.__class__ is not other.__class__:
|
|
2165
|
+
return NotImplemented
|
|
2166
|
+
return (
|
|
2167
|
+
self.lst == other.lst
|
|
2168
|
+
)
|
|
2169
|
+
|
|
2170
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2171
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2172
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2173
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2174
|
+
|
|
2175
|
+
__dataclass___setattr_frozen_fields = {
|
|
2176
|
+
'lst',
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
def __setattr__(self, name, value):
|
|
2180
|
+
if (
|
|
2181
|
+
type(self) is __dataclass__cls
|
|
2182
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2183
|
+
):
|
|
2184
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2185
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2186
|
+
|
|
2187
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2188
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2189
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2190
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2191
|
+
|
|
2192
|
+
__dataclass___delattr_frozen_fields = {
|
|
2193
|
+
'lst',
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
def __delattr__(self, name):
|
|
2197
|
+
if (
|
|
2198
|
+
type(self) is __dataclass__cls
|
|
2199
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2200
|
+
):
|
|
2201
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2202
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2203
|
+
|
|
2204
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2205
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2206
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2207
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2208
|
+
|
|
2209
|
+
def __hash__(self):
|
|
2210
|
+
return hash((
|
|
2211
|
+
self.lst,
|
|
2212
|
+
))
|
|
2213
|
+
|
|
2214
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2215
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2216
|
+
|
|
2217
|
+
def __init__(
|
|
2218
|
+
self,
|
|
2219
|
+
lst: __dataclass__init__fields__0__annotation,
|
|
2220
|
+
) -> __dataclass__None:
|
|
2221
|
+
__dataclass__object_setattr(self, 'lst', lst)
|
|
2222
|
+
__dataclass__init__init_fns__0(self)
|
|
2223
|
+
__dataclass__init__init_fns__1(self)
|
|
2224
|
+
__dataclass__init__init_fns__2(self)
|
|
2225
|
+
|
|
2226
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2227
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2228
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2229
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2230
|
+
|
|
2231
|
+
@__dataclass___recursive_repr()
|
|
2232
|
+
def __repr__(self):
|
|
2233
|
+
parts = []
|
|
2234
|
+
parts.append(f"lst={self.lst!r}")
|
|
2235
|
+
return (
|
|
2236
|
+
f"{self.__class__.__qualname__}("
|
|
2237
|
+
f"{', '.join(parts)}"
|
|
2238
|
+
f")"
|
|
2239
|
+
)
|
|
2240
|
+
|
|
2241
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2242
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2243
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2244
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2245
|
+
|
|
2246
|
+
return _process_dataclass
|
|
2247
|
+
|
|
2248
|
+
|
|
2249
|
+
@_register(
|
|
2250
|
+
plan_repr=(
|
|
2251
|
+
"Plans(tup=(CopyPlan(fields=('factory', 'fields_by_unmarshal_name', 'specials', 'defaults', 'embeds', 'embeds_b"
|
|
2252
|
+
"y_unmarshal_name', 'ignore_unknown')), EqPlan(fields=('factory', 'fields_by_unmarshal_name', 'specials', 'defa"
|
|
2253
|
+
"ults', 'embeds', 'embeds_by_unmarshal_name', 'ignore_unknown')), FrozenPlan(fields=('factory', 'fields_by_unma"
|
|
2254
|
+
"rshal_name', 'specials', 'defaults', 'embeds', 'embeds_by_unmarshal_name', 'ignore_unknown'), allow_dynamic_du"
|
|
2255
|
+
"nder_attrs=False), HashPlan(action='add', fields=('factory', 'fields_by_unmarshal_name', 'specials', 'defaults"
|
|
2256
|
+
"', 'embeds', 'embeds_by_unmarshal_name', 'ignore_unknown'), cache=False), InitPlan(fields=(InitPlan.Field(name"
|
|
2257
|
+
"='factory', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True, "
|
|
2258
|
+
"override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(na"
|
|
2259
|
+
"me='fields_by_unmarshal_name', annotation=OpRef(name='init.fields.1.annotation'), default=None, default_factor"
|
|
2260
|
+
"y=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)"
|
|
2261
|
+
", InitPlan.Field(name='specials', annotation=OpRef(name='init.fields.2.annotation'), default=OpRef(name='init."
|
|
2262
|
+
"fields.2.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=Non"
|
|
2263
|
+
"e, validate=None, check_type=None), InitPlan.Field(name='defaults', annotation=OpRef(name='init.fields.3.annot"
|
|
2264
|
+
"ation'), default=OpRef(name='init.fields.3.default'), default_factory=None, init=True, override=False, field_t"
|
|
2265
|
+
"ype=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='embeds', annotation"
|
|
2266
|
+
"=OpRef(name='init.fields.4.annotation'), default=OpRef(name='init.fields.4.default'), default_factory=None, in"
|
|
2267
|
+
"it=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan"
|
|
2268
|
+
".Field(name='embeds_by_unmarshal_name', annotation=OpRef(name='init.fields.5.annotation'), default=OpRef(name="
|
|
2269
|
+
"'init.fields.5.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coer"
|
|
2270
|
+
"ce=None, validate=None, check_type=None), InitPlan.Field(name='ignore_unknown', annotation=OpRef(name='init.fi"
|
|
2271
|
+
"elds.6.annotation'), default=OpRef(name='init.fields.6.default'), default_factory=None, init=True, override=Fa"
|
|
2272
|
+
"lse, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_para"
|
|
2273
|
+
"ms=('factory', 'fields_by_unmarshal_name'), kw_only_params=('specials', 'defaults', 'embeds', 'embeds_by_unmar"
|
|
2274
|
+
"shal_name', 'ignore_unknown'), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()),"
|
|
2275
|
+
" ReprPlan(fields=(ReprPlan.Field(name='factory', kw_only=False, fn=None), ReprPlan.Field(name='fields_by_unmar"
|
|
2276
|
+
"shal_name', kw_only=False, fn=None), ReprPlan.Field(name='specials', kw_only=True, fn=None), ReprPlan.Field(na"
|
|
2277
|
+
"me='defaults', kw_only=True, fn=None), ReprPlan.Field(name='embeds', kw_only=True, fn=None), ReprPlan.Field(na"
|
|
2278
|
+
"me='embeds_by_unmarshal_name', kw_only=True, fn=None), ReprPlan.Field(name='ignore_unknown', kw_only=True, fn="
|
|
2279
|
+
"None)), id=False, terse=False, default_fn=None)))"
|
|
2280
|
+
),
|
|
2281
|
+
plan_repr_sha1='e171c973cbb0e4f2e398aefc90142b250947e15b',
|
|
2282
|
+
op_ref_idents=(
|
|
2283
|
+
'__dataclass__init__fields__0__annotation',
|
|
2284
|
+
'__dataclass__init__fields__1__annotation',
|
|
2285
|
+
'__dataclass__init__fields__2__annotation',
|
|
2286
|
+
'__dataclass__init__fields__2__default',
|
|
2287
|
+
'__dataclass__init__fields__3__annotation',
|
|
2288
|
+
'__dataclass__init__fields__3__default',
|
|
2289
|
+
'__dataclass__init__fields__4__annotation',
|
|
2290
|
+
'__dataclass__init__fields__4__default',
|
|
2291
|
+
'__dataclass__init__fields__5__annotation',
|
|
2292
|
+
'__dataclass__init__fields__5__default',
|
|
2293
|
+
'__dataclass__init__fields__6__annotation',
|
|
2294
|
+
'__dataclass__init__fields__6__default',
|
|
2295
|
+
),
|
|
2296
|
+
cls_names=(
|
|
2297
|
+
('omlish.marshal.standard', 'ObjectUnmarshaler'),
|
|
2298
|
+
),
|
|
2299
|
+
)
|
|
2300
|
+
def _process_dataclass__e171c973cbb0e4f2e398aefc90142b250947e15b():
|
|
2301
|
+
def _process_dataclass(
|
|
2302
|
+
*,
|
|
2303
|
+
__dataclass__cls,
|
|
2304
|
+
__dataclass__init__fields__0__annotation,
|
|
2305
|
+
__dataclass__init__fields__1__annotation,
|
|
2306
|
+
__dataclass__init__fields__2__annotation,
|
|
2307
|
+
__dataclass__init__fields__2__default,
|
|
2308
|
+
__dataclass__init__fields__3__annotation,
|
|
2309
|
+
__dataclass__init__fields__3__default,
|
|
2310
|
+
__dataclass__init__fields__4__annotation,
|
|
2311
|
+
__dataclass__init__fields__4__default,
|
|
2312
|
+
__dataclass__init__fields__5__annotation,
|
|
2313
|
+
__dataclass__init__fields__5__default,
|
|
2314
|
+
__dataclass__init__fields__6__annotation,
|
|
2315
|
+
__dataclass__init__fields__6__default,
|
|
2316
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2317
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2318
|
+
__dataclass__FnValidationError, # noqa
|
|
2319
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2320
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2321
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2322
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2323
|
+
__dataclass__None=None, # noqa
|
|
2324
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2325
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2326
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2327
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2328
|
+
__dataclass__property=property, # noqa
|
|
2329
|
+
):
|
|
2330
|
+
def __copy__(self):
|
|
2331
|
+
if self.__class__ is not __dataclass__cls:
|
|
2332
|
+
raise TypeError(self)
|
|
2333
|
+
return __dataclass__cls( # noqa
|
|
2334
|
+
factory=self.factory,
|
|
2335
|
+
fields_by_unmarshal_name=self.fields_by_unmarshal_name,
|
|
2336
|
+
specials=self.specials,
|
|
2337
|
+
defaults=self.defaults,
|
|
2338
|
+
embeds=self.embeds,
|
|
2339
|
+
embeds_by_unmarshal_name=self.embeds_by_unmarshal_name,
|
|
2340
|
+
ignore_unknown=self.ignore_unknown,
|
|
2341
|
+
)
|
|
2342
|
+
|
|
2343
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2344
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2345
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2346
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2347
|
+
|
|
2348
|
+
def __eq__(self, other):
|
|
2349
|
+
if self is other:
|
|
2350
|
+
return True
|
|
2351
|
+
if self.__class__ is not other.__class__:
|
|
2352
|
+
return NotImplemented
|
|
2353
|
+
return (
|
|
2354
|
+
self.factory == other.factory and
|
|
2355
|
+
self.fields_by_unmarshal_name == other.fields_by_unmarshal_name and
|
|
2356
|
+
self.specials == other.specials and
|
|
2357
|
+
self.defaults == other.defaults and
|
|
2358
|
+
self.embeds == other.embeds and
|
|
2359
|
+
self.embeds_by_unmarshal_name == other.embeds_by_unmarshal_name and
|
|
2360
|
+
self.ignore_unknown == other.ignore_unknown
|
|
2361
|
+
)
|
|
2362
|
+
|
|
2363
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2364
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2365
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2366
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2367
|
+
|
|
2368
|
+
__dataclass___setattr_frozen_fields = {
|
|
2369
|
+
'factory',
|
|
2370
|
+
'fields_by_unmarshal_name',
|
|
2371
|
+
'specials',
|
|
2372
|
+
'defaults',
|
|
2373
|
+
'embeds',
|
|
2374
|
+
'embeds_by_unmarshal_name',
|
|
2375
|
+
'ignore_unknown',
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
def __setattr__(self, name, value):
|
|
2379
|
+
if (
|
|
2380
|
+
type(self) is __dataclass__cls
|
|
2381
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2382
|
+
):
|
|
2383
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2384
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2385
|
+
|
|
2386
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2387
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2388
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2389
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2390
|
+
|
|
2391
|
+
__dataclass___delattr_frozen_fields = {
|
|
2392
|
+
'factory',
|
|
2393
|
+
'fields_by_unmarshal_name',
|
|
2394
|
+
'specials',
|
|
2395
|
+
'defaults',
|
|
2396
|
+
'embeds',
|
|
2397
|
+
'embeds_by_unmarshal_name',
|
|
2398
|
+
'ignore_unknown',
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
def __delattr__(self, name):
|
|
2402
|
+
if (
|
|
2403
|
+
type(self) is __dataclass__cls
|
|
2404
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2405
|
+
):
|
|
2406
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2407
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2408
|
+
|
|
2409
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2410
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2411
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2412
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2413
|
+
|
|
2414
|
+
def __hash__(self):
|
|
2415
|
+
return hash((
|
|
2416
|
+
self.factory,
|
|
2417
|
+
self.fields_by_unmarshal_name,
|
|
2418
|
+
self.specials,
|
|
2419
|
+
self.defaults,
|
|
2420
|
+
self.embeds,
|
|
2421
|
+
self.embeds_by_unmarshal_name,
|
|
2422
|
+
self.ignore_unknown,
|
|
2423
|
+
))
|
|
2424
|
+
|
|
2425
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2426
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2427
|
+
|
|
2428
|
+
def __init__(
|
|
2429
|
+
self,
|
|
2430
|
+
factory: __dataclass__init__fields__0__annotation,
|
|
2431
|
+
fields_by_unmarshal_name: __dataclass__init__fields__1__annotation,
|
|
2432
|
+
*,
|
|
2433
|
+
specials: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
2434
|
+
defaults: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
2435
|
+
embeds: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
2436
|
+
embeds_by_unmarshal_name: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
2437
|
+
ignore_unknown: __dataclass__init__fields__6__annotation = __dataclass__init__fields__6__default,
|
|
2438
|
+
) -> __dataclass__None:
|
|
2439
|
+
__dataclass__object_setattr(self, 'factory', factory)
|
|
2440
|
+
__dataclass__object_setattr(self, 'fields_by_unmarshal_name', fields_by_unmarshal_name)
|
|
2441
|
+
__dataclass__object_setattr(self, 'specials', specials)
|
|
2442
|
+
__dataclass__object_setattr(self, 'defaults', defaults)
|
|
2443
|
+
__dataclass__object_setattr(self, 'embeds', embeds)
|
|
2444
|
+
__dataclass__object_setattr(self, 'embeds_by_unmarshal_name', embeds_by_unmarshal_name)
|
|
2445
|
+
__dataclass__object_setattr(self, 'ignore_unknown', ignore_unknown)
|
|
2446
|
+
|
|
2447
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2448
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2449
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2450
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2451
|
+
|
|
2452
|
+
@__dataclass___recursive_repr()
|
|
2453
|
+
def __repr__(self):
|
|
2454
|
+
parts = []
|
|
2455
|
+
parts.append(f"factory={self.factory!r}")
|
|
2456
|
+
parts.append(f"fields_by_unmarshal_name={self.fields_by_unmarshal_name!r}")
|
|
2457
|
+
parts.append(f"specials={self.specials!r}")
|
|
2458
|
+
parts.append(f"defaults={self.defaults!r}")
|
|
2459
|
+
parts.append(f"embeds={self.embeds!r}")
|
|
2460
|
+
parts.append(f"embeds_by_unmarshal_name={self.embeds_by_unmarshal_name!r}")
|
|
2461
|
+
parts.append(f"ignore_unknown={self.ignore_unknown!r}")
|
|
2462
|
+
return (
|
|
2463
|
+
f"{self.__class__.__qualname__}("
|
|
2464
|
+
f"{', '.join(parts)}"
|
|
2465
|
+
f")"
|
|
2466
|
+
)
|
|
2467
|
+
|
|
2468
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2469
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2470
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2471
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2472
|
+
|
|
2473
|
+
return _process_dataclass
|
|
2474
|
+
|
|
2475
|
+
|
|
2476
|
+
@_register(
|
|
2477
|
+
plan_repr=(
|
|
2478
|
+
"Plans(tup=(CopyPlan(fields=('tys', 'x')), EqPlan(fields=('tys', 'x')), FrozenPlan(fields=('tys', 'x'), allow_d"
|
|
2479
|
+
"ynamic_dunder_attrs=False), HashPlan(action='add', fields=('tys', 'x'), cache=False), InitPlan(fields=(InitPla"
|
|
2480
|
+
"n.Field(name='tys', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, ini"
|
|
2481
|
+
"t=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan."
|
|
2482
|
+
"Field(name='x', annotation=OpRef(name='init.fields.1.annotation'), default=OpRef(name='init.fields.1.default')"
|
|
2483
|
+
", default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, "
|
|
2484
|
+
"check_type=None)), self_param='self', std_params=('tys', 'x'), kw_only_params=(), frozen=True, slots=False, po"
|
|
2485
|
+
"st_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='tys', kw_only=False,"
|
|
2486
|
+
" fn=None), ReprPlan.Field(name='x', kw_only=False, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
2487
|
+
),
|
|
2488
|
+
plan_repr_sha1='f2f290d474e5d287d38623cbc2f347779aa70a7a',
|
|
2489
|
+
op_ref_idents=(
|
|
2490
|
+
'__dataclass__init__fields__0__annotation',
|
|
2491
|
+
'__dataclass__init__fields__1__annotation',
|
|
2492
|
+
'__dataclass__init__fields__1__default',
|
|
2493
|
+
),
|
|
2494
|
+
cls_names=(
|
|
2495
|
+
('omlish.marshal.standard', 'PrimitiveUnionMarshaler'),
|
|
2496
|
+
('omlish.marshal.standard', 'PrimitiveUnionUnmarshaler'),
|
|
2497
|
+
),
|
|
2498
|
+
)
|
|
2499
|
+
def _process_dataclass__f2f290d474e5d287d38623cbc2f347779aa70a7a():
|
|
2500
|
+
def _process_dataclass(
|
|
2501
|
+
*,
|
|
2502
|
+
__dataclass__cls,
|
|
2503
|
+
__dataclass__init__fields__0__annotation,
|
|
2504
|
+
__dataclass__init__fields__1__annotation,
|
|
2505
|
+
__dataclass__init__fields__1__default,
|
|
2506
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2507
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2508
|
+
__dataclass__FnValidationError, # noqa
|
|
2509
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2510
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2511
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2512
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2513
|
+
__dataclass__None=None, # noqa
|
|
2514
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2515
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2516
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2517
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2518
|
+
__dataclass__property=property, # noqa
|
|
2519
|
+
):
|
|
2520
|
+
def __copy__(self):
|
|
2521
|
+
if self.__class__ is not __dataclass__cls:
|
|
2522
|
+
raise TypeError(self)
|
|
2523
|
+
return __dataclass__cls( # noqa
|
|
2524
|
+
tys=self.tys,
|
|
2525
|
+
x=self.x,
|
|
2526
|
+
)
|
|
2527
|
+
|
|
2528
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2529
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2530
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2531
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2532
|
+
|
|
2533
|
+
def __eq__(self, other):
|
|
2534
|
+
if self is other:
|
|
2535
|
+
return True
|
|
2536
|
+
if self.__class__ is not other.__class__:
|
|
2537
|
+
return NotImplemented
|
|
2538
|
+
return (
|
|
2539
|
+
self.tys == other.tys and
|
|
2540
|
+
self.x == other.x
|
|
2541
|
+
)
|
|
2542
|
+
|
|
2543
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2544
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2545
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2546
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2547
|
+
|
|
2548
|
+
__dataclass___setattr_frozen_fields = {
|
|
2549
|
+
'tys',
|
|
2550
|
+
'x',
|
|
2551
|
+
}
|
|
2552
|
+
|
|
2553
|
+
def __setattr__(self, name, value):
|
|
2554
|
+
if (
|
|
2555
|
+
type(self) is __dataclass__cls
|
|
2556
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2557
|
+
):
|
|
2558
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2559
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2560
|
+
|
|
2561
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2562
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2563
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2564
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2565
|
+
|
|
2566
|
+
__dataclass___delattr_frozen_fields = {
|
|
2567
|
+
'tys',
|
|
2568
|
+
'x',
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
def __delattr__(self, name):
|
|
2572
|
+
if (
|
|
2573
|
+
type(self) is __dataclass__cls
|
|
2574
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2575
|
+
):
|
|
2576
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2577
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2578
|
+
|
|
2579
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2580
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2581
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2582
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2583
|
+
|
|
2584
|
+
def __hash__(self):
|
|
2585
|
+
return hash((
|
|
2586
|
+
self.tys,
|
|
2587
|
+
self.x,
|
|
2588
|
+
))
|
|
2589
|
+
|
|
2590
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2591
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2592
|
+
|
|
2593
|
+
def __init__(
|
|
2594
|
+
self,
|
|
2595
|
+
tys: __dataclass__init__fields__0__annotation,
|
|
2596
|
+
x: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
2597
|
+
) -> __dataclass__None:
|
|
2598
|
+
__dataclass__object_setattr(self, 'tys', tys)
|
|
2599
|
+
__dataclass__object_setattr(self, 'x', x)
|
|
2600
|
+
|
|
2601
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2602
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2603
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2604
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2605
|
+
|
|
2606
|
+
@__dataclass___recursive_repr()
|
|
2607
|
+
def __repr__(self):
|
|
2608
|
+
parts = []
|
|
2609
|
+
parts.append(f"tys={self.tys!r}")
|
|
2610
|
+
parts.append(f"x={self.x!r}")
|
|
2611
|
+
return (
|
|
2612
|
+
f"{self.__class__.__qualname__}("
|
|
2613
|
+
f"{', '.join(parts)}"
|
|
2614
|
+
f")"
|
|
2615
|
+
)
|
|
2616
|
+
|
|
2617
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2618
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2619
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2620
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2621
|
+
|
|
2622
|
+
return _process_dataclass
|
|
2623
|
+
|
|
2624
|
+
|
|
2625
|
+
@_register(
|
|
2626
|
+
plan_repr=(
|
|
2627
|
+
"Plans(tup=(CopyPlan(fields=('unknown', 'source')), EqPlan(fields=('unknown', 'source')), FrozenPlan(fields=('u"
|
|
2628
|
+
"nknown', 'source'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('unknown', 'source'), ca"
|
|
2629
|
+
"che=False), InitPlan(fields=(InitPlan.Field(name='unknown', annotation=OpRef(name='init.fields.0.annotation'),"
|
|
2630
|
+
" default=OpRef(name='init.fields.0.default'), default_factory=None, init=True, override=False, field_type=Fiel"
|
|
2631
|
+
"dType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='source', annotation=OpRef(n"
|
|
2632
|
+
"ame='init.fields.1.annotation'), default=OpRef(name='init.fields.1.default'), default_factory=None, init=True,"
|
|
2633
|
+
" override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='sel"
|
|
2634
|
+
"f', std_params=(), kw_only_params=('unknown', 'source'), frozen=True, slots=False, post_init_params=None, init"
|
|
2635
|
+
"_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='unknown', kw_only=True, fn=None), ReprPlan.Fi"
|
|
2636
|
+
"eld(name='source', kw_only=True, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
2637
|
+
),
|
|
2638
|
+
plan_repr_sha1='ffbfe43830279fbce3d0d2196bd9c1e581bc796f',
|
|
2639
|
+
op_ref_idents=(
|
|
2640
|
+
'__dataclass__init__fields__0__annotation',
|
|
2641
|
+
'__dataclass__init__fields__0__default',
|
|
2642
|
+
'__dataclass__init__fields__1__annotation',
|
|
2643
|
+
'__dataclass__init__fields__1__default',
|
|
2644
|
+
),
|
|
2645
|
+
cls_names=(
|
|
2646
|
+
('omlish.marshal.standard', 'ObjectSpecials'),
|
|
2647
|
+
),
|
|
2648
|
+
)
|
|
2649
|
+
def _process_dataclass__ffbfe43830279fbce3d0d2196bd9c1e581bc796f():
|
|
2650
|
+
def _process_dataclass(
|
|
2651
|
+
*,
|
|
2652
|
+
__dataclass__cls,
|
|
2653
|
+
__dataclass__init__fields__0__annotation,
|
|
2654
|
+
__dataclass__init__fields__0__default,
|
|
2655
|
+
__dataclass__init__fields__1__annotation,
|
|
2656
|
+
__dataclass__init__fields__1__default,
|
|
2657
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2658
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2659
|
+
__dataclass__FnValidationError, # noqa
|
|
2660
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2661
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2662
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2663
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2664
|
+
__dataclass__None=None, # noqa
|
|
2665
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2666
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2667
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2668
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2669
|
+
__dataclass__property=property, # noqa
|
|
2670
|
+
):
|
|
2671
|
+
def __copy__(self):
|
|
2672
|
+
if self.__class__ is not __dataclass__cls:
|
|
2673
|
+
raise TypeError(self)
|
|
2674
|
+
return __dataclass__cls( # noqa
|
|
2675
|
+
unknown=self.unknown,
|
|
2676
|
+
source=self.source,
|
|
2677
|
+
)
|
|
2678
|
+
|
|
2679
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2680
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2681
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2682
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2683
|
+
|
|
2684
|
+
def __eq__(self, other):
|
|
2685
|
+
if self is other:
|
|
2686
|
+
return True
|
|
2687
|
+
if self.__class__ is not other.__class__:
|
|
2688
|
+
return NotImplemented
|
|
2689
|
+
return (
|
|
2690
|
+
self.unknown == other.unknown and
|
|
2691
|
+
self.source == other.source
|
|
2692
|
+
)
|
|
2693
|
+
|
|
2694
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2695
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2696
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2697
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2698
|
+
|
|
2699
|
+
__dataclass___setattr_frozen_fields = {
|
|
2700
|
+
'unknown',
|
|
2701
|
+
'source',
|
|
2702
|
+
}
|
|
2703
|
+
|
|
2704
|
+
def __setattr__(self, name, value):
|
|
2705
|
+
if (
|
|
2706
|
+
type(self) is __dataclass__cls
|
|
2707
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2708
|
+
):
|
|
2709
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2710
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2711
|
+
|
|
2712
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2713
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2714
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2715
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2716
|
+
|
|
2717
|
+
__dataclass___delattr_frozen_fields = {
|
|
2718
|
+
'unknown',
|
|
2719
|
+
'source',
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2722
|
+
def __delattr__(self, name):
|
|
2723
|
+
if (
|
|
2724
|
+
type(self) is __dataclass__cls
|
|
2725
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2726
|
+
):
|
|
2727
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2728
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2729
|
+
|
|
2730
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2731
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2732
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2733
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2734
|
+
|
|
2735
|
+
def __hash__(self):
|
|
2736
|
+
return hash((
|
|
2737
|
+
self.unknown,
|
|
2738
|
+
self.source,
|
|
2739
|
+
))
|
|
2740
|
+
|
|
2741
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2742
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2743
|
+
|
|
2744
|
+
def __init__(
|
|
2745
|
+
self,
|
|
2746
|
+
*,
|
|
2747
|
+
unknown: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
2748
|
+
source: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
2749
|
+
) -> __dataclass__None:
|
|
2750
|
+
__dataclass__object_setattr(self, 'unknown', unknown)
|
|
2751
|
+
__dataclass__object_setattr(self, 'source', source)
|
|
2752
|
+
|
|
2753
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2754
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2755
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2756
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2757
|
+
|
|
2758
|
+
@__dataclass___recursive_repr()
|
|
2759
|
+
def __repr__(self):
|
|
2760
|
+
parts = []
|
|
2761
|
+
parts.append(f"unknown={self.unknown!r}")
|
|
2762
|
+
parts.append(f"source={self.source!r}")
|
|
2763
|
+
return (
|
|
2764
|
+
f"{self.__class__.__qualname__}("
|
|
2765
|
+
f"{', '.join(parts)}"
|
|
2766
|
+
f")"
|
|
2767
|
+
)
|
|
2768
|
+
|
|
2769
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2770
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2771
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2772
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2773
|
+
|
|
2774
|
+
return _process_dataclass
|