Skip to content

Commit e9a581f

Browse files
committed
Reformat and fix merge conflict errors
1 parent 9fa7bee commit e9a581f

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

sentry_sdk/ai/utils.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import inspect
22
import json
3-
from copy import deepcopy
43
from collections import deque
5-
from typing import TYPE_CHECKING
4+
from copy import deepcopy
65
from sys import getsizeof
6+
from typing import TYPE_CHECKING
77

88
if TYPE_CHECKING:
99
from typing import Any, Callable, Dict, List, Optional, Tuple
@@ -107,8 +107,9 @@ def get_start_span_function() -> "Callable[..., Any]":
107107
return sentry_sdk.start_span if transaction_exists else sentry_sdk.start_transaction
108108

109109

110-
def _truncate_single_message_content_if_present(message: "Tuple[Dict[str, Any], int]", max_chars: int) -> "Dict[str, Any]":
111-
# type: (Dict[str, Any], int) -> Dict[str, Any]
110+
def _truncate_single_message_content_if_present(
111+
message: "Dict[str, Any]", max_chars: int
112+
) -> "Dict[str, Any]":
112113
"""
113114
Truncate a message's content to at most `max_chars` characters and append an
114115
ellipsis if truncation occurs.
@@ -144,7 +145,7 @@ def truncate_messages_by_size(
144145
messages: "List[Dict[str, Any]]",
145146
max_bytes: int = MAX_GEN_AI_MESSAGE_BYTES,
146147
max_single_message_chars: int = MAX_SINGLE_MESSAGE_CONTENT_CHARS,
147-
):
148+
) -> "Tuple[List[Dict[str, Any]], int]":
148149
"""
149150
Returns a truncated messages list, consisting of
150151
- the last message, with its content truncated to `max_single_message_chars` characters,

sentry_sdk/tracing_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,9 @@ def from_options(cls, scope: "sentry_sdk.scope.Scope") -> "Optional[Baggage]":
660660
return Baggage.populate_from_propagation_context(scope._propagation_context)
661661

662662
@classmethod
663-
def populate_from_propagation_context(cls, propagation_context: "PropagationContext") -> "Baggage":
663+
def populate_from_propagation_context(
664+
cls, propagation_context: "PropagationContext"
665+
) -> "Baggage":
664666
sentry_items: "Dict[str, str]" = {}
665667
third_party_items = ""
666668
mutable = False

0 commit comments

Comments
 (0)