feat(python): add deleteFolderRecursive sample#14305
Conversation
This adds a sample demonstrating how to recursively delete a folder in a hierarchical namespace bucket. Fixes: b/521168740 [Generated-by: AI]
There was a problem hiding this comment.
Code Review
This pull request introduces a new script delete_folder_recursive.py that implements recursive folder deletion using the Google Cloud Storage Control API, along with corresponding integration tests in snippets_test.py. The feedback recommends moving the inline import of delete_folder_recursive in the test file to the top of the file to adhere to PEP 8 guidelines.
| def test_delete_folder_recursive( | ||
| capsys: pytest.LogCaptureFixture, hns_enabled_bucket: storage.Bucket, uuid_name: str | ||
| ) -> None: | ||
| import delete_folder_recursive |
There was a problem hiding this comment.
According to PEP 8, imports should always be placed at the top of the file, just after any module comments and docstrings, and before module globals and constants.
Please move import delete_folder_recursive to the top of the file, grouping it alphabetically with the other local imports (e.g., right after import delete_folder on line 20).
References
- PEP 8 specifies that imports should always be put at the top of the file, grouped and ordered. (link)
[Generated-by: AI]
feat(python): add deleteFolderRecursive sample
This adds a sample demonstrating how to recursively delete a folder in a hierarchical namespace bucket.
Fixes: b/521168740
[Generated-by: AI]