Skip to content

Commit 5921645

Browse files
abhijeet-dhumalntkathole
authored andcommitted
fix: Remove redundant isinstance checks for Redis protobuf parsing
Signed-off-by: abhijeet-dhumal <abhijeetdhumal652@gmail.com>
1 parent ef61f8a commit 5921645

File tree

1 file changed

+2
-6
lines changed
  • sdk/python/feast/infra/online_stores

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -445,17 +445,13 @@ def _get_features_for_entity(
445445
ts_key = f"_ts:{feature_view}"
446446
ts_val = res_val.pop(ts_key)
447447
if ts_val:
448-
res_ts.ParseFromString(
449-
ts_val if isinstance(ts_val, bytes) else bytes(ts_val)
450-
)
448+
res_ts.ParseFromString(ts_val)
451449

452450
res: Dict[str, ValueProto] = {}
453451
for feature_name, val_bin in res_val.items():
454452
val = ValueProto()
455453
if val_bin:
456-
val.ParseFromString(
457-
val_bin if isinstance(val_bin, bytes) else bytes(val_bin)
458-
)
454+
val.ParseFromString(val_bin)
459455
res[feature_name] = val
460456

461457
if not res:

0 commit comments

Comments
 (0)