Skip to content

Commit e864eab

Browse files
authored
style: Reformat with black==24.1.0 (#2680)
1 parent ed3ac88 commit e864eab

File tree

16 files changed

+73
-50
lines changed

16 files changed

+73
-50
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repos:
88
- id: end-of-file-fixer
99

1010
- repo: https://github.com/psf/black
11-
rev: 22.6.0
11+
rev: 24.1.0
1212
hooks:
1313
- id: black
1414
exclude: ^(.*_pb2.py|.*_pb2_grpc.py)

sentry_sdk/integrations/arq.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ def event_processor(event, hint):
149149
extra = event.setdefault("extra", {})
150150
extra["arq-job"] = {
151151
"task": ctx["job_name"],
152-
"args": args
153-
if _should_send_default_pii()
154-
else SENSITIVE_DATA_SUBSTITUTE,
155-
"kwargs": kwargs
156-
if _should_send_default_pii()
157-
else SENSITIVE_DATA_SUBSTITUTE,
152+
"args": (
153+
args if _should_send_default_pii() else SENSITIVE_DATA_SUBSTITUTE
154+
),
155+
"kwargs": (
156+
kwargs if _should_send_default_pii() else SENSITIVE_DATA_SUBSTITUTE
157+
),
158158
"retry": ctx["job_try"],
159159
}
160160

sentry_sdk/integrations/huey.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,16 @@ def event_processor(event, hint):
7373
extra = event.setdefault("extra", {})
7474
extra["huey-job"] = {
7575
"task": task.name,
76-
"args": task.args
77-
if _should_send_default_pii()
78-
else SENSITIVE_DATA_SUBSTITUTE,
79-
"kwargs": task.kwargs
80-
if _should_send_default_pii()
81-
else SENSITIVE_DATA_SUBSTITUTE,
76+
"args": (
77+
task.args
78+
if _should_send_default_pii()
79+
else SENSITIVE_DATA_SUBSTITUTE
80+
),
81+
"kwargs": (
82+
task.kwargs
83+
if _should_send_default_pii()
84+
else SENSITIVE_DATA_SUBSTITUTE
85+
),
8286
"retry": (task.default_retries or 0) - task.retries,
8387
}
8488

sentry_sdk/integrations/opentelemetry/integration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
are experimental and not suitable for production use. They may be changed or
44
removed at any time without prior notice.
55
"""
6+
67
import sys
78
from importlib import import_module
89

sentry_sdk/scope.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ def get_dynamic_sampling_context(self):
270270

271271
baggage = self.get_baggage()
272272
if baggage is not None:
273-
self._propagation_context[
274-
"dynamic_sampling_context"
275-
] = baggage.dynamic_sampling_context()
273+
self._propagation_context["dynamic_sampling_context"] = (
274+
baggage.dynamic_sampling_context()
275+
)
276276

277277
return self._propagation_context["dynamic_sampling_context"]
278278

sentry_sdk/serializer.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@ def _serialize_node_impl(
348348
should_repr_strings=should_repr_strings,
349349
is_databag=is_databag,
350350
is_request_body=is_request_body,
351-
remaining_depth=remaining_depth - 1
352-
if remaining_depth is not None
353-
else None,
351+
remaining_depth=(
352+
remaining_depth - 1 if remaining_depth is not None else None
353+
),
354354
remaining_breadth=remaining_breadth,
355355
)
356356
rv_dict[str_k] = v
@@ -375,9 +375,9 @@ def _serialize_node_impl(
375375
should_repr_strings=should_repr_strings,
376376
is_databag=is_databag,
377377
is_request_body=is_request_body,
378-
remaining_depth=remaining_depth - 1
379-
if remaining_depth is not None
380-
else None,
378+
remaining_depth=(
379+
remaining_depth - 1 if remaining_depth is not None else None
380+
),
381381
remaining_breadth=remaining_breadth,
382382
)
383383
)

sentry_sdk/tracing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,9 @@ def get_trace_context(self):
544544
rv["status"] = self.status
545545

546546
if self.containing_transaction:
547-
rv[
548-
"dynamic_sampling_context"
549-
] = self.containing_transaction.get_baggage().dynamic_sampling_context()
547+
rv["dynamic_sampling_context"] = (
548+
self.containing_transaction.get_baggage().dynamic_sampling_context()
549+
)
550550

551551
return rv
552552

tests/integrations/asyncpg/test_asyncpg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
99
The tests use the following credentials to establish a database connection.
1010
"""
11+
1112
import os
1213

1314

tests/integrations/aws_lambda/client.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,12 +386,14 @@ def repl(runtime, verbose):
386386
_REPL_CODE.format(line=line),
387387
b"",
388388
cleanup.append,
389-
subprocess_kwargs={
390-
"stdout": subprocess.DEVNULL,
391-
"stderr": subprocess.DEVNULL,
392-
}
393-
if not verbose
394-
else {},
389+
subprocess_kwargs=(
390+
{
391+
"stdout": subprocess.DEVNULL,
392+
"stderr": subprocess.DEVNULL,
393+
}
394+
if not verbose
395+
else {}
396+
),
395397
)
396398

397399
for line in base64.b64decode(response["LogResult"]).splitlines():

tests/integrations/clickhouse_driver/test_clickhouse_driver.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
docker run -d -p 18123:8123 -p9000:9000 --name clickhouse-test --ulimit nofile=262144:262144 --rm clickhouse/clickhouse-server
55
```
66
"""
7+
78
import clickhouse_driver
89
from clickhouse_driver import Client, connect
910

0 commit comments

Comments
 (0)