Open
Conversation
The code in the constructor actually depends on lots of fields that are only in SimCfg, but we aren't really type-safe yet, so only find this out at runtime (when we try to do something other than a simulation). Correct the type safety at the site where we actually create the Deploy object. Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
0861323 to
9aa7c87
Compare
This was referenced Apr 2, 2026
AlexJones0
approved these changes
Apr 2, 2026
| return pprint.pformat(self.__dict__) if log.isEnabledFor(log.VERBOSE) else self.full_name | ||
|
|
||
| def __init__(self, sim_cfg: "SimCfg") -> None: | ||
| def __init__(self, sim_cfg: "FlowCfg") -> None: |
Contributor
There was a problem hiding this comment.
Thanks, this is a useful fix. I wonder, would it not be a good idea to rename sim_cfg -> flow_cfg as well?
AlexJones0
reviewed
Apr 2, 2026
Contributor
There was a problem hiding this comment.
Also, as a nit on this PR (and all of the other PRs that you opened): I think the current preference is to use conventional commit names, because we have python-semantic-release setup to automatically parse these to generate changelogs and release notes.
I'm not sure how the tool would parse these, but it would be good to tag them as refactor: or fix: appropriately so the tool doesn't all think they're new features and bump the minor version for every merge.
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.
The code in the constructor actually depends on lots of fields that are only in SimCfg, but we aren't really type-safe yet, so only find this out at runtime (when we try to do something other than a simulation).
Correct the type safety at the site where we actually create the Deploy object.