diff --git a/litellm/proxy/guardrails/guardrail_hooks/presidio.py b/litellm/proxy/guardrails/guardrail_hooks/presidio.py index 2cbb6c4e8ac..d5d1382e635 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/presidio.py +++ b/litellm/proxy/guardrails/guardrail_hooks/presidio.py @@ -859,7 +859,7 @@ class _OPTIONAL_PresidioPIIMasking(CustomGuardrail): # Assign sequence numbers in forward (left-to-right) order so # that is the first entity in the text, etc. sorted_forward: Final = sorted(analyze_results, key=lambda x: x["start"]) - seq_map: Final = {} + seq_map: Final[dict[tuple[int, int], int]] = {} for idx, ar in enumerate(sorted_forward, start=1): seq_map[(ar["start"], ar["end"])] = idx