From b27457862feb4323e9d8ae8d4b7eb7e45fc6e20d Mon Sep 17 00:00:00 2001 From: crp4222 <121295348+crp4222@users.noreply.github.com> Date: Fri, 3 Jul 2026 20:43:44 +0100 Subject: [PATCH] style(guardrails): ruff format the privaite hook --- .../proxy/guardrails/guardrail_hooks/privaite/privaite.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/litellm/proxy/guardrails/guardrail_hooks/privaite/privaite.py b/litellm/proxy/guardrails/guardrail_hooks/privaite/privaite.py index c946a88f7c3..62a37f4b812 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/privaite/privaite.py +++ b/litellm/proxy/guardrails/guardrail_hooks/privaite/privaite.py @@ -287,12 +287,7 @@ class PrivaiteGuardrail(CustomGuardrail): raise HTTPException(status_code=400, detail={"error": str(exc)}) from exc - if ( - mapping is not None - and self.deanonymize - and not mapping.is_empty - and not data.get("background") - ): + if mapping is not None and self.deanonymize and not mapping.is_empty and not data.get("background"): # Carry a plain fake->original dict to the post-call hook on the same # request, the same channel LiteLLM's Presidio guardrail uses. The # post-call hook pops it again so it does not linger in metadata.