Skip to content

Commit c0498b1

Browse files
committed
[ModelicaSystem] fix type hint for _prepare_input_data() - use dict[str, Any]
1 parent 067b9be commit c0498b1

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

OMPython/ModelicaSystem.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ def getSolutions(self, varList: Optional[str | list[str]] = None, resultfile: Op
10741074

10751075
@staticmethod
10761076
def _prepare_input_data(
1077-
raw_input: str | list[str] | dict[str, str | int | float],
1077+
raw_input: str | list[str] | dict[str, Any],
10781078
) -> dict[str, str]:
10791079
"""
10801080
Convert raw input to a structured dictionary {'key1': 'value1', 'key2': 'value2'}.
@@ -1186,7 +1186,7 @@ def isParameterChangeable(
11861186

11871187
def setContinuous(
11881188
self,
1189-
cvals: str | list[str] | dict[str, str | int | float],
1189+
cvals: str | list[str] | dict[str, Any],
11901190
) -> bool:
11911191
"""
11921192
This method is used to set continuous values. It can be called:
@@ -1206,7 +1206,7 @@ def setContinuous(
12061206

12071207
def setParameters(
12081208
self,
1209-
pvals: str | list[str] | dict[str, str | int | float],
1209+
pvals: str | list[str] | dict[str, Any],
12101210
) -> bool:
12111211
"""
12121212
This method is used to set parameter values. It can be called:
@@ -1226,7 +1226,7 @@ def setParameters(
12261226

12271227
def setSimulationOptions(
12281228
self,
1229-
simOptions: str | list[str] | dict[str, str | int | float],
1229+
simOptions: str | list[str] | dict[str, Any],
12301230
) -> bool:
12311231
"""
12321232
This method is used to set simulation options. It can be called:
@@ -1246,7 +1246,7 @@ def setSimulationOptions(
12461246

12471247
def setLinearizationOptions(
12481248
self,
1249-
linearizationOptions: str | list[str] | dict[str, str | int | float],
1249+
linearizationOptions: str | list[str] | dict[str, Any],
12501250
) -> bool:
12511251
"""
12521252
This method is used to set linearization options. It can be called:
@@ -1264,7 +1264,10 @@ def setLinearizationOptions(
12641264
datatype="Linearization-option",
12651265
overwritedata=None)
12661266

1267-
def setOptimizationOptions(self, optimizationOptions: str | list[str] | dict[str, str | int | float]) -> bool:
1267+
def setOptimizationOptions(
1268+
self,
1269+
optimizationOptions: str | list[str] | dict[str, Any],
1270+
) -> bool:
12681271
"""
12691272
This method is used to set optimization options. It can be called:
12701273
with a sequence of optimization options name and assigning corresponding values as arguments as show in the example below:
@@ -1283,7 +1286,7 @@ def setOptimizationOptions(self, optimizationOptions: str | list[str] | dict[str
12831286

12841287
def setInputs(
12851288
self,
1286-
name: str | list[str] | dict[str, str | int | float],
1289+
name: str | list[str] | dict[str, Any],
12871290
) -> bool:
12881291
"""
12891292
This method is used to set input values. It can be called:

0 commit comments

Comments
 (0)