tui-utilities 1.0.25__py3-none-any.whl → 1.0.27__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 tui-utilities might be problematic. Click here for more details.

tui_utilities/console.py CHANGED
@@ -112,51 +112,22 @@ def print(
112
112
  ):
113
113
  renderables = []
114
114
  for object in objects:
115
- if isinstance(object, Text): renderables.append(object)
116
- elif isinstance(object, (str, list)):
117
- renderables.append(_style(
118
- object = object,
119
- color = color,
120
- bold = bold,
121
- italic = italic,
122
- underline = underline,
123
- strike = strike,
124
- reverse = reverse,
125
- alignment = alignment,
126
- padding = padding,
127
- top_padding = top_padding,
128
- right_padding = right_padding,
129
- bottom_padding = bottom_padding,
130
- left_padding = left_padding,
131
- plain_text = plain_text
132
- ))
133
- elif isinstance(object, RenderableType):
134
- renderables.append(_style(
135
- object = object,
136
- alignment = alignment,
137
- padding = padding,
138
- top_padding = top_padding,
139
- right_padding = right_padding,
140
- bottom_padding = bottom_padding,
141
- left_padding = left_padding
142
- ))
143
- else:
144
- renderables.append(_style(
145
- object = str(object),
146
- color = color,
147
- bold = bold,
148
- italic = italic,
149
- underline = underline,
150
- strike = strike,
151
- reverse = reverse,
152
- alignment = alignment,
153
- padding = padding,
154
- top_padding = top_padding,
155
- right_padding = right_padding,
156
- bottom_padding = bottom_padding,
157
- left_padding = left_padding,
158
- plain_text = plain_text
159
- ))
115
+ renderables.append(_style(
116
+ object = object,
117
+ color = color,
118
+ bold = bold,
119
+ italic = italic,
120
+ underline = underline,
121
+ strike = strike,
122
+ reverse = reverse,
123
+ alignment = alignment,
124
+ padding = padding,
125
+ top_padding = top_padding,
126
+ right_padding = right_padding,
127
+ bottom_padding = bottom_padding,
128
+ left_padding = left_padding,
129
+ plain_text = plain_text
130
+ ))
160
131
  _console.print(*renderables, sep = separator, end = end, **kwargs)
161
132
 
162
133
  def input(
@@ -17,7 +17,7 @@ def _choose_option(
17
17
  return selection
18
18
 
19
19
  def menu(
20
- options_list,
20
+ options,
21
21
  title,
22
22
  title_color = "#ffffff",
23
23
  title_bold = True,
@@ -69,16 +69,16 @@ def menu(
69
69
  bottom_padding = separator_bottom_padding,
70
70
  left_padding = separator_left_padding
71
71
  )
72
- options = {}
72
+ options_dictionary = {}
73
73
  key = 1
74
- for option in options_list:
74
+ for option in options:
75
75
  match option:
76
- case "Atrás": options["A"] = option
77
- case "Salir": options["S"] = option
76
+ case "Atrás": options_dictionary["A"] = option
77
+ case "Salir": options_dictionary["S"] = option
78
78
  case _:
79
- options[str(key)] = option
79
+ options_dictionary[str(key)] = option
80
80
  key += 1
81
- return _choose_option(options, message, selection_text, error)
81
+ return _choose_option(options_dictionary, message, selection_text, error)
82
82
 
83
83
  def confirm_exit(
84
84
  message = "¿Está seguro de querer salir?",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tui_utilities
3
- Version: 1.0.25
3
+ Version: 1.0.27
4
4
  Summary: Personal-use console utilities library
5
5
  Author-email: Guido Iván Gross <grossguidoivan@gmail.com>
6
6
  License: MIT
@@ -0,0 +1,10 @@
1
+ tui_utilities/__init__.py,sha256=8WIoKhRFLM4Bcdd7W3grDoBgfSR0HFWxTsP4ON6Il-E,775
2
+ tui_utilities/console.py,sha256=ft-LTJAoIWCcyjOwlkmPg8OjCzuhNQ8N0wPJHkQHZQk,5992
3
+ tui_utilities/format.py,sha256=6Ou6aeRku1Fb5Nf0tKmCgh8CIsh3sRJZogog-f5_igc,657
4
+ tui_utilities/structure.py,sha256=ZT75tblz52nI9_2FdFCUAw1AITLjMP7pdx8hErRgWjs,5286
5
+ tui_utilities/validation.py,sha256=xybjpleTg0l7lRT0D3QuD62_RwV-r03ZTwPqO9us9Tg,6511
6
+ tui_utilities/_tlds/tlds.txt,sha256=ieHVMCtLqEoh8aiMZIZPepNdOjR3CGlO2QgH5LKCRuI,10916
7
+ tui_utilities-1.0.27.dist-info/METADATA,sha256=jc1B2efzjLYoCEc6T8rBNIjgJ9VEkuHUB1wfSvAeuuM,4250
8
+ tui_utilities-1.0.27.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
9
+ tui_utilities-1.0.27.dist-info/top_level.txt,sha256=TF1KuV0fMB1rkFRhqaCkqjprAnH-Tpc4Klsxwif5RWI,14
10
+ tui_utilities-1.0.27.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- tui_utilities/__init__.py,sha256=8WIoKhRFLM4Bcdd7W3grDoBgfSR0HFWxTsP4ON6Il-E,775
2
- tui_utilities/console.py,sha256=VEn8YpiFA81T3Tfe4Xt8xpzGMifMNC-l21uatIRdvAo,7192
3
- tui_utilities/format.py,sha256=6Ou6aeRku1Fb5Nf0tKmCgh8CIsh3sRJZogog-f5_igc,657
4
- tui_utilities/structure.py,sha256=yFbKhUagXfaFcQgyu5MX-Tjpp47aKir4K2jdJSBfdJo,5241
5
- tui_utilities/validation.py,sha256=xybjpleTg0l7lRT0D3QuD62_RwV-r03ZTwPqO9us9Tg,6511
6
- tui_utilities/_tlds/tlds.txt,sha256=ieHVMCtLqEoh8aiMZIZPepNdOjR3CGlO2QgH5LKCRuI,10916
7
- tui_utilities-1.0.25.dist-info/METADATA,sha256=gVxBVyv2MS-DXLWCwEy6Aaa_NmLXM8eLXtDUfb77V1c,4250
8
- tui_utilities-1.0.25.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
9
- tui_utilities-1.0.25.dist-info/top_level.txt,sha256=TF1KuV0fMB1rkFRhqaCkqjprAnH-Tpc4Klsxwif5RWI,14
10
- tui_utilities-1.0.25.dist-info/RECORD,,