omlish 0.0.0.dev362__py3-none-any.whl → 0.0.0.dev363__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 (106) hide show
  1. omlish/.manifests.json +1 -1
  2. omlish/__about__.py +2 -2
  3. omlish/algorithm/distribute.py +3 -0
  4. omlish/algorithm/toposort.py +3 -0
  5. omlish/algorithm/unify.py +3 -0
  6. omlish/codecs/chain.py +3 -0
  7. omlish/codecs/funcs.py +3 -0
  8. omlish/concurrent/executors.py +3 -0
  9. omlish/configs/nginx.py +3 -0
  10. omlish/configs/types.py +1 -1
  11. omlish/daemons/reparent.py +3 -0
  12. omlish/dataclasses/api/classes/conversion.py +1 -1
  13. omlish/dataclasses/processing/priority.py +3 -0
  14. omlish/diag/pydevd.py +3 -0
  15. omlish/diag/replserver/console.py +3 -0
  16. omlish/diag/replserver/server.py +3 -0
  17. omlish/docker/cli.py +3 -0
  18. omlish/docker/compose.py +3 -0
  19. omlish/docker/manifests.py +3 -0
  20. omlish/formats/json/backends/base.py +3 -0
  21. omlish/formats/json/literals.py +1 -1
  22. omlish/formats/json5/__init__.py +4 -0
  23. omlish/formats/json5/codec.py +19 -0
  24. omlish/formats/json5/rendering.py +1 -1
  25. omlish/formats/props.py +3 -0
  26. omlish/formats/toml/writer.py +3 -0
  27. omlish/http/coro/fdio.py +3 -0
  28. omlish/http/coro/simple.py +3 -0
  29. omlish/http/dates.py +3 -0
  30. omlish/http/multipart.py +3 -0
  31. omlish/http/versions.py +3 -0
  32. omlish/io/compress/base.py +3 -0
  33. omlish/io/fileno.py +3 -0
  34. omlish/io/pyio.py +3 -0
  35. omlish/lang/__init__.py +1 -1
  36. omlish/lang/strings.py +1 -1
  37. omlish/lifecycles/abstract.py +3 -0
  38. omlish/lifecycles/base.py +3 -0
  39. omlish/lifecycles/contextmanagers.py +3 -0
  40. omlish/lifecycles/controller.py +3 -0
  41. omlish/lifecycles/manager.py +3 -0
  42. omlish/lifecycles/states.py +3 -0
  43. omlish/lifecycles/transitions.py +3 -0
  44. omlish/lite/pycharm.py +3 -0
  45. omlish/lite/runtime.py +3 -0
  46. omlish/lite/secrets.py +3 -0
  47. omlish/manifests/types.py +3 -0
  48. omlish/marshal/naming.py +3 -0
  49. omlish/marshal/proxy.py +3 -0
  50. omlish/marshal/registries.py +3 -0
  51. omlish/multiprocessing/proxies.py +3 -0
  52. omlish/multiprocessing/spawn.py +3 -0
  53. omlish/os/deathsig.py +3 -0
  54. omlish/os/fcntl.py +3 -0
  55. omlish/os/filemodes.py +3 -0
  56. omlish/os/files.py +3 -0
  57. omlish/os/linux.py +3 -0
  58. omlish/os/mangle.py +1 -1
  59. omlish/os/paths.py +3 -0
  60. omlish/os/pidfiles/cli.py +3 -0
  61. omlish/os/signals.py +3 -0
  62. omlish/os/sizes.py +3 -0
  63. omlish/os/temp.py +3 -0
  64. omlish/reflect/ops.py +3 -0
  65. omlish/reflect/subst.py +3 -0
  66. omlish/specs/irc/messages/messages.py +1 -1
  67. omlish/specs/irc/numerics/formats.py +3 -0
  68. omlish/specs/irc/protocol/message.py +3 -0
  69. omlish/specs/irc/protocol/nuh.py +3 -0
  70. omlish/specs/irc/protocol/parsing.py +3 -0
  71. omlish/specs/irc/protocol/rendering.py +3 -0
  72. omlish/specs/irc/protocol/tags.py +3 -0
  73. omlish/specs/irc/protocol/utils.py +3 -0
  74. omlish/specs/jsonrpc/errors.py +3 -0
  75. omlish/specs/jsonrpc/marshal.py +3 -0
  76. omlish/sql/alchemy/asyncs.py +6 -3
  77. omlish/sql/alchemy/duckdb.py +3 -0
  78. omlish/sql/alchemy/exprs.py +3 -0
  79. omlish/sql/alchemy/secrets.py +4 -1
  80. omlish/sql/alchemy/sqlean.py +3 -0
  81. omlish/sql/tabledefs/alchemy.py +3 -0
  82. omlish/sql/tabledefs/dtypes.py +3 -0
  83. omlish/sql/tabledefs/lower.py +3 -0
  84. omlish/sql/tabledefs/marshal.py +3 -0
  85. omlish/term/vt100/c.py +3 -0
  86. omlish/testing/pytest/marks.py +3 -0
  87. omlish/testing/pytest/plugins/asyncs/backends/asyncio.py +3 -0
  88. omlish/testing/pytest/plugins/asyncs/backends/base.py +3 -0
  89. omlish/testing/pytest/plugins/asyncs/backends/trio.py +3 -0
  90. omlish/testing/pytest/plugins/asyncs/backends/trio_asyncio.py +3 -0
  91. omlish/testing/pytest/plugins/asyncs/utils.py +3 -0
  92. omlish/testing/pytest/plugins/depskip.py +3 -0
  93. omlish/testing/pytest/plugins/logging.py +3 -0
  94. omlish/testing/pytest/plugins/managermarks.py +3 -0
  95. omlish/testing/pytest/plugins/pydevd.py +3 -0
  96. omlish/testing/pytest/plugins/repeat.py +3 -0
  97. omlish/testing/pytest/plugins/skips.py +3 -0
  98. omlish/testing/pytest/plugins/spacing.py +3 -0
  99. omlish/testing/pytest/plugins/utils.py +3 -0
  100. omlish/text/go/quoting.py +3 -0
  101. {omlish-0.0.0.dev362.dist-info → omlish-0.0.0.dev363.dist-info}/METADATA +1 -1
  102. {omlish-0.0.0.dev362.dist-info → omlish-0.0.0.dev363.dist-info}/RECORD +106 -106
  103. {omlish-0.0.0.dev362.dist-info → omlish-0.0.0.dev363.dist-info}/WHEEL +0 -0
  104. {omlish-0.0.0.dev362.dist-info → omlish-0.0.0.dev363.dist-info}/entry_points.txt +0 -0
  105. {omlish-0.0.0.dev362.dist-info → omlish-0.0.0.dev363.dist-info}/licenses/LICENSE +0 -0
  106. {omlish-0.0.0.dev362.dist-info → omlish-0.0.0.dev363.dist-info}/top_level.txt +0 -0
omlish/.manifests.json CHANGED
@@ -125,7 +125,7 @@
125
125
  "module": ".formats.json5.codec",
126
126
  "attr": "_JSON5_LAZY_CODEC",
127
127
  "file": "omlish/formats/json5/codec.py",
128
- "line": 54,
128
+ "line": 73,
129
129
  "value": {
130
130
  "$.codecs.base.LazyLoadedCodec": {
131
131
  "mod_name": "omlish.formats.json5.codec",
omlish/__about__.py CHANGED
@@ -1,5 +1,5 @@
1
- __version__ = '0.0.0.dev362'
2
- __revision__ = '09c5218470c2d3eab0217fad907ace2acf9de2fb'
1
+ __version__ = '0.0.0.dev363'
2
+ __revision__ = '4f8e697da60d11b78b7994ff7f5ed3d6f69a6b69'
3
3
 
4
4
 
5
5
  #
@@ -8,6 +8,9 @@ import typing as ta
8
8
  T = ta.TypeVar('T')
9
9
 
10
10
 
11
+ ##
12
+
13
+
11
14
  def distribute_evenly(
12
15
  items: ta.Iterable[ta.Tuple[T, float]],
13
16
  n_bins: int,
@@ -7,6 +7,9 @@ import typing as ta
7
7
  T = ta.TypeVar('T')
8
8
 
9
9
 
10
+ ##
11
+
12
+
10
13
  def mut_toposort(data: ta.Dict[T, ta.Set[T]]) -> ta.Iterator[ta.Set[T]]:
11
14
  for k, v in data.items():
12
15
  v.discard(k)
omlish/algorithm/unify.py CHANGED
@@ -5,6 +5,9 @@ import typing as ta
5
5
  T = ta.TypeVar('T')
6
6
 
7
7
 
8
+ ##
9
+
10
+
8
11
  def mut_unify_sets(sets: ta.Iterable[set[T]]) -> list[set[T]]:
9
12
  rem: list[set[T]] = list(sets)
10
13
  ret: list[set[T]] = []
omlish/codecs/chain.py CHANGED
@@ -4,6 +4,9 @@ import typing as ta
4
4
  from .base import EagerCodec
5
5
 
6
6
 
7
+ ##
8
+
9
+
7
10
  @dc.dataclass(frozen=True)
8
11
  class ChainEagerCodec(EagerCodec[ta.Any, ta.Any]):
9
12
  codecs: ta.Sequence[EagerCodec]
omlish/codecs/funcs.py CHANGED
@@ -9,6 +9,9 @@ I = ta.TypeVar('I')
9
9
  O = ta.TypeVar('O')
10
10
 
11
11
 
12
+ ##
13
+
14
+
12
15
  @dc.dataclass(frozen=True)
13
16
  class FnPairEagerCodec(EagerCodec[I, O]):
14
17
  fp: fps.FnPair[I, O]
@@ -7,6 +7,9 @@ T = ta.TypeVar('T')
7
7
  P = ta.ParamSpec('P')
8
8
 
9
9
 
10
+ ##
11
+
12
+
10
13
  class ImmediateExecutor(cf.Executor):
11
14
  def __init__(self, *, immediate_exceptions: bool = False) -> None:
12
15
  super().__init__()
omlish/configs/nginx.py CHANGED
@@ -14,6 +14,9 @@ from ..lite.check import check
14
14
  from ..text.indent import IndentWriter
15
15
 
16
16
 
17
+ ##
18
+
19
+
17
20
  @dc.dataclass()
18
21
  class NginxConfigItems:
19
22
  lst: ta.List['NginxConfigItem']
omlish/configs/types.py CHANGED
@@ -6,4 +6,4 @@ import typing as ta
6
6
  ConfigMap = ta.Mapping[str, ta.Any]
7
7
 
8
8
 
9
- #
9
+ ##
@@ -2,6 +2,9 @@ import os
2
2
  import sys
3
3
 
4
4
 
5
+ ##
6
+
7
+
5
8
  def reparent_process(
6
9
  *,
7
10
  no_close_stdio: bool = False,
@@ -6,7 +6,7 @@ from ...specs import ClassSpec
6
6
  from ...specs import FieldSpec
7
7
 
8
8
 
9
- #
9
+ ##
10
10
 
11
11
 
12
12
  def std_params_to_class_spec(
@@ -1,6 +1,9 @@
1
1
  import enum
2
2
 
3
3
 
4
+ ##
5
+
6
+
4
7
  class ProcessorPriority(enum.IntEnum):
5
8
  BOOTSTRAP = enum.auto()
6
9
 
omlish/diag/pydevd.py CHANGED
@@ -39,6 +39,9 @@ from .. import check
39
39
  from .. import lang
40
40
 
41
41
 
42
+ ##
43
+
44
+
42
45
  ALLOW_DEBUGGER_CALLS = False
43
46
 
44
47
 
@@ -31,6 +31,9 @@ from ... import check
31
31
  log = logging.getLogger(__name__)
32
32
 
33
33
 
34
+ ##
35
+
36
+
34
37
  class DisconnectError(Exception):
35
38
  pass
36
39
 
@@ -37,6 +37,9 @@ from .console import InteractiveSocketConsole
37
37
  log = logging.getLogger(__name__)
38
38
 
39
39
 
40
+ ##
41
+
42
+
40
43
  class ReplServer:
41
44
  CONNECTION_THREAD_NAME = 'ReplServerConnection'
42
45
 
omlish/docker/cli.py CHANGED
@@ -18,6 +18,9 @@ from .. import marshal as msh
18
18
  from ..formats import json
19
19
 
20
20
 
21
+ ##
22
+
23
+
21
24
  @dc.dataclass(frozen=True)
22
25
  @msh.update_object_metadata(field_naming=msh.Naming.CAMEL, unknown_field='x')
23
26
  @msh.update_fields_metadata(['id'], name='ID')
omlish/docker/compose.py CHANGED
@@ -14,6 +14,9 @@ else:
14
14
  yaml = lang.proxy_import('yaml')
15
15
 
16
16
 
17
+ ##
18
+
19
+
17
20
  class ComposeConfig:
18
21
  def __init__(
19
22
  self,
@@ -8,6 +8,9 @@ from .. import lang
8
8
  from .. import marshal as msh
9
9
 
10
10
 
11
+ ##
12
+
13
+
11
14
  SCHEMA_VERSION = 2
12
15
 
13
16
 
@@ -4,6 +4,9 @@ import typing as ta
4
4
  from .... import lang
5
5
 
6
6
 
7
+ ##
8
+
9
+
7
10
  class Backend(lang.Abstract):
8
11
  @abc.abstractmethod
9
12
  def dump(self, obj: ta.Any, fp: ta.Any, **kwargs: ta.Any) -> None:
@@ -118,7 +118,7 @@ def encode_string(
118
118
  if process_chunks is not None:
119
119
  chunks: list[str] = [
120
120
  replace(p.group(0)) if isinstance(p, re.Match) else p
121
- for p in lang.iter_matches(pat, s)
121
+ for p in lang.iter_pat(pat, s)
122
122
  ]
123
123
 
124
124
  return ''.join([
@@ -1,7 +1,11 @@
1
1
  from .codec import ( # noqa
2
+ dump,
3
+ dump_compact,
4
+ dump_pretty,
2
5
  dumps,
3
6
  dumps_pretty,
4
7
  dumps_compact,
8
+ load,
5
9
  loads,
6
10
  )
7
11
 
@@ -42,10 +42,29 @@ def dumps_compact(obj: ta.Any, **kwargs: ta.Any) -> str:
42
42
  return dumps(obj, **json.COMPACT_KWARGS, **kwargs)
43
43
 
44
44
 
45
+ def dump(obj: ta.Any, fp: ta.Any, **kwargs: ta.Any) -> None:
46
+ fp.write(dumps(obj, **kwargs))
47
+
48
+
49
+ def dump_pretty(obj: ta.Any, fp: ta.Any, **kwargs: ta.Any) -> None:
50
+ fp.write(dumps_pretty(obj, **kwargs))
51
+
52
+
53
+ def dump_compact(obj: ta.Any, fp: ta.Any, **kwargs: ta.Any) -> None:
54
+ fp.write(dumps_compact(obj, **kwargs))
55
+
56
+
57
+ #
58
+
59
+
45
60
  def loads(s: str, **kwargs: ta.Any) -> ta.Any:
46
61
  return parsing.parse(s, **kwargs)
47
62
 
48
63
 
64
+ def load(fp: ta.Any, **kwargs: ta.Any) -> ta.Any:
65
+ return loads(fp.read(), **kwargs)
66
+
67
+
49
68
  ##
50
69
 
51
70
 
@@ -75,7 +75,7 @@ class Json5Renderer(JsonRenderer):
75
75
  if c[0] == '\\':
76
76
  it = [c]
77
77
  else:
78
- it = lang.iter_matches(SOFTWRAP_WS_PAT, c)
78
+ it = lang.iter_pat(SOFTWRAP_WS_PAT, c)
79
79
 
80
80
  for x in it:
81
81
  if isinstance(x, re.Match):
omlish/formats/props.py CHANGED
@@ -35,6 +35,9 @@ import time
35
35
  import typing as ta
36
36
 
37
37
 
38
+ ##
39
+
40
+
38
41
  class PropertyTuple(ta.NamedTuple):
39
42
  data: ta.Any
40
43
  meta: ta.Any
@@ -5,6 +5,9 @@ import string
5
5
  import typing as ta
6
6
 
7
7
 
8
+ ##
9
+
10
+
8
11
  class TomlWriter:
9
12
  @dc.dataclass(frozen=True)
10
13
  class Literal:
omlish/http/coro/fdio.py CHANGED
@@ -12,6 +12,9 @@ from ..handlers import HttpHandler
12
12
  from .server import CoroHttpServer
13
13
 
14
14
 
15
+ ##
16
+
17
+
15
18
  class CoroHttpServerConnectionFdioHandler(SocketFdioHandler):
16
19
  def __init__(
17
20
  self,
@@ -33,6 +33,9 @@ if ta.TYPE_CHECKING:
33
33
  import ssl
34
34
 
35
35
 
36
+ ##
37
+
38
+
36
39
  @contextlib.contextmanager
37
40
  def make_simple_http_server(
38
41
  bind: CanSocketBinder,
omlish/http/dates.py CHANGED
@@ -26,6 +26,9 @@ import time
26
26
  from .. import check
27
27
 
28
28
 
29
+ ##
30
+
31
+
29
32
  def _dt_as_utc(dt: datetime.datetime | None) -> datetime.datetime | None:
30
33
  if dt is None:
31
34
  return dt
omlish/http/multipart.py CHANGED
@@ -12,6 +12,9 @@ from .. import cached
12
12
  MultipartData: ta.TypeAlias = ta.Any # bytes | file
13
13
 
14
14
 
15
+ ##
16
+
17
+
15
18
  @dc.dataclass(frozen=True)
16
19
  class MultipartField:
17
20
  data: MultipartData
omlish/http/versions.py CHANGED
@@ -3,6 +3,9 @@
3
3
  import typing as ta
4
4
 
5
5
 
6
+ ##
7
+
8
+
6
9
  class HttpProtocolVersion(ta.NamedTuple):
7
10
  major: int
8
11
  minor: int
@@ -4,6 +4,9 @@ from ..coro import BytesSteppedCoro
4
4
  from ..coro import BytesSteppedReaderCoro
5
5
 
6
6
 
7
+ ##
8
+
9
+
7
10
  class Compression(abc.ABC):
8
11
  @abc.abstractmethod
9
12
  def compress(self, d: bytes) -> bytes:
omlish/io/fileno.py CHANGED
@@ -3,6 +3,9 @@
3
3
  import dataclasses as dc
4
4
 
5
5
 
6
+ ##
7
+
8
+
6
9
  @dc.dataclass(frozen=True)
7
10
  class Fileno:
8
11
  fd: int
omlish/io/pyio.py CHANGED
@@ -52,6 +52,9 @@ import threading
52
52
  import warnings
53
53
 
54
54
 
55
+ ##
56
+
57
+
55
58
  valid_seek_flags = {0, 1, 2} # Hardwired values
56
59
  if hasattr(os, 'SEEK_HOLE'):
57
60
  valid_seek_flags.add(os.SEEK_HOLE)
omlish/lang/__init__.py CHANGED
@@ -327,7 +327,7 @@ from .strings import ( # noqa
327
327
  is_ident_cont,
328
328
  is_ident_start,
329
329
  is_sunder,
330
- iter_matches,
330
+ iter_pat,
331
331
  prefix_delimited,
332
332
  prefix_lines,
333
333
  replace_many,
omlish/lang/strings.py CHANGED
@@ -216,7 +216,7 @@ STRING_BOOL_VALUES: ta.Mapping[str, bool] = {
216
216
  ##
217
217
 
218
218
 
219
- def iter_matches(pat: re.Pattern[str], s: str, **kwargs: ta.Any) -> ta.Generator[str | re.Match]:
219
+ def iter_pat(pat: re.Pattern[str], s: str, **kwargs: ta.Any) -> ta.Generator[str | re.Match]:
220
220
  p = 0
221
221
  for m in re.finditer(pat, s, **kwargs):
222
222
  if p < (l := m.start()):
@@ -9,6 +9,9 @@ from .base import Lifecycle
9
9
  AbstractLifecycleT = ta.TypeVar('AbstractLifecycleT', bound='AbstractLifecycle')
10
10
 
11
11
 
12
+ ##
13
+
14
+
12
15
  class AbstractLifecycle(lang.Abstract):
13
16
  @dc.dataclass(frozen=True)
14
17
  class _Lifecycle(Lifecycle, lang.Final, ta.Generic[AbstractLifecycleT]):
omlish/lifecycles/base.py CHANGED
@@ -8,6 +8,9 @@ LifecycleT = ta.TypeVar('LifecycleT', bound='Lifecycle')
8
8
  LifecycleCallback: ta.TypeAlias = ta.Callable[[LifecycleT], None]
9
9
 
10
10
 
11
+ ##
12
+
13
+
11
14
  class Lifecycle:
12
15
  def lifecycle_construct(self) -> None:
13
16
  pass
@@ -14,6 +14,9 @@ LifecycleT = ta.TypeVar('LifecycleT', bound='Lifecycle')
14
14
  ContextManagerT = ta.TypeVar('ContextManagerT', bound=ta.ContextManager)
15
15
 
16
16
 
17
+ ##
18
+
19
+
17
20
  @dc.dataclass(frozen=True)
18
21
  class ContextManagerLifecycle(Lifecycle, lang.Final, ta.Generic[ContextManagerT]):
19
22
  cm: ContextManagerT
@@ -13,6 +13,9 @@ from .transitions import LifecycleTransitions
13
13
  LifecycleT = ta.TypeVar('LifecycleT', bound='Lifecycle')
14
14
 
15
15
 
16
+ ##
17
+
18
+
16
19
  class LifecycleListener(ta.Generic[LifecycleT]):
17
20
  def on_starting(self, obj: LifecycleT) -> None:
18
21
  pass
@@ -12,6 +12,9 @@ from .states import LifecycleStateError
12
12
  from .states import LifecycleStates
13
13
 
14
14
 
15
+ ##
16
+
17
+
15
18
  class LifecycleManager(AbstractLifecycle):
16
19
  @dc.dataclass(frozen=True)
17
20
  class Entry(lang.Final):
@@ -5,6 +5,9 @@ from .. import dataclasses as dc
5
5
  from .. import lang
6
6
 
7
7
 
8
+ ##
9
+
10
+
8
11
  class LifecycleStateError(Exception):
9
12
  pass
10
13
 
@@ -5,6 +5,9 @@ from .states import LifecycleState
5
5
  from .states import LifecycleStates
6
6
 
7
7
 
8
+ ##
9
+
10
+
8
11
  @dc.dataclass(frozen=True)
9
12
  class LifecycleTransition(lang.Final):
10
13
  old: frozenset[LifecycleState]
omlish/lite/pycharm.py CHANGED
@@ -3,6 +3,9 @@ import dataclasses as dc
3
3
  import typing as ta
4
4
 
5
5
 
6
+ ##
7
+
8
+
6
9
  DEFAULT_PYCHARM_VERSION = '242.23726.102'
7
10
 
8
11
 
omlish/lite/runtime.py CHANGED
@@ -4,6 +4,9 @@ import sys
4
4
  from .cached import cached_nullary
5
5
 
6
6
 
7
+ ##
8
+
9
+
7
10
  @cached_nullary
8
11
  def is_debugger_attached() -> bool:
9
12
  return any(frame[1].endswith('pydevd.py') for frame in inspect.stack())
omlish/lite/secrets.py CHANGED
@@ -2,6 +2,9 @@
2
2
  import typing as ta
3
3
 
4
4
 
5
+ ##
6
+
7
+
5
8
  class Secret:
6
9
  __sensitive__ = True
7
10
 
omlish/manifests/types.py CHANGED
@@ -4,6 +4,9 @@ import dataclasses as dc
4
4
  import typing as ta
5
5
 
6
6
 
7
+ ##
8
+
9
+
7
10
  @dc.dataclass(frozen=True)
8
11
  class ManifestOrigin:
9
12
  module: str
omlish/marshal/naming.py CHANGED
@@ -10,6 +10,9 @@ from .. import lang
10
10
  from .base import Option
11
11
 
12
12
 
13
+ ##
14
+
15
+
13
16
  class Naming(Option, enum.Enum):
14
17
  SNAKE = 'snake'
15
18
  CAMEL = 'camel'
omlish/marshal/proxy.py CHANGED
@@ -4,6 +4,9 @@ import typing as ta
4
4
  T = ta.TypeVar('T')
5
5
 
6
6
 
7
+ ##
8
+
9
+
7
10
  class _Proxy(ta.Generic[T]):
8
11
  __obj: T | None = None
9
12
 
@@ -10,6 +10,9 @@ from .. import collections as col
10
10
  from .. import lang
11
11
 
12
12
 
13
+ ##
14
+
15
+
13
16
  class RegistryItem(lang.Abstract):
14
17
  pass
15
18
 
@@ -7,6 +7,9 @@ from .. import lang
7
7
  T = ta.TypeVar('T')
8
8
 
9
9
 
10
+ ##
11
+
12
+
10
13
  @ta.runtime_checkable
11
14
  class ValueProxy(ta.Protocol[T]):
12
15
  # value = property(get, set)
@@ -11,6 +11,9 @@ from .. import libc
11
11
  T = ta.TypeVar('T')
12
12
 
13
13
 
14
+ ##
15
+
16
+
14
17
  @dc.dataclass(frozen=True, kw_only=True)
15
18
  class SpawnExtras:
16
19
  pass_fds: ta.AbstractSet[int] | None = None
omlish/os/deathsig.py CHANGED
@@ -3,6 +3,9 @@ import ctypes as ct
3
3
  import sys
4
4
 
5
5
 
6
+ ##
7
+
8
+
6
9
  LINUX_PR_SET_PDEATHSIG = 1 # Second arg is a signal
7
10
  LINUX_PR_GET_PDEATHSIG = 2 # Second arg is a ptr to return the signal
8
11
 
omlish/os/fcntl.py CHANGED
@@ -7,6 +7,9 @@ import sys
7
7
  import typing as ta
8
8
 
9
9
 
10
+ ##
11
+
12
+
10
13
  @dc.dataclass(frozen=True)
11
14
  class FcntlLockData:
12
15
  # cmd = {F_SETLK, F_SETLKW, F_GETLK}
omlish/os/filemodes.py CHANGED
@@ -7,6 +7,9 @@ import typing as ta
7
7
  from ..lite.check import check
8
8
 
9
9
 
10
+ ##
11
+
12
+
10
13
  @dc.dataclass(frozen=True)
11
14
  class FileMode:
12
15
  """
omlish/os/files.py CHANGED
@@ -7,6 +7,9 @@ import os
7
7
  import typing as ta
8
8
 
9
9
 
10
+ ##
11
+
12
+
10
13
  def is_fd_open(fd: int) -> bool:
11
14
  try:
12
15
  fcntl.fcntl(fd, fcntl.F_GETFD)
omlish/os/linux.py CHANGED
@@ -32,6 +32,9 @@ import os.path
32
32
  import typing as ta
33
33
 
34
34
 
35
+ ##
36
+
37
+
35
38
  @dc.dataclass(frozen=True)
36
39
  class LinuxOsRelease:
37
40
  """
omlish/os/mangle.py CHANGED
@@ -6,7 +6,7 @@ TODO:
6
6
  """
7
7
 
8
8
 
9
- #
9
+ ##
10
10
 
11
11
 
12
12
  def mangle_path(path: str) -> str:
omlish/os/paths.py CHANGED
@@ -4,6 +4,9 @@ import os.path
4
4
  import typing as ta
5
5
 
6
6
 
7
+ ##
8
+
9
+
7
10
  def abs_real_path(p: str) -> str:
8
11
  return os.path.abspath(os.path.realpath(p))
9
12