omlish 0.0.0.dev205__py3-none-any.whl → 0.0.0.dev206__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- omlish/__about__.py +2 -2
- omlish/dataclasses/__init__.py +4 -0
- omlish/dataclasses/utils.py +9 -0
- {omlish-0.0.0.dev205.dist-info → omlish-0.0.0.dev206.dist-info}/METADATA +1 -1
- {omlish-0.0.0.dev205.dist-info → omlish-0.0.0.dev206.dist-info}/RECORD +9 -9
- {omlish-0.0.0.dev205.dist-info → omlish-0.0.0.dev206.dist-info}/LICENSE +0 -0
- {omlish-0.0.0.dev205.dist-info → omlish-0.0.0.dev206.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev205.dist-info → omlish-0.0.0.dev206.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev205.dist-info → omlish-0.0.0.dev206.dist-info}/top_level.txt +0 -0
omlish/__about__.py
CHANGED
omlish/dataclasses/__init__.py
CHANGED
@@ -71,6 +71,8 @@ from .impl.metaclass import ( # noqa
|
|
71
71
|
)
|
72
72
|
|
73
73
|
from .impl.metadata import ( # noqa
|
74
|
+
Metadata,
|
75
|
+
|
74
76
|
get_merged_metadata,
|
75
77
|
|
76
78
|
UserMetadata,
|
@@ -89,6 +91,8 @@ from .impl.reflect import ( # noqa
|
|
89
91
|
)
|
90
92
|
|
91
93
|
from .utils import ( # noqa
|
94
|
+
is_immediate_dataclass,
|
95
|
+
|
92
96
|
maybe_post_init,
|
93
97
|
|
94
98
|
opt_repr,
|
omlish/dataclasses/utils.py
CHANGED
@@ -4,6 +4,7 @@ import types
|
|
4
4
|
import typing as ta
|
5
5
|
|
6
6
|
from .. import check
|
7
|
+
from .impl.internals import FIELDS_ATTR
|
7
8
|
from .impl.metadata import METADATA_ATTR
|
8
9
|
from .impl.metadata import UserMetadata
|
9
10
|
from .impl.params import DEFAULT_FIELD_EXTRAS
|
@@ -17,6 +18,14 @@ T = ta.TypeVar('T')
|
|
17
18
|
##
|
18
19
|
|
19
20
|
|
21
|
+
def is_immediate_dataclass(cls: type) -> bool:
|
22
|
+
check.isinstance(cls, type)
|
23
|
+
return FIELDS_ATTR in cls.__dict__
|
24
|
+
|
25
|
+
|
26
|
+
##
|
27
|
+
|
28
|
+
|
20
29
|
def maybe_post_init(sup: ta.Any) -> bool:
|
21
30
|
try:
|
22
31
|
fn = sup.__post_init__
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.manifests.json,sha256=dyIpveH7Z8OnQp2pTn6NVv7LCDXVrozJWAzbk8PBavg,7950
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=HkupIc8CpzVWpOlDHjAm9pefevlmAr3JF8jUolA3iF4,3409
|
3
3
|
omlish/__init__.py,sha256=SsyiITTuK0v74XpKV8dqNaCmjOlan1JZKrHQv5rWKPA,253
|
4
4
|
omlish/c3.py,sha256=ubu7lHwss5V4UznbejAI0qXhXahrU01MysuHOZI9C4U,8116
|
5
5
|
omlish/cached.py,sha256=UI-XTFBwA6YXWJJJeBn-WkwBkfzDjLBBaZf4nIJA9y0,510
|
@@ -163,8 +163,8 @@ omlish/configs/processing/matching.py,sha256=JMS9r58pMCBbpewOhPY5oPtBu3uD6z6YBfZ
|
|
163
163
|
omlish/configs/processing/names.py,sha256=weHmaTclzgM9lUn3aBtw-kwZ3mc2N-CZlFg3Kd_UsKo,1093
|
164
164
|
omlish/configs/processing/rewriting.py,sha256=v7PfHtuTn5v_5Y6Au7oMN2Z0nxAMy1iYyO5CXnTvZhs,4226
|
165
165
|
omlish/configs/processing/strings.py,sha256=qFS2oh6z02IaM_q4lTKLdufzkJqAJ6J-Qjrz5S-QJoM,826
|
166
|
-
omlish/dataclasses/__init__.py,sha256=
|
167
|
-
omlish/dataclasses/utils.py,sha256=
|
166
|
+
omlish/dataclasses/__init__.py,sha256=lw-ItSe_zE_iKGGEnkbT92Kv4Zu3KqS1vh-CFOFUGd8,1467
|
167
|
+
omlish/dataclasses/utils.py,sha256=hbQfbdCjQ9oA3h9kmGcM5bWZM1GbboXsq02ns5ycJwQ,3958
|
168
168
|
omlish/dataclasses/impl/LICENSE,sha256=Oy-B_iHRgcSZxZolbI4ZaEVdZonSaaqFNzv7avQdo78,13936
|
169
169
|
omlish/dataclasses/impl/__init__.py,sha256=zqGBC5gSbjJxaqG_zS1LL1PX-zAfhIua8UqOE4IwO2k,789
|
170
170
|
omlish/dataclasses/impl/api.py,sha256=p7W519_EnDAWlkOVS-4BpP4SxadWIiUzC3RldSoB28o,6431
|
@@ -609,9 +609,9 @@ omlish/text/indent.py,sha256=YjtJEBYWuk8--b9JU_T6q4yxV85_TR7VEVr5ViRCFwk,1336
|
|
609
609
|
omlish/text/minja.py,sha256=jZC-fp3Xuhx48ppqsf2Sf1pHbC0t8XBB7UpUUoOk2Qw,5751
|
610
610
|
omlish/text/parts.py,sha256=7vPF1aTZdvLVYJ4EwBZVzRSy8XB3YqPd7JwEnNGGAOo,6495
|
611
611
|
omlish/text/random.py,sha256=jNWpqiaKjKyTdMXC-pWAsSC10AAP-cmRRPVhm59ZWLk,194
|
612
|
-
omlish-0.0.0.
|
613
|
-
omlish-0.0.0.
|
614
|
-
omlish-0.0.0.
|
615
|
-
omlish-0.0.0.
|
616
|
-
omlish-0.0.0.
|
617
|
-
omlish-0.0.0.
|
612
|
+
omlish-0.0.0.dev206.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
613
|
+
omlish-0.0.0.dev206.dist-info/METADATA,sha256=UGV5-pANwtpbaBPJMYzB7MGk-5ZDkEngcGS3p1Fcnl8,4264
|
614
|
+
omlish-0.0.0.dev206.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
615
|
+
omlish-0.0.0.dev206.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
616
|
+
omlish-0.0.0.dev206.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
617
|
+
omlish-0.0.0.dev206.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|