Compare commits
No commits in common. "bc286355230f31636988536720e02b30c1af03fc" and "1ef52a2e07186ed8bb7cb6d8c5241d49cb1ea9c3" have entirely different histories.
bc28635523
...
1ef52a2e07
4 changed files with 13 additions and 12 deletions
|
|
@ -1,9 +1,3 @@
|
||||||
## 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.0a15"
|
version = "0.2.0a14"
|
||||||
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,11 +105,17 @@ class RougailOutputConsole:
|
||||||
else:
|
else:
|
||||||
current_options.setdefault(None, []).append(description)
|
current_options.setdefault(None, []).append(description)
|
||||||
if options:
|
if options:
|
||||||
self.errors.append({_("The following variables are mandatory but have no value:"): options})
|
self.errors.append(
|
||||||
|
_("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:
|
||||||
|
|
@ -219,8 +225,9 @@ 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:
|
||||||
self.display_error(tree, error)
|
sub_tree = self.display_error(sub_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.0a15"
|
__version__ = "0.2.0a14"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue