console-window 1.0.3__tar.gz → 1.0.4__tar.gz
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.
- {console_window-1.0.3 → console_window-1.0.4}/PKG-INFO +1 -1
- {console_window-1.0.3 → console_window-1.0.4}/console_window/ConsoleWindow.py +9 -8
- {console_window-1.0.3 → console_window-1.0.4}/pyproject.toml +1 -1
- {console_window-1.0.3 → console_window-1.0.4}/.gitignore +0 -0
- {console_window-1.0.3 → console_window-1.0.4}/LICENSE +0 -0
- {console_window-1.0.3 → console_window-1.0.4}/README.md +0 -0
- {console_window-1.0.3 → console_window-1.0.4}/console_window/__init__.py +0 -0
|
@@ -227,18 +227,19 @@ class OptionSpinner:
|
|
|
227
227
|
# get / coerce the current value
|
|
228
228
|
value = self.get_value(ns.attr)
|
|
229
229
|
assert value is not None, f'cannot get value of {repr(ns.attr)}'
|
|
230
|
-
choices = ns.vals if ns.vals else [value]
|
|
231
230
|
|
|
232
231
|
colon = '' if ns.category == 'action' else ':'
|
|
233
232
|
win.add_body(f'{ns.descr:>{self.align}}{colon} ')
|
|
234
233
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
shown =
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
234
|
+
if ns.category in ('cycle', 'prompt'):
|
|
235
|
+
choices = ns.vals if ns.vals else [value]
|
|
236
|
+
for choice in choices:
|
|
237
|
+
shown = f'{choice}'
|
|
238
|
+
if isinstance(choice, bool):
|
|
239
|
+
shown = "ON" if choice else "off"
|
|
240
|
+
win.add_body(' ', resume=True)
|
|
241
|
+
win.add_body(shown, resume=True,
|
|
242
|
+
attr=curses.A_REVERSE if choice == value else None)
|
|
242
243
|
|
|
243
244
|
for comment in ns.comments:
|
|
244
245
|
win.add_body(f'{"":>{self.align}}: {comment}')
|
|
@@ -23,7 +23,7 @@ name = "console_window"
|
|
|
23
23
|
# UNIFIED PROJECT METADATA (Replaces [tool.flit.metadata])
|
|
24
24
|
[project]
|
|
25
25
|
name = "console-window"
|
|
26
|
-
version = "1.0.
|
|
26
|
+
version = "1.0.4"
|
|
27
27
|
description = "A robust curses wrapper for creating Text User Interfaces (TUIs)."
|
|
28
28
|
readme = "README.md"
|
|
29
29
|
requires-python = ">=3.8"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|