Skip to content

Commit 65dd77d

Browse files
build(deps): bump black from 22.12.0 to 23.3.0 (#1984)
* build(deps): bump black from 22.12.0 to 23.3.0 Bumps [black](https://github.com/psf/black) from 22.12.0 to 23.3.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](psf/black@22.12.0...23.3.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:production update-type: version-update:semver-major ... --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ivana Kellyerova <[email protected]>
1 parent 24e2940 commit 65dd77d

20 files changed

+4
-25
lines changed

linter-requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mypy==1.3.0
2-
black==22.12.0
2+
black==23.3.0
33
flake8==5.0.4
44
types-certifi
55
types-redis

sentry_sdk/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def _update_session_from_event(
444444

445445
if session.user_agent is None:
446446
headers = (event.get("request") or {}).get("headers")
447-
for (k, v) in iteritems(headers or {}):
447+
for k, v in iteritems(headers or {}):
448448
if k.lower() == "user-agent":
449449
user_agent = v
450450
break

sentry_sdk/integrations/atexit.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from sentry_sdk._types import TYPE_CHECKING
1212

1313
if TYPE_CHECKING:
14-
1514
from typing import Any
1615
from typing import Optional
1716

sentry_sdk/integrations/django/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ def _got_request_exception(request=None, **kwargs):
475475
hub = Hub.current
476476
integration = hub.get_integration(DjangoIntegration)
477477
if integration is not None:
478-
479478
if request is not None and integration.transaction_style == "url":
480479
with hub.configure_scope() as scope:
481480
_attempt_resolve_again(request, scope, integration.transaction_style)
@@ -504,7 +503,7 @@ def cookies(self):
504503
]
505504

506505
clean_cookies = {} # type: Dict[str, Union[str, AnnotatedValue]]
507-
for (key, val) in self.request.COOKIES.items():
506+
for key, val in self.request.COOKIES.items():
508507
if key in privacy_cookies:
509508
clean_cookies[key] = SENSITIVE_DATA_SUBSTITUTE
510509
else:

sentry_sdk/integrations/django/asgi.py

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ def patch_channels_asgi_handler_impl(cls):
6161
from sentry_sdk.integrations.django import DjangoIntegration
6262

6363
if channels.__version__ < "3.0.0":
64-
6564
old_app = cls.__call__
6665

6766
async def sentry_patched_asgi_handler(self, receive, send):

sentry_sdk/integrations/django/middleware.py

-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ def sentry_wrapped_method(*args, **kwargs):
126126
class SentryWrappingMiddleware(
127127
_asgi_middleware_mixin_factory(_check_middleware_span) # type: ignore
128128
):
129-
130129
async_capable = getattr(middleware, "async_capable", False)
131130

132131
def __init__(self, get_response=None, *args, **kwargs):

sentry_sdk/integrations/django/views.py

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def sentry_patched_make_view_atomic(self, *args, **kwargs):
4949
integration = hub.get_integration(DjangoIntegration)
5050

5151
if integration is not None and integration.middleware_spans:
52-
5352
if (
5453
iscoroutinefunction is not None
5554
and wrap_async_view is not None

sentry_sdk/integrations/starlite.py

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def patch_app_init() -> None:
6969
old__init__ = Starlite.__init__
7070

7171
def injection_wrapper(self: "Starlite", *args: "Any", **kwargs: "Any") -> None:
72-
7372
after_exception = kwargs.pop("after_exception", [])
7473
kwargs.update(
7574
after_exception=[

sentry_sdk/integrations/trytond.py

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def __init__(self): # type: () -> None
2222

2323
@staticmethod
2424
def setup_once(): # type: () -> None
25-
2625
app.wsgi_app = sentry_sdk.integrations.wsgi.SentryWsgiMiddleware(app.wsgi_app)
2726

2827
def error_handler(e): # type: (Exception) -> None

sentry_sdk/sessions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def flush(self):
9393

9494
envelope.add_session(session)
9595

96-
for (attrs, states) in pending_aggregates.items():
96+
for attrs, states in pending_aggregates.items():
9797
if len(envelope.items) == MAX_ENVELOPE_ITEMS:
9898
self.capture_func(envelope)
9999
envelope = Envelope()

tests/integrations/gcp/test_gcp.py

-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ def init_sdk(timeout_warning=False, **extra_init_args):
9393
@pytest.fixture
9494
def run_cloud_function():
9595
def inner(code, subprocess_kwargs=()):
96-
9796
events = []
9897
envelopes = []
9998
return_value = None

tests/integrations/grpc/grpc_test_service_pb2.py

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integrations/redis/test_redis.py

-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ def test_data_truncation_custom(sentry_init, capture_events):
184184

185185

186186
def test_breadcrumbs(sentry_init, capture_events):
187-
188187
sentry_init(
189188
integrations=[RedisIntegration(max_data_size=30)],
190189
send_default_pii=True,

tests/integrations/rediscluster/test_rediscluster.py

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
@pytest.fixture(autouse=True)
1616
def monkeypatch_rediscluster_classes(reset_integrations):
17-
1817
try:
1918
pipeline_cls = rediscluster.pipeline.ClusterPipeline
2019
except AttributeError:

tests/integrations/rq/test_rq.py

-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ def test_transport_shutdown(sentry_init, capture_events_forksafe):
9393
def test_transaction_with_error(
9494
sentry_init, capture_events, DictionaryContaining # noqa:N803
9595
):
96-
9796
sentry_init(integrations=[RqIntegration()], traces_sample_rate=1.0)
9897
events = capture_events()
9998

tests/integrations/sqlalchemy/test_sqlalchemy.py

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class Address(Base):
7575
sys.version_info < (3,), reason="This sqla usage seems to be broken on Py2"
7676
)
7777
def test_transactions(sentry_init, capture_events, render_span_tree):
78-
7978
sentry_init(
8079
integrations=[SqlalchemyIntegration()],
8180
_experiments={"record_sql_params": True},

tests/integrations/stdlib/test_httplib.py

-2
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ def test_outgoing_trace_headers(sentry_init, monkeypatch):
165165
op="greeting.sniff",
166166
trace_id="12312012123120121231201212312012",
167167
) as transaction:
168-
169168
HTTPSConnection("www.squirrelchasers.com").request("GET", "/top-chasers")
170169

171170
(request_str,) = mock_send.call_args[0]
@@ -326,7 +325,6 @@ def test_option_trace_propagation_targets(
326325
op="greeting.sniff",
327326
trace_id="12312012123120121231201212312012",
328327
) as transaction:
329-
330328
HTTPSConnection(host).request("GET", path)
331329

332330
(request_str,) = mock_send.call_args[0]

tests/test_conftest.py

-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
def test_string_containing(
2525
test_string, expected_result, StringContaining # noqa: N803
2626
):
27-
2827
assert (test_string == StringContaining("dogs")) is expected_result
2928

3029

@@ -49,7 +48,6 @@ def test_string_containing(
4948
def test_dictionary_containing(
5049
test_dict, expected_result, DictionaryContaining # noqa: N803
5150
):
52-
5351
assert (
5452
test_dict == DictionaryContaining({"dogs": "yes", "cats": "maybe"})
5553
) is expected_result
@@ -98,7 +96,6 @@ def test_object_described_by(
9896
attrs_only_result,
9997
ObjectDescribedBy, # noqa: N803
10098
):
101-
10299
assert (
103100
test_obj == ObjectDescribedBy(type=Dog, attrs={"name": "Maisey", "age": 7})
104101
) is type_and_attrs_result

tests/tracing/test_http_headers.py

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
@pytest.mark.parametrize("sampled", [True, False, None])
1414
def test_to_traceparent(sentry_init, sampled):
15-
1615
transaction = Transaction(
1716
name="/interactions/other-dogs/new-dog",
1817
op="greeting.sniff",

tests/tracing/test_sampling.py

-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ def test_uses_traces_sample_rate_correctly(
7676
sentry_init(traces_sample_rate=traces_sample_rate)
7777

7878
with mock.patch.object(random, "random", return_value=0.5):
79-
8079
transaction = start_transaction(name="dogpark")
8180
assert transaction.sampled is expected_decision
8281

@@ -93,7 +92,6 @@ def test_uses_traces_sampler_return_value_correctly(
9392
sentry_init(traces_sampler=mock.Mock(return_value=traces_sampler_return_value))
9493

9594
with mock.patch.object(random, "random", return_value=0.5):
96-
9795
transaction = start_transaction(name="dogpark")
9896
assert transaction.sampled is expected_decision
9997

0 commit comments

Comments
 (0)