Skip to content

Commit c63ba7e

Browse files
committed
fix: ruff
1 parent c4d1f70 commit c63ba7e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

posthog/exception_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,9 @@ def serialize_code_variables(
10471047
serialized = _serialize_variable_value(value, limiter, max_length)
10481048
if serialized is None:
10491049
break
1050-
if isinstance(serialized, str) and _pattern_matches(serialized, compiled_mask):
1050+
if isinstance(serialized, str) and _pattern_matches(
1051+
serialized, compiled_mask
1052+
):
10511053
result[name] = CODE_VARIABLES_REDACTED_VALUE
10521054
else:
10531055
result[name] = serialized

posthog/test/test_exception_capture.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ def process_data():
9999
assert b'"my_dict": "{\\"name\\": \\"test\\", \\"value\\": 123}"' in output
100100
assert b"<__main__.UnserializableObject object at" in output
101101
assert b"'my_password': '$$_posthog_redacted_based_on_masking_rules_$$'" in output
102-
assert b"'my_innocent_var': '$$_posthog_redacted_based_on_masking_rules_$$'" in output
102+
assert (
103+
b"'my_innocent_var': '$$_posthog_redacted_based_on_masking_rules_$$'" in output
104+
)
103105
assert b"'__should_be_ignored':" not in output
104106

105107
# Variables from intermediate_function frame

0 commit comments

Comments
 (0)