[ModelicaSystem] reorder input (mypy)#294
Merged
adeas31 merged 2 commits intoOpenModelica:masterfrom Jun 11, 2025
Merged
Conversation
Merged
584da4b to
7f8d7e2
Compare
adeas31
approved these changes
Jun 10, 2025
Member
adeas31
left a comment
There was a problem hiding this comment.
Please keep in mind, that this is a breaking change - all calls to ModelicaSystem which do not use kwargs will fail!
As far as I can see, you updated all the reference calls so we are good to go, right?
Member
|
Please rebase the PR. |
7f8d7e2 to
9dbc7b9
Compare
* define modelName as first (required!) argument * use *kwargs in tests
9dbc7b9 to
9a80503
Compare
Contributor
Author
|
rebased and slightly modifiy such that the order of arguments is still intact for external uses @adeas31 in my opinion one should always use kwargs (if possible) - it allows to reorder the arguments; however, in this case we can save the existing order (backward compatibility) and also fix the mypy warning by just adding an additional check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Class ModelicaSystem uses several imputs which are all optional; however, modelName must be present.
This PR reorders the inputs such that modelName is the first parameter. This also fixes one of the last mypy warnings.
Please keep in mind, that this is a breaking change - all calls to ModelicaSystem which do not use kwargs will fail!
On top of PR #292