tui-utilities 1.0.16__tar.gz → 1.0.18__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tui_utilities
3
- Version: 1.0.16
3
+ Version: 1.0.18
4
4
  Summary: Personal-use console utilities library
5
5
  Author-email: Guido Iván Gross <grossguidoivan@gmail.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tui_utilities"
3
- version = "1.0.16"
3
+ version = "1.0.18"
4
4
  description = "Personal-use console utilities library"
5
5
  readme = "README.md"
6
6
  license = {text = "MIT"}
@@ -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, RenderableType):
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 isinstance(object, RenderableType):
129
+ elif is_renderable(object):
129
130
  renderables.append(_style(
130
131
  object = object,
131
132
  alignment = alignment,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tui_utilities
3
- Version: 1.0.16
3
+ Version: 1.0.18
4
4
  Summary: Personal-use console utilities library
5
5
  Author-email: Guido Iván Gross <grossguidoivan@gmail.com>
6
6
  License: MIT
File without changes
File without changes