personalise functions that can returns list
This commit is contained in:
@ -50,6 +50,8 @@ class Annotator(TargetAnnotator, ParamAnnotator):
|
||||
self.objectspace = objectspace
|
||||
self.functions = copy(functions)
|
||||
self.functions.extend(self.objectspace.rougailconfig['internal_functions'])
|
||||
self.calc_multi = list(CALC_MULTI)
|
||||
self.calc_multi.extend(self.objectspace.rougailconfig['multi_functions'])
|
||||
self.target_is_uniq = True
|
||||
self.only_variable = True
|
||||
self.allow_function = False
|
||||
@ -79,7 +81,7 @@ class Annotator(TargetAnnotator, ParamAnnotator):
|
||||
value = self.objectspace.value(fill.xmlfiles)
|
||||
value.type = 'calculation'
|
||||
value.name = fill.name
|
||||
if fill.name not in CALC_MULTI:
|
||||
if fill.name not in self.calc_multi:
|
||||
is_calc_multi = self.calc_is_multi(target.name)
|
||||
else:
|
||||
is_calc_multi = False
|
||||
|
@ -43,6 +43,7 @@ RougailConfig = {'dictionaries_dir': [join(ROUGAILROOT, 'dictionaries')],
|
||||
'variable_namespace': 'rougail',
|
||||
'auto_freeze_variable': 'server_deployed',
|
||||
'internal_functions': [],
|
||||
'multi_functions': [],
|
||||
'extra_annotators': [],
|
||||
'modes_level': ['basic', 'normal', 'expert'],
|
||||
'default_family_mode': 'basic',
|
||||
|
Reference in New Issue
Block a user