@@ -96,10 +96,11 @@ def from_array(cls, name, array, title=None, abscissa=None):
9696
9797 ##############################################
9898
99- def __new__ (cls , name , prefixed_unit , shape ,
100- dtype = float , buffer = None , offset = 0 , strides = None , order = None ,
101- title = None , abscissa = None ,
102- ):
99+ def __new__ (
100+ cls , name , prefixed_unit , shape ,
101+ dtype = float , buffer = None , offset = 0 , strides = None , order = None ,
102+ title = None , abscissa = None ,
103+ ):
103104 # Called first
104105 # cls._logger.info(str((cls, prefixed_unit, shape, dtype, buffer, offset, strides, order)))
105106
@@ -173,7 +174,8 @@ def title(self, value):
173174 ##############################################
174175
175176 def __repr__ (self ):
176- return '{0.__class__.__name__} {0._name} {1}' .format (self , super ().__str__ ())
177+ _ = super ().__str__ ()
178+ return '{self.__class__.__name__} {self._name} {_}'
177179
178180 ##############################################
179181
@@ -255,15 +257,13 @@ class Analysis:
255257 ##############################################
256258
257259 def __init__ (self , simulation , nodes = (), branches = (), elements = (), internal_parameters = ()):
258-
259260 # Fixme: branches are elements in fact, and elements is not yet supported ...
260-
261261 self ._simulation = simulation
262262 # Fixme: to func?
263- self ._nodes = {waveform .name :waveform for waveform in nodes }
264- self ._branches = {waveform .name :waveform for waveform in branches }
265- self ._elements = {waveform .name :waveform for waveform in elements }
266- self ._internal_parameters = {waveform .name :waveform for waveform in internal_parameters }
263+ self ._nodes = {waveform .name : waveform for waveform in nodes }
264+ self ._branches = {waveform .name : waveform for waveform in branches }
265+ self ._elements = {waveform .name : waveform for waveform in elements }
266+ self ._internal_parameters = {waveform .name : waveform for waveform in internal_parameters }
267267
268268 ##############################################
269269
@@ -294,7 +294,7 @@ def elements(self):
294294 def internal_parameters (self ):
295295 return self ._internal_parameters
296296
297- ##############################################
297+ ##############################################
298298
299299 def _get_item (self , name ):
300300 # Fixme: cache dict ???
@@ -343,7 +343,6 @@ def __getattr__(self, name):
343343
344344class OperatingPoint (Analysis ):
345345 """This class implements an operating point analysis."""
346- pass
347346
348347####################################################################################################
349348
@@ -376,8 +375,10 @@ class DcAnalysis(Analysis):
376375 ##############################################
377376
378377 def __init__ (self , simulation , sweep , nodes , branches , internal_parameters ):
379- super ().__init__ (simulation = simulation , nodes = nodes , branches = branches ,
380- internal_parameters = internal_parameters )
378+ super ().__init__ (
379+ simulation = simulation , nodes = nodes , branches = branches ,
380+ internal_parameters = internal_parameters ,
381+ )
381382 self ._sweep = sweep
382383
383384 ##############################################
@@ -396,8 +397,10 @@ class AcAnalysis(Analysis):
396397 ##############################################
397398
398399 def __init__ (self , simulation , frequency , nodes , branches , internal_parameters ):
399- super ().__init__ (simulation = simulation , nodes = nodes , branches = branches ,
400- internal_parameters = internal_parameters )
400+ super ().__init__ (
401+ simulation = simulation , nodes = nodes , branches = branches ,
402+ internal_parameters = internal_parameters ,
403+ )
401404 self ._frequency = frequency
402405
403406 ##############################################
@@ -416,8 +419,10 @@ class TransientAnalysis(Analysis):
416419 ##############################################
417420
418421 def __init__ (self , simulation , time , nodes , branches , internal_parameters ):
419- super ().__init__ (simulation = simulation , nodes = nodes , branches = branches ,
420- internal_parameters = internal_parameters )
422+ super ().__init__ (
423+ simulation = simulation , nodes = nodes , branches = branches ,
424+ internal_parameters = internal_parameters ,
425+ )
421426 self ._time = time
422427
423428 ##############################################
@@ -436,8 +441,10 @@ class PoleZeroAnalysis(Analysis):
436441 ##############################################
437442
438443 def __init__ (self , simulation , nodes , branches , internal_parameters ):
439- super ().__init__ (simulation = simulation , nodes = nodes , branches = branches ,
440- internal_parameters = internal_parameters )
444+ super ().__init__ (
445+ simulation = simulation , nodes = nodes , branches = branches ,
446+ internal_parameters = internal_parameters ,
447+ )
441448
442449####################################################################################################
443450
@@ -448,8 +455,10 @@ class NoiseAnalysis(Analysis):
448455 ##############################################
449456
450457 def __init__ (self , simulation , nodes , branches , internal_parameters ):
451- super ().__init__ (simulation = simulation , nodes = nodes , branches = branches ,
452- internal_parameters = internal_parameters )
458+ super ().__init__ (
459+ simulation = simulation , nodes = nodes , branches = branches ,
460+ internal_parameters = internal_parameters ,
461+ )
453462
454463####################################################################################################
455464
@@ -460,8 +469,10 @@ class DistortionAnalysis(Analysis):
460469 ##############################################
461470
462471 def __init__ (self , simulation , frequency , nodes , branches , internal_parameters ):
463- super ().__init__ (simulation = simulation , nodes = nodes , branches = branches ,
464- internal_parameters = internal_parameters )
472+ super ().__init__ (
473+ simulation = simulation , nodes = nodes , branches = branches ,
474+ internal_parameters = internal_parameters ,
475+ )
465476 self ._frequency = frequency
466477
467478 ##############################################
@@ -480,5 +491,7 @@ class TransferFunctionAnalysis(Analysis):
480491 ##############################################
481492
482493 def __init__ (self , simulation , nodes , branches , internal_parameters ):
483- super ().__init__ (simulation = simulation , nodes = nodes , branches = branches ,
484- internal_parameters = internal_parameters )
494+ super ().__init__ (
495+ simulation = simulation , nodes = nodes , branches = branches ,
496+ internal_parameters = internal_parameters ,
497+ )
0 commit comments