Closed
Conversation
yaswant
reviewed
Jan 26, 2026
github_scripts/get_git_sources.py
Outdated
| dest: Path, | ||
| repo: str, | ||
| use_mirrors: bool = False, | ||
| mirror_loc: Path = "", |
Collaborator
There was a problem hiding this comment.
Will this (assigning Path to an empty string) not raise a type mismatch? Perhaps you meant mirror_loc: Path = Path("")?
yaswant
reviewed
Jan 26, 2026
github_scripts/get_git_sources.py
Outdated
| command = f"git -C {loc} fetch origin main:main" | ||
| result = run_command(command, check=False) | ||
| if result and result.returncode: | ||
| if result.returncode: |
Collaborator
There was a problem hiding this comment.
I see you are reverting this back to original. But please note that run_command() will not always have a value so I added if result and result.returncode (sorry if I messed up your original logic.
Alternatively, you should probably use try/except:
try:
result = runc_command(...)
if result.returncode:
...
except Exception:
result = None # or you chose how to handle it
Collaborator
Author
There was a problem hiding this comment.
Not intended - didn't merge the file correctly
Collaborator
Author
|
Closing this PR as these changes are going to make it on as part of #169 |
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.
PR Summary
Sci/Tech Reviewer:
Code Reviewer: @t00sa
This merges changes from MetOffice/lfric_apps#162 into this repo as they may be of use here in the future.
Code Quality Checklist
Testing
Tested by running with the Apps rose-stem suite
Security Considerations
AI Assistance and Attribution
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review