omlish 0.0.0.dev189__py3-none-any.whl → 0.0.0.dev191__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/os/atomics.py +7 -1
- omlish/text/indent.py +5 -4
- {omlish-0.0.0.dev189.dist-info → omlish-0.0.0.dev191.dist-info}/METADATA +1 -1
- {omlish-0.0.0.dev189.dist-info → omlish-0.0.0.dev191.dist-info}/RECORD +9 -9
- {omlish-0.0.0.dev189.dist-info → omlish-0.0.0.dev191.dist-info}/LICENSE +0 -0
- {omlish-0.0.0.dev189.dist-info → omlish-0.0.0.dev191.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev189.dist-info → omlish-0.0.0.dev191.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev189.dist-info → omlish-0.0.0.dev191.dist-info}/top_level.txt +0 -0
omlish/__about__.py
CHANGED
omlish/os/atomics.py
CHANGED
@@ -114,6 +114,7 @@ class AtomicPathSwapping(abc.ABC):
|
|
114
114
|
*,
|
115
115
|
name_hint: ta.Optional[str] = None,
|
116
116
|
make_dirs: bool = False,
|
117
|
+
skip_root_dir_check: bool = False,
|
117
118
|
**kwargs: ta.Any,
|
118
119
|
) -> AtomicPathSwap:
|
119
120
|
raise NotImplementedError
|
@@ -177,10 +178,15 @@ class TempDirAtomicPathSwapping(AtomicPathSwapping):
|
|
177
178
|
*,
|
178
179
|
name_hint: ta.Optional[str] = None,
|
179
180
|
make_dirs: bool = False,
|
181
|
+
skip_root_dir_check: bool = False,
|
180
182
|
**kwargs: ta.Any,
|
181
183
|
) -> AtomicPathSwap:
|
182
184
|
dst_path = os.path.abspath(dst_path)
|
183
|
-
if
|
185
|
+
if (
|
186
|
+
not skip_root_dir_check and
|
187
|
+
self._root_dir is not None and
|
188
|
+
not dst_path.startswith(check.non_empty_str(self._root_dir))
|
189
|
+
):
|
184
190
|
raise RuntimeError(f'Atomic path swap dst must be in root dir: {dst_path}, {self._root_dir}')
|
185
191
|
|
186
192
|
dst_dir = os.path.dirname(dst_path)
|
omlish/text/indent.py
CHANGED
@@ -1,19 +1,20 @@
|
|
1
|
+
# ruff: noqa: UP006 UP007
|
2
|
+
# @omlish-lite
|
1
3
|
import contextlib
|
2
4
|
import io
|
3
5
|
import typing as ta
|
4
6
|
|
5
|
-
from
|
7
|
+
from omlish.lite.check import check
|
6
8
|
|
7
9
|
|
8
10
|
class IndentWriter:
|
9
|
-
|
10
11
|
DEFAULT_INDENT = ' ' * 4
|
11
12
|
|
12
13
|
def __init__(
|
13
14
|
self,
|
14
15
|
*,
|
15
|
-
buf: io.StringIO
|
16
|
-
indent: str
|
16
|
+
buf: ta.Optional[io.StringIO] = None,
|
17
|
+
indent: ta.Optional[str] = None,
|
17
18
|
) -> None:
|
18
19
|
super().__init__()
|
19
20
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.manifests.json,sha256=lRkBDFxlAbf6lN5upo3WSf-owW8YG1T21dfpbQL-XHM,7598
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=aJSbxhOnDBD4IEn8DVRokzXG6YjV7VDAFM2SNSQkB4E,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
|
@@ -442,7 +442,7 @@ omlish/math/bits.py,sha256=yip1l8agOYzT7bFyMGc0RR3XlnGCfHMpjw_SECLLh1I,3477
|
|
442
442
|
omlish/math/floats.py,sha256=UimhOT7KRl8LXTzOI5cQWoX_9h6WNWe_3vcOuO7-h_8,327
|
443
443
|
omlish/math/stats.py,sha256=MegzKVsmv2kra4jDWLOUgV0X7Ee2Tbl5u6ql1v4-dEY,10053
|
444
444
|
omlish/os/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
445
|
-
omlish/os/atomics.py,sha256=
|
445
|
+
omlish/os/atomics.py,sha256=AKap761fcRqr44jnJNLbNwh6ju5drWJc3WWqTO0BcAs,5256
|
446
446
|
omlish/os/deathsig.py,sha256=hk9Yq2kyDdI-cI7OQH7mOfpRbOKzY_TfPKEqgrjVYbA,641
|
447
447
|
omlish/os/files.py,sha256=1tNy1z5I_CgYKA5c6lOfsXc-hknP4tQDbSShdz8HArw,1308
|
448
448
|
omlish/os/journald.py,sha256=2nI8Res1poXkbLc31--MPUlzYMESnCcPUkIxDOCjZW0,3903
|
@@ -575,13 +575,13 @@ omlish/text/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
575
575
|
omlish/text/asdl.py,sha256=AS3irh-sag5pqyH3beJif78PjCbOaFso1NeKq-HXuTs,16867
|
576
576
|
omlish/text/delimit.py,sha256=ubPXcXQmtbOVrUsNh5gH1mDq5H-n1y2R4cPL5_DQf68,4928
|
577
577
|
omlish/text/glyphsplit.py,sha256=Ug-dPRO7x-OrNNr8g1y6DotSZ2KH0S-VcOmUobwa4B0,3296
|
578
|
-
omlish/text/indent.py,sha256=
|
578
|
+
omlish/text/indent.py,sha256=XixaVnk9bvtBlH0n_cwN6yS5IyfrTWpe_alfu3_saLY,1341
|
579
579
|
omlish/text/minja.py,sha256=KAmZ2POcLcxwF4DPKxdWa16uWxXmVz1UnJXLSwt4oZo,5761
|
580
580
|
omlish/text/parts.py,sha256=7vPF1aTZdvLVYJ4EwBZVzRSy8XB3YqPd7JwEnNGGAOo,6495
|
581
581
|
omlish/text/random.py,sha256=jNWpqiaKjKyTdMXC-pWAsSC10AAP-cmRRPVhm59ZWLk,194
|
582
|
-
omlish-0.0.0.
|
583
|
-
omlish-0.0.0.
|
584
|
-
omlish-0.0.0.
|
585
|
-
omlish-0.0.0.
|
586
|
-
omlish-0.0.0.
|
587
|
-
omlish-0.0.0.
|
582
|
+
omlish-0.0.0.dev191.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
583
|
+
omlish-0.0.0.dev191.dist-info/METADATA,sha256=VeMQ5bZm2pqd7T5E6Dv-eH_jL1uJ7Dxat7Zhr8mL-LU,4264
|
584
|
+
omlish-0.0.0.dev191.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
585
|
+
omlish-0.0.0.dev191.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
586
|
+
omlish-0.0.0.dev191.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
587
|
+
omlish-0.0.0.dev191.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|