Skip to content

Commit 245b495

Browse files
committed
remove some comments
1 parent 638e1b4 commit 245b495

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sentry_sdk/integrations/langchain.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ def on_chat_model_start(self, serialized, messages, *, run_id, **kwargs):
250250
_set_tools_on_span(span, all_params.get("tools"))
251251

252252
if should_send_default_pii() and self.include_prompts:
253-
# Flatten the nested list structure to a single list of message dicts
254253
normalized_messages = []
255254
for list_ in messages:
256255
for message in list_:
@@ -479,13 +478,11 @@ def _get_token_usage(obj):
479478
if usage is not None:
480479
return usage
481480

482-
# check for usage in the object itself
483481
for name in possible_names:
484482
usage = _get_value(obj, name)
485483
if usage is not None:
486484
return usage
487485

488-
# no usage found anywhere
489486
return None
490487

491488

@@ -686,7 +683,7 @@ def new_configure(
686683
]
687684
elif isinstance(local_callbacks, BaseCallbackHandler):
688685
local_callbacks = [local_callbacks, sentry_handler]
689-
else: # local_callbacks is a list
686+
else:
690687
local_callbacks = [*local_callbacks, sentry_handler]
691688

692689
return f(

0 commit comments

Comments
 (0)