fix: support NamespaceCalculation

This commit is contained in:
egarette@silique.fr 2025-03-29 14:37:14 +01:00
parent 83614a2a5e
commit fd54b9ca00

View file

@ -34,6 +34,7 @@ from rougail.object_model import (
IdentifierPropertyCalculation, IdentifierPropertyCalculation,
InformationCalculation, InformationCalculation,
IndexCalculation, IndexCalculation,
NamespaceCalculation,
CONVERT_OPTION, CONVERT_OPTION,
PROPERTY_ATTRIBUTE, PROPERTY_ATTRIBUTE,
) )
@ -257,7 +258,12 @@ class Annotator(Walk):
"type": "index", "type": "index",
"value": True, "value": True,
} }
raise Exception('unknown calculation "{values}"') if isinstance(values, NamespaceCalculation):
return {
"type": "namespace",
"value": True,
}
raise Exception(f'unknown calculation {type(values)} "{values}"')
def _calculation_to_information_jinja(self, values): def _calculation_to_information_jinja(self, values):
if values.description: if values.description: