diff --git a/studio/backend/tests/test_codex_provider.py b/studio/backend/tests/test_codex_provider.py index be0ab1ace5..92ef48d439 100644 --- a/studio/backend/tests/test_codex_provider.py +++ b/studio/backend/tests/test_codex_provider.py @@ -2047,9 +2047,7 @@ class TestDeviceLoginLogFilter: # caught when the production source is loaded. import importlib - mod = importlib.reload( - importlib.import_module("core.inference.codex_provider") - ) + mod = importlib.reload(importlib.import_module("core.inference.codex_provider")) # Walk the source string to find the patterns; they live inside # the generator. Use a stable proxy: read the regex literals. import re @@ -2059,8 +2057,10 @@ class TestDeviceLoginLogFilter: # phrases AND an unsafe-content blocklist. assert "safe_log_res" in src assert "unsafe_log_re" in src - assert "not\\s+(?:logged|signed)\\s+in" in src or \ - "not\\\\s+(?:logged|signed)\\\\s+in" in src + assert ( + "not\\s+(?:logged|signed)\\s+in" in src + or "not\\\\s+(?:logged|signed)\\\\s+in" in src + ) return None def test_safe_log_source_has_anchored_patterns_and_blocklist(self): @@ -2117,5 +2117,6 @@ class TestDeviceLoginLogFilter: "Browser opened", "Press Ctrl+C to cancel", ]: - assert any(pat.search(clean) for pat in safe_log_res), \ - f"clean line should match safe: {clean!r}" + assert any( + pat.search(clean) for pat in safe_log_res + ), f"clean line should match safe: {clean!r}"