Skip to content

Commit 8b5ae77

Browse files
chore(cloudsql): format comments into doc strings (#8803)
* chore: format comments into doc strings * chore: lint * chore: lint Co-authored-by: nicain <[email protected]>
1 parent c0af5fa commit 8b5ae77

10 files changed

+30
-22
lines changed

cloud-sql/mysql/sqlalchemy/connect_connector.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@
2121
import sqlalchemy
2222

2323

24-
# connect_with_connector initializes a connection pool for a
25-
# Cloud SQL instance of MySQL using the Cloud SQL Python Connector.
2624
def connect_with_connector() -> sqlalchemy.engine.base.Engine:
25+
"""
26+
Initializes a connection pool for a Cloud SQL instance of MySQL.
27+
28+
Uses the Cloud SQL Python Connector package.
29+
"""
2730
# Note: Saving credentials in environment variables is convenient, but not
2831
# secure - consider a more secure solution such as
2932
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help

cloud-sql/mysql/sqlalchemy/connect_connector_auto_iam_authn.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
import sqlalchemy
2222

2323

24-
# connect_with_connector_auto_iam_authn initializes a connection pool for
25-
# a Cloud SQL instance of MySQL using the Cloud SQL Python Connector
26-
# with Automatic IAM Database Authentication.
2724
def connect_with_connector_auto_iam_authn() -> sqlalchemy.engine.base.Engine:
25+
"""
26+
Initializes a connection pool for a Cloud SQL instance of MySQL.
27+
28+
Uses the Cloud SQL Python Connector with Automatic IAM Database Authentication.
29+
"""
2830
# Note: Saving credentials in environment variables is convenient, but not
2931
# secure - consider a more secure solution such as
3032
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help

cloud-sql/mysql/sqlalchemy/connect_tcp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
import sqlalchemy
2222

2323

24-
# connect_tcp_socket initializes a TCP connection pool
25-
# for a Cloud SQL instance of MySQL.
2624
def connect_tcp_socket() -> sqlalchemy.engine.base.Engine:
25+
""" Initializes a TCP connection pool for a Cloud SQL instance of MySQL. """
2726
# Note: Saving credentials in environment variables is convenient, but not
2827
# secure - consider a more secure solution such as
2928
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help

cloud-sql/mysql/sqlalchemy/connect_unix.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
import sqlalchemy
1919

2020

21-
# connect_unix_socket initializes a Unix socket connection pool for
22-
# a Cloud SQL instance of MySQL.
2321
def connect_unix_socket() -> sqlalchemy.engine.base.Engine:
22+
""" Initializes a Unix socket connection pool for a Cloud SQL instance of MySQL. """
2423
# Note: Saving credentials in environment variables is convenient, but not
2524
# secure - consider a more secure solution such as
2625
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help

cloud-sql/postgres/sqlalchemy/connect_connector.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@
2121
import sqlalchemy
2222

2323

24-
# connect_with_connector initializes a connection pool for a
25-
# Cloud SQL instance of Postgres using the Cloud SQL Python Connector.
2624
def connect_with_connector() -> sqlalchemy.engine.base.Engine:
25+
"""
26+
Initializes a connection pool for a Cloud SQL instance of Postgres.
27+
28+
Uses the Cloud SQL Python Connector package.
29+
"""
2730
# Note: Saving credentials in environment variables is convenient, but not
2831
# secure - consider a more secure solution such as
2932
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help

cloud-sql/postgres/sqlalchemy/connect_connector_auto_iam_authn.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
import sqlalchemy
2222

2323

24-
# connect_with_connector_auto_iam_authn initializes a connection pool for
25-
# a Cloud SQL instance of Postgres using the Cloud SQL Python Connector
26-
# with Automatic IAM Database Authentication.
2724
def connect_with_connector_auto_iam_authn() -> sqlalchemy.engine.base.Engine:
25+
"""
26+
Initializes a connection pool for a Cloud SQL instance of Postgres.
27+
28+
Uses the Cloud SQL Python Connector with Automatic IAM Database Authentication.
29+
"""
2830
# Note: Saving credentials in environment variables is convenient, but not
2931
# secure - consider a more secure solution such as
3032
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help

cloud-sql/postgres/sqlalchemy/connect_tcp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
import sqlalchemy
2323

2424

25-
# connect_tcp_socket initializes a TCP connection pool
26-
# for a Cloud SQL instance of Postgres.
2725
def connect_tcp_socket() -> sqlalchemy.engine.base.Engine:
26+
""" Initializes a TCP connection pool for a Cloud SQL instance of Postgres. """
2827
# Note: Saving credentials in environment variables is convenient, but not
2928
# secure - consider a more secure solution such as
3029
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help

cloud-sql/postgres/sqlalchemy/connect_unix.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
import sqlalchemy
1919

2020

21-
# connect_unix_socket initializes a Unix socket connection pool for
22-
# a Cloud SQL instance of Postgres.
2321
def connect_unix_socket() -> sqlalchemy.engine.base.Engine:
22+
""" Initializes a Unix socket connection pool for a Cloud SQL instance of Postgres. """
2423
# Note: Saving credentials in environment variables is convenient, but not
2524
# secure - consider a more secure solution such as
2625
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help

cloud-sql/sql-server/sqlalchemy/connect_connector.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@
2121
import sqlalchemy
2222

2323

24-
# connect_with_connector initializes a connection pool for a
25-
# Cloud SQL instance of SQL Server using the Cloud SQL Python Connector.
2624
def connect_with_connector() -> sqlalchemy.engine.base.Engine:
25+
"""
26+
Initializes a connection pool for a Cloud SQL instance of SQL Server.
27+
28+
Uses the Cloud SQL Python Connector package.
29+
"""
2730
# Note: Saving credentials in environment variables is convenient, but not
2831
# secure - consider a more secure solution such as
2932
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help

cloud-sql/sql-server/sqlalchemy/connect_tcp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
import sqlalchemy
2222

2323

24-
# connect_tcp_socket initializes a TCP connection pool
25-
# for a Cloud SQL instance of SQL Server.
2624
def connect_tcp_socket() -> sqlalchemy.engine.base.Engine:
25+
""" Initializes a TCP connection pool for a Cloud SQL instance of SQL Server. """
2726
# Note: Saving credentials in environment variables is convenient, but not
2827
# secure - consider a more secure solution such as
2928
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help

0 commit comments

Comments
 (0)