Skip to content

Commit 76908e3

Browse files
author
octavia-squidington-iii
committed
Auto-fix lint and format issues
1 parent b6be53c commit 76908e3

File tree

2 files changed

+10
-4
lines changed
  • airbyte_cdk/sources/declarative/auth
  • unit_tests/sources/declarative/auth

2 files changed

+10
-4
lines changed

airbyte_cdk/sources/declarative/auth/jwt.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
33
#
44

5-
import json
65
import base64
6+
import json
77
from dataclasses import InitVar, dataclass
88
from datetime import datetime
99
from typing import Any, Mapping, Optional, Union
@@ -178,7 +178,11 @@ def _get_header_prefix(self) -> Union[str, None]:
178178
"""
179179
Returns the header prefix to be used when attaching the token to the request.
180180
"""
181-
return self._header_prefix.eval(self.config, json_loads=json.loads) if self._header_prefix else None
181+
return (
182+
self._header_prefix.eval(self.config, json_loads=json.loads)
183+
if self._header_prefix
184+
else None
185+
)
182186

183187
@property
184188
def auth_header(self) -> str:

unit_tests/sources/declarative/auth/test_jwt.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,11 @@ def test_get_secret_key(self, base64_encode_secret_key, secret_key, expected):
126126
)
127127
assert authenticator._get_secret_key() == expected
128128

129-
def test_get_secret_key_from_config(self,):
129+
def test_get_secret_key_from_config(
130+
self,
131+
):
130132
authenticator = JwtAuthenticator(
131-
config={'secrets': '{"secret_key": "test"}'},
133+
config={"secrets": '{"secret_key": "test"}'},
132134
parameters={},
133135
secret_key="{{ json_loads(config['secrets'])['secret_key'] }}",
134136
algorithm="test_algo",

0 commit comments

Comments
 (0)