We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fc6c53 commit d8228d2Copy full SHA for d8228d2
OMPython/ModelicaSystem.py
@@ -388,7 +388,7 @@ def __init__(
388
389
def model(
390
self,
391
- name: str,
+ name: Optional[str] = None,
392
file: Optional[str | os.PathLike] = None,
393
libraries: Optional[list[str | tuple[str, str]]] = None,
394
variable_filter: Optional[str] = None,
@@ -427,7 +427,7 @@ def model(
427
raise ModelicaSystemError("Can not reuse this instance of ModelicaSystem "
428
f"defined for {repr(self._model_name)}!")
429
430
- if not isinstance(name, str):
+ if name is None or not isinstance(name, str):
431
raise ModelicaSystemError("A model name must be provided!")
432
433
if libraries is None:
0 commit comments