Skip to content

Commit 585cb85

Browse files
docs: implement docstring feedback
1 parent bbdd32d commit 585cb85

File tree

7 files changed

+14
-10
lines changed

7 files changed

+14
-10
lines changed

google/cloud/sql/connector/asyncpg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ async def connect(
3232
ip_address (str): A string containing an IP address for the Cloud SQL
3333
instance.
3434
ctx (ssl.SSLContext): An SSLContext object created from the Cloud SQL
35+
server CA cert and ephemeral cert.
3536
kwargs: Keyword arguments for establishing asyncpg connection
3637
object to Cloud SQL instance.
3738
3839
Returns:
39-
asyncpg.Connection: A asyncpg Connection object for the Cloud SQL
40+
asyncpg.Connection: An asyncpg connection to the Cloud SQL
4041
instance.
4142
Raises:
4243
ImportError: The asyncpg module cannot be imported.

google/cloud/sql/connector/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,9 @@ async def _get_ephemeral(
194194
authentication for Postgres or MySQL instances.
195195
196196
Returns:
197-
An ephemeral certificate from the Cloud SQL instance that allows
198-
authorized connections to the instance.
197+
A tuple containing an ephemeral certificate from
198+
the Cloud SQL instance as well as a datetime object
199+
representing the expiration time of the certificate.
199200
"""
200201
headers = {
201202
"Authorization": f"Bearer {self._credentials.token}",

google/cloud/sql/connector/pg8000.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def connect(
3434
kwargs: Additional arguments to pass to the pg8000 connect method.
3535
3636
Returns:
37-
pg8000.dbapi.Connection: A pg8000 Connection object for the Cloud SQL
37+
pg8000.dbapi.Connection: A pg8000 connection to the Cloud SQL
3838
instance.
3939
4040
Raises:

google/cloud/sql/connector/pymysql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def connect(
3333
server CA cert and ephemeral cert.
3434
3535
Returns:
36-
pymysql.connections.Connection: A pymysql Connection object for the Cloud SQL
36+
pymysql.connections.Connection: A pymysql connection to the Cloud SQL
3737
instance.
3838
3939
Raises:

google/cloud/sql/connector/pytds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def connect(ip_address: str, sock: ssl.SSLSocket, **kwargs: Any) -> "pytds.Conne
3434
server CA cert and ephemeral cert.
3535
3636
Returns:
37-
pytds.Connection: A pytds Connection object for the Cloud SQL
37+
pytds.Connection: A pytds connection to the Cloud SQL
3838
instance.
3939
4040
Raises:

google/cloud/sql/connector/rate_limiter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class AsyncRateLimiter(object):
2424
of function calls over a time interval using an event queue.
2525
2626
Args:
27-
max_capacity (int): The maximum capacity of tokens the bucket will store at any one time.
28-
Default: 1
27+
max_capacity (int): The maximum capacity of tokens the bucket
28+
will store at any one time. Default: 1
2929
rate (float): The number of tokens that should be added per second.
3030
loop (asyncio.AbstractEventLoop): The event loop to use.
3131
If not provided, the default event loop will be used.

google/cloud/sql/connector/refresh_utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ def _downscope_credentials(
8585
"""Generate a down-scoped credential.
8686
8787
Args:
88-
credentials (google.auth.credentials.Credentials): Credentials object used to generate down-scoped credentials.
89-
scopes (list[str]): List of Google scopes to include in down-scoped credentials object.
88+
credentials (google.auth.credentials.Credentials):
89+
Credentials object used to generate down-scoped credentials.
90+
scopes (list[str]): List of Google scopes to
91+
include in down-scoped credentials object.
9092
9193
Returns:
9294
google.auth.credentials.Credentials: Down-scoped credentials object.

0 commit comments

Comments
 (0)