Skip to content

Commit f92fd88

Browse files
chore: update type hint
1 parent 4f2fc4c commit f92fd88

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/system/test_pg8000_connection.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
import os
1919

2020
# [START cloud_sql_connector_postgres_pg8000]
21+
from typing import Union
22+
2123
import pg8000
2224
import sqlalchemy
2325

@@ -32,7 +34,7 @@ def create_sqlalchemy_engine(
3234
password: str,
3335
db: str,
3436
refresh_strategy: str = "background",
35-
resolver: DefaultResolver | DnsResolver = DefaultResolver,
37+
resolver: Union[DefaultResolver, DnsResolver] = DefaultResolver,
3638
) -> tuple[sqlalchemy.engine.Engine, Connector]:
3739
"""Creates a connection pool for a Cloud SQL instance and returns the pool
3840
and the connector. Callers are responsible for closing the pool and the

0 commit comments

Comments
 (0)