Compare commits

...

2 commits

4 changed files with 12 additions and 5 deletions

View file

@ -1,3 +1,9 @@
## 0.1.0a22 (2025-11-21)
### Fix
- ExtentionError => ExtensionError
## 0.1.0a21 (2025-11-06)
### Feat

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project]
name = "rougail.output_formatter"
version = "0.1.0a21"
version = "0.1.0a22"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md"
description = "Rougail output formatter"

View file

@ -55,6 +55,7 @@ from rougail.convert.object_model import (
)
from rougail.tiramisu import normalize_family, RENAME_TYPE
from rougail.utils import undefined
from rougail.error import ExtensionError
from .upgrade import RougailUpgrade
from .i18n import _
@ -114,7 +115,7 @@ class RougailOutputFormatter:
rougailconfig["step.output"] = self.output_name
self.rougailconfig = rougailconfig
if self.rougailconfig["step.output"] != self.output_name:
raise ExtentionError(
raise ExtensionError(
_('the "step.output" is not set to "{0}"').format(self.output_name)
)
# yaml.top_level_colon_align = True
@ -163,10 +164,10 @@ class RougailOutputFormatter:
def upgrade(self) -> None:
filenames = self.rougailconfig["main_structural_directories"]
if len(filenames) > 1:
raise Exception(_("only one file is allowed"))
raise ExtensionError(_('only one filename is allowed, not "{0}"').format(filenames))
filename = Path(filenames[0])
if not filename.is_file():
raise Exception(_("only a file is allowed"))
raise ExtensionError(_('"{0}" is not a valid file, but only a file is allowed').format(filename))
self.version_name, self.original_yaml = RougailUpgrade(self.rougailconfig).run(
filename

View file

@ -1 +1 @@
__version__ = "0.1.0a21"
__version__ = "0.1.0a22"