Skip to content

Commit 94ad0fb

Browse files
abhijeet-dhumalntkathole
authored andcommitted
style: ruff format spark.py and spark_source.py
Signed-off-by: abhijeet-dhumal <abhijeetdhumal652@gmail.com>
1 parent c0c8da3 commit 94ad0fb

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/spark.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ def _apply_bfv_transformations_for_historical(
130130
hasattr(fv, "feature_transformation")
131131
and fv.feature_transformation is not None
132132
and (
133-
getattr(fv.feature_transformation, "mode", None)
134-
in ("python", "pandas")
133+
getattr(fv.feature_transformation, "mode", None) in ("python", "pandas")
135134
or getattr(
136135
getattr(fv.feature_transformation, "mode", None), "value", None
137136
)
@@ -144,9 +143,7 @@ def _apply_bfv_transformations_for_historical(
144143
if udf is not None:
145144
temp_view_name = f"__feast_bfv_{ctx.name}_{uuid.uuid4().hex[:8]}"
146145
spark_session.conf.set("spark.sql.runSQLOnFiles", "true")
147-
raw_df = spark_session.sql(
148-
f"SELECT * FROM {ctx.table_subquery}"
149-
)
146+
raw_df = spark_session.sql(f"SELECT * FROM {ctx.table_subquery}")
150147
transformed_df = udf(raw_df)
151148
transformed_df.createOrReplaceTempView(temp_view_name)
152149
ctx = replace(ctx, table_subquery=temp_view_name)

sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/spark_source.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,7 @@ def __init__(
294294
has_query = bool(query)
295295
has_path = bool(path)
296296
if has_table and (has_query or has_path):
297-
raise ValueError(
298-
"'table' cannot be combined with 'query' or 'path'."
299-
)
297+
raise ValueError("'table' cannot be combined with 'query' or 'path'.")
300298
if not (has_table or has_query or has_path):
301299
raise ValueError(
302300
"At least one of params(table, query, path) must be specified."

0 commit comments

Comments
 (0)