From 94a7bb5c7e7913853bb329f02b13d20b3976ae8f Mon Sep 17 00:00:00 2001 From: Ketan Umare Date: Mon, 27 Mar 2023 17:36:39 -0700 Subject: [PATCH] Fixed lint errors Signed-off-by: Ketan Umare --- flytekit/clients/auth/authenticator.py | 6 ------ flytekit/clients/auth/token_client.py | 2 +- tests/flytekit/unit/clients/auth/test_token_client.py | 2 +- tests/flytekit/unit/clients/test_auth_helper.py | 1 - 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/flytekit/clients/auth/authenticator.py b/flytekit/clients/auth/authenticator.py index 82842b9368..9582c901d8 100644 --- a/flytekit/clients/auth/authenticator.py +++ b/flytekit/clients/auth/authenticator.py @@ -1,14 +1,8 @@ -import base64 -import json import logging import subprocess -import time import typing from abc import abstractmethod from dataclasses import dataclass -from datetime import datetime, timedelta - -import requests from . import token_client from .auth_client import AuthorizationClient diff --git a/flytekit/clients/auth/token_client.py b/flytekit/clients/auth/token_client.py index 7e9c13d080..e7e55f74a9 100644 --- a/flytekit/clients/auth/token_client.py +++ b/flytekit/clients/auth/token_client.py @@ -145,7 +145,7 @@ def poll_token_endpoint(resp: DeviceCodeResponse, token_endpoint: str, client_id ... except Exception: raise - print(f"Authentication Pending...") + print("Authentication Pending...") time.sleep(interval.total_seconds()) tick = tick + interval raise AuthenticationError("Authentication failed!") diff --git a/tests/flytekit/unit/clients/auth/test_token_client.py b/tests/flytekit/unit/clients/auth/test_token_client.py index 4c2b90ed97..6e56c351bc 100644 --- a/tests/flytekit/unit/clients/auth/test_token_client.py +++ b/tests/flytekit/unit/clients/auth/test_token_client.py @@ -1,5 +1,5 @@ import json -from unittest.mock import MagicMock, PropertyMock, patch +from unittest.mock import MagicMock, patch import pytest diff --git a/tests/flytekit/unit/clients/test_auth_helper.py b/tests/flytekit/unit/clients/test_auth_helper.py index e3c87e033f..3bd57918f4 100644 --- a/tests/flytekit/unit/clients/test_auth_helper.py +++ b/tests/flytekit/unit/clients/test_auth_helper.py @@ -1,5 +1,4 @@ import os.path -import typing from unittest.mock import MagicMock, patch import pytest