Skip to content

Commit 873754e

Browse files
chore: auto-fix lint and format issues
1 parent 5e518c3 commit 873754e

File tree

3 files changed

+1641
-5
lines changed

3 files changed

+1641
-5
lines changed

airbyte-integrations/connectors/destination-firebolt/destination_firebolt/destination.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,25 @@
1212
from airbyte_cdk.destinations import Destination
1313
from airbyte_cdk.models import AirbyteConnectionStatus, AirbyteMessage, ConfiguredAirbyteCatalog, DestinationSyncMode, Status, Type
1414
from firebolt.client import DEFAULT_API_URL
15-
from firebolt.client.auth import UsernamePassword, ClientCredentials, Auth
15+
from firebolt.client.auth import Auth, ClientCredentials, UsernamePassword
1616
from firebolt.db import Connection, connect
1717

1818
from .writer import create_firebolt_wirter
1919

2020
logger = getLogger("airbyte")
2121

2222

23-
def _determine_auth(key: str, secret:str) -> Auth:
23+
def _determine_auth(key: str, secret: str) -> Auth:
2424
"""
2525
Determine between new auth based on key and secret or legacy email based auth.
2626
"""
27-
if '@' in key:
27+
if "@" in key:
2828
# email auth can only be used with UsernamePassword
2929
return UsernamePassword(key, secret)
3030
else:
3131
return ClientCredentials(key, secret)
3232

33+
3334
def parse_config(config: json, logger: Optional[AirbyteLogger] = None) -> Dict[str, Any]:
3435
"""
3536
Convert dict of config values to firebolt.db.Connection arguments
@@ -38,8 +39,7 @@ def parse_config(config: json, logger: Optional[AirbyteLogger] = None) -> Dict[s
3839
:return: dictionary of firebolt.db.Connection-compatible kwargs
3940
"""
4041
# We should use client_id/client_secret, this code supports username/password for legacy users
41-
auth = _determine_auth(config.get("client_id", config.get("username")),
42-
config.get("client_secret", config.get("password")))
42+
auth = _determine_auth(config.get("client_id", config.get("username")), config.get("client_secret", config.get("password")))
4343
connection_args = {
4444
"database": config["database"],
4545
"auth": auth,

dagger_engine_logs.tgz

42.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)