Skip to content

Commit 36bb330

Browse files
style: update type hints to use modern lowercase syntax
Co-Authored-By: Aaron <AJ> Steers <[email protected]>
1 parent ebc9b52 commit 36bb330

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

airbyte_cdk/cli/airbyte_cdk/_secrets.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import os
3535
from functools import lru_cache
3636
from pathlib import Path
37-
from typing import Any, List, Optional, Tuple, cast
37+
from typing import Any, cast
3838

3939
import requests
4040
import rich_click as click
@@ -132,7 +132,7 @@ def fetch(
132132
)
133133
# Fetch and write secrets
134134
secret_count = 0
135-
failed_secrets: List[str] = []
135+
failed_secrets: list[str] = []
136136

137137
for secret in secrets:
138138
secret_file_path = _get_secret_filepath(
@@ -313,7 +313,7 @@ def _write_secret_file(
313313
secret: "Secret", # type: ignore
314314
client: "secretmanager.SecretManagerServiceClient", # type: ignore
315315
file_path: Path,
316-
) -> Optional[str]:
316+
) -> str | None:
317317
"""Write the most recent enabled version of a secret to a file.
318318
319319
Lists all enabled versions of the secret and selects the most recent one.
@@ -325,7 +325,7 @@ def _write_secret_file(
325325
file_path: The path to write the secret to
326326
327327
Returns:
328-
Optional[str]: Error message if no enabled version is found, None otherwise
328+
str | None: Error message if no enabled version is found, None otherwise
329329
"""
330330
# List all enabled versions of the secret.
331331
response = client.list_secret_versions(

airbyte_cdk/cli/airbyte_cdk/exceptions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"""Exceptions for the Airbyte CDK CLI."""
33

44
from dataclasses import dataclass
5-
from typing import List
65

76
from airbyte_cdk.sql.exceptions import AirbyteConnectorError
87

@@ -12,7 +11,7 @@ class ConnectorSecretWithNoValidVersionsError(AirbyteConnectorError):
1211
"""Error when a connector secret has no valid versions."""
1312

1413
connector_name: str
15-
secret_names: List[str]
14+
secret_names: list[str]
1615
gcp_project_id: str
1716

1817
def __str__(self) -> str:

0 commit comments

Comments
 (0)