From 17ba056a7e08765210160f7bcc9b4ced6728304f Mon Sep 17 00:00:00 2001 From: Jacob Klegar Date: Thu, 7 Jan 2021 18:55:55 -0500 Subject: [PATCH] lint Signed-off-by: Jacob Klegar --- sdk/python/feast/pyspark/launchers/k8s/k8s.py | 10 ++++++---- sdk/python/feast/staging/storage_client.py | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/sdk/python/feast/pyspark/launchers/k8s/k8s.py b/sdk/python/feast/pyspark/launchers/k8s/k8s.py index 6de8b460cd..2761570fb3 100644 --- a/sdk/python/feast/pyspark/launchers/k8s/k8s.py +++ b/sdk/python/feast/pyspark/launchers/k8s/k8s.py @@ -183,18 +183,20 @@ def _job_from_job_info(self, job_info: JobInfo) -> SparkJob: def _get_staging_client(self): uri = urlparse(self._staging_location) return get_staging_client(uri.scheme, self._config) - + def _get_azure_credentials(self): uri = urlparse(self._staging_location) - if (uri.scheme != "wasbs"): + if uri.scheme != "wasbs": return {} account_name = self._config.get(opt.AZURE_BLOB_ACCOUNT_NAME) account_key = self._config.get(opt.AZURE_BLOB_ACCOUNT_ACCESS_KEY) - if (account_name is None or account_key is None): + if account_name is None or account_key is None: raise Exception( f"Using Azure blob storage requires {opt.AZURE_BLOB_ACCOUNT_NAME} and {opt.AZURE_BLOB_ACCOUNT_ACCESS_KEY} to be set in config" ) - return {f"spark.hadoop.fs.azure.account.key.{account_name}.blob.core.windows.net": f"{account_key}"} + return { + f"spark.hadoop.fs.azure.account.key.{account_name}.blob.core.windows.net": f"{account_key}" + } def historical_feature_retrieval( self, job_params: RetrievalJobParameters diff --git a/sdk/python/feast/staging/storage_client.py b/sdk/python/feast/staging/storage_client.py index 934497eabf..cdec19a8b1 100644 --- a/sdk/python/feast/staging/storage_client.py +++ b/sdk/python/feast/staging/storage_client.py @@ -372,7 +372,9 @@ def list_files(self, uri: ParseResult) -> List[str]: if re.match(regex, file) and file not in path ] else: - return [f"wasbs://{bucket}@{self.account_name}.blob.core.windows.net/{path}"] + return [ + f"wasbs://{bucket}@{self.account_name}.blob.core.windows.net/{path}" + ] def _uri_to_bucket_key(self, uri: ParseResult) -> Tuple[str, str]: assert uri.hostname == f"{self.account_name}.blob.core.windows.net"