Skip to content

Commit c2d47f1

Browse files
Peter Uittenbroekpuittenbroek
authored andcommitted
Use kwargs more
1 parent b775430 commit c2d47f1

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

sentry_sdk/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,10 @@ def _prepare_event(
286286
"values": [
287287
{
288288
"stacktrace": current_stacktrace(
289-
self.options["max_string_length"],
290289
include_local_variables=self.options[
291290
"include_local_variables"
292291
],
292+
max_string_length=self.options["max_string_length"],
293293
),
294294
"crashed": False,
295295
"current": True,

sentry_sdk/integrations/logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,10 @@ def _emit(self, record):
205205
"values": [
206206
{
207207
"stacktrace": current_stacktrace(
208-
client_options["max_string_length"],
209208
include_local_variables=client_options[
210209
"include_local_variables"
211210
],
211+
max_string_length=client_options["max_string_length"],
212212
),
213213
"crashed": False,
214214
"current": True,

sentry_sdk/serializer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ def _serialize_node_impl(
397397
if is_span_description:
398398
return obj
399399

400-
return _flatten_annotated(strip_string(obj, max_string_length))
400+
return _flatten_annotated(strip_string(obj, max_length=max_string_length))
401401

402402
#
403403
# Start of serialize() function

sentry_sdk/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ def get_lines_from_file(
515515
def get_source_context(
516516
frame, # type: FrameType
517517
tb_lineno, # type: int
518-
max_string_length, # type: int
518+
max_string_length=None, # type: Optional[int]
519519
):
520520
# type: (...) -> Tuple[List[Annotated[str]], Optional[Annotated[str]], List[Annotated[str]]]
521521
try:
@@ -650,7 +650,7 @@ def serialize_frame(
650650

651651

652652
def current_stacktrace(
653-
max_string_length, include_local_variables=True, include_source_context=True
653+
include_local_variables=True, include_source_context=True, max_string_length=None
654654
):
655655
# type: (bool, bool) -> Any
656656
__tracebackhide__ = True

0 commit comments

Comments
 (0)