diff --git a/src/rougail/output_doc/doc.py b/src/rougail/output_doc/doc.py
index f7544e585..7a7a248a4 100644
--- a/src/rougail/output_doc/doc.py
+++ b/src/rougail/output_doc/doc.py
@@ -670,7 +670,13 @@ class RougailOutputDoc(Examples):
# true_msg = _("depends on an undocumented variable")
else:
if uncalculated and not isinstance(uncalculated, Calculation):
- true_msg = _('{0} (from an undocumented variable)').format(uncalculated)
+ if isinstance(uncalculated, list):
+ uncalculated = self.formater.list(uncalculated)
+ true_msg = _('(from an undocumented variable){0}').format(uncalculated)
+ else:
+ if not isinstance(uncalculated, str):
+ uncalculated = dump(uncalculated)
+ true_msg = _('{0} (from an undocumented variable)').format(uncalculated)
else:
true_msg = _("depends on an undocumented variable")
if true_msg:
diff --git a/src/rougail/output_doc/output/console.py b/src/rougail/output_doc/output/console.py
index b7bef6357..ae5008f7e 100644
--- a/src/rougail/output_doc/output/console.py
+++ b/src/rougail/output_doc/output/console.py
@@ -93,7 +93,7 @@ class Formater(CommonFormater):
def list(
self,
choices,
- ):
+ ) -> str:
"""Display a liste of element"""
char = f"{self.enter_table}- "
ret = ""
diff --git a/src/rougail/output_doc/output/ojson.py b/src/rougail/output_doc/output/ojson.py
index ee8a564a1..008095a5a 100644
--- a/src/rougail/output_doc/output/ojson.py
+++ b/src/rougail/output_doc/output/ojson.py
@@ -41,3 +41,6 @@ class Formater:
def to_phrase(self, text: str) -> str:
return to_phrase(text)
+
+ def list(self, lst: list) -> list:
+ return lst
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_boolean.adoc b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_boolean.adoc
new file mode 100644
index 000000000..46e7a0eb6
--- /dev/null
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_boolean.adoc
@@ -0,0 +1,22 @@
+== Variables for "Rougail"
+
+[cols="1a,1a"]
+|====
+| Variable | Description
+|
+
+**rougail.var1** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `unique` `multiple` |
+A suffix variable. +
+**Default**:
+
+* val1
+* val2
+|
+
+**rougail.var2** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[boolean]` `standard` `mandatory` |
+A variable calculated. +
+**Default**: true (from an undocumented variable).
+|====
+
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_boolean.json b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_boolean.json
new file mode 100644
index 000000000..6f66247f8
--- /dev/null
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_boolean.json
@@ -0,0 +1,83 @@
+{
+ "rougail": {
+ "type": "namespace",
+ "informations": {
+ "paths": [
+ "rougail"
+ ],
+ "names": [
+ "rougail"
+ ],
+ "description": "Rougail",
+ "properties": [
+ {
+ "type": "mode",
+ "name": "standard"
+ }
+ ]
+ },
+ "children": {
+ "rougail.var1": {
+ "type": "variable",
+ "default": [
+ "val1",
+ "val2"
+ ],
+ "properties": [
+ {
+ "type": "type",
+ "name": "string"
+ },
+ {
+ "type": "mode",
+ "name": "standard"
+ },
+ {
+ "type": "property",
+ "name": "unique"
+ },
+ {
+ "type": "multiple",
+ "name": "multiple"
+ }
+ ],
+ "paths": [
+ "rougail.var1"
+ ],
+ "names": [
+ "var1"
+ ],
+ "descriptions": [
+ "A suffix variable."
+ ]
+ },
+ "rougail.var2": {
+ "type": "variable",
+ "default": "true (from an undocumented variable).",
+ "properties": [
+ {
+ "type": "type",
+ "name": "boolean"
+ },
+ {
+ "type": "mode",
+ "name": "standard"
+ },
+ {
+ "type": "property",
+ "name": "mandatory"
+ }
+ ],
+ "paths": [
+ "rougail.var2"
+ ],
+ "names": [
+ "var2"
+ ],
+ "descriptions": [
+ "A variable calculated."
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_boolean.md b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_boolean.md
new file mode 100644
index 000000000..091632ccb
--- /dev/null
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_boolean.md
@@ -0,0 +1,7 @@
+# Variables for "Rougail"
+
+| Variable | Description |
+|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| **rougail.var1**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `unique` `multiple` | A suffix variable.
**Default**:
- val1
- val2 |
+| **rougail.var2**
[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable calculated.
**Default**: true (from an undocumented variable). |
+
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_boolean.sh b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_boolean.sh
new file mode 100644
index 000000000..eb4b8fd99
--- /dev/null
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_boolean.sh
@@ -0,0 +1,17 @@
+
+
+[1;4;96mVariables for [0m[1;4;96m"Rougail"[0m
+
+
+┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
+┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃
+┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
+│ [1mrougail.var1[0m │ A suffix variable. │
+│ [1;7m string [0m [1;7m standard [0m [1;7m unique [0m [1;7m [0m │ [1mDefault[0m: │
+│ [1;7mmultiple [0m │ - val1 │
+│ │ - val2 │
+├───────────────────────────────────────┼──────────────────────────────────────┤
+│ [1mrougail.var2[0m │ A variable calculated. │
+│ [1;7m boolean [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: true (from an undocumented │
+│ │ variable). │
+└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_multi.adoc b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_multi.adoc
new file mode 100644
index 000000000..8e5c33675
--- /dev/null
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_multi.adoc
@@ -0,0 +1,25 @@
+== Variables for "Rougail"
+
+[cols="1a,1a"]
+|====
+| Variable | Description
+|
+
+**rougail.var1** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `unique` `multiple` |
+A suffix variable. +
+**Default**:
+
+* val1
+* val2
+|
+
+**rougail.var2** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` |
+A variable calculated. +
+**Default**: (from an undocumented variable)
+
+* a value
+* a second value.
+|====
+
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_multi.json b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_multi.json
new file mode 100644
index 000000000..8473d8afa
--- /dev/null
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_multi.json
@@ -0,0 +1,91 @@
+{
+ "rougail": {
+ "type": "namespace",
+ "informations": {
+ "paths": [
+ "rougail"
+ ],
+ "names": [
+ "rougail"
+ ],
+ "description": "Rougail",
+ "properties": [
+ {
+ "type": "mode",
+ "name": "standard"
+ }
+ ]
+ },
+ "children": {
+ "rougail.var1": {
+ "type": "variable",
+ "default": [
+ "val1",
+ "val2"
+ ],
+ "properties": [
+ {
+ "type": "type",
+ "name": "string"
+ },
+ {
+ "type": "mode",
+ "name": "standard"
+ },
+ {
+ "type": "property",
+ "name": "unique"
+ },
+ {
+ "type": "multiple",
+ "name": "multiple"
+ }
+ ],
+ "paths": [
+ "rougail.var1"
+ ],
+ "names": [
+ "var1"
+ ],
+ "descriptions": [
+ "A suffix variable."
+ ]
+ },
+ "rougail.var2": {
+ "type": "variable",
+ "default": "(from an undocumented variable)['a value', 'a second value'].",
+ "properties": [
+ {
+ "type": "type",
+ "name": "string"
+ },
+ {
+ "type": "mode",
+ "name": "standard"
+ },
+ {
+ "type": "property",
+ "name": "mandatory"
+ },
+ {
+ "type": "property",
+ "name": "unique"
+ },
+ {
+ "type": "multiple",
+ "name": "multiple"
+ }
+ ],
+ "paths": [
+ "rougail.var2"
+ ],
+ "names": [
+ "var2"
+ ],
+ "descriptions": [
+ "A variable calculated."
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_multi.md b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_multi.md
new file mode 100644
index 000000000..51ecfd8bf
--- /dev/null
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_multi.md
@@ -0,0 +1,7 @@
+# Variables for "Rougail"
+
+| Variable | Description |
+|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| **rougail.var1**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `unique` `multiple` | A suffix variable.
**Default**:
- val1
- val2 |
+| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | A variable calculated.
**Default**: (from an undocumented variable)
- a value
- a second value. |
+
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_multi.sh b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_multi.sh
new file mode 100644
index 000000000..90cdadd26
--- /dev/null
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_hidden_multi.sh
@@ -0,0 +1,19 @@
+
+
+[1;4;96mVariables for [0m[1;4;96m"Rougail"[0m
+
+
+┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
+┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃
+┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
+│ [1mrougail.var1[0m │ A suffix variable. │
+│ [1;7m string [0m [1;7m standard [0m [1;7m unique [0m [1;7m [0m │ [1mDefault[0m: │
+│ [1;7mmultiple [0m │ - val1 │
+│ │ - val2 │
+├───────────────────────────────────────┼──────────────────────────────────────┤
+│ [1mrougail.var2[0m │ A variable calculated. │
+│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m [1;7m [0m │ [1mDefault[0m: (from an undocumented │
+│ [1;7munique [0m [1;7m multiple [0m │ variable) │
+│ │ - a value │
+│ │ - a second value. │
+└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test_namespace/warnings_60_5family_dynamic_calc_suffix_hidden_boolean b/tests/results/test_namespace/warnings_60_5family_dynamic_calc_suffix_hidden_boolean
new file mode 100644
index 000000000..0637a088a
--- /dev/null
+++ b/tests/results/test_namespace/warnings_60_5family_dynamic_calc_suffix_hidden_boolean
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/tests/results/test_namespace/warnings_60_5family_dynamic_calc_suffix_hidden_multi b/tests/results/test_namespace/warnings_60_5family_dynamic_calc_suffix_hidden_multi
new file mode 100644
index 000000000..0637a088a
--- /dev/null
+++ b/tests/results/test_namespace/warnings_60_5family_dynamic_calc_suffix_hidden_multi
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/tests/results/test_namespace_examples/60_5family_dynamic_calc_suffix_hidden_boolean.md b/tests/results/test_namespace_examples/60_5family_dynamic_calc_suffix_hidden_boolean.md
new file mode 100644
index 000000000..5fdcb960a
--- /dev/null
+++ b/tests/results/test_namespace_examples/60_5family_dynamic_calc_suffix_hidden_boolean.md
@@ -0,0 +1,10 @@
+# Example with all variables modifiable
+
+```yaml
+---
+rougail:
+ var1:
+ - val1
+ - val2
+ var2: true
+```
diff --git a/tests/results/test_namespace_examples/60_5family_dynamic_calc_suffix_hidden_multi.md b/tests/results/test_namespace_examples/60_5family_dynamic_calc_suffix_hidden_multi.md
new file mode 100644
index 000000000..3987eb44c
--- /dev/null
+++ b/tests/results/test_namespace_examples/60_5family_dynamic_calc_suffix_hidden_multi.md
@@ -0,0 +1,12 @@
+# Example with all variables modifiable
+
+```yaml
+---
+rougail:
+ var1:
+ - val1
+ - val2
+ var2:
+ - a value
+ - a second value
+```
diff --git a/tests/results/test_namespace_examples/warnings_60_5family_dynamic_calc_suffix_hidden_boolean b/tests/results/test_namespace_examples/warnings_60_5family_dynamic_calc_suffix_hidden_boolean
new file mode 100644
index 000000000..0637a088a
--- /dev/null
+++ b/tests/results/test_namespace_examples/warnings_60_5family_dynamic_calc_suffix_hidden_boolean
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/tests/results/test_namespace_examples/warnings_60_5family_dynamic_calc_suffix_hidden_multi b/tests/results/test_namespace_examples/warnings_60_5family_dynamic_calc_suffix_hidden_multi
new file mode 100644
index 000000000..0637a088a
--- /dev/null
+++ b/tests/results/test_namespace_examples/warnings_60_5family_dynamic_calc_suffix_hidden_multi
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/tests/test_load.py b/tests/test_load.py
index a002a85c2..2f36057c2 100644
--- a/tests/test_load.py
+++ b/tests/test_load.py
@@ -20,8 +20,7 @@ excludes = [
]
test_ok = get_structures_list(excludes)
-# test_ok = [Path('../rougail-tests/structures/04_5validators')]
-
+# test_ok = [HERE.parent.parent / "rougail-tests" / "structures" / "60_5family_dynamic_calc_suffix_hidden"]
os.environ['COLUMNS'] = '80'