fix: separation between run and print function

This commit is contained in:
egarette@silique.fr 2024-11-28 21:36:45 +01:00
parent 1f37457b9f
commit e6a38423ef
3 changed files with 7 additions and 5 deletions

View file

@ -25,7 +25,7 @@ classifiers = [
]
dependencies = [
"rougail ~= 1.2,<2",
"rougail > 1.1,<2",
"tabulate ~= 0.9.0",
"rich ~= 13.9.3",
]

View file

@ -1,5 +1,4 @@
"""Annotate for documentation
"""
Silique (https://www.silique.fr)
Copyright (C) 2024

View file

@ -94,9 +94,12 @@ class RougailOutputDoc(Examples):
]
super().__init__()
def run(self):
def run(self) -> str:
"""Print documentation in stdout"""
print(self.gen_doc())
return self.gen_doc()
def print(self) -> None:
print(self.run())
def gen_doc(self):
"""Return documentation"""