diff --git a/src/rougail/output_table/__init__.py b/src/rougail/output_table/__init__.py
index c902f7d..2a5ce80 100644
--- a/src/rougail/output_table/__init__.py
+++ b/src/rougail/output_table/__init__.py
@@ -1,7 +1,7 @@
"""
Silique (https://www.silique.fr)
Copyright (C) 2022-2026
-
+
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
@@ -28,10 +28,11 @@ from .i18n import _
from .__version__ import __version__
-TABULATE = {"console": "heavy_grid",
- "html": "unsafehtml",
- }
-ENTER = {"github": '
'}
+TABULATE = {
+ "console": "heavy_grid",
+ "html": "unsafehtml",
+}
+ENTER = {"github": "
"}
class RougailOutputTable:
@@ -75,13 +76,17 @@ class RougailOutputTable:
self.output_format = TABULATE[self.output_format]
self.columns = self.rougailconfig["table.columns"].copy()
self.first_column = self.rougailconfig["table.first_column"]
- if self.first_column == 'namespace':
+ if self.first_column == "namespace":
if self.support_namespace:
- self.columns.insert(0, 'namespace')
+ self.columns.insert(0, "namespace")
else:
- self.columns.insert(0, 'description')
+ self.columns.insert(0, "description")
for option in self.config:
- if self.support_namespace and self.first_column == 'namespace' and option.group_type() is groups.namespace:
+ if (
+ self.support_namespace
+ and self.first_column == "namespace"
+ and option.group_type() is groups.namespace
+ ):
namespace = option.description()
else:
namespace = ""
@@ -122,20 +127,24 @@ class RougailOutputTable:
def manage(self, option, namespace):
if option.isoptiondescription():
self.walk(option, namespace)
- tags = option.information.get('tags', [])
+ tags = option.information.get("tags", [])
if not tags:
return
for col in self.columns:
if col in tags:
value = option.value.get()
- if self.first_column == 'namespace':
+ if self.first_column == "namespace":
key = namespace
else:
key = option.description()
if isinstance(value, list):
- self.datas.setdefault(key, {}).setdefault(col, []).extend([str(val) for val in value])
+ self.datas.setdefault(key, {}).setdefault(col, []).extend(
+ [str(val) for val in value]
+ )
else:
- self.datas.setdefault(key, {}).setdefault(col, []).append(str(value))
+ self.datas.setdefault(key, {}).setdefault(col, []).append(
+ str(value)
+ )
self.datas[key][self.first_column] = [key]
diff --git a/src/rougail/output_table/config.py b/src/rougail/output_table/config.py
index a69e4be..e9822d1 100644
--- a/src/rougail/output_table/config.py
+++ b/src/rougail/output_table/config.py
@@ -76,4 +76,5 @@ table:
"level": 60,
}
+
__all__ = ("get_rougail_config",)