@@ -194,13 +194,9 @@ def __init__(self, dependent_obj: V, operator: str, value: Number):
194194 super (NumericConstraint , self ).__init__ (dependent_obj , operator = operator , value = value )
195195
196196 def _parse_operator (self , obj : V , * args , ** kwargs ) -> Number :
197- ## TODO clean when full move to new_variable
198- import easyscience .Objects .new_variable .parameter
197+ ## TODO Probably needs to be updated when DescriptorArray is implemented
199198
200- if isinstance (obj , easyscience .Objects .new_variable .parameter .Parameter ):
201- value = obj .value_no_call_back
202- else :
203- value = obj .raw_value
199+ value = obj .value_no_call_back
204200
205201 if isinstance (value , list ):
206202 value = np .array (value )
@@ -258,13 +254,7 @@ def __init__(self, dependent_obj: V, operator: str, value: str):
258254 super (SelfConstraint , self ).__init__ (dependent_obj , operator = operator , value = value )
259255
260256 def _parse_operator (self , obj : V , * args , ** kwargs ) -> Number :
261- ## TODO clean when full move to new_variable
262- import easyscience .Objects .new_variable .parameter
263-
264- if isinstance (obj , easyscience .Objects .new_variable .parameter .Parameter ):
265- value = obj .value_no_call_back
266- else :
267- value = obj .raw_value
257+ value = obj .value_no_call_back
268258
269259 self .aeval .symtable ['value1' ] = value
270260 self .aeval .symtable ['value2' ] = getattr (obj , self .value )
@@ -322,13 +312,7 @@ def __init__(self, dependent_obj: V, operator: str, independent_obj: V):
322312 self .external = True
323313
324314 def _parse_operator (self , obj : V , * args , ** kwargs ) -> Number :
325- ## TODO clean when full move to new_variable
326- import easyscience .Objects .new_variable .parameter
327-
328- if isinstance (obj , easyscience .Objects .new_variable .parameter .Parameter ):
329- value = obj .value_no_call_back
330- else :
331- value = obj .raw_value
315+ value = obj .value_no_call_back
332316
333317 self .aeval .symtable ['value1' ] = value
334318 try :
@@ -417,16 +401,11 @@ def __init__(
417401 self .external = True
418402
419403 def _parse_operator (self , independent_objs : List [V ], * args , ** kwargs ) -> Number :
420- import easyscience .Objects .new_variable .parameter
421404
422405 in_str = ''
423406 value = None
424407 for idx , obj in enumerate (independent_objs ):
425- ## TODO clean when full move to new_variable
426- if isinstance (obj , easyscience .Objects .new_variable .parameter .Parameter ):
427- self .aeval .symtable ['p' + str (self .independent_obj_ids [idx ])] = obj .value_no_call_back
428- else :
429- self .aeval .symtable ['p' + str (self .independent_obj_ids [idx ])] = obj .raw_value
408+ self .aeval .symtable ['p' + str (self .independent_obj_ids [idx ])] = obj .value_no_call_back
430409
431410 in_str += ' p' + str (self .independent_obj_ids [idx ])
432411 if idx < len (self .operator ):
@@ -485,25 +464,16 @@ def __init__(
485464 self .external = True
486465
487466 def _parse_operator (self , obj : V , * args , ** kwargs ) -> Number :
488- import easyscience .Objects .new_variable .parameter
489467
490468 self .aeval .symtable [f'f{ id (self .function )} ' ] = self .function
491469 value_str = f'r_value = f{ id (self .function )} ('
492470 if isinstance (obj , list ):
493471 for o in obj :
494- ## TODO clean when full move to new_variable
495- if isinstance (o , easyscience .Objects .new_variable .parameter .Parameter ):
496- value_str += f'{ o .value_no_call_back } ,'
497- else :
498- value_str += f'{ o .raw_value } ,'
472+ value_str += f'{ o .value_no_call_back } ,'
499473
500474 value_str = value_str [:- 1 ]
501475 else :
502- ## TODO clean when full move to new_variable
503- if isinstance (obj , easyscience .Objects .new_variable .parameter .Parameter ):
504- value_str += f'{ obj .value_no_call_back } '
505- else :
506- value_str += f'{ obj .raw_value } '
476+ value_str += f'{ obj .value_no_call_back } '
507477
508478 value_str += ')'
509479 try :
0 commit comments