Compare commits
2 commits
1ef52a2e07
...
bc28635523
| Author | SHA1 | Date | |
|---|---|---|---|
| bc28635523 | |||
| 7733d6240f |
4 changed files with 12 additions and 13 deletions
|
|
@ -1,3 +1,9 @@
|
||||||
|
## 0.2.0a15 (2025-10-16)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- error format
|
||||||
|
|
||||||
## 0.2.0a14 (2025-10-10)
|
## 0.2.0a14 (2025-10-10)
|
||||||
|
|
||||||
### Feat
|
### Feat
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail.output_console"
|
name = "rougail.output_console"
|
||||||
version = "0.2.0a14"
|
version = "0.2.0a15"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "Rougail output console"
|
description = "Rougail output console"
|
||||||
|
|
|
||||||
|
|
@ -105,17 +105,11 @@ class RougailOutputConsole:
|
||||||
else:
|
else:
|
||||||
current_options.setdefault(None, []).append(description)
|
current_options.setdefault(None, []).append(description)
|
||||||
if options:
|
if options:
|
||||||
self.errors.append(
|
self.errors.append({_("The following variables are mandatory but have no value:"): options})
|
||||||
_("The following variables are mandatory but have no value:")
|
|
||||||
)
|
|
||||||
self.errors.append(options)
|
|
||||||
elif options_with_error:
|
elif options_with_error:
|
||||||
self.errors.append(
|
self.errors.append({_(
|
||||||
_(
|
|
||||||
"The following variables are inaccessible but are empty and mandatory:"
|
"The following variables are inaccessible but are empty and mandatory:"
|
||||||
)
|
): self.errors.append([option.description() for option in options_with_error])})
|
||||||
)
|
|
||||||
self.errors.append([option.description() for option in options_with_error])
|
|
||||||
|
|
||||||
def exporter(self) -> bool:
|
def exporter(self) -> bool:
|
||||||
if self.is_mandatory:
|
if self.is_mandatory:
|
||||||
|
|
@ -225,9 +219,8 @@ class RougailOutputConsole:
|
||||||
f"[bold][bright_red]:stop_sign: {_('ERRORS')}[/bright_red][/bold]",
|
f"[bold][bright_red]:stop_sign: {_('ERRORS')}[/bright_red][/bold]",
|
||||||
guide_style="bold bright_red",
|
guide_style="bold bright_red",
|
||||||
)
|
)
|
||||||
sub_tree = tree
|
|
||||||
for error in errors:
|
for error in errors:
|
||||||
sub_tree = self.display_error(sub_tree, error)
|
self.display_error(tree, error)
|
||||||
self.out.append(tree)
|
self.out.append(tree)
|
||||||
|
|
||||||
def display_error(self, tree, error):
|
def display_error(self, tree, error):
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
__version__ = "0.2.0a14"
|
__version__ = "0.2.0a15"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue