Skip to content

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Oct 18, 2022

Also reject __MACOSX and .DS_Store files from unzipping.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Refactoring of ZIP file extraction methods for cleaner and more maintainable code.

📊 Key Changes

  • Removed direct ZipFile imports and usages in dataloaders.py, downloads.py, and general.py.
  • Added a new unzip_file function in general.py to handle ZIP extraction.
  • Updated all the instances where ZIP files were extracted using ZipFile to now use the new unzip_file function.
  • Removed old Google Drive download function and helpers which are no longer needed.

🎯 Purpose & Impact

  • The purpose of these changes is to centralize and simplify the process of unzipping files, which enhances code readability and maintainability. 🛠
  • Users should experience no functional change, but the codebase is cleaner and less prone to bugs when handling ZIP file extractions. 📁
  • Removal of deprecated Google Drive download code reduces clutter and potential confusion about supported download methods. 🧹

@glenn-jocher glenn-jocher self-assigned this Oct 18, 2022
@glenn-jocher glenn-jocher merged commit d0df6c8 into master Oct 18, 2022
@glenn-jocher glenn-jocher deleted the update/zipfile branch October 18, 2022 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant