10000 fix: Formatting · laranea/sentry-python@2267fd4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2267fd4

Browse files
author
sentry-bot
committed
fix: Formatting
1 parent a57a6c2 commit 2267fd4

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

sentry_sdk/integrations/django/views.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,20 @@ def sentry_patched_make_view_atomic(self, *args, **kwargs):
3939

4040
if integration is not None and integration.middleware_spans:
4141

42-
if iscoroutinefunction is not None and wrap_async_view is not None and iscoroutinefunction(callback):
42+
if (
43+
iscoroutinefunction is not None
44+
and wrap_async_view is not None
45+
and iscoroutinefunction(callback)
46+
):
4347
sentry_wrapped_callback = wrap_async_view(hub, callback)
4448
else:
45-
print((iscoroutinefunction, wrap_async_view, iscoroutinefunction(callback)))
49+
print(
50+
(
51+
iscoroutinefunction,
52+
wrap_async_view,
53+
iscoroutinefunction(callback),
54+
)
55+
)
4656
sentry_wrapped_callback = _wrap_sync_view(hub, callback)
4757

4858
else:

tests/integrations/django/asgi/test_asgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async def test_async_views(sentry_init, capture_events, application):
5555
response = await comm.get_response()
5656
assert response["status"] == 200
5757

58-
event, = events
58+
(event,) = events
5959

6060
assert event["transaction"] == "/async_message"
6161
assert event["request"] == {

tests/integrations/django/myapp/views.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,11 @@ def csrf_hello_not_exempt(*args, **kwargs):
123123

124124

125125
try:
126-
exec("""async def async_message(request):
126+
exec(
127+
"""async def async_message(request):
127128
sentry_sdk.capture_message("hi")
128-
return HttpResponse("ok")""")
129+
return HttpResponse("ok")"""
130+
)
129131

130132
except SyntaxError:
131133
async_message = None

0 commit comments

Comments
 (0)
0