Repository navigation
BP-1829: Refactor tools/backup.py - #492
Open
MarcoCunha-MOVAI wants to merge 3 commits into
Open
MarcoCunha-MOVAI wants to merge 3 commits into
MarcoCunha-MOVAI wants to merge 3 commits into
Conversation
|
| @classmethod | ||
| def _update_metadata(cls, data: dict, file_path: str, source: ProjectSource) -> dict: | ||
| for name in data: | ||
| data = {"Ports": {name: data[name]}} |
Contributor
There was a problem hiding this comment.
Do not alter data in the same loop that iterates it. Keep data in a temporary dict and either return it or assign it after the loop.
Also, typhint returns dict but function does not.
Contributor
Author
There was a problem hiding this comment.
Yikes, I've added a test and redid the export an import logic for ports
| try: | ||
| tool.run(objects) | ||
| report = tool.run(objects) | ||
| if args.action == "import" and report["failed"]: |
Contributor
There was a problem hiding this comment.
Just FYI there will be a similar report mechanism for export (already in PR).
Contributor
|
Forgot to bump movai-core-shared |
This branch has not been deployed
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.



Uh oh!
There was an error while loading. Please reload this page.