Skip to content

Commit 227acbe

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

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
@@ -183,7 +183,7 @@ def can_convert_to_dict(s: str) -> bool:
183183

184184

185185
def recursive_key_operation(
186-
data: Dict[str, Any] | List[Any] | str,
186+
data: Optional[Union[Dict[str, Any], List[Any], str]],
187187
operation: Callable[[str], str],
188188
keys_to_match: List[str] = ["key", "token"],
189189
) -> Optional[Union[Dict[str, Any], List[Any], str]]:

0 commit comments

Comments
 (0)