Skip to content
Prev Previous commit
moved imports as per comment
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
  • Loading branch information
dmartinol committed Aug 30, 2024
commit 50306c1041cad50029f85f1ea9370a3c87ab8ba6
6 changes: 2 additions & 4 deletions sdk/python/feast/errors.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import importlib
import json
import logging
from typing import Any, List, Optional, Set

Expand Down Expand Up @@ -36,7 +38,6 @@ def to_error_detail(self) -> str:
Returns:
str: a string representation of a JSON document including `module`, `class` and `message` fields.
"""
import json

m = {
"module": f"{type(self).__module__}",
Expand All @@ -47,9 +48,6 @@ def to_error_detail(self) -> str:

@staticmethod
def from_error_detail(detail: str) -> Optional["FeastError"]:
import importlib
import json

try:
m = json.loads(detail)
if all(f in m for f in ["module", "class", "message"]):
Expand Down