omlish 0.0.0.dev205__py3-none-any.whl → 0.0.0.dev207__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
omlish/__about__.py CHANGED
@@ -1,5 +1,5 @@
1
- __version__ = '0.0.0.dev205'
2
- __revision__ = 'b8c9f3ebab2623defba06c4203550adab970b0f1'
1
+ __version__ = '0.0.0.dev207'
2
+ __revision__ = 'beb43e7bf617a8e7c0e1074a556dbb12f8ec5b9e'
3
3
 
4
4
 
5
5
  #
@@ -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,
@@ -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,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: omlish
3
- Version: 0.0.0.dev205
3
+ Version: 0.0.0.dev207
4
4
  Summary: omlish
5
5
  Author: wrmsr
6
6
  License: BSD-3-Clause
@@ -1,5 +1,5 @@
1
1
  omlish/.manifests.json,sha256=dyIpveH7Z8OnQp2pTn6NVv7LCDXVrozJWAzbk8PBavg,7950
2
- omlish/__about__.py,sha256=hEOal00YUHPX1MAx1hCKoC7orYKXawvuemHzKvDR5dg,3409
2
+ omlish/__about__.py,sha256=1i7Qs2Hp3sPquE6Xbwrl4eLoSEBzGWjkLR1lLcecpR4,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=AHo-tN5V_b_VYFUF7VFRmuHrjZBXS1WytRAj061MUTA,1423
167
- omlish/dataclasses/utils.py,sha256=lcikCPiiX5Giu0Kb1hP18loZjmm_Z9D-XtJ-ZlHq9iM,3793
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.dev205.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
613
- omlish-0.0.0.dev205.dist-info/METADATA,sha256=hhq2aiYE9P2qj3u6D8JZXcYMrfO1f7NzgycNytXD1ZY,4264
614
- omlish-0.0.0.dev205.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
615
- omlish-0.0.0.dev205.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
616
- omlish-0.0.0.dev205.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
617
- omlish-0.0.0.dev205.dist-info/RECORD,,
612
+ omlish-0.0.0.dev207.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
613
+ omlish-0.0.0.dev207.dist-info/METADATA,sha256=k3cukaeWfrJv0jcwHqaG1P7rGbCQ9iQ0DaWQ30Grmek,4264
614
+ omlish-0.0.0.dev207.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
615
+ omlish-0.0.0.dev207.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
616
+ omlish-0.0.0.dev207.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
617
+ omlish-0.0.0.dev207.dist-info/RECORD,,