Skip to content

Commit

Permalink
fix flake warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
arsenlosenko committed Jun 14, 2023
1 parent dafa33e commit fcbdfc8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
from airbyte_cdk.sources.streams.http import HttpStream
from airbyte_cdk.sources.streams.http.auth import TokenAuthenticator
from airbyte_cdk.sources.streams.http.requests_native_auth.oauth import SingleUseRefreshTokenOauth2Authenticator
from requests.auth import AuthBase
from pendulum.datetime import DateTime
from requests.auth import AuthBase


class TypeformStream(HttpStream, ABC):
Expand Down Expand Up @@ -250,7 +250,9 @@ class SourceTypeform(AbstractSource):
def get_auth(self, config: MutableMapping) -> AuthBase:
if config.get("access_token"):
return TokenAuthenticator(token=config["access_token"])
return SingleUseRefreshTokenOauth2Authenticator(config, token_refresh_endpoint=f"https://api.typeform.com/oauth/token", scopes=["offline", "accounts:read", "forms:read"])
return SingleUseRefreshTokenOauth2Authenticator(
config, token_refresh_endpoint="https://api.typeform.com/oauth/token", scopes=["offline", "accounts:read", "forms:read"]
)

def check_connection(self, logger: AirbyteLogger, config: Mapping[str, Any]) -> Tuple[bool, any]:
try:
Expand Down

0 comments on commit fcbdfc8

Please sign in to comment.