tui-utilities 1.0.20__tar.gz → 1.0.21__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.
Potentially problematic release.
This version of tui-utilities might be problematic. Click here for more details.
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/PKG-INFO +1 -1
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/pyproject.toml +1 -1
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/tui_utilities/console.py +4 -4
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/tui_utilities.egg-info/PKG-INFO +1 -1
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/README.md +0 -0
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/setup.cfg +0 -0
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/tui_utilities/__init__.py +0 -0
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/tui_utilities/_tlds/tlds.txt +0 -0
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/tui_utilities/format.py +0 -0
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/tui_utilities/structure.py +0 -0
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/tui_utilities/validation.py +0 -0
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/tui_utilities.egg-info/SOURCES.txt +0 -0
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/tui_utilities.egg-info/dependency_links.txt +0 -0
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/tui_utilities.egg-info/requires.txt +0 -0
- {tui_utilities-1.0.20 → tui_utilities-1.0.21}/tui_utilities.egg-info/top_level.txt +0 -0
|
@@ -2,7 +2,6 @@ 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
|
|
6
5
|
import os
|
|
7
6
|
import readchar
|
|
8
7
|
|
|
@@ -75,7 +74,7 @@ def _style(
|
|
|
75
74
|
)
|
|
76
75
|
return Padding(paddable, final_padding)
|
|
77
76
|
|
|
78
|
-
if
|
|
77
|
+
if isinstance(object, RenderableType):
|
|
79
78
|
aligned = apply_alignment(object)
|
|
80
79
|
padded = apply_padding(aligned)
|
|
81
80
|
return padded
|
|
@@ -108,7 +107,8 @@ def print(
|
|
|
108
107
|
):
|
|
109
108
|
renderables = []
|
|
110
109
|
for object in objects:
|
|
111
|
-
if isinstance(object, (
|
|
110
|
+
if isinstance(object, Text): renderables.append(object)
|
|
111
|
+
elif isinstance(object, (str, list)):
|
|
112
112
|
renderables.append(_style(
|
|
113
113
|
object = object,
|
|
114
114
|
color = color,
|
|
@@ -125,7 +125,7 @@ def print(
|
|
|
125
125
|
left_padding = left_padding,
|
|
126
126
|
plain_text = plain_text
|
|
127
127
|
))
|
|
128
|
-
elif
|
|
128
|
+
elif isinstance(object, RenderableType):
|
|
129
129
|
renderables.append(_style(
|
|
130
130
|
object = object,
|
|
131
131
|
alignment = alignment,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|