File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed
dags/veda_data_pipeline/utils Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -43,28 +43,6 @@ class Creds(TypedDict):
4343 scope : str
4444
4545
46- def sanitize_for_json (obj : Any ) -> Any :
47- """
48- Recursively sanitize an object by replacing inf and NaN float values with None.
49- This ensures the object can be JSON serialized without errors.
50-
51- Args:
52- obj: Any Python object (dict, list, float, etc.)
53-
54- Returns:
55- Sanitized object with inf/NaN replaced by None
56- """
57- if isinstance (obj , dict ):
58- return {key : sanitize_for_json (value ) for key , value in obj .items ()}
59- elif isinstance (obj , list ):
60- return [sanitize_for_json (item ) for item in obj ]
61- elif isinstance (obj , float ):
62- if math .isnan (obj ) or math .isinf (obj ):
63- return None
64- return obj
65- else :
66- return obj
67-
6846@dataclass
6947class IngestionApi :
7048 base_url : str
You can’t perform that action at this time.
0 commit comments