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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: console-window
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: A robust curses wrapper for creating Text User Interfaces (TUIs).
5
5
  Author-email: Joe Defen <joedef@duck.com>
6
6
  Requires-Python: >=3.8
@@ -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
- for choice in choices:
236
- shown = f'{choice}'
237
- if isinstance(choice, bool):
238
- shown = "ON" if choice else "off"
239
- win.add_body(' ', resume=True)
240
- win.add_body(shown, resume=True,
241
- attr=curses.A_REVERSE if choice == value else None)
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.3"
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