Skip to content

Commit a5795f1

Browse files
authored
Use older Union syntax for older python version support
1 parent a74b07b commit a5795f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guardrails/telemetry/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def recursive_key_operation(
186186
data: Dict[str, Any] | List[Any] | str,
187187
operation: Callable[[str], str],
188188
keys_to_match: List[str] = ["key", "token"],
189-
) -> Dict[str, Any] | List[Any] | str:
189+
) -> Optional[Union[Dict[str, Any], List[Any], str]]:
190190
"""Recursively checks if any key in the dictionary or JSON object is
191191
present in keys_to_match and applies the operation on the corresponding
192192
value.

0 commit comments

Comments
 (0)