feat(storage): support returning skipped items as UserWarning in download_many_to_path#1773
feat(storage): support returning skipped items as UserWarning in download_many_to_path#1773chandra-siri merged 2 commits intomainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
c06a854 to
0cc2884
Compare
There was a problem hiding this comment.
Code Review
This pull request correctly updates download_many_to_path to return a list containing UserWarning objects for skipped items, addressing both path traversal issues and cases where skip_if_exists=True. The implementation is solid, with the logic for skipped items now encapsulated within the function, and the call to download_many is appropriately adjusted. The tests are comprehensive, including a new system test for mixed success and skipped scenarios. I have one suggestion to enhance the new system test for better coverage.
0cc2884 to
3c7ee25
Compare
…load_many_to_path
3c7ee25 to
347c6ee
Compare
This PR updates
download_many_to_pathreturn type in transfer_manager.pyIt now returns
List[None|Exception|UserWarning]Nonefor successful downloadUserWarningfor- file skipped because
skip_if_exists=Truewas provided and file exists.- Resolve path in either invalid or skips destination_directory (because of
..)Exceptionif error occurred during download.