Skip to content

Commit 1b5917c

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

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
@@ -1119,7 +1119,7 @@ def getSolutions(self, varList: Optional[str | list[str]] = None, resultfile: Op
11191119

11201120
@staticmethod
11211121
def _prepare_input_data(
1122-
raw_input: str | list[str] | dict[str, str | int | float],
1122+
raw_input: str | list[str] | dict[str, Any],
11231123
) -> dict[str, str]:
11241124
"""
11251125
Convert raw input to a structured dictionary {'key1': 'value1', 'key2': 'value2'}.
@@ -1231,7 +1231,7 @@ def isParameterChangeable(
12311231

12321232
def setContinuous(
12331233
self,
1234-
cvals: str | list[str] | dict[str, str | int | float],
1234+
cvals: str | list[str] | dict[str, Any],
12351235
) -> bool:
12361236
"""
12371237
This method is used to set continuous values. It can be called:
@@ -1251,7 +1251,7 @@ def setContinuous(
12511251

12521252
def setParameters(
12531253
self,
1254-
pvals: str | list[str] | dict[str, str | int | float],
1254+
pvals: str | list[str] | dict[str, Any],
12551255
) -> bool:
12561256
"""
12571257
This method is used to set parameter values. It can be called:
@@ -1271,7 +1271,7 @@ def setParameters(
12711271

12721272
def setSimulationOptions(
12731273
self,
1274-
simOptions: str | list[str] | dict[str, str | int | float],
1274+
simOptions: str | list[str] | dict[str, Any],
12751275
) -> bool:
12761276
"""
12771277
This method is used to set simulation options. It can be called:
@@ -1291,7 +1291,7 @@ def setSimulationOptions(
12911291

12921292
def setLinearizationOptions(
12931293
self,
1294-
linearizationOptions: str | list[str] | dict[str, str | int | float],
1294+
linearizationOptions: str | list[str] | dict[str, Any],
12951295
) -> bool:
12961296
"""
12971297
This method is used to set linearization options. It can be called:
@@ -1309,7 +1309,10 @@ def setLinearizationOptions(
13091309
datatype="Linearization-option",
13101310
overwritedata=None)
13111311

1312-
def setOptimizationOptions(self, optimizationOptions: str | list[str] | dict[str, str | int | float]) -> bool:
1312+
def setOptimizationOptions(
1313+
self,
1314+
optimizationOptions: str | list[str] | dict[str, Any],
1315+
) -> bool:
13131316
"""
13141317
This method is used to set optimization options. It can be called:
13151318
with a sequence of optimization options name and assigning corresponding values as arguments as show in the example below:
@@ -1328,7 +1331,7 @@ def setOptimizationOptions(self, optimizationOptions: str | list[str] | dict[str
13281331

13291332
def setInputs(
13301333
self,
1331-
name: str | list[str] | dict[str, str | int | float],
1334+
name: str | list[str] | dict[str, Any],
13321335
) -> bool:
13331336
"""
13341337
This method is used to set input values. It can be called:

0 commit comments

Comments
 (0)