From 6b6a223db859effbcae0dfdbe8b6df3e0321f14b Mon Sep 17 00:00:00 2001 From: Lokesh Rangineni Date: Thu, 13 Jun 2024 11:26:58 -0400 Subject: [PATCH] Removing the unnecessary () for if block and removing unused method. Signed-off-by: Lokesh Rangineni --- .../feast/infra/online_stores/remote.py | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/sdk/python/feast/infra/online_stores/remote.py b/sdk/python/feast/infra/online_stores/remote.py index a2dd35626dc..572f7cc4b2f 100644 --- a/sdk/python/feast/infra/online_stores/remote.py +++ b/sdk/python/feast/infra/online_stores/remote.py @@ -86,16 +86,8 @@ def online_read( for index, feature_name in enumerate( response_json["metadata"]["feature_names"] ): - if ( - requested_features is not None - and feature_name in requested_features - ): - if ( - response_json["results"][index]["statuses"][ - feature_value_index - ] - == "PRESENT" - ): + if requested_features is not None and feature_name in requested_features: + if response_json["results"][index]["statuses"][feature_value_index] == "PRESENT": message = python_values_to_proto_values( [ response_json["results"][index]["values"][ @@ -107,7 +99,6 @@ def online_read( feature_values_dict[feature_name] = message[0] else: feature_values_dict[feature_name] = ValueProto() - result_tuples.append((event_ts, feature_values_dict)) return result_tuples else: @@ -142,12 +133,6 @@ def _construct_online_read_api_json_request( ) return req_body - def _check_if_feature_requested(self, feature_name, requested_features): - for requested_feature in requested_features: - if feature_name in requested_feature: - return True - return False - def _get_event_ts(self, response_json) -> datetime: event_ts = "" if len(response_json["results"]) > 1: