@@ -455,7 +455,7 @@ def getParameters(self, names=None): # 5
455455 elif isinstance (names , str ):
456456 return [self .paramlist .get (names , "NotExist" )]
457457 elif isinstance (names , list ):
458- return ( [self .paramlist .get (x , "NotExist" ) for x in names ])
458+ return [self .paramlist .get (x , "NotExist" ) for x in names ]
459459
460460 raise ModelicaSystemError ("Unhandled input for getParameters()" )
461461
@@ -483,7 +483,7 @@ def getInputs(self, names=None): # 6
483483 elif isinstance (names , str ):
484484 return [self .inputlist .get (names , "NotExist" )]
485485 elif isinstance (names , list ):
486- return ( [self .inputlist .get (x , "NotExist" ) for x in names ])
486+ return [self .inputlist .get (x , "NotExist" ) for x in names ]
487487
488488 raise ModelicaSystemError ("Unhandled input for getInputs()" )
489489
@@ -502,7 +502,7 @@ def getOutputs(self, names=None): # 7
502502 elif isinstance (names , str ):
503503 return [self .outputlist .get (names , "NotExist" )]
504504 else :
505- return ( [self .outputlist .get (x , "NotExist" ) for x in names ])
505+ return [self .outputlist .get (x , "NotExist" ) for x in names ]
506506 else :
507507 if names is None :
508508 for i in self .outputlist :
@@ -515,7 +515,7 @@ def getOutputs(self, names=None): # 7
515515 self .outputlist [names ] = value [0 ][- 1 ]
516516 return [self .outputlist .get (names )]
517517 else :
518- return ( names , " is not Output" )
518+ return names , " is not Output"
519519 elif isinstance (names , list ):
520520 valuelist = []
521521 for i in names :
@@ -524,7 +524,7 @@ def getOutputs(self, names=None): # 7
524524 self .outputlist [i ] = value [0 ][- 1 ]
525525 valuelist .append (value [0 ][- 1 ])
526526 else :
527- return ( i , "is not Output" )
527+ return i , "is not Output"
528528 return valuelist
529529
530530 raise ModelicaSystemError ("Unhandled input for getOutputs()" )
@@ -543,7 +543,7 @@ def getSimulationOptions(self, names=None): # 8
543543 elif isinstance (names , str ):
544544 return [self .simulateOptions .get (names , "NotExist" )]
545545 elif isinstance (names , list ):
546- return ( [self .simulateOptions .get (x , "NotExist" ) for x in names ])
546+ return [self .simulateOptions .get (x , "NotExist" ) for x in names ]
547547
548548 raise ModelicaSystemError ("Unhandled input for getSimulationOptions()" )
549549
@@ -561,7 +561,7 @@ def getLinearizationOptions(self, names=None): # 9
561561 elif isinstance (names , str ):
562562 return [self .linearOptions .get (names , "NotExist" )]
563563 elif isinstance (names , list ):
564- return ( [self .linearOptions .get (x , "NotExist" ) for x in names ])
564+ return [self .linearOptions .get (x , "NotExist" ) for x in names ]
565565
566566 raise ModelicaSystemError ("Unhandled input for getLinearizationOptions()" )
567567
@@ -577,7 +577,7 @@ def getOptimizationOptions(self, names=None): # 10
577577 elif isinstance (names , str ):
578578 return [self .optimizeOptions .get (names , "NotExist" )]
579579 elif isinstance (names , list ):
580- return ( [self .optimizeOptions .get (x , "NotExist" ) for x in names ])
580+ return [self .optimizeOptions .get (x , "NotExist" ) for x in names ]
581581
582582 raise ModelicaSystemError ("Unhandled input for getOptimizationOptions()" )
583583
@@ -769,7 +769,7 @@ def setParameters(self, pvals): # 14
769769
770770 def isParameterChangeable (self , name , value ):
771771 q = self .getQuantities (name )
772- if ( q [0 ]["changeable" ] == "false" ) :
772+ if q [0 ]["changeable" ] == "false" :
773773 if self ._verbose :
774774 logger .info ("setParameters() failed : It is not possible to set "
775775 f'the following signal "{ name } ", It seems to be structural, final, '
@@ -838,10 +838,10 @@ def setInputs(self, name): # 15
838838 value = var .split ("=" )
839839 if value [0 ] in self .inputlist :
840840 tmpvalue = eval (value [1 ])
841- if ( isinstance (tmpvalue , int ) or isinstance (tmpvalue , float ) ):
841+ if isinstance (tmpvalue , int ) or isinstance (tmpvalue , float ):
842842 self .inputlist [value [0 ]] = [(float (self .simulateOptions ["startTime" ]), float (value [1 ])),
843843 (float (self .simulateOptions ["stopTime" ]), float (value [1 ]))]
844- elif ( isinstance (tmpvalue , list ) ):
844+ elif isinstance (tmpvalue , list ):
845845 self .checkValidInputs (tmpvalue )
846846 self .inputlist [value [0 ]] = tmpvalue
847847 self .inputFlag = True
@@ -917,7 +917,7 @@ def createCSVData(self):
917917 t2 = i [ind + 1 ][0 ]
918918 u2 = i [ind + 1 ][1 ]
919919 nex = 2
920- while ( u2 == '?' ) :
920+ while u2 == '?' :
921921 u2 = i [ind + nex ][1 ]
922922 t2 = i [ind + nex ][0 ]
923923 nex += 1
0 commit comments