mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-08 02:19:35 +00:00
* Optimize directory_missing_or_empty function Replace inefficient os.listdir() with os.scandir() and next() to check if directory is empty. This avoids reading entire directory contents into memory when we only need to know if any entry exists. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Add unit tests for directory_missing_or_empty function Add comprehensive test coverage for the optimized directory_missing_or_empty function, testing empty directories, directories with content, non-existent paths, and files (non-directories). 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Apply suggestions from code review Co-authored-by: Mike Degatano <michael.degatano@gmail.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Mike Degatano <michael.degatano@gmail.com>