omdev 0.0.0.dev386__py3-none-any.whl → 0.0.0.dev387__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.
- omdev/ptk/__init__.py +3 -3
- omdev/ptk/confirm.py +3 -7
- {omdev-0.0.0.dev386.dist-info → omdev-0.0.0.dev387.dist-info}/METADATA +2 -2
- {omdev-0.0.0.dev386.dist-info → omdev-0.0.0.dev387.dist-info}/RECORD +8 -8
- {omdev-0.0.0.dev386.dist-info → omdev-0.0.0.dev387.dist-info}/WHEEL +0 -0
- {omdev-0.0.0.dev386.dist-info → omdev-0.0.0.dev387.dist-info}/entry_points.txt +0 -0
- {omdev-0.0.0.dev386.dist-info → omdev-0.0.0.dev387.dist-info}/licenses/LICENSE +0 -0
- {omdev-0.0.0.dev386.dist-info → omdev-0.0.0.dev387.dist-info}/top_level.txt +0 -0
omdev/ptk/__init__.py
CHANGED
@@ -97,7 +97,7 @@ from prompt_toolkit.widgets.toolbars import SearchToolbar
|
|
97
97
|
from prompt_toolkit.widgets.toolbars import SystemToolbar
|
98
98
|
from prompt_toolkit.widgets.toolbars import ValidationToolbar
|
99
99
|
|
100
|
-
#
|
101
|
-
from .confirm import a_strict_confirm
|
102
100
|
from .confirm import create_strict_confirm_session
|
103
|
-
|
101
|
+
|
102
|
+
#
|
103
|
+
from .confirm import m_strict_confirm
|
omdev/ptk/confirm.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
from prompt_toolkit.formatted_text import merge_formatted_text
|
3
2
|
from prompt_toolkit.key_binding import KeyBindings
|
4
3
|
from prompt_toolkit.key_binding import KeyPressEvent
|
@@ -42,12 +41,13 @@ def create_strict_confirm_session(
|
|
42
41
|
##
|
43
42
|
|
44
43
|
|
45
|
-
|
44
|
+
@lang.maysync
|
45
|
+
async def m_strict_confirm(message: str = 'Confirm?', suffix: str = ' (y/n) ') -> bool:
|
46
46
|
"""Display a confirmation prompt that returns True/False. Requires an explicit answer."""
|
47
47
|
|
48
48
|
while True:
|
49
49
|
session = create_strict_confirm_session(message, suffix)
|
50
|
-
ret =
|
50
|
+
ret = await lang.make_maysync(session.prompt, session.prompt_async).m()
|
51
51
|
|
52
52
|
if isinstance(ret, str):
|
53
53
|
check.empty(ret)
|
@@ -57,7 +57,3 @@ def _m_strict_confirm(message: str = 'Confirm?', suffix: str = ' (y/n) ') -> lan
|
|
57
57
|
|
58
58
|
else:
|
59
59
|
raise TypeError(ret)
|
60
|
-
|
61
|
-
|
62
|
-
strict_confirm = lang.maysync_wrap(_m_strict_confirm)
|
63
|
-
a_strict_confirm = lang.a_maysync_wrap(_m_strict_confirm)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: omdev
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev387
|
4
4
|
Summary: omdev
|
5
5
|
Author: wrmsr
|
6
6
|
License-Expression: BSD-3-Clause
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
14
14
|
Requires-Python: >=3.13
|
15
15
|
Description-Content-Type: text/markdown
|
16
16
|
License-File: LICENSE
|
17
|
-
Requires-Dist: omlish==0.0.0.
|
17
|
+
Requires-Dist: omlish==0.0.0.dev387
|
18
18
|
Provides-Extra: all
|
19
19
|
Requires-Dist: black~=25.1; extra == "all"
|
20
20
|
Requires-Dist: pycparser~=2.22; extra == "all"
|
@@ -216,8 +216,8 @@ omdev/precheck/main.py,sha256=_1A5wiu9p2th1dn_17w1ZIFtMmCIOaTFpWyvK0jopEA,4374
|
|
216
216
|
omdev/precheck/manifests.py,sha256=1CG0PG0feagydT-cgxiOBvQKhoILjZVXk4MYf65wkkM,786
|
217
217
|
omdev/precheck/scripts.py,sha256=244Jq5xee2QErn0gvpt0hmdYg95TYtuefMDXaE9YPws,1344
|
218
218
|
omdev/precheck/unicode.py,sha256=VUNDCrlfUas_U8ugV_q0eFUXuBgKjS8YdCFm0FXREXo,2583
|
219
|
-
omdev/ptk/__init__.py,sha256=
|
220
|
-
omdev/ptk/confirm.py,sha256=
|
219
|
+
omdev/ptk/__init__.py,sha256=4zhIfvhebFj4TJRRN1SQkcAe-7elizcfZLsD-fIlZsI,5198
|
220
|
+
omdev/ptk/confirm.py,sha256=TJdZno0I_-pmUqVimz3ySgoYWIsQ5_yP_e1ElhDD4HI,1571
|
221
221
|
omdev/ptk/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
222
222
|
omdev/ptk/apps/ncdu.py,sha256=KTbAgwhzcROOvq20VGN92UwMWcgkMMVOeFfpjZAsKUk,4561
|
223
223
|
omdev/ptk/markdown/LICENSE,sha256=oSmc9j-n23wTJUO0TbY8sIHrf9pFZUovFWfDL7D53IA,1489
|
@@ -316,9 +316,9 @@ omdev/tools/jsonview/resources/jsonview.js,sha256=faDvXDOXKvEvjOuIlz4D3F2ReQXb_b
|
|
316
316
|
omdev/tools/pawk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
317
317
|
omdev/tools/pawk/__main__.py,sha256=VCqeRVnqT1RPEoIrqHFSu4PXVMg4YEgF4qCQm90-eRI,66
|
318
318
|
omdev/tools/pawk/pawk.py,sha256=ao5mdrpiSU4AZ8mBozoEaV3UVlmVTnRG9wD9XP70MZE,11429
|
319
|
-
omdev-0.0.0.
|
320
|
-
omdev-0.0.0.
|
321
|
-
omdev-0.0.0.
|
322
|
-
omdev-0.0.0.
|
323
|
-
omdev-0.0.0.
|
324
|
-
omdev-0.0.0.
|
319
|
+
omdev-0.0.0.dev387.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
320
|
+
omdev-0.0.0.dev387.dist-info/METADATA,sha256=uPihGTRaQIGK30ba-Gs7sRIF0QXbGSoycCU6sGSYklc,5094
|
321
|
+
omdev-0.0.0.dev387.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
322
|
+
omdev-0.0.0.dev387.dist-info/entry_points.txt,sha256=dHLXFmq5D9B8qUyhRtFqTGWGxlbx3t5ejedjrnXNYLU,33
|
323
|
+
omdev-0.0.0.dev387.dist-info/top_level.txt,sha256=1nr7j30fEWgLYHW3lGR9pkdHkb7knv1U1ES1XRNVQ6k,6
|
324
|
+
omdev-0.0.0.dev387.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|