Skip to content

Commit 78c9c12

Browse files
committed
[ModelicaSystem] fix type hint for _prepare_input_data() - use dict[str, Any]
1 parent 73cf18e commit 78c9c12

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

OMPython/ModelicaSystem.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ def getSolutions(self, varList=None, resultfile=None): # 12
978978

979979
@staticmethod
980980
def _prepare_input_data(
981-
raw_input: str | list[str] | dict[str, str | int | float],
981+
raw_input: str | list[str] | dict[str, Any],
982982
) -> dict[str, str]:
983983
"""
984984
Convert raw input to a structured dictionary {'key1': 'value1', 'key2': 'value2'}.
@@ -1088,7 +1088,7 @@ def isParameterChangeable(
10881088
return False
10891089
return True
10901090

1091-
def setContinuous(self, cvals: str | list[str] | dict[str, str | int | float]) -> bool:
1091+
def setContinuous(self, cvals: str | list[str] | dict[str, Any]) -> bool:
10921092
"""
10931093
This method is used to set continuous values. It can be called:
10941094
with a sequence of continuous name and assigning corresponding values as arguments as show in the example below:
@@ -1105,7 +1105,7 @@ def setContinuous(self, cvals: str | list[str] | dict[str, str | int | float]) -
11051105
datatype="continuous",
11061106
overwritedata=self.overridevariables)
11071107

1108-
def setParameters(self, pvals: str | list[str] | dict[str, str | int | float]) -> bool:
1108+
def setParameters(self, pvals: str | list[str] | dict[str, Any]) -> bool:
11091109
"""
11101110
This method is used to set parameter values. It can be called:
11111111
with a sequence of parameter name and assigning corresponding value as arguments as show in the example below:
@@ -1122,7 +1122,7 @@ def setParameters(self, pvals: str | list[str] | dict[str, str | int | float]) -
11221122
datatype="parameter",
11231123
overwritedata=self.overridevariables)
11241124

1125-
def setSimulationOptions(self, simOptions: str | list[str] | dict[str, str | int | float]) -> bool:
1125+
def setSimulationOptions(self, simOptions: str | list[str] | dict[str, Any]) -> bool:
11261126
"""
11271127
This method is used to set simulation options. It can be called:
11281128
with a sequence of simulation options name and assigning corresponding values as arguments as show in the example below:
@@ -1139,7 +1139,7 @@ def setSimulationOptions(self, simOptions: str | list[str] | dict[str, str | int
11391139
datatype="simulation-option",
11401140
overwritedata=self.simoptionsoverride)
11411141

1142-
def setLinearizationOptions(self, linearizationOptions: str | list[str] | dict[str, str | int | float]) -> bool:
1142+
def setLinearizationOptions(self, linearizationOptions: str | list[str] | dict[str, Any]) -> bool:
11431143
"""
11441144
This method is used to set linearization options. It can be called:
11451145
with a sequence of linearization options name and assigning corresponding value as arguments as show in the example below
@@ -1156,7 +1156,7 @@ def setLinearizationOptions(self, linearizationOptions: str | list[str] | dict[s
11561156
datatype="Linearization-option",
11571157
overwritedata=None)
11581158

1159-
def setOptimizationOptions(self, optimizationOptions: str | list[str] | dict[str, str | int | float]) -> bool:
1159+
def setOptimizationOptions(self, optimizationOptions: str | list[str] | dict[str, Any]) -> bool:
11601160
"""
11611161
This method is used to set optimization options. It can be called:
11621162
with a sequence of optimization options name and assigning corresponding values as arguments as show in the example below:
@@ -1173,7 +1173,7 @@ def setOptimizationOptions(self, optimizationOptions: str | list[str] | dict[str
11731173
datatype="optimization-option",
11741174
overwritedata=None)
11751175

1176-
def setInputs(self, name: str | list[str] | dict[str, str | int | float]) -> bool:
1176+
def setInputs(self, name: str | list[str] | dict[str, Any]) -> bool:
11771177
"""
11781178
This method is used to set input values. It can be called:
11791179
with a sequence of input name and assigning corresponding values as arguments as show in the example below:

0 commit comments

Comments
 (0)