From cdf6701b70f42283f203a5f0cb39cad4cec64e84 Mon Sep 17 00:00:00 2001 From: "dharmishadoshi@gmail.com" Date: Thu, 9 Jan 2025 00:26:18 -0800 Subject: [PATCH] resolving linting issues Signed-off-by: dharmishadoshi@gmail.com Signed-off-by: Dharmisha Doshi --- sdk/python/feast/infra/offline_stores/bigquery.py | 3 +-- sdk/python/feast/infra/offline_stores/offline_utils.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/bigquery.py b/sdk/python/feast/infra/offline_stores/bigquery.py index a98a34ff31e..f0516b594ee 100644 --- a/sdk/python/feast/infra/offline_stores/bigquery.py +++ b/sdk/python/feast/infra/offline_stores/bigquery.py @@ -898,8 +898,7 @@ def arrow_schema_to_bq_schema(arrow_schema: pyarrow.Schema) -> List[SchemaField] {{ featureview.name }}__subquery AS ( SELECT {{ featureview.timestamp_field }} as event_timestamp, - {{ featureview.created_timestamp_column ~ ' as created_timestamp,' if featureview.created_timestamp_column - else '' }} + {{ featureview.created_timestamp_column ~ ' as created_timestamp,' if featureview.created_timestamp_column else '' }} {{ featureview.entity_selections | join(', ')}}{% if featureview.entity_selections %},{% else %}{% endif %} {% for feature in featureview.features %} {{ feature | backticks }} as {% if full_feature_names %} diff --git a/sdk/python/feast/infra/offline_stores/offline_utils.py b/sdk/python/feast/infra/offline_stores/offline_utils.py index 5ea34ac0554..2076f977acc 100644 --- a/sdk/python/feast/infra/offline_stores/offline_utils.py +++ b/sdk/python/feast/infra/offline_stores/offline_utils.py @@ -187,7 +187,7 @@ def build_point_in_time_query( ) -> str: """Build point-in-time query between each feature view table and the entity dataframe for Bigquery and Redshift""" env = Environment(loader=BaseLoader()) - env.filters['backticks'] = enclose_in_backticks + env.filters["backticks"] = enclose_in_backticks template = env.from_string(source=query_template) final_output_feature_names = list(entity_df_columns) @@ -259,6 +259,6 @@ def get_pyarrow_schema_from_batch_source( def enclose_in_backticks(value): # Check if the input is a list if isinstance(value, list): - return [f'`{v}`' for v in value] + return [f"`{v}`" for v in value] else: - return f'`{value}`' + return f"`{value}`"