Skip to content

Commit 388f89b

Browse files
fix: remove leftover orjson dead code causing mypy no-redef error
Signed-off-by: abhijeet-dhumal <abhijeetdhumal652@gmail.com>
1 parent c559ac5 commit 388f89b

1 file changed

Lines changed: 1 addition & 24 deletions

File tree

sdk/python/feast/feature_server_utils.py

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,13 @@
66

77
import logging
88
from datetime import datetime, timezone
9-
from typing import Any, Callable, Dict, Optional
10-
11-
from starlette.responses import Response
9+
from typing import Any, Dict, Optional
1210

1311
from feast.protos.feast.serving.ServingService_pb2 import GetOnlineFeaturesResponse
1412
from feast.protos.feast.types.Value_pb2 import Value
1513

1614
logger = logging.getLogger(__name__)
1715

18-
try:
19-
import orjson
20-
21-
def _make_json_response(data: Dict[str, Any]) -> Response:
22-
return Response(
23-
content=orjson.dumps(data),
24-
media_type="application/json",
25-
)
26-
27-
except ImportError:
28-
import json
29-
30-
def _make_json_response(data: Dict[str, Any]) -> Response: # type: ignore[misc]
31-
return Response(
32-
content=json.dumps(data).encode(),
33-
media_type="application/json",
34-
)
35-
36-
37-
_make_json_response: Callable[[Dict[str, Any]], Response]
38-
3916
# FieldStatus enum mapping (protos/feast/serving/ServingService.proto)
4017
_STATUS_NAMES: Dict[int, str] = {
4118
0: "INVALID",

0 commit comments

Comments
 (0)