- Notifications
You must be signed in to change notification settings - Fork 217
Description
Summary
Several functions within the following modules are affected by misleading docstrings, which may result in confusion for users seeking to understand the behavior of these functions.
The affected modules include:
- google/pubsub_v1/services/subscriber/async_client.py
- google/pubsub_v1/services/subscriber/client.py
- google/pubsub_v1/services/subscriber/transports/grpc.py
- google/pubsub_v1/services/subscriber/transports/grpc_asyncio.py
Details
The issue primarily revolves around the incorrect usage of the term "returns" in the docstrings for certain functions, specifically when describing their behavior during exceptional circumstances. In these cases, the functions are expected to raise exceptions such as ALREADY_EXISTS and NOT_FOUND instead of returning these exceptions.
This inconsistency between the docstring descriptions and the actual behavior of the functions can lead to misunderstandings, potentially impacting the usability and reliability of the codebase.
Proposed Solution
The recommended solution is to update the docstrings in the affected modules to accurately reflect the behavior of these functions. This correction will enhance the clarity and correctness of the documentation, making it easier for users to comprehend the expected behavior of the functions during edge cases.