tui-utilities 1.0.16__py3-none-any.whl → 1.0.18__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.
- tui_utilities/console.py +3 -2
- {tui_utilities-1.0.16.dist-info → tui_utilities-1.0.18.dist-info}/METADATA +1 -1
- {tui_utilities-1.0.16.dist-info → tui_utilities-1.0.18.dist-info}/RECORD +5 -5
- {tui_utilities-1.0.16.dist-info → tui_utilities-1.0.18.dist-info}/WHEEL +0 -0
- {tui_utilities-1.0.16.dist-info → tui_utilities-1.0.18.dist-info}/top_level.txt +0 -0
tui_utilities/console.py
CHANGED
|
@@ -2,6 +2,7 @@ from rich.console import Console, RenderableType
|
|
|
2
2
|
from rich.text import Text
|
|
3
3
|
from rich.align import Align
|
|
4
4
|
from rich.padding import Padding
|
|
5
|
+
from rich.protocol import is_renderable
|
|
5
6
|
import os
|
|
6
7
|
import readchar
|
|
7
8
|
|
|
@@ -74,7 +75,7 @@ def _style(
|
|
|
74
75
|
)
|
|
75
76
|
return Padding(paddable, final_padding)
|
|
76
77
|
|
|
77
|
-
if isinstance(object,
|
|
78
|
+
if is_renderable(object) and not isinstance(object, Text):
|
|
78
79
|
aligned = apply_alignment(object)
|
|
79
80
|
padded = apply_padding(aligned)
|
|
80
81
|
return padded
|
|
@@ -125,7 +126,7 @@ def print(
|
|
|
125
126
|
left_padding = left_padding,
|
|
126
127
|
plain_text = plain_text
|
|
127
128
|
))
|
|
128
|
-
elif
|
|
129
|
+
elif is_renderable(object):
|
|
129
130
|
renderables.append(_style(
|
|
130
131
|
object = object,
|
|
131
132
|
alignment = alignment,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
tui_utilities/__init__.py,sha256=8WIoKhRFLM4Bcdd7W3grDoBgfSR0HFWxTsP4ON6Il-E,775
|
|
2
|
-
tui_utilities/console.py,sha256=
|
|
2
|
+
tui_utilities/console.py,sha256=_pAnLqf_GLT-ksAiWgeFcaVi5yA3w35ZJOe9xYx8bfE,7045
|
|
3
3
|
tui_utilities/format.py,sha256=6Ou6aeRku1Fb5Nf0tKmCgh8CIsh3sRJZogog-f5_igc,657
|
|
4
4
|
tui_utilities/structure.py,sha256=yFbKhUagXfaFcQgyu5MX-Tjpp47aKir4K2jdJSBfdJo,5241
|
|
5
5
|
tui_utilities/validation.py,sha256=xybjpleTg0l7lRT0D3QuD62_RwV-r03ZTwPqO9us9Tg,6511
|
|
6
6
|
tui_utilities/_tlds/tlds.txt,sha256=ieHVMCtLqEoh8aiMZIZPepNdOjR3CGlO2QgH5LKCRuI,10916
|
|
7
|
-
tui_utilities-1.0.
|
|
8
|
-
tui_utilities-1.0.
|
|
9
|
-
tui_utilities-1.0.
|
|
10
|
-
tui_utilities-1.0.
|
|
7
|
+
tui_utilities-1.0.18.dist-info/METADATA,sha256=eU3-HD_AjD34JfUjRXUCB2wZ75aLlfg7SNbIB4uwZOs,4250
|
|
8
|
+
tui_utilities-1.0.18.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
9
|
+
tui_utilities-1.0.18.dist-info/top_level.txt,sha256=TF1KuV0fMB1rkFRhqaCkqjprAnH-Tpc4Klsxwif5RWI,14
|
|
10
|
+
tui_utilities-1.0.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|