fix: support NamespaceCalculation
This commit is contained in:
parent
83614a2a5e
commit
fd54b9ca00
1 changed files with 7 additions and 1 deletions
|
@ -34,6 +34,7 @@ from rougail.object_model import (
|
|||
IdentifierPropertyCalculation,
|
||||
InformationCalculation,
|
||||
IndexCalculation,
|
||||
NamespaceCalculation,
|
||||
CONVERT_OPTION,
|
||||
PROPERTY_ATTRIBUTE,
|
||||
)
|
||||
|
@ -257,7 +258,12 @@ class Annotator(Walk):
|
|||
"type": "index",
|
||||
"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):
|
||||
if values.description:
|
||||
|
|
Loading…
Reference in a new issue