tui-utilities 1.0.28__py3-none-any.whl → 1.0.29__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.

@@ -61,7 +61,7 @@ def _build_email_pattern():
61
61
  def check_if_empty(list, message = "La lista está vacía"):
62
62
  if not list:
63
63
  clear_console()
64
- print(f"\n{message}", color = "#ff0000")
64
+ print(f"\n{message}\n", color = "#ff0000")
65
65
  wait_for_key()
66
66
  return True
67
67
  return False
@@ -73,7 +73,7 @@ def validate_string(
73
73
  while True:
74
74
  string = input(text = message, bold = True)
75
75
  if string: return string
76
- print(f"\n{blank_error}", color = "#ff0000")
76
+ print(f"\n{blank_error}\n", color = "#ff0000")
77
77
 
78
78
  def validate_integer(
79
79
  message = "Ingrese un número: ",
@@ -84,12 +84,12 @@ def validate_integer(
84
84
  while True:
85
85
  integer = input(text = message, bold = True)
86
86
  if not integer:
87
- print(f"\n{blank_error}", color = "#ff0000")
87
+ print(f"\n{blank_error}\n", color = "#ff0000")
88
88
  continue
89
89
  if pattern.match(integer):
90
90
  unformatted_integer = integer.replace(".", "")
91
91
  return int(unformatted_integer)
92
- print(f"\n{invalid_error}", color = "#ff0000")
92
+ print(f"\n{invalid_error}\n", color = "#ff0000")
93
93
 
94
94
  def validate_double(
95
95
  message = "Ingrese un número: ",
@@ -100,12 +100,12 @@ def validate_double(
100
100
  while True:
101
101
  double = input(text = message, bold = True)
102
102
  if not double:
103
- print(f"\n{blank_error}", color = "#ff0000")
103
+ print(f"\n{blank_error}\n", color = "#ff0000")
104
104
  continue
105
105
  if pattern.match(double):
106
106
  unformatted_double = double.replace(".", "").replace(",", ".")
107
107
  return float(unformatted_double)
108
- print(f"\n{invalid_error}", color = "#ff0000")
108
+ print(f"\n{invalid_error}\n", color = "#ff0000")
109
109
 
110
110
  def validate_date(
111
111
  message = "Ingrese una fecha: ",
@@ -116,13 +116,13 @@ def validate_date(
116
116
  while True:
117
117
  date_string = input(text = message, bold = True)
118
118
  if not date_string:
119
- print(f"\n{blank_error}", color = "#ff0000")
119
+ print(f"\n{blank_error}\n", color = "#ff0000")
120
120
  continue
121
121
  if pattern.match(date_string):
122
122
  date_part, time_part = date_string.split(" - ")
123
123
  date_part = date_part.replace(".", "")
124
124
  return datetime.strptime(f"{date_part} - {time_part}", "%d/%m/%Y - %H:%M")
125
- print(f"\n{invalid_error}", color = "#ff0000")
125
+ print(f"\n{invalid_error}\n", color = "#ff0000")
126
126
 
127
127
  def validate_id(
128
128
  message = "Ingrese un número de D.N.I.: ",
@@ -133,10 +133,10 @@ def validate_id(
133
133
  while True:
134
134
  id = input(text = message, bold = True)
135
135
  if not id:
136
- print(f"\n{blank_error}", color = "#ff0000")
136
+ print(f"\n{blank_error}\n", color = "#ff0000")
137
137
  continue
138
138
  if pattern.match(id): return id
139
- print(f"\n{invalid_error}", color = "#ff0000")
139
+ print(f"\n{invalid_error}\n", color = "#ff0000")
140
140
 
141
141
  def validate_cellphone_number(
142
142
  message = "Ingrese un número telefónico: ",
@@ -147,10 +147,10 @@ def validate_cellphone_number(
147
147
  while True:
148
148
  cellphone_number = input(text = message, bold = True)
149
149
  if not cellphone_number:
150
- print(f"\n{blank_error}", color = "#ff0000")
150
+ print(f"\n{blank_error}\n", color = "#ff0000")
151
151
  continue
152
152
  if pattern.match(cellphone_number): return cellphone_number
153
- print(f"\n{invalid_error}", color = "#ff0000")
153
+ print(f"\n{invalid_error}\n", color = "#ff0000")
154
154
 
155
155
  def validate_email(
156
156
  message = "Ingrese el correo electrónico: ",
@@ -161,7 +161,7 @@ def validate_email(
161
161
  while True:
162
162
  email = input(text = message, bold = True)
163
163
  if not email:
164
- print(f"\n{blank_error}", color = "#ff0000")
164
+ print(f"\n{blank_error}\n", color = "#ff0000")
165
165
  continue
166
166
  if pattern.match(email): return email
167
- print(f"\n{invalid_error}", color = "#ff0000")
167
+ print(f"\n{invalid_error}\n", color = "#ff0000")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tui_utilities
3
- Version: 1.0.28
3
+ Version: 1.0.29
4
4
  Summary: Personal-use console utilities library
5
5
  Author-email: Guido Iván Gross <grossguidoivan@gmail.com>
6
6
  License: MIT
@@ -2,9 +2,9 @@ tui_utilities/__init__.py,sha256=8WIoKhRFLM4Bcdd7W3grDoBgfSR0HFWxTsP4ON6Il-E,775
2
2
  tui_utilities/console.py,sha256=huYmaPh13zUg43rGhEnoy7MHwH5er7kdXHmZpq9Qb74,5997
3
3
  tui_utilities/format.py,sha256=6Ou6aeRku1Fb5Nf0tKmCgh8CIsh3sRJZogog-f5_igc,657
4
4
  tui_utilities/structure.py,sha256=04px4ME1WuLxEGSKZsg3oAorIFayLhbUKgP3R_H3R1I,5284
5
- tui_utilities/validation.py,sha256=HmUp4KtVorIHj0Uk7cEPO62aj3lrPyrsaeqbgf5lUY0,6474
5
+ tui_utilities/validation.py,sha256=DGaVjTiLAsdG3wFIuiYWg9vRZZ5R0OgBB8cxWg-riZ8,6502
6
6
  tui_utilities/_tlds/tlds.txt,sha256=ieHVMCtLqEoh8aiMZIZPepNdOjR3CGlO2QgH5LKCRuI,10916
7
- tui_utilities-1.0.28.dist-info/METADATA,sha256=qAdF28hNRG4WZCme65keJhr4R-fz3lqYIpHmxNhcaE0,4250
8
- tui_utilities-1.0.28.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
9
- tui_utilities-1.0.28.dist-info/top_level.txt,sha256=TF1KuV0fMB1rkFRhqaCkqjprAnH-Tpc4Klsxwif5RWI,14
10
- tui_utilities-1.0.28.dist-info/RECORD,,
7
+ tui_utilities-1.0.29.dist-info/METADATA,sha256=ol-ZWfjcKqHi-mpe7SWWzLAbGByXm0zGNfK50FEQzGA,4250
8
+ tui_utilities-1.0.29.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
9
+ tui_utilities-1.0.29.dist-info/top_level.txt,sha256=TF1KuV0fMB1rkFRhqaCkqjprAnH-Tpc4Klsxwif5RWI,14
10
+ tui_utilities-1.0.29.dist-info/RECORD,,