feat: keep forced_descriptions information (mostly for rougail-output-doc)
This commit is contained in:
parent
5d8278acf8
commit
4df2b013df
4 changed files with 5 additions and 7 deletions
|
|
@ -122,6 +122,7 @@ class Annotator(Walk):
|
|||
for family in self.get_families():
|
||||
if not family.description:
|
||||
family.description = family.name
|
||||
self.objectspace.forced_descriptions.append(family.path)
|
||||
if family.type == "dynamic" and isinstance(
|
||||
family.dynamic, VariableCalculation
|
||||
):
|
||||
|
|
|
|||
|
|
@ -232,6 +232,7 @@ class Annotator(Walk): # pylint: disable=R0903
|
|||
# variable without description: description is the name
|
||||
if not variable.description:
|
||||
variable.description = variable.name
|
||||
self.objectspace.forced_descriptions.append(variable.path)
|
||||
if variable.type is None:
|
||||
variable.type = "string"
|
||||
self.objectspace.informations.add(variable.path, "type", variable.type)
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ class ParserVariable:
|
|||
self.dynamics_variable = {}
|
||||
self.multis = {}
|
||||
self.default_multi = {}
|
||||
self.forced_descriptions = []
|
||||
self.jinja = {}
|
||||
#
|
||||
self.convert_options = list(CONVERT_OPTION)
|
||||
|
|
|
|||
|
|
@ -283,8 +283,9 @@ class UserDatas:
|
|||
def _populate_error_warnings(self):
|
||||
# we don't find variable, apply value just to get error or warning messages
|
||||
for path, options in self.values.items():
|
||||
if "{{ identifier }}" in path:
|
||||
continue
|
||||
value = options["values"]
|
||||
|
||||
if options.get('secret_manager'):
|
||||
option = self.config.forcepermissive.option(path)
|
||||
else:
|
||||
|
|
@ -431,13 +432,7 @@ class UserDatas:
|
|||
if is_secret_manager and isinstance(value, tuple):
|
||||
# it's a function
|
||||
value = value[0](*value[1:], option=option, warnings=self.warnings, errors=self.errors)
|
||||
if is_secret_manager and "hidden" in option.property.get():
|
||||
option.permissive.add("hidden")
|
||||
option.permissive.add("frozen")
|
||||
option.value.set(value)
|
||||
if is_secret_manager and "hidden" in option.property.get():
|
||||
option.permissive.remove("hidden")
|
||||
option.permissive.remove("frozen")
|
||||
|
||||
|
||||
def convert_value(option, value):
|
||||
|
|
|
|||
Loading…
Reference in a new issue