Skip to content

Commit

Permalink
fix Translator model
Browse files Browse the repository at this point in the history
  • Loading branch information
FabriceSalvaire committed Jan 25, 2024
1 parent 418ccc0 commit 033cd61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PySpice/Spice/Parser/Translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def handle_Measure(self, obj: Measure) -> None:
##############################################

def handle_Model(self, obj: Model) -> None:
self._circuit.model(obj._name, obj._model_type, **obj._parameters)
self._circuit.model(obj.name, obj.type, **obj.parameters)

##############################################

Expand Down Expand Up @@ -457,8 +457,8 @@ def handle_Measure(self, obj: Measure) -> str:
##############################################

def handle_Model(self, obj: Model) -> str:
args = self.values_to_python((obj.name, obj.model_type))
kwargs = self.kwargs_to_python(self.parameters)
args = self.values_to_python((obj.name, obj.type))
kwargs = self.format_kwargs(obj.py_parameters)
parameters = self.join_args(args + kwargs)
return f'{self._circuit_name}.model({parameters})'

Expand Down

0 comments on commit 033cd61

Please sign in to comment.