Skip to content

Commit 9380cf9

Browse files
format
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
1 parent 6d5ce47 commit 9380cf9

4 files changed

Lines changed: 10 additions & 13 deletions

File tree

sdk/python/feast/feature_store.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,8 @@ def apply(
977977
view.transform_when in ["batch_on_read", "batch_on_write"]
978978
or (
979979
hasattr(view.transform_when, "value")
980-
and view.transform_when.value in ["batch_on_read", "batch_on_write"]
980+
and view.transform_when.value
981+
in ["batch_on_read", "batch_on_write"]
981982
)
982983
)
983984
and hasattr(view, "online")

sdk/python/feast/feature_view.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ def __init__(
175175
self.transform_when = transform_when
176176

177177
# Auto-infer online setting based on transform_when pattern
178-
if transform_when in [TransformExecutionPattern.BATCH_ON_READ, TransformExecutionPattern.BATCH_ON_WRITE]:
178+
if transform_when in [
179+
TransformExecutionPattern.BATCH_ON_READ,
180+
TransformExecutionPattern.BATCH_ON_WRITE,
181+
]:
179182
if online is False:
180183
raise ValueError(
181184
f"Cannot set online=False with transform_when='{transform_when}'. "

sdk/python/feast/transformation/base.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@
22

33
import functools
44
from abc import ABC
5-
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
5+
from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Union
66

77
import dill
88

9-
from feast.entity import Entity
10-
from feast.field import Field
11-
129
if TYPE_CHECKING:
13-
from feast.data_source import RequestSource
14-
from feast.feature_view import FeatureView, FeatureViewProjection
10+
pass
1511
from feast.protos.feast.core.Transformation_pb2 import (
1612
SubstraitTransformationV2 as SubstraitTransformationProto,
1713
)
@@ -22,7 +18,7 @@
2218
TRANSFORMATION_CLASS_FOR_TYPE,
2319
get_transformation_class_from_type,
2420
)
25-
from feast.transformation.mode import TransformationMode, TransformExecutionPattern
21+
from feast.transformation.mode import TransformationMode
2622

2723
# Online compatibility constants
2824
ONLINE_COMPATIBLE_MODES = {"python", "pandas"}

sdk/python/tests/unit/transformation/test_unified_transformation.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
import pytest
99

10-
from feast.entity import Entity
11-
from feast.feature_view import FeatureView
12-
from feast.field import Field
1310
from feast.transformation.base import (
1411
BATCH_ONLY_MODES,
1512
ONLINE_COMPATIBLE_MODES,
@@ -18,7 +15,6 @@
1815
transformation,
1916
)
2017
from feast.transformation.mode import TransformationMode, TransformExecutionPattern
21-
from feast.types import Float64, Int64, String
2218

2319

2420
def create_dummy_source():
@@ -75,6 +71,7 @@ def enum_mode_transform(df):
7571

7672
def test_mode_parameter_validation(self):
7773
"""Test that mode parameter validation works correctly"""
74+
7875
# Test valid mode string
7976
@transformation(mode="python")
8077
def valid_mode_transform(inputs):

0 commit comments

Comments
 (0)