fix: separation between run and print function

This commit is contained in:
egarette@silique.fr 2024-11-28 21:57:30 +01:00
parent 94c6336f5d
commit a0ccf61e22

View file

@ -77,7 +77,7 @@ class RougailOutputJson:
)
self.errors.append(f" - {option.description()}")
def exporter(self) -> bool:
def exporter(self) -> None:
self.config.property.read_write()
self.mandatory()
if self.read_write:
@ -96,11 +96,13 @@ class RougailOutputJson:
self.config,
self.dico,
)
return True
def run(self) -> None:
self.exporter()
print(dumps(self.dico, ensure_ascii=False, indent=2))
return dumps(self.dico, ensure_ascii=False, indent=2)
def print(self) -> str:
print(self.run())
def parse_family(
self,