Skip to content

[ModelicaSystem] Cleanup & mypy - #292

Merged
adeas31 merged 6 commits into
OpenModelica:masterfrom
syntron:cleanup_ModelicaSystem
Jun 4, 2025
Merged

[ModelicaSystem] Cleanup & mypy#292
adeas31 merged 6 commits into
OpenModelica:masterfrom
syntron:cleanup_ModelicaSystem

Conversation

@syntron

@syntron syntron commented May 28, 2025

Copy link
Copy Markdown
Contributor

cleanup within ModelicaSystem and mypy updates

This was referenced May 28, 2025
self.xmlparse()

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

Copy link
Copy Markdown
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?

@syntron syntron Jun 2, 2025

Copy link
Copy Markdown
Contributor Author

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
@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

2 participants