Skip to content

Conversation

syntron
Copy link
Contributor

@syntron syntron commented May 28, 2025

cleanup within ModelicaSystem and mypy updates

This was referenced May 28, 2025
buildModelResult = self.requestApi("buildModel", self.modelName, properties=varFilter)
logger.debug("OM model build result: %s", buildModelResult)

self.xmlFile = pathlib.Path(buildModelResult[0]).parent / buildModelResult[1]
self.xmlparse()

def sendExpression(self, expr, parsed=True):
def sendExpression(self, expr: str, parsed: bool = True):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be parsed: Optional[bool] = True, right?

Copy link
Contributor Author

@syntron syntron Jun 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in this case as True is a valid bool value; it would be needed in case of parsed: Optional[bool] = None

Optional[abc] resolves to abc | None - both values are used as type hints

@adeas31 adeas31 enabled auto-merge (squash) June 4, 2025 12:06
@adeas31 adeas31 merged commit c912116 into OpenModelica:master Jun 4, 2025
5 checks passed
@syntron syntron deleted the cleanup_ModelicaSystem branch June 4, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants