Skip to content

Commit 7be1b04

Browse files
committed
address copilot nits
1 parent a901d25 commit 7be1b04

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/guardrails/_base_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ def _mask_text(text: str) -> str:
287287
# Check for encoded PII if enabled
288288
has_encoded_pii = False
289289
encoded_candidates = []
290-
decoded_text = normalized
291290

292291
if detect_encoded_pii:
293292
decoded_text, encoded_candidates = _build_decoded_text(normalized)

tests/unit/test_base_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def test_apply_preflight_modifications_structured_content_with_unicode_obfuscati
295295

296296
# Should detect and mask the obfuscated email
297297
assert "<EMAIL_ADDRESS>" in modified[0]["content"][0]["text"] # noqa: S101
298-
assert "@" not in modified[0]["content"][0]["text"] or "@" not in modified[0]["content"][0]["text"] # noqa: S101
298+
assert "@" not in modified[0]["content"][0]["text"] and "@" not in modified[0]["content"][0]["text"] # noqa: S101
299299

300300

301301
def test_apply_preflight_modifications_structured_content_with_url_encoded_pii() -> None:

0 commit comments

Comments
 (0)