Skip to content

Commit 3b0c9d9

Browse files
committed
[ModelicaSystem] fix type hint for _prepare_input_data() - use dict[str, Any]
1 parent c498498 commit 3b0c9d9

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
@@ -994,7 +994,7 @@ def getSolutions(self, varList=None, resultfile=None): # 12
994994

995995
@staticmethod
996996
def _prepare_input_data(
997-
raw_input: str | list[str] | dict[str, str | int | float],
997+
raw_input: str | list[str] | dict[str, Any],
998998
) -> dict[str, str]:
999999
"""
10001000
Convert raw input to a structured dictionary {'key1': 'value1', 'key2': 'value2'}.
@@ -1104,7 +1104,7 @@ def isParameterChangeable(
11041104
return False
11051105
return True
11061106

1107-
def setContinuous(self, cvals: str | list[str] | dict[str, str | int | float]) -> bool:
1107+
def setContinuous(self, cvals: str | list[str] | dict[str, Any]) -> bool:
11081108
"""
11091109
This method is used to set continuous values. It can be called:
11101110
with a sequence of continuous name and assigning corresponding values as arguments as show in the example below:
@@ -1121,7 +1121,7 @@ def setContinuous(self, cvals: str | list[str] | dict[str, str | int | float]) -
11211121
datatype="continuous",
11221122
overwritedata=self.overridevariables)
11231123

1124-
def setParameters(self, pvals: str | list[str] | dict[str, str | int | float]) -> bool:
1124+
def setParameters(self, pvals: str | list[str] | dict[str, Any]) -> bool:
11251125
"""
11261126
This method is used to set parameter values. It can be called:
11271127
with a sequence of parameter name and assigning corresponding value as arguments as show in the example below:
@@ -1138,7 +1138,7 @@ def setParameters(self, pvals: str | list[str] | dict[str, str | int | float]) -
11381138
datatype="parameter",
11391139
overwritedata=self.overridevariables)
11401140

1141-
def setSimulationOptions(self, simOptions: str | list[str] | dict[str, str | int | float]) -> bool:
1141+
def setSimulationOptions(self, simOptions: str | list[str] | dict[str, Any]) -> bool:
11421142
"""
11431143
This method is used to set simulation options. It can be called:
11441144
with a sequence of simulation options name and assigning corresponding values as arguments as show in the example below:
@@ -1155,7 +1155,7 @@ def setSimulationOptions(self, simOptions: str | list[str] | dict[str, str | int
11551155
datatype="simulation-option",
11561156
overwritedata=self.simoptionsoverride)
11571157

1158-
def setLinearizationOptions(self, linearizationOptions: str | list[str] | dict[str, str | int | float]) -> bool:
1158+
def setLinearizationOptions(self, linearizationOptions: str | list[str] | dict[str, Any]) -> bool:
11591159
"""
11601160
This method is used to set linearization options. It can be called:
11611161
with a sequence of linearization options name and assigning corresponding value as arguments as show in the example below
@@ -1172,7 +1172,7 @@ def setLinearizationOptions(self, linearizationOptions: str | list[str] | dict[s
11721172
datatype="Linearization-option",
11731173
overwritedata=None)
11741174

1175-
def setOptimizationOptions(self, optimizationOptions: str | list[str] | dict[str, str | int | float]) -> bool:
1175+
def setOptimizationOptions(self, optimizationOptions: str | list[str] | dict[str, Any]) -> bool:
11761176
"""
11771177
This method is used to set optimization options. It can be called:
11781178
with a sequence of optimization options name and assigning corresponding values as arguments as show in the example below:
@@ -1189,7 +1189,7 @@ def setOptimizationOptions(self, optimizationOptions: str | list[str] | dict[str
11891189
datatype="optimization-option",
11901190
overwritedata=None)
11911191

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

0 commit comments

Comments
 (0)