omlish 0.0.0.dev2__py3-none-any.whl → 0.0.0.dev3__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.

Files changed (118) hide show
  1. omlish/__about__.py +1 -2
  2. omlish/argparse.py +4 -4
  3. omlish/asyncs/__init__.py +2 -2
  4. omlish/asyncs/anyio.py +13 -11
  5. omlish/asyncs/asyncs.py +1 -3
  6. omlish/asyncs/futures.py +10 -9
  7. omlish/c3.py +1 -1
  8. omlish/check.py +3 -3
  9. omlish/collections/_abc.py +2 -0
  10. omlish/collections/_io_abc.py +4 -2
  11. omlish/collections/cache/__init__.py +1 -1
  12. omlish/collections/cache/descriptor.py +8 -8
  13. omlish/collections/cache/impl.py +24 -17
  14. omlish/collections/cache/types.py +1 -1
  15. omlish/collections/coerce.py +1 -1
  16. omlish/collections/frozen.py +6 -6
  17. omlish/collections/identity.py +3 -4
  18. omlish/collections/mappings.py +2 -2
  19. omlish/collections/ordered.py +7 -7
  20. omlish/collections/skiplist.py +1 -1
  21. omlish/collections/sorted.py +1 -1
  22. omlish/collections/treap.py +25 -0
  23. omlish/collections/treapmap.py +57 -5
  24. omlish/collections/unmodifiable.py +9 -9
  25. omlish/collections/utils.py +1 -1
  26. omlish/configs/flattening.py +7 -6
  27. omlish/configs/props.py +3 -3
  28. omlish/dataclasses/__init__.py +1 -1
  29. omlish/dataclasses/impl/__init__.py +17 -1
  30. omlish/dataclasses/impl/api.py +10 -11
  31. omlish/dataclasses/impl/as_.py +4 -4
  32. omlish/dataclasses/impl/exceptions.py +1 -1
  33. omlish/dataclasses/impl/fields.py +7 -7
  34. omlish/dataclasses/impl/frozen.py +2 -2
  35. omlish/dataclasses/impl/init.py +5 -5
  36. omlish/dataclasses/impl/internals.py +1 -1
  37. omlish/dataclasses/impl/metaclass.py +1 -1
  38. omlish/dataclasses/impl/order.py +1 -1
  39. omlish/dataclasses/impl/replace.py +1 -1
  40. omlish/dataclasses/impl/repr.py +4 -4
  41. omlish/dataclasses/impl/utils.py +6 -6
  42. omlish/defs.py +13 -17
  43. omlish/{procfs.py → diag/procfs.py} +22 -24
  44. omlish/diag/ps.py +47 -0
  45. omlish/{replserver → diag/replserver}/console.py +18 -20
  46. omlish/{replserver → diag/replserver}/server.py +8 -8
  47. omlish/dispatch/dispatch.py +5 -8
  48. omlish/dispatch/functions.py +1 -1
  49. omlish/dispatch/methods.py +4 -5
  50. omlish/docker.py +1 -1
  51. omlish/dynamic.py +8 -8
  52. omlish/fnpairs.py +311 -0
  53. omlish/graphs/trees.py +13 -13
  54. omlish/inject/__init__.py +7 -7
  55. omlish/inject/elements.py +1 -1
  56. omlish/inject/exceptions.py +7 -7
  57. omlish/inject/impl/elements.py +4 -4
  58. omlish/inject/impl/injector.py +5 -5
  59. omlish/inject/impl/inspect.py +2 -2
  60. omlish/inject/impl/scopes.py +9 -9
  61. omlish/inject/proxy.py +5 -5
  62. omlish/iterators.py +19 -24
  63. omlish/json.py +7 -6
  64. omlish/lang/__init__.py +9 -4
  65. omlish/lang/cached.py +2 -5
  66. omlish/lang/classes/__init__.py +2 -2
  67. omlish/lang/classes/abstract.py +2 -2
  68. omlish/lang/classes/restrict.py +14 -14
  69. omlish/lang/classes/simple.py +1 -1
  70. omlish/lang/classes/virtual.py +5 -5
  71. omlish/lang/clsdct.py +1 -1
  72. omlish/lang/cmp.py +2 -2
  73. omlish/lang/contextmanagers.py +12 -14
  74. omlish/lang/descriptors.py +16 -4
  75. omlish/lang/exceptions.py +1 -1
  76. omlish/lang/functions.py +58 -22
  77. omlish/lang/imports.py +22 -27
  78. omlish/lang/iterables.py +2 -2
  79. omlish/lang/maybes.py +1 -0
  80. omlish/lang/objects.py +15 -9
  81. omlish/lang/resolving.py +1 -1
  82. omlish/lang/strings.py +1 -1
  83. omlish/lang/typing.py +3 -3
  84. omlish/libc.py +9 -5
  85. omlish/logs/_abc.py +5 -1
  86. omlish/logs/filters.py +2 -0
  87. omlish/logs/formatters.py +6 -2
  88. omlish/logs/utils.py +1 -1
  89. omlish/marshal/base.py +3 -3
  90. omlish/marshal/exceptions.py +1 -1
  91. omlish/marshal/global_.py +10 -4
  92. omlish/marshal/objects.py +1 -2
  93. omlish/marshal/registries.py +3 -3
  94. omlish/marshal/utils.py +2 -2
  95. omlish/marshal/values.py +1 -1
  96. omlish/math.py +9 -9
  97. omlish/reflect.py +3 -3
  98. omlish/stats.py +4 -5
  99. omlish/term.py +1 -1
  100. omlish/testing/pydevd.py +26 -6
  101. omlish/testing/pytest/inject/harness.py +1 -1
  102. omlish/testing/pytest/plugins/pydevd.py +1 -1
  103. omlish/testing/pytest/plugins/switches.py +1 -1
  104. omlish/text/delimit.py +3 -6
  105. {omlish-0.0.0.dev2.dist-info → omlish-0.0.0.dev3.dist-info}/METADATA +1 -1
  106. omlish-0.0.0.dev3.dist-info/RECORD +191 -0
  107. {omlish-0.0.0.dev2.dist-info → omlish-0.0.0.dev3.dist-info}/WHEEL +1 -1
  108. omlish/lang/classes/test/test_abstract.py +0 -89
  109. omlish/lang/classes/test/test_restrict.py +0 -71
  110. omlish/lang/classes/test/test_simple.py +0 -58
  111. omlish/lang/classes/test/test_virtual.py +0 -72
  112. omlish-0.0.0.dev2.dist-info/RECORD +0 -193
  113. /omlish/{lang/classes/test → diag}/__init__.py +0 -0
  114. /omlish/{replserver → diag/replserver}/__init__.py +0 -0
  115. /omlish/{replserver → diag/replserver}/__main__.py +0 -0
  116. /omlish/sql/{_abcs.py → _abc.py} +0 -0
  117. {omlish-0.0.0.dev2.dist-info → omlish-0.0.0.dev3.dist-info}/LICENSE +0 -0
  118. {omlish-0.0.0.dev2.dist-info → omlish-0.0.0.dev3.dist-info}/top_level.txt +0 -0
omlish/math.py CHANGED
@@ -66,7 +66,7 @@ class FixedWidthInt(int):
66
66
 
67
67
  MASK: ta.ClassVar[int]
68
68
 
69
- def __init_subclass__(cls, **kwargs):
69
+ def __init_subclass__(cls) -> None:
70
70
  super().__init_subclass__()
71
71
 
72
72
  if not isinstance(cls.BITS, int):
@@ -82,13 +82,13 @@ class FixedWidthInt(int):
82
82
  cls.MASK = (1 << cls.BITS) - 1
83
83
 
84
84
  @classmethod
85
- def clamp(cls, value):
85
+ def clamp(cls, value: int) -> int:
86
86
  return ((value - cls.MIN) & cls.MASK) + cls.MIN
87
87
 
88
- def __new__(cls, value, *args, **kwargs):
89
- return super().__new__(cls, cls.clamp(value))
88
+ def __new__(cls, value: int) -> 'FixedWidthInt':
89
+ return super().__new__(cls, cls.clamp(value)) # noqa
90
90
 
91
- SCALAR_PROXY_METHODS = {
91
+ SCALAR_PROXY_METHODS = frozenset([
92
92
  '__abs__',
93
93
  '__add__',
94
94
  '__and__',
@@ -117,12 +117,12 @@ class FixedWidthInt(int):
117
117
  '__sub__',
118
118
  '__truediv__',
119
119
  '__xor__',
120
- }
120
+ ])
121
121
 
122
- TUPLE_PROXY_METHODS = {
122
+ TUPLE_PROXY_METHODS = frozenset([
123
123
  '__divmod__',
124
124
  '__rdivmod__',
125
- }
125
+ ])
126
126
 
127
127
  for _proxy_name in SCALAR_PROXY_METHODS:
128
128
  locals()[_proxy_name] = _gen_scalar_proxy_method(_proxy_name)
@@ -130,7 +130,7 @@ class FixedWidthInt(int):
130
130
  locals()[_proxy_name] = _gen_tuple_proxy_method(_proxy_name)
131
131
  del _proxy_name
132
132
 
133
- def __repr__(self):
133
+ def __repr__(self) -> str:
134
134
  return f'{self.__class__.__name__}({int(self)})'
135
135
 
136
136
 
omlish/reflect.py CHANGED
@@ -21,7 +21,7 @@ else:
21
21
 
22
22
  _NoneType = types.NoneType # type: ignore
23
23
 
24
- _NONE_TYPE_FROZENSET: ta.FrozenSet['Type'] = frozenset([_NoneType])
24
+ _NONE_TYPE_FROZENSET: frozenset['Type'] = frozenset([_NoneType])
25
25
 
26
26
 
27
27
  _GenericAlias = ta._GenericAlias # type: ignore # noqa
@@ -99,7 +99,7 @@ Type = ta.Union[
99
99
 
100
100
 
101
101
  class Union(ta.NamedTuple):
102
- args: ta.FrozenSet[Type]
102
+ args: frozenset[Type]
103
103
 
104
104
  @property
105
105
  def is_optional(self) -> bool:
@@ -121,7 +121,7 @@ class Generic(ta.NamedTuple):
121
121
  # params2: tuple[ta.TypeVar, ...] # map[int, V] = (V,) | map[T, T] = (T,)
122
122
  obj: ta.Any
123
123
 
124
- def __repr__(self):
124
+ def __repr__(self) -> str:
125
125
  return (
126
126
  f'{self.__class__.__name__}('
127
127
  f'cls={self.cls.__name__}, '
omlish/stats.py CHANGED
@@ -5,6 +5,7 @@ TODO:
5
5
  """
6
6
  import bisect
7
7
  import collections
8
+ import contextlib
8
9
  import dataclasses as dc
9
10
  import math
10
11
  import operator
@@ -215,7 +216,7 @@ class Stats(ta.Sequence[float]):
215
216
  else:
216
217
  bins = [float(x) for x in bins]
217
218
  if self.min < bins[0]:
218
- bins = [self.min] + bins
219
+ bins = [self.min, *bins]
219
220
 
220
221
  round_factor = 10.0 ** bin_digits
221
222
  bins = [math.floor(b * round_factor) / round_factor for b in bins]
@@ -251,7 +252,7 @@ class SamplingHistogram:
251
252
  sample_percentiles: list['SamplingHistogram.Percentile']
252
253
 
253
254
  DEFAULT_SIZE = 1000
254
- DEFAULT_PERCENTILES = [0.5, 0.75, 0.9, 0.95, 0.99]
255
+ DEFAULT_PERCENTILES = (0.5, 0.75, 0.9, 0.95, 0.99)
255
256
 
256
257
  def __init__(
257
258
  self,
@@ -291,10 +292,8 @@ class SamplingHistogram:
291
292
 
292
293
  sample_pos = None
293
294
  if self._sample_pos_queue:
294
- try:
295
+ with contextlib.suppress(IndexError):
295
296
  sample_pos = self._sample_pos_queue.pop()
296
- except IndexError:
297
- pass
298
297
  if sample_pos is None:
299
298
  sample_pos = random.randrange(0, self._size)
300
299
  self._sample[sample_pos] = entry
omlish/term.py CHANGED
@@ -208,7 +208,7 @@ BG24_RGB = ControlSequence(
208
208
  '24-Bit Background Color (RGB)')
209
209
 
210
210
 
211
- def main():
211
+ def main() -> None:
212
212
  import sys
213
213
 
214
214
  sys.stdout.write(SGR(SGRs.RESET))
omlish/testing/pydevd.py CHANGED
@@ -5,6 +5,27 @@ an already-debugging PyCharm instance to debug PySpark jobs.
5
5
 
6
6
  TODO:
7
7
  - https://www.jetbrains.com/help/pycharm/remote-debugging-with-product.html#
8
+ - PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_constants.py -> USE_LOW_IMPACT_MONITORING
9
+
10
+ ==
11
+
12
+ https://www.jetbrains.com/help/pycharm/remote-debugging-with-product.html#remote-debug-config ->
13
+
14
+ pycharm_port = 43251
15
+ pycharm_version = '241.18034.82'
16
+ buf = textwrap.dedent(f'''
17
+ import subprocess
18
+ import sys
19
+ subprocess.check_call([sys.executable, '-mpip', 'install', f'pydevd-pycharm~={pycharm_version}'])
20
+
21
+ import pydevd_pycharm # noqa
22
+ pydevd_pycharm.settrace(
23
+ 'docker.for.mac.localhost',
24
+ port={pycharm_port},
25
+ stdoutToServer=True,
26
+ stderrToServer=True,
27
+ )
28
+ ''') + '\n' * 2 + buf
8
29
  """
9
30
  import json
10
31
  import os
@@ -38,14 +59,14 @@ def is_debugger_call(hoist: int = 0, walk: int = 2) -> bool:
38
59
  return False
39
60
 
40
61
 
41
- class DebuggerCallForbiddenException(Exception):
62
+ class DebuggerCallForbiddenError(Exception):
42
63
  pass
43
64
 
44
65
 
45
66
  def forbid_debugger_call(hoist: int = 0) -> None:
46
67
  # FIXME: only reentrant?
47
68
  if not ALLOW_DEBUGGER_CALLS and is_debugger_call(hoist + 1):
48
- raise DebuggerCallForbiddenException
69
+ raise DebuggerCallForbiddenError
49
70
 
50
71
 
51
72
  ##
@@ -60,7 +81,7 @@ def silence_subprocess_check() -> None:
60
81
  return
61
82
 
62
83
  new_tb = lang.proxy_import('traceback')
63
- new_tb.print_exc = lambda *a, **k: None # type: ignore
84
+ new_tb.print_exc = lambda *a, **k: None # type: ignore # noqa
64
85
  pydev_monkey.traceback = new_tb
65
86
 
66
87
 
@@ -186,9 +207,8 @@ def maybe_reexec(
186
207
  """))
187
208
  file = bootstrap_path
188
209
 
189
- else:
190
- if file is None:
191
- raise ValueError
210
+ elif file is None:
211
+ raise ValueError
192
212
 
193
213
  args = [sys.executable]
194
214
  args.extend(json.loads(os.environ[ARGS_ENV_VAR]))
@@ -141,7 +141,7 @@ class HarnessPlugin:
141
141
  with harness._pytest_scope_manager(PytestScope.CLASS, request): # noqa
142
142
  yield
143
143
 
144
- @pytest.fixture(scope='function', autouse=True)
144
+ @pytest.fixture(scope='function', autouse=True) # noqa
145
145
  def _harness_scope_listener_function(self, harness, request):
146
146
  with harness._pytest_scope_manager(PytestScope.FUNCTION, request): # noqa
147
147
  yield
@@ -9,4 +9,4 @@ class PydevdPlugin:
9
9
  setup = opd.get_setup()
10
10
  if setup is not None:
11
11
  if hasattr(session.config, '_env_timeout'):
12
- session.config._env_timeout = None
12
+ session.config._env_timeout = None # noqa
@@ -13,7 +13,7 @@ from .... import collections as col
13
13
  from ._registry import register
14
14
 
15
15
 
16
- Configable = ta.Union[pytest.FixtureRequest, pytest.Config]
16
+ Configable = pytest.FixtureRequest | pytest.Config
17
17
 
18
18
 
19
19
  SWITCHES = col.OrderedSet([
omlish/text/delimit.py CHANGED
@@ -46,7 +46,7 @@ class DelimitedEscaping:
46
46
  def is_control_char(self, c: str) -> bool:
47
47
  if not len(c) == 1:
48
48
  raise TypeError(c)
49
- return c == self._delimit_char or c == self._quote_char or c == self._escape_char
49
+ return c == self._delimit_char or c == self._quote_char or c == self._escape_char # noqa
50
50
 
51
51
  def contains_escaped_char(self, s: str) -> bool:
52
52
  return any(c in self._all_escaped_chars for c in s)
@@ -94,11 +94,9 @@ class DelimitedEscaping:
94
94
  if isinstance(strs, str):
95
95
  raise TypeError(strs)
96
96
  buf = io.StringIO()
97
- count = 0
98
- for s in strs:
97
+ for count, s in enumerate(strs):
99
98
  if count:
100
99
  buf.write(self._delimit_char)
101
- count += 1
102
100
  if self.contains_escaped_char(s):
103
101
  buf.write(self.quote(s))
104
102
  else:
@@ -137,8 +135,7 @@ class DelimitedEscaping:
137
135
  if c == self._delimit_char:
138
136
  if not quoted:
139
137
  break
140
- else:
141
- buf.write(c)
138
+ buf.write(c)
142
139
  elif c == self._quote_char:
143
140
  if not quoted:
144
141
  raise ValueError(s)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omlish
3
- Version: 0.0.0.dev2
3
+ Version: 0.0.0.dev3
4
4
  Summary: omlish
5
5
  Author: wrmsr
6
6
  License: BSD-3-Clause
@@ -0,0 +1,191 @@
1
+ omlish/__about__.py,sha256=PDr-dayjZF7uNCY78Cmj-DplO_IRgBlaOdS27ftVXMk,153
2
+ omlish/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ omlish/argparse.py,sha256=QRQmX9G0-L_nATkFtGHvpd4qrpYzKATdjuFLbBqzJPM,6224
4
+ omlish/c3.py,sha256=yhescciIJWoJ9nIWJSrUOtyqIu4uLyPjRHk8RbAJ3f4,8039
5
+ omlish/cached.py,sha256=i7uWLRrUrE5N1ofzUf9D3OIsxf-dXkgu4OxCep0CCBk,197
6
+ omlish/check.py,sha256=h66jWSwaiuaaIKPI6_pIfolWYYK3WTR43X1CBO5-PQA,5538
7
+ omlish/defs.py,sha256=IvUL5i-iyBh5HUhf-gY6sonw3tIozL8066QL71CnoiY,4729
8
+ omlish/docker.py,sha256=oLyJQg4Mu-k_WfDVP7PU9yK1cI-JCdcrTVjrQg2sQsE,4140
9
+ omlish/dynamic.py,sha256=9LHfKegKnMFoczFfqIZuGpkR8xGxMxq_lAvNJTDJjWs,6541
10
+ omlish/fnpairs.py,sha256=DgXK-AbcIFq7a-HI0a-7ctvKvoSAou4wW5B0fcorMIc,7252
11
+ omlish/iterators.py,sha256=YJUTyfqY_calFFOU40TEuptYBqKeavi6L6kc2gXn9s4,5524
12
+ omlish/json.py,sha256=P2T8yigNNGDVdYpgKfaA7gtYdJC2EQJ10XaS89MROoQ,4549
13
+ omlish/libc.py,sha256=u0481imCiTFqP_e-v9g0pD-0WD249j5vYzhtn-fnNkY,15308
14
+ omlish/math.py,sha256=AVqp5Y8yxKA-wO0BgrzaxA0Ga3PZiCXnYcwivMneC-0,3804
15
+ omlish/os.py,sha256=T77P7_U7jShPXsm_byvXwPoumcmtA0a7KPRvE2GAOhw,950
16
+ omlish/reflect.py,sha256=3dJ9ZGrBan5RRW_Q0OTbl9--oi3B05-ZV4uu0VH-m1c,9891
17
+ omlish/runmodule.py,sha256=PWvuAaJ9wQQn6bx9ftEL3_d04DyotNn8dR_twm2pgw0,700
18
+ omlish/stats.py,sha256=uqjN-focDVssFZMagj22HqmyJ1TBO4Wt-XnHp8-EtVw,9927
19
+ omlish/term.py,sha256=OmD3QXntycYHNDCZ-ZV5x2Rz9tw49CoYEn-rld7x_r8,5963
20
+ omlish/asyncs/__init__.py,sha256=FIoKl3m_gSxEXL_JJU_dc4OAIKVqq9fLqom_byH3PGY,307
21
+ omlish/asyncs/anyio.py,sha256=oYU7FGxMlzPhj5Aa1p7XSdKeD6icoyTPxZRWDc9-YGc,3226
22
+ omlish/asyncs/asyncio.py,sha256=pSldCmtE9AgVATXb_Vnhjhhz0v2LtqgVXxe7-OFjH0g,414
23
+ omlish/asyncs/asyncs.py,sha256=MmIz8Gw4PbZd0LUIro_u5kUjobR8i2qGCo6l2hb4U74,2014
24
+ omlish/asyncs/futures.py,sha256=3KkTj5TOPmvNOcuK9LtOQwmkuLzoEYQfcuaHTXSQ0Ts,5424
25
+ omlish/asyncs/trio.py,sha256=GKG3wgelFr7gIKKHZhcflvMyCvxXHNZe862KB0Xw2uA,370
26
+ omlish/collections/__init__.py,sha256=H1_J6VNBqdmdMb8vjc7LBJ8ULoiawxoz-1cR41twB2k,1526
27
+ omlish/collections/_abc.py,sha256=sP7BpTVhx6s6C59mTFeosBi4rHOWC6tbFBYbxdZmvh0,2365
28
+ omlish/collections/_io_abc.py,sha256=Cxs8KB1B_69rxpUYxI-MTsilAmNooJJn3w07DKqYKkE,1255
29
+ omlish/collections/coerce.py,sha256=o11AMrUiyoadd8WkdqeKPIpXf2xd0LyylzNCyJivCLU,7036
30
+ omlish/collections/frozen.py,sha256=DGxemj_pVID85tSBm-Wns_x4ov0wOEIT6X5bVgJtmkA,4152
31
+ omlish/collections/identity.py,sha256=3X4J-LqdzM-9QA1bJ_FIxqxsei_ESS3oJHFlD1VX7KQ,2550
32
+ omlish/collections/indexed.py,sha256=lbMBqMjwy8VRZhEsh0o_PIkP9mk4LP3MHQZxa18Hlzg,2143
33
+ omlish/collections/mappings.py,sha256=5D7xZabUY6n1nB-BrZlcrPy_AdzLZ6IyihuLeDL48pA,3188
34
+ omlish/collections/ordered.py,sha256=RzEC3fHvrDeJQSWThVDNYQKke263Vje1II5YwtDwT1Q,2335
35
+ omlish/collections/persistent.py,sha256=KG471s0bhhReQrjlmX0xaN9HeAIcrtT264ddZCxsExo,875
36
+ omlish/collections/skiplist.py,sha256=xjuKZtSScp1VnOi9lpf7I090vGp1DnjA5ELjFhMeGps,5987
37
+ omlish/collections/sorted.py,sha256=E5ZOdNn7Jju1EcQ7CX2Ltk9StIXsBOzqvh7EsT3ZA2U,3354
38
+ omlish/collections/treap.py,sha256=wq9L5hvxq4QgPvIpHmueZMF8t7UrvX5vmlNN4BOqY4g,7720
39
+ omlish/collections/treapmap.py,sha256=TxOM-ZRF5PK2xe5wRIhESNt7DGh9b_MeZfE7HLkCOs4,5804
40
+ omlish/collections/unmodifiable.py,sha256=QmUEi9IBXqiM_KGgH2rqg15VmkHJo1MZ6kwq2twEMho,4750
41
+ omlish/collections/utils.py,sha256=2mqczC8lnIfpuYxdBJACqRqXup5YGcVNhwgw2r5MVy4,3022
42
+ omlish/collections/cache/__init__.py,sha256=Cv8RX-Ehit3um0QLDq7uRDqJUCcdqTKoAB9T0pM_5hg,392
43
+ omlish/collections/cache/descriptor.py,sha256=t-1Gh4DTABDuNmeDJlpoW4LV3gi_uSlBd9ZfBINfYCM,5023
44
+ omlish/collections/cache/impl.py,sha256=WDmF_WSGpVsFRbUAB7GMAA-z5-nr7rGNB7TiKfK53dY,15129
45
+ omlish/collections/cache/types.py,sha256=yNjwd6CGyTJQdxN2CQxFqqBAlcs1Z7vvNV-aU1K7p8E,685
46
+ omlish/configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
+ omlish/configs/flattening.py,sha256=AOlRpBHm449MxwMp3CiIRGunStOC1DUNs1f3CLou0wc,4731
48
+ omlish/configs/props.py,sha256=nwbg4uzFMbiNnTxOhRQ67AREbrLB8lMoiGMjmjjdVBE,1693
49
+ omlish/dataclasses/__init__.py,sha256=xx4l1C6bgo75DMcZZwhIJr9UZpo8LranMqa_1hOkiMk,972
50
+ omlish/dataclasses/impl/__init__.py,sha256=rQJRcE9fVsGEvRUOZ18r4DE0xiLbSRjspyJRXgbLS3I,348
51
+ omlish/dataclasses/impl/api.py,sha256=7w-SXif9e2Driz_HyR2depJRQL76EwRai3jdNrQAjB0,6243
52
+ omlish/dataclasses/impl/as_.py,sha256=lXSMsRgzsewSaub8SUmNXvxVRsDpeAOhL1xMOK-d4RI,2598
53
+ omlish/dataclasses/impl/exceptions.py,sha256=EDuVPeyjBu8jHYUFIASRNupRL-krpytSeuNIkD4N6Ok,38
54
+ omlish/dataclasses/impl/fields.py,sha256=_ICwU0aCYLQYV5i0gmO3bLJlyMG4OxOa89xemPY_gcQ,4242
55
+ omlish/dataclasses/impl/frozen.py,sha256=5wKtt8WvPYCkHPrwR024mpvbFzqcbPQfgiFvy3orRJo,1692
56
+ omlish/dataclasses/impl/hashing.py,sha256=FKnHuXCg9ylrzK2TLGqO5yfRN4HX3F415CSLlVYXtYE,3190
57
+ omlish/dataclasses/impl/init.py,sha256=O5UAUysLKWPg3e4KiJ5Dsv8CJnrdwJErMWkgQVERXpA,5558
58
+ omlish/dataclasses/impl/internals.py,sha256=LTCqGT8AhyGTWwioGrBpTJzDzPvAtizQKb0NBNKcNs0,2989
59
+ omlish/dataclasses/impl/main.py,sha256=gANq32eOkNXWDLdJ3MgPFKiviE-m0ao8ryjF52Hg1xs,5129
60
+ omlish/dataclasses/impl/metaclass.py,sha256=UaNdJjD-Y6aJ178Et5_1erORsJ9PzO1xfR0K5rGOCjs,2722
61
+ omlish/dataclasses/impl/metadata.py,sha256=HGqAtMcP422X4kPx93btcxE-n4guBFm6-N-S4nobgk4,1407
62
+ omlish/dataclasses/impl/order.py,sha256=8aWqDgf4sPhn04tdAaFwA8tjvuIhf2D8f4mpk5LvPqw,1369
63
+ omlish/dataclasses/impl/params.py,sha256=M-xg9IeFftVy795oqlp7Yw8jE-7wG2K4vaFhXHKmL1k,2538
64
+ omlish/dataclasses/impl/processing.py,sha256=iUvaNwRAt8rQsLIIkvRye5rfk6xhgR35EbcdwZCZec8,366
65
+ omlish/dataclasses/impl/reflect.py,sha256=nw8OkZkVloQEhpIwXkuQAIQKT8XxI_eOmi0ZNAIb_IY,5000
66
+ omlish/dataclasses/impl/replace.py,sha256=wS9GHX4fIwaPv1JBJzIewdBfXyK3X3V7_t55Da87dYo,1217
67
+ omlish/dataclasses/impl/repr.py,sha256=oLXBTxqp88NKmz82HrJeGiTEiwK4l5LlXQT9Q0-tX3c,1605
68
+ omlish/dataclasses/impl/simple.py,sha256=EovA-GpmQYtB_svItO2byTAWqbKGF4njz0MdQts3QBU,3157
69
+ omlish/dataclasses/impl/slots.py,sha256=_sm-x9v1tPnXEHBHNUMTHZocgVyhZaPdvamIPPBUVyk,2635
70
+ omlish/dataclasses/impl/utils.py,sha256=aER2iL3UAtgS1BdLuEvTr9Tr2wC28wk1kiOeO-jIymw,6138
71
+ omlish/diag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
72
+ omlish/diag/procfs.py,sha256=94o3xDtJn4PWsUUwZjnE7m0aJM80rykDssG_R1OH98w,9274
73
+ omlish/diag/ps.py,sha256=1JWxZen3fVG-20R6ZZ8BtO_gpzw_5bhHZiKdoHkgxoU,1004
74
+ omlish/diag/replserver/__init__.py,sha256=uLo6V2aQ29v9z3IMELlPDSlG3_2iOT4-_X8VniF-EgE,235
75
+ omlish/diag/replserver/__main__.py,sha256=LmU41lQ58bm1h4Mx7S8zhE_uEBSC6kPcp9mn5JRpulA,32
76
+ omlish/diag/replserver/console.py,sha256=hzY3sCpUF_C9Nvlc5QT75OqHbfnPQkUz3keWRMITmjY,7396
77
+ omlish/diag/replserver/server.py,sha256=L8qHxVx4JBPzWs18m2t82fW0Uloi7Kvv7xnUGyN1pAk,4865
78
+ omlish/dispatch/__init__.py,sha256=GsiGJ91NKiQptSROtnCSkrZExBkvfDwYvdoTu5dBqF0,117
79
+ omlish/dispatch/dispatch.py,sha256=8B66wOat30HckcIsCq4pnutBy20iSPwPQOqJ4msHaGU,3739
80
+ omlish/dispatch/functions.py,sha256=S8ElsLi6DKxTdtFGigWaF0vAquwy2sK-3f4iRLaYq70,1522
81
+ omlish/dispatch/methods.py,sha256=utLvLioBgEqa0gR0fpfNEtMDZFGPM4G5p3XHnPt-oIw,5865
82
+ omlish/graphs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
83
+ omlish/graphs/trees.py,sha256=_N8Z-gBVzreY0NWpzzitD4iR3e40ojoFLVXjJlGViTI,8150
84
+ omlish/graphs/dot/__init__.py,sha256=6-LAx7ytHFQvfLrnxVQG1s8xmApgblERJJCTB2knOHk,642
85
+ omlish/graphs/dot/items.py,sha256=OWPf0-hjBgS1uyy2QgAEn4IgFHJcEg7sHVWeTx1ghZc,4083
86
+ omlish/graphs/dot/rendering.py,sha256=hUSJ5HvSvxnTIC9ynSxxP8IJnVH6quEeDbLzNlUnmuk,3626
87
+ omlish/graphs/dot/utils.py,sha256=_FMwn77WfiiAfLsRTOKWm4IYbNv5kQN22YJ5psw6CWg,801
88
+ omlish/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
+ omlish/http/consts.py,sha256=reOpgv7NHAHLqUblYgfT5-hZVngkZfMJfCz9P41JdlU,696
90
+ omlish/http/wsgi.py,sha256=czZsVUX-l2YTlMrUjKN49wRoP4rVpS0qpeBn4O5BoMY,948
91
+ omlish/inject/__init__.py,sha256=kgHhZHYW-A1z99HhBKsk13RrjQXFL1-JjfU3hF3IQ4M,1207
92
+ omlish/inject/binder.py,sha256=hkT2dw_VSOkYTP4Mn1gvEFKeWPb-O_koFeSSsB8eNx4,278
93
+ omlish/inject/bindings.py,sha256=_GeM_w-QdPa_UMeVFluuGPf-9UCzvOqzo1gL0AEfqtc,1129
94
+ omlish/inject/eagers.py,sha256=ITpV2FoIzP2xJs4XtzEKTWP0QktLw1aPSWTxmNVJcPA,372
95
+ omlish/inject/elements.py,sha256=HXG5rt2IMczK3eJCkEhj73wcCIliJnqFzQv3evPwOGI,957
96
+ omlish/inject/exceptions.py,sha256=UCNc8s8O6_2c28VeqvB7oVR2SmnnXb55Vd0MWx-YS20,612
97
+ omlish/inject/injector.py,sha256=ewnyHj50KfanQFJU8Il2MtulpaHQYgXuDZMqWud_IHE,927
98
+ omlish/inject/inspect.py,sha256=PriB5cqqTYSz_FnLxoxIRAOp9fR9CMSILfvh-V26wxA,206
99
+ omlish/inject/keys.py,sha256=ihDlt4b8mPNRyEmg2EOEsTQ7e4NSVh7nVDq2JEC4OVY,759
100
+ omlish/inject/managed.py,sha256=hXVl8eLMrCaEwPv6glB9Dfr5EM_y1fBQwrZ2eu2XxsQ,627
101
+ omlish/inject/overrides.py,sha256=k-WjyslF-pZmsYwzrDDsFNgqcl0Ao3CufHCoN0LDCAU,391
102
+ omlish/inject/private.py,sha256=brBCsI-lZHPoouAij7_Eja44nkT-HxweG6eSVIhtXMA,592
103
+ omlish/inject/providers.py,sha256=VKc2vKiJN4GdWn7Vp1Su3zTBZe2PnH0h256qusrHMnU,1999
104
+ omlish/inject/proxy.py,sha256=4ACSV3iy0lIbMvM3dZUCG6BnmmOTAVqA4mvjRxlcdX8,1634
105
+ omlish/inject/scopes.py,sha256=hecYiZwZ3H31cnTgfP01-duTM8OgllwxtvQKpzyHDSU,2033
106
+ omlish/inject/types.py,sha256=CP3ltWxRtmR2Iqz1Qd7CvaTHQYV4st5FPiNDBN8tmn0,235
107
+ omlish/inject/impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
+ omlish/inject/impl/bindings.py,sha256=8H586RCgmvwq53XBL9WMbb-1-Tdw_hh9zxIDCwcHA1c,414
109
+ omlish/inject/impl/elements.py,sha256=MnBtTF9bx07s8KRYQ7xMtbB6WdtkAJ8Si59l-4Yxn_w,4532
110
+ omlish/inject/impl/injector.py,sha256=1jSWr8uvsUPAWRFXEj_HHY6efprMrMBPy0tWvKLUYJw,5528
111
+ omlish/inject/impl/inspect.py,sha256=ZQScAStbjWi_5InA6M52ll3cdyfPRuLwYo6kc4kFsmM,2525
112
+ omlish/inject/impl/private.py,sha256=MiYvs-EiFrla4FQnoqmqGpYx784ij33p0obAS57HOCQ,2611
113
+ omlish/inject/impl/providers.py,sha256=m0c9AAY849P6egYBOsSCkSoSBc8So7Zbmlo6gZwzTIw,3302
114
+ omlish/inject/impl/scopes.py,sha256=Lc2Bw1hK0TrAt0_JrXwSQGCixZdBcqZlEz3_n2Q1bCA,5636
115
+ omlish/lang/__init__.py,sha256=mxCgLE8RAq6kQs75cOjT8POZXLrN_EKji2ZLKTnnJ78,2718
116
+ omlish/lang/cached.py,sha256=MgBHfT83Rrl8tFr98hGBgEeA3ugse077_w6n3S35QYM,7603
117
+ omlish/lang/clsdct.py,sha256=LXwLCULeI_8Np-7-pZkyNAHpUZLcQiBEQiHwKYQ0WRo,1742
118
+ omlish/lang/cmp.py,sha256=5vbzWWbqdzDmNKAGL19z6ZfUKe5Ci49e-Oegf9f4BsE,1346
119
+ omlish/lang/contextmanagers.py,sha256=bbtQM8qK8dXAiGzNHdpXfIqFTyr9i5cgxeI5PoD6x60,6071
120
+ omlish/lang/datetimes.py,sha256=vZ-wZXcQUuYKv59FcWfBD36d5DiHUDG5nIPW8-nhYng,2022
121
+ omlish/lang/descriptors.py,sha256=dJ5wQlKK3H-gyddFnmDO8_IOQ290SR7VxFyF-RdV2FE,2056
122
+ omlish/lang/exceptions.py,sha256=qJBo3NU1mOWWm-NhQUHCY5feYXR3arZVyEHinLsmRH4,47
123
+ omlish/lang/functions.py,sha256=wN21Uyxt4zmT4MH6VWNsKsf8-oBphvVW-cd8KQXwfJs,3858
124
+ omlish/lang/imports.py,sha256=f_Dqv4aMasl_UiEc3CJ-4t-cRaRjkUtFzfofNbDrn7M,4093
125
+ omlish/lang/iterables.py,sha256=_WK-AvXOUUVOk5073uqCKc48vH8uXI_vNV5o5OOgiUU,1034
126
+ omlish/lang/maybes.py,sha256=J2N3IDOnSSeGbrN342ln2adt0TDpz2SkyCIiZ0pVRDQ,3425
127
+ omlish/lang/objects.py,sha256=TAD84PYsD0cGtaQpqo3fQSm99tP4-hckixkQ_K_Iaic,2820
128
+ omlish/lang/resolving.py,sha256=UgrX-vxXtCGGEmnAMUYP4bUZ6-Ok0EcHVEKAZYbAS-o,1597
129
+ omlish/lang/strings.py,sha256=wdLo3m9GkV76ZKak3QqtwiR6rWqUd1XlZ-divZppcek,2372
130
+ omlish/lang/timeouts.py,sha256=vECdWYhc_IZgcal1Ng1Y42wf2FV3KAx-i8As-MgGHIQ,1186
131
+ omlish/lang/typing.py,sha256=pN7Eh8X-1iDqaZ_nZQJaheHBYdkuYTSs0yCN0LcKfDU,2341
132
+ omlish/lang/classes/__init__.py,sha256=j1p0_uuMznKrY2EhMoj20uv6vx4LXljMzp7AaKe0mmU,530
133
+ omlish/lang/classes/abstract.py,sha256=goIV14oY24EOs88eVe6E6NyrSPOOLMOcWTXTMuYKiqc,2304
134
+ omlish/lang/classes/restrict.py,sha256=D3ICBbITr65xJpms3Q-KA-qygkZdb8FsrJAQBJuCzNg,3147
135
+ omlish/lang/classes/simple.py,sha256=p30A4dJxXrtG3ztRF50uBZoBwt84hMqOt_c7cyNx5ec,2672
136
+ omlish/lang/classes/virtual.py,sha256=hEVeosXKwG4sK_9dqBoNjkK2jF2mV9QoZGOtLqg7L_Q,3315
137
+ omlish/logs/__init__.py,sha256=V8jEdb5rj9Dli0b9qtR0ZYstRoIlxWqbU38UmEOXbfY,419
138
+ omlish/logs/_abc.py,sha256=UgrCUQVUi_PvT3p1CEkb3P74CFrFcZq2AFby3GEUv9M,5974
139
+ omlish/logs/configs.py,sha256=vW4QMZKqeEBbtQY0JEi-VKBIt0CuLgcGDgG8aTlgmC0,1762
140
+ omlish/logs/filters.py,sha256=dk-_sRQhp_rCGF48qpPj5viHOBEOu78quXe9pHHs78c,187
141
+ omlish/logs/formatters.py,sha256=sFboMGuDdK-FuLc13KJ0gexvLrPz2nuzlajGiStVRQw,1905
142
+ omlish/logs/utils.py,sha256=xDSt0bMv9VPPsMxHGQNG5mPw53VgmC9u2biBi9ghr34,392
143
+ omlish/marshal/__init__.py,sha256=8kNPJUBApx6pt2-M3wiaC0o3JXF-c9nu8MUZ_h_fg4E,821
144
+ omlish/marshal/any.py,sha256=uWGEeBWaJvh5hjaGKIBL0ogGCg1jKH0Rq_onECYpHVs,821
145
+ omlish/marshal/base.py,sha256=w1zfL-eU5ZvVsoPWOwy_P8qi3VcxgI4I_3NuHNFUeww,5124
146
+ omlish/marshal/base64.py,sha256=kdkkFXjYaKx6iHxMM_7vYfaX-KUM3wXN3vzsOmBbou4,863
147
+ omlish/marshal/dataclasses.py,sha256=uTjpSxRtVJLWJr5-Bmb_PMGpRhr2gJjaL3oR2pToR1I,3522
148
+ omlish/marshal/datetimes.py,sha256=5q1CQEadI5OMDYrToHNrl3NyIuD_0GAohCgKU-HjkEs,2287
149
+ omlish/marshal/enums.py,sha256=xItDDXHoIsCL_wnhRZmTpK1zy6P0dYouOcbfPGFvyxE,1224
150
+ omlish/marshal/exceptions.py,sha256=5ub1eA0Wfd3gs8mT8XbPvPdqMVFUoCJfxvgbIjI5Uo0,142
151
+ omlish/marshal/factories.py,sha256=4Vt5Vr4r_toZQHGt_fTmcmG-gJoaZcpr6GJMU1P2lhA,2932
152
+ omlish/marshal/global_.py,sha256=kbq8gzjsKLlkieboQ-mYibPNrUGdb_kOt4Dzcmk3I4Y,881
153
+ omlish/marshal/iterables.py,sha256=ZHmvT79_i2m4bCahcuEE9aeeOukjtZhYnROCnxP53y8,2168
154
+ omlish/marshal/mappings.py,sha256=4bh1pdbvUh42Xp3mWQQa4J6da7MADmsuO029uqIYk3w,2469
155
+ omlish/marshal/naming.py,sha256=QQtw_w_YuJr4Fg-tihonOaQn_XCNixMdtgMHaRkSq6w,325
156
+ omlish/marshal/objects.py,sha256=wbcZDDzG1j3nRdHEVWb9cZiRosx06IsUnIxH5YF515w,2739
157
+ omlish/marshal/optionals.py,sha256=zZN34AGXkHobJRzM1g4UcW6jw82La8moPH5tmyxy9rc,1508
158
+ omlish/marshal/polymorphism.py,sha256=9sFTwrAjqJ4J7lRAXQZgV1jucSkgeQd7IHs4xJnEDLE,3858
159
+ omlish/marshal/primitives.py,sha256=N7kXrdxz5CIrDnPnsYMdo0xLjEfMnVfKXLMANDu-L6Y,1139
160
+ omlish/marshal/registries.py,sha256=GI2KogcxawMkk02Ky7-TsnijChoe1I7YTOPIbUNwSAI,1665
161
+ omlish/marshal/standard.py,sha256=MPmtJH3B_LqeoSwQsxKjUm65-cq6albBc8z-gxyKAj4,2442
162
+ omlish/marshal/utils.py,sha256=puKJpwPpuDlMOIrKMcLTRLJyMiL6n_Xs-p59AuDEymA,543
163
+ omlish/marshal/uuids.py,sha256=_htkeMt1a6FUNBlstZIy2rrB1-1DiavV5dZrjSQNYVM,952
164
+ omlish/marshal/values.py,sha256=ssHiWdg_L6M17kAn8GiGdPW7UeQOm3RDikWkvwblf5I,263
165
+ omlish/sql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
166
+ omlish/sql/_abc.py,sha256=HLhnnLZ7l0r_N99I-RCqJe6VHth-9iluU7cR-7-5jfs,1519
167
+ omlish/sql/dbs.py,sha256=JxcJm3JIcsb7i-t9L0KU9WhAc26QsKUL6ZL6puy3IXI,1763
168
+ omlish/testing/__init__.py,sha256=l13axR7dyVE9T1e6w1pMYtAkW3vS2J97nBcYQ1FUv18,136
169
+ omlish/testing/pydevd.py,sha256=OV9RsVbzo7fYbA3EkoOdbxQ-VB4ex2Sm9jzG8poJHDk,6270
170
+ omlish/testing/testing.py,sha256=TaLELNrPx42_-EEqJygDYyQOtEdjXP4KqgLGu6juHmU,2470
171
+ omlish/testing/pytest/__init__.py,sha256=diebkOX565JdY7HIDMJVLlj3pcFnlK-spv6YIlD77oA,176
172
+ omlish/testing/pytest/helpers.py,sha256=DKZXQGqKpDiQAh0SuYrzvJ8usJbTnuVQFDpuDmQD_Oc,912
173
+ omlish/testing/pytest/inject/__init__.py,sha256=pdRKv1HcDmJ_yArKJbYITPXXZthRSGgBJWqITr0Er38,117
174
+ omlish/testing/pytest/inject/harness.py,sha256=-zeQIeD9NvpTo9DNbkb_jv_dPMrSCUbj8UDQrZ4cCPs,5042
175
+ omlish/testing/pytest/plugins/__init__.py,sha256=BVXbNpxBMvncdMoyfuVAnnV9DqCdvrICC5zY6bzYVDQ,374
176
+ omlish/testing/pytest/plugins/_registry.py,sha256=IK04KlBgiOJxKAyCCgjpX2R-9tE-btalYJkgjLc8Te8,77
177
+ omlish/testing/pytest/plugins/logging.py,sha256=1zs6Xe54wiaSjabCviaFXwKkoN97CKm3mA5mEoUeJGs,380
178
+ omlish/testing/pytest/plugins/pydevd.py,sha256=xCBAbBmn-WGwSzLCgUZlAXM6c0fWChydoUf2Lr5SERg,314
179
+ omlish/testing/pytest/plugins/repeat.py,sha256=flSQzE9GFOWksVKz-mUGnpxJpv3yRqn1G4K8pW7JHs0,498
180
+ omlish/testing/pytest/plugins/skips.py,sha256=EoZDg1uWccgbAegmzqI85c7RliycD1e2J4Y7vfDRhwM,1041
181
+ omlish/testing/pytest/plugins/spacing.py,sha256=JQQhi9q3c523Ro1a_K_9RGAb7HotiO74N8bYX2VESFE,707
182
+ omlish/testing/pytest/plugins/switches.py,sha256=qeCp3aDtZjnh6-po1FU4JEKCrR97q0MI9nJmIF_LRkg,1809
183
+ omlish/text/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
184
+ omlish/text/delimit.py,sha256=gAdbVES35IT-maH_M084SJEaf1LRoyXG8Z3pIS6OSCI,4878
185
+ omlish/text/indent.py,sha256=6Jj6TFY9unaPa4xPzrnZemJ-fHsV53IamP93XGjSUHs,1274
186
+ omlish/text/parts.py,sha256=KGgo0wHOIMVMZtDso-rhSWKAcAkYAH2IGpg9tULabu8,6505
187
+ omlish-0.0.0.dev3.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
188
+ omlish-0.0.0.dev3.dist-info/METADATA,sha256=OIbDCU-yfhRj6eymUO_GHiLTfG0lhWtjQtRfh9mB2ys,953
189
+ omlish-0.0.0.dev3.dist-info/WHEEL,sha256=rWxmBtp7hEUqVLOnTaDOPpR-cZpCDkzhhcBce-Zyd5k,91
190
+ omlish-0.0.0.dev3.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
191
+ omlish-0.0.0.dev3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.3.0)
2
+ Generator: setuptools (71.0.4)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,89 +0,0 @@
1
- import abc
2
-
3
- import pytest
4
-
5
- from ..abstract import Abstract
6
- from ..abstract import is_abstract
7
-
8
-
9
- def test_abstract():
10
- class C(Abstract):
11
- pass
12
-
13
- class D(C):
14
- pass
15
-
16
- class E(D, Abstract):
17
- pass
18
-
19
- class F(E):
20
- pass
21
-
22
- with pytest.raises(TypeError):
23
- C()
24
- D()
25
- with pytest.raises(TypeError):
26
- E()
27
- F()
28
-
29
-
30
- def test_abstract2():
31
- class O(Abstract):
32
- pass
33
-
34
- assert is_abstract(O)
35
-
36
- with pytest.raises(TypeError):
37
- O()
38
-
39
- class A(Abstract):
40
- @abc.abstractmethod
41
- def f(self):
42
- pass
43
-
44
- assert is_abstract(A)
45
-
46
- with pytest.raises(TypeError):
47
- A() # type: ignore
48
-
49
- class B(A, Abstract):
50
- pass
51
-
52
- with pytest.raises(TypeError):
53
- B() # type: ignore
54
-
55
- class C(B):
56
- f = 0
57
-
58
- assert C()
59
-
60
- with pytest.raises(TypeError):
61
- class D(A):
62
- pass
63
-
64
-
65
- def test_is_abstract():
66
- class A(Abstract):
67
- pass
68
-
69
- assert is_abstract(A)
70
-
71
- class B(A):
72
- pass
73
-
74
- assert not is_abstract(B)
75
-
76
- class C(Abstract):
77
-
78
- def __init_subclass__(cls, **kwargs):
79
- super().__init_subclass__(**kwargs)
80
- if cls.__name__ == 'D':
81
- assert is_abstract(cls)
82
- else:
83
- assert not is_abstract(cls)
84
-
85
- class D(C, Abstract):
86
- pass
87
-
88
- class E(D):
89
- pass
@@ -1,71 +0,0 @@
1
- import typing as ta
2
-
3
- import pytest
4
-
5
- from ..restrict import Final
6
- from ..restrict import FinalException
7
- from ..restrict import NoBool
8
- from ..restrict import Sealed
9
- from ..restrict import SealedException
10
- from ..restrict import no_bool
11
-
12
-
13
- def test_final():
14
- class A:
15
- pass
16
-
17
- A()
18
-
19
- class B(A, Final):
20
- pass
21
-
22
- B()
23
-
24
- with pytest.raises(FinalException):
25
- class C(B):
26
- pass
27
-
28
- T = ta.TypeVar('T')
29
-
30
- class D(ta.Generic[T], Final):
31
- pass
32
-
33
- D()
34
- D[int] # noqa
35
-
36
- with pytest.raises(FinalException):
37
- class E(D[int]):
38
- pass
39
-
40
-
41
- def test_sealed():
42
- class A(Sealed):
43
- __module__ = 'a'
44
-
45
- class B(A):
46
- __module__ = 'a'
47
-
48
- with pytest.raises(SealedException):
49
- class C(A):
50
- __module__ = 'c'
51
-
52
- class D(B):
53
- __module__ = 'd'
54
-
55
-
56
- def test_no_bool():
57
- @no_bool
58
- def f():
59
- return 1
60
-
61
- assert f() == 1
62
- assert bool(f())
63
- with pytest.raises(TypeError):
64
- bool(f)
65
-
66
- class C(NoBool):
67
- pass
68
-
69
- assert C # type: ignore
70
- with pytest.raises(TypeError):
71
- bool(C())