Skip to content

Commit 4a5c932

Browse files
soooojinleeclaude
andcommitted
style: Fix ruff lint and formatting issues
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a9f4116 commit 4a5c932

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

sdk/python/feast/feature_store.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2598,8 +2598,7 @@ def _doc_feature(x):
25982598
data=requested_features_data,
25992599
)
26002600
feature_types = {
2601-
f.name: f.dtype.to_value_type()
2602-
for f in requested_feature_view.features
2601+
f.name: f.dtype.to_value_type() for f in requested_feature_view.features
26032602
}
26042603
return OnlineResponse(online_features_response, feature_types=feature_types)
26052604

@@ -2885,10 +2884,7 @@ def _retrieve_from_online_store_v2(
28852884
online_features_response.metadata.feature_names.val.extend(
28862885
features_to_request
28872886
)
2888-
feature_types = {
2889-
f.name: f.dtype.to_value_type()
2890-
for f in table.features
2891-
}
2887+
feature_types = {f.name: f.dtype.to_value_type() for f in table.features}
28922888
return OnlineResponse(online_features_response, feature_types=feature_types)
28932889

28942890
table_entity_values, idxs, output_len = utils._get_unique_entities_from_values(
@@ -2916,10 +2912,7 @@ def _retrieve_from_online_store_v2(
29162912
data=entity_key_dict,
29172913
)
29182914

2919-
feature_types = {
2920-
f.name: f.dtype.to_value_type()
2921-
for f in table.features
2922-
}
2915+
feature_types = {f.name: f.dtype.to_value_type() for f in table.features}
29232916
return OnlineResponse(online_features_response, feature_types=feature_types)
29242917

29252918
def serve(

sdk/python/feast/infra/online_stores/online_store.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from feast.protos.feast.types.Value_pb2 import Value as ValueProto
3131
from feast.repo_config import RepoConfig
3232
from feast.stream_feature_view import StreamFeatureView
33+
from feast.value_type import ValueType
3334

3435

3536
class OnlineStore(ABC):
@@ -340,11 +341,9 @@ async def query_table(table, requested_features):
340341
@staticmethod
341342
def _build_feature_types(
342343
grouped_refs: List,
343-
) -> Dict[str, "ValueType"]:
344+
) -> Dict[str, ValueType]:
344345
"""Build a mapping of feature names to ValueType from grouped feature view refs."""
345-
from feast.value_type import ValueType as VT
346-
347-
feature_types: Dict[str, VT] = {}
346+
feature_types: Dict[str, ValueType] = {}
348347
for table, requested_features in grouped_refs:
349348
for field in table.features:
350349
if field.name in requested_features:

sdk/python/feast/type_map.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,16 @@ def _type_err(item, dtype):
420420
ValueType.STRING_LIST: (StringList, "string_list_val", [np.str_, str]),
421421
ValueType.BOOL_LIST: (BoolList, "bool_list_val", [np.bool_, bool]),
422422
ValueType.BYTES_LIST: (BytesList, "bytes_list_val", [np.bytes_, bytes]),
423-
ValueType.UUID_LIST: (StringList, "string_list_val", [np.str_, str, uuid_module.UUID]),
424-
ValueType.TIME_UUID_LIST: (StringList, "string_list_val", [np.str_, str, uuid_module.UUID]),
423+
ValueType.UUID_LIST: (
424+
StringList,
425+
"string_list_val",
426+
[np.str_, str, uuid_module.UUID],
427+
),
428+
ValueType.TIME_UUID_LIST: (
429+
StringList,
430+
"string_list_val",
431+
[np.str_, str, uuid_module.UUID],
432+
),
425433
}
426434

427435
PYTHON_SET_VALUE_TYPE_TO_PROTO_VALUE: Dict[

sdk/python/feast/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,9 @@ def _augment_response_with_on_demand_transforms(
667667
else feature_name
668668
)
669669

670-
initial_response = OnlineResponse(online_features_response, feature_types=feature_types)
670+
initial_response = OnlineResponse(
671+
online_features_response, feature_types=feature_types
672+
)
671673
initial_response_arrow: Optional[pyarrow.Table] = None
672674
initial_response_dict: Optional[Dict[str, List[Any]]] = None
673675

0 commit comments

Comments
 (0)