Skip to content

Commit a51a1b4

Browse files
committed
fold _to_config_structure into base64_string
1 parent e6aab0c commit a51a1b4

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/sentry/grouping/enhancer/__init__.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -755,18 +755,16 @@ def assemble_stacktrace_component(
755755

756756
return stacktrace_component
757757

758-
def _to_config_structure(self) -> list[Any]:
759-
# TODO: Can we switch this to a tuple so we can type it more exactly?
760-
return [
761-
self.version,
762-
self.bases,
763-
[rule._to_config_structure(self.version) for rule in self.rules],
764-
]
765-
766758
@cached_property
767759
def base64_string(self) -> str:
768760
"""A base64 string representation of the enhancements object"""
769-
pickled = msgpack.dumps(self._to_config_structure())
761+
pickled = msgpack.dumps(
762+
[
763+
self.version,
764+
self.bases,
765+
[rule._to_config_structure(self.version) for rule in self.rules],
766+
]
767+
)
770768
compressed_pickle = zstandard.compress(pickled)
771769
base64_bytes = base64.urlsafe_b64encode(compressed_pickle).strip(b"=")
772770
base64_str = base64_bytes.decode("ascii")

0 commit comments

Comments
 (0)