Skip to content

feat(python): add deleteFolderRecursive sample#14305

Draft
nidhiii-27 wants to merge 2 commits into
mainfrom
feat/add-delete-folder-recursive
Draft

feat(python): add deleteFolderRecursive sample#14305
nidhiii-27 wants to merge 2 commits into
mainfrom
feat/add-delete-folder-recursive

Conversation

@nidhiii-27

Copy link
Copy Markdown
Contributor

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]

This adds a sample demonstrating how to recursively delete a folder in a hierarchical namespace bucket.

Fixes: b/521168740

[Generated-by: AI]
@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Jun 11, 2026
@nidhiii-27 nidhiii-27 added ai-generated storage-sample-architect and removed samples Issues that are directly related to samples. labels Jun 11, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread storagecontrol/snippets_test.py Outdated
def test_delete_folder_recursive(
capsys: pytest.LogCaptureFixture, hns_enabled_bucket: storage.Bucket, uuid_name: str
) -> None:
import delete_folder_recursive

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
  1. PEP 8 specifies that imports should always be put at the top of the file, grouped and ordered. (link)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated samples Issues that are directly related to samples. storage-sample-architect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant