urwid 2.6.13__py3-none-any.whl → 2.6.14__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 urwid might be problematic. Click here for more details.

urwid/version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '2.6.13'
16
- __version_tuple__ = version_tuple = (2, 6, 13)
15
+ __version__ = version = '2.6.14'
16
+ __version_tuple__ = version_tuple = (2, 6, 14)
urwid/widget/grid_flow.py CHANGED
@@ -30,13 +30,18 @@ class GridFlowWarning(WidgetWarning):
30
30
 
31
31
  class GridFlow(WidgetWrap[Pile], WidgetContainerMixin, WidgetContainerListContentsMixin):
32
32
  """
33
- The GridFlow widget is a flow widget that renders all the widgets it
34
- contains the same width and it arranges them from left to right and top to
35
- bottom.
33
+ The GridFlow widget is a flow widget that renders all the widgets it contains the same width,
34
+ and it arranges them from left to right and top to bottom.
36
35
  """
37
36
 
38
37
  def sizing(self) -> frozenset[Sizing]:
39
- return frozenset((Sizing.FLOW, Sizing.FIXED))
38
+ """Widget sizing.
39
+
40
+ ..note:: Empty widget sizing is limited to the FLOW due to no data for width.
41
+ """
42
+ if self:
43
+ return frozenset((Sizing.FLOW, Sizing.FIXED))
44
+ return frozenset((Sizing.FLOW,))
40
45
 
41
46
  def __init__(
42
47
  self,
@@ -422,14 +427,16 @@ class GridFlow(WidgetWrap[Pile], WidgetContainerMixin, WidgetContainerListConten
422
427
  def _get_maxcol(self, size: tuple[int] | tuple[()]) -> int:
423
428
  if size:
424
429
  (maxcol,) = size
425
- if maxcol < self.cell_width:
430
+ if self and maxcol < self.cell_width:
426
431
  warnings.warn(
427
432
  f"Size is smaller than cell width ({maxcol!r} < {self.cell_width!r})",
428
433
  GridFlowWarning,
429
434
  stacklevel=3,
430
435
  )
431
- else:
436
+ elif self:
432
437
  maxcol = len(self) * self.cell_width + (len(self) - 1) * self.h_sep
438
+ else:
439
+ maxcol = 0
433
440
  return maxcol
434
441
 
435
442
  def get_display_widget(self, size: tuple[int] | tuple[()]) -> Divider | Pile:
@@ -525,7 +532,7 @@ class GridFlow(WidgetWrap[Pile], WidgetContainerMixin, WidgetContainerListConten
525
532
 
526
533
  def keypress(
527
534
  self,
528
- size: tuple[int], # type: ignore[override]
535
+ size: tuple[int] | tuple[()], # type: ignore[override]
529
536
  key: str,
530
537
  ) -> str | None:
531
538
  """
@@ -545,7 +552,10 @@ class GridFlow(WidgetWrap[Pile], WidgetContainerMixin, WidgetContainerListConten
545
552
  ) -> tuple[int, int]:
546
553
  if size:
547
554
  return super().pack(size, focus)
548
- cols = len(self) * self.cell_width + (len(self) - 1) * self.h_sep
555
+ if self:
556
+ cols = len(self) * self.cell_width + (len(self) - 1) * self.h_sep
557
+ else:
558
+ cols = 0
549
559
  return cols, self.rows((cols,), focus)
550
560
 
551
561
  def rows(self, size: tuple[int], focus: bool = False) -> int:
@@ -668,4 +668,4 @@ class ScrollBar(WidgetDecoration[WrappedWidget]):
668
668
  ow.set_scrollpos(pos + 1)
669
669
  return True
670
670
 
671
- return False
671
+ return handled
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: urwid
3
- Version: 2.6.13
3
+ Version: 2.6.14
4
4
  Summary: A full-featured console (xterm et al.) user interface library
5
5
  Home-page: https://urwid.org/
6
6
  Author-email: Ian Ward <ian@excess.org>
@@ -11,7 +11,7 @@ urwid/split_repr.py,sha256=pXzuddzQ4RnfIl537Gvoe8PVaBRHCPnxgdYvKK0qm8k,3899
11
11
  urwid/str_util.py,sha256=1ss-LHAhjXTynTVBcoSgYWIpBeN_RirqHYhP7fq7MrA,10844
12
12
  urwid/text_layout.py,sha256=lHiGfo7clmwHt5dMl_AaQSs2ov9IbY9JySTATZBm7h0,22821
13
13
  urwid/util.py,sha256=pGXnma03_IBx3v6_qN9cDWPXPj_YjkhQ9IxLjm_0TpU,15747
14
- urwid/version.py,sha256=T8eL9nv6DS-11fVwa1nS-rwGvQm8s4HSJKRd2eJV19g,413
14
+ urwid/version.py,sha256=3bjm6qWK9StytO6WlKHkLZ7Fya12zQ1QDSiXuzwk8wQ,413
15
15
  urwid/vterm.py,sha256=q9-8dxJpVr_7a0Bj_z_FYDiRgzos3IS17BjhYcy1RDw,58410
16
16
  urwid/wimp.py,sha256=o1YsjL_tBLXba8ZRr1MTHH0poLSlXT_atY3-uD_Ualg,567
17
17
  urwid/display/__init__.py,sha256=y90WbHPNRHlimPrXhzsSfFsBbBHy8QErmB1y4Xza-xo,1732
@@ -51,7 +51,7 @@ urwid/widget/divider.py,sha256=cM0gWHAqBz7E8l52CGEWWDMSVQkPNDjwy-t3ptbmh2s,3251
51
51
  urwid/widget/edit.py,sha256=qgVYeg_hX6tqRUiuLQkYwYKmWcfVLrLzAG1a5Au6S-w,23732
52
52
  urwid/widget/filler.py,sha256=EEnyAawdKXuwf79pErfNuvqsU1SVTutcMUrwWkU4wfo,14665
53
53
  urwid/widget/frame.py,sha256=AOe4FwjvwcIwrpXqyZkCwSZWwAALNl1XRMAKx6ZXYWs,21834
54
- urwid/widget/grid_flow.py,sha256=otujeOTWYDr4gwuDikBm9zZd8SUgma9yvQ1hDWI-dGk,21514
54
+ urwid/widget/grid_flow.py,sha256=PNgs6YN3-cE5ZLlPns_5rwxrSMynB7T5BZvKohSjiPA,21817
55
55
  urwid/widget/line_box.py,sha256=V750xiZtkw6_uRXLhNY91ER3pXwwrZstVv_IJUZd_YY,6884
56
56
  urwid/widget/listbox.py,sha256=EaGo13fpt4Oy9V00n27U-2PhOWa7-nmsTgnddKv9GII,74392
57
57
  urwid/widget/monitored_list.py,sha256=mZUPYB1yhuKN6su6_VjmoiE0LlTXsYxkH14pbif0tbc,19264
@@ -60,15 +60,15 @@ urwid/widget/padding.py,sha256=pBXQsnkySV1GXgveg2Ivm6SCqHiGa2YkYSjXaoCUIHk,21334
60
60
  urwid/widget/pile.py,sha256=aIzKYNrSQtbHVk_bn2PElHUiSdsO_NKnL4mTu-sXm4I,38628
61
61
  urwid/widget/popup.py,sha256=vw9_S1UC6UMy5Roc4qK8NXgH5_dDGxoHmpDAi_u9wsI,5974
62
62
  urwid/widget/progress_bar.py,sha256=HRnIu2V2_4wgsnAdrhK-GVVToyLaXRH0gtlkWllA4Mo,4767
63
- urwid/widget/scrollable.py,sha256=UjUsBABcgJZxS5DlzqjPh2mXMHk1x_vu4ga1KAgmo4g,24540
63
+ urwid/widget/scrollable.py,sha256=Smn5X1wvxm3juqFZGOOKREZS4eD4PIyZLeqWAVuAlos,24542
64
64
  urwid/widget/solid_fill.py,sha256=NZRDSRK0lP4r7gXcKDgVaKEoeOcWvtrY5k2aueQEEL4,1260
65
65
  urwid/widget/text.py,sha256=jy15hL6rCBoJdZviq2jJ-i9eO6vEcxvzCIVAZs12AUw,12187
66
66
  urwid/widget/treetools.py,sha256=5s3Dnp2PCz4wQccutmdvsTTbAROJMLehXe4moB5POY0,17387
67
67
  urwid/widget/widget.py,sha256=A0ZjvDjLqhdzelPFC96Ozo1voIoGkxftNmJh8X1IyNI,29557
68
68
  urwid/widget/widget_decoration.py,sha256=6eEPvtF7wk2n1csIBWrnXAosprFl2pZiQ7SoCpwKnJM,5736
69
69
  urwid/widget/wimp.py,sha256=4wfzTQBLMbhicSlL64hBPb-1W5FAFrIKfb43i10MKSY,27305
70
- urwid-2.6.13.dist-info/COPYING,sha256=NrbT-keRaUP9X-wxPFhHhJRgR-wTN6eLRA5ZkstZX4k,26434
71
- urwid-2.6.13.dist-info/METADATA,sha256=ccL9AgWkfyCrgHxDpQ2LbzJ-_nB4F4DdJggInGiXOeY,11043
72
- urwid-2.6.13.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
73
- urwid-2.6.13.dist-info/top_level.txt,sha256=AwxQA43kNkjHbhYELXHBKrQ01X5CR2KnDzU07cVqilY,6
74
- urwid-2.6.13.dist-info/RECORD,,
70
+ urwid-2.6.14.dist-info/COPYING,sha256=NrbT-keRaUP9X-wxPFhHhJRgR-wTN6eLRA5ZkstZX4k,26434
71
+ urwid-2.6.14.dist-info/METADATA,sha256=11Ld6T3rIMn15o5mQmpnTBP9_5Oj31gVeRZ4nv-_Hz4,11043
72
+ urwid-2.6.14.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
73
+ urwid-2.6.14.dist-info/top_level.txt,sha256=AwxQA43kNkjHbhYELXHBKrQ01X5CR2KnDzU07cVqilY,6
74
+ urwid-2.6.14.dist-info/RECORD,,
File without changes