Client recursive_delete() return value not documented

Open Beginner friendly
#17,266 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
72/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
documentation

Research direction

Open google/cloud/firestore_v1/client.py and start at Client.recursive_delete() and its docstring. Document that the returned int is the number of documents deleted, then confirm the updated return description is reflected in the API documentation.

Written by the indexing model from the issue text.

Description

priority: p2 type: docs
Determine this is the right repository
  • I determined this is the correct repository in which to report this feature request.
Summary of the feature request

google/cloud/firestore_v1/client.py::recursive_delete() return value is not documented.
Anyone using the recursive_delete() function will get a number and not understand the meaning of it without digging in the implementation which actually calls another function called _recursive_delete().

Desired code experience

file: client.py

       def recursive_delete(
        self,
        reference: Union[CollectionReference, DocumentReference],
        *,
        bulk_writer: Optional["BulkWriter"] = None,
        chunk_size: int = 5000,
    ) -> int:
        """Deletes documents and their subcollections, regardless of collection
        name.

        Passing a CollectionReference leads to each document in the collection
        getting deleted, as well as all of their descendents.

        Passing a DocumentReference deletes that one document and all of its
        descendents.

        Args:
            reference (Union[
                :class:`@google.cloud.firestore_v1.collection.CollectionReference`,
                :class:`@google.cloud.firestore_v1.document.DocumentReference`,
            ])
                The reference to be deleted.

            bulk_writer (Optional[:class:`@google.cloud.firestore_v1.bulk_writer.BulkWriter`])
                The BulkWriter used to delete all matching documents. Supply this
                if you want to override the default throttling behavior.

        Returns:
            int: The number of documents deleted.
        """
Expected results

recursive_delete() should specify what is the returned int value

API client name and version

No response

Use case

Anyone using the recursive_delete() function that desires to make use of the return value.

Additional context

No response

Dominant language
Python
Stars
5.4k
Forks
1.8k
Avg merge
1d 17h
Merged PRs (30d)
93

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from googleapis/google-cloud-python

All issues in googleapis/google-cloud-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.