-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ez] Use strip for arg sanitization in upload_metadata_file to improve readability #144155
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/144155
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 14 PendingAs of commit 6f7f9b0 with merge base b9fbd65 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
args.key_prefix = args.key_prefix[1:] | ||
if args.key_prefix.endswith("/"): | ||
args.key_prefix = args.key_prefix[:-1] | ||
args.bucket = args.bucket.rstrip("/") |
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.
Any reason not to make it even shorter with args.bucket.strip("/")
?
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.
Because I didn't realize strip could also take in characters... Changed
@pytorchbot merge -f "no trunk needed" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Minor thing that improves readability. I didn't realize you could specify characters for strip when I wrote this