From 4189cda89518c779d329b7cd05c9050533b6a40e Mon Sep 17 00:00:00 2001 From: HectorSin Date: Sat, 10 Jan 2026 21:25:25 +0900 Subject: [PATCH] refactor: simplify type hint and add return type for sanitize function Signed-off-by: HectorSin --- cognee/shared/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cognee/shared/utils.py b/cognee/shared/utils.py index ce9fb2169..3b6e7ba14 100644 --- a/cognee/shared/utils.py +++ b/cognee/shared/utils.py @@ -59,7 +59,7 @@ def get_anonymous_id(): return anonymous_id -def _sanitize_nested_properties(obj: Union[Dict, List, Any], property_names: list[str]): +def _sanitize_nested_properties(obj: Any, property_names: list[str]) -> Any: """ Recursively replaces any property whose key matches one of `property_names` (e.g., ['url', 'path']) in a nested dict or list with a uuid5 hash