remove todict
This commit is contained in:
@ -32,9 +32,6 @@ from .annotator import CONVERT_OPTION
|
||||
from .objspace import RootRougailObject
|
||||
|
||||
|
||||
FUNC_TO_DICT = ['calc_value']
|
||||
|
||||
|
||||
class Root(): # pylint: disable=R0903
|
||||
"""Root classes
|
||||
"""
|
||||
@ -275,6 +272,8 @@ class Variable(Common):
|
||||
if hasattr(self.elt, key):
|
||||
keys[key] = getattr(self.elt, key)
|
||||
for key, value in CONVERT_OPTION[self.elt.type].get('initkwargs', {}).items():
|
||||
if isinstance(value, str):
|
||||
value = f"'{value}'"
|
||||
keys[key] = value
|
||||
|
||||
def calculation_value(self,
|
||||
@ -329,7 +328,6 @@ class Variable(Common):
|
||||
"""build variable parameters
|
||||
"""
|
||||
option_name = param.text.reflector_object.get()
|
||||
todict = function in FUNC_TO_DICT
|
||||
params = [f'{option_name}']
|
||||
if hasattr(param, 'suffix'):
|
||||
param_type = 'ParamDynOption'
|
||||
@ -338,8 +336,6 @@ class Variable(Common):
|
||||
param_type = 'ParamOption'
|
||||
if param.notraisepropertyerror:
|
||||
params.append(f'notraisepropertyerror={param.notraisepropertyerror}')
|
||||
if todict:
|
||||
params.append(f'todict={todict}')
|
||||
return "{}({})".format(param_type, ', '.join(params))
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user