Compare commits
No commits in common. "246ad6c7e026c73e07223060b7732763da890a2e" and "0024c2cb2adf6ab4e0397c4d967bc5ecfc71c619" have entirely different histories.
246ad6c7e0
...
0024c2cb2a
66 changed files with 8 additions and 39 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -1,14 +1,3 @@
|
||||||
## 0.2.0a45 (2026-01-21)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- doc transitive properties
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- root could be a variable
|
|
||||||
- path
|
|
||||||
|
|
||||||
## 0.2.0a44 (2026-01-14)
|
## 0.2.0a44 (2026-01-14)
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail.output_doc"
|
name = "rougail.output_doc"
|
||||||
version = "0.2.0a45"
|
version = "0.2.0a44"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "Rougail output doc"
|
description = "Rougail output doc"
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
__version__ = "0.2.0a45"
|
__version__ = "0.2.0a44"
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,6 @@ HIDDEN_PROPERTIES = [
|
||||||
"disabled",
|
"disabled",
|
||||||
]
|
]
|
||||||
|
|
||||||
DISABLED_PROPERTIES = ["disabled"]
|
|
||||||
|
|
||||||
|
|
||||||
class RougailOutputDoc(Examples, Changelog):
|
class RougailOutputDoc(Examples, Changelog):
|
||||||
"""Rougail Output Doc:
|
"""Rougail Output Doc:
|
||||||
|
|
@ -621,9 +619,9 @@ class RougailOutputDoc(Examples, Changelog):
|
||||||
elif child.information.get(f"{prop}_calculation", False):
|
elif child.information.get(f"{prop}_calculation", False):
|
||||||
annotation = self._to_string(child, prop)
|
annotation = self._to_string(child, prop)
|
||||||
if annotation is None or isinstance(annotation, bool):
|
if annotation is None or isinstance(annotation, bool):
|
||||||
if (annotation is None and prop in HIDDEN_PROPERTIES) or (annotation is True and prop in DISABLED_PROPERTIES):
|
if annotation is None and prop in HIDDEN_PROPERTIES:
|
||||||
return False, {}
|
return False, {}
|
||||||
if not annotation or prop in DISABLED_PROPERTIES:
|
if not annotation:
|
||||||
continue
|
continue
|
||||||
prop_obj = {
|
prop_obj = {
|
||||||
"type": "property",
|
"type": "property",
|
||||||
|
|
@ -853,26 +851,20 @@ class RougailOutputDoc(Examples, Changelog):
|
||||||
description = self._convert_description(option.description(uncalculated=True), "description", its_a_path=False)
|
description = self._convert_description(option.description(uncalculated=True), "description", its_a_path=False)
|
||||||
variables = [[variable_path, description, None]]
|
variables = [[variable_path, description, None]]
|
||||||
for cpath, description, identifiers in variables:
|
for cpath, description, identifiers in variables:
|
||||||
if calculation["propertyerror"] == "transitive":
|
|
||||||
if not cpath:
|
if not cpath:
|
||||||
return True
|
|
||||||
else:
|
|
||||||
print(variable_path)
|
|
||||||
continue
|
|
||||||
pass
|
|
||||||
elif not cpath:
|
|
||||||
# we cannot access to this variable so try with permissive
|
|
||||||
variable = self.true_config.forcepermissive.option(variable_path)
|
variable = self.true_config.forcepermissive.option(variable_path)
|
||||||
try:
|
try:
|
||||||
variable_value = self._get_unmodified_default_value(variable)
|
variable_value = self._get_unmodified_default_value(variable)
|
||||||
except PropertiesOptionError as err:
|
except PropertiesOptionError as err:
|
||||||
if calculation["propertyerror"] is True:
|
if calculation["propertyerror"]:
|
||||||
raise err from err
|
raise err from err
|
||||||
variable_value = value
|
variable_value = value
|
||||||
except VariableCalculationDependencyError:
|
except VariableCalculationDependencyError:
|
||||||
values.append(_("depends on an undocumented variable"))
|
values.append(_("depends on an undocumented variable"))
|
||||||
continue
|
continue
|
||||||
except AttributeError as err:
|
except AttributeError as err:
|
||||||
|
# if err.code != "option-not-found" or not calculation.get("optional", False):
|
||||||
|
# raise err from err
|
||||||
return calculation.get("default", False)
|
return calculation.get("default", False)
|
||||||
if (
|
if (
|
||||||
condition == "when"
|
condition == "when"
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
[]
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
[]
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
[]
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
[]
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
[]
|
|
||||||
Loading…
Reference in a new issue