-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Improve AliBuild typing and linter strictness #882
base: master
Are you sure you want to change the base?
Conversation
alibuild_helpers/sync.py
Outdated
@@ -233,7 +218,7 @@ def fetch_symlinks(self, spec): | |||
os.path.join(self.workdir, links_path, linkname)) | |||
|
|||
def upload_symlinks_and_tarball(self, spec): | |||
pass | |||
dieOnError(True, "HTTP backend does not support uploading directly") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change correct? The tests seem to suggest that it should fail silently, instead of crashing like how the CVMFS backend fails
70c9385
to
2320045
Compare
alibuild_helpers/sync.py
Outdated
destFp = None | ||
try: | ||
destFp = open(dest+".tmp", "wb") if dest else None | ||
if dest: destFp = open(dest+".tmp", "wb") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this is an improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this one so destFp is always bounded on the finally
block, otherwise if open()
throws aliBuild would crash trying to access it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the finally actually needed / working? is there a case where open throws and still returns destFp? Maybe we should fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should split the opening of the file from the rest of the try catch...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would live this particular change out and continue with the rest of the PR, since to that I have no particular objections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, leaving it out
52650d4
to
c5f2c63
Compare
f6473d7
to
ad3935e
Compare
I'm currently trying to type the codebase as much as possible, and use a stronger mypy filter.
Not ready to merge yet, just want to get the tests running