Skip to content

Commit

Permalink
build(deps): bump black from 22.12.0 to 23.3.0 (#1984)
Browse files Browse the repository at this point in the history
* 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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ivana Kellyerova <ivana.kellyerova@sentry.io>
  • Loading branch information
dependabot[bot] and sentrivana authored Jun 7, 2023
1 parent 24e2940 commit 65dd77d
Show file tree
Hide file tree
Showing 20 changed files with 4 additions and 25 deletions.
2 changes: 1 addition & 1 deletion linter-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mypy==1.3.0
black==22.12.0
black==23.3.0
flake8==5.0.4
types-certifi
types-redis
Expand Down
2 changes: 1 addition & 1 deletion sentry_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def _update_session_from_event(

if session.user_agent is None:
headers = (event.get("request") or {}).get("headers")
for (k, v) in iteritems(headers or {}):
for k, v in iteritems(headers or {}):
if k.lower() == "user-agent":
user_agent = v
break
Expand Down
1 change: 0 additions & 1 deletion sentry_sdk/integrations/atexit.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from sentry_sdk._types import TYPE_CHECKING

if TYPE_CHECKING:

from typing import Any
from typing import Optional

Expand Down
3 changes: 1 addition & 2 deletions sentry_sdk/integrations/django/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ def _got_request_exception(request=None, **kwargs):
hub = Hub.current
integration = hub.get_integration(DjangoIntegration)
if integration is not None:

if request is not None and integration.transaction_style == "url":
with hub.configure_scope() as scope:
_attempt_resolve_again(request, scope, integration.transaction_style)
Expand Down Expand Up @@ -504,7 +503,7 @@ def cookies(self):
]

clean_cookies = {} # type: Dict[str, Union[str, AnnotatedValue]]
for (key, val) in self.request.COOKIES.items():
for key, val in self.request.COOKIES.items():
if key in privacy_cookies:
clean_cookies[key] = SENSITIVE_DATA_SUBSTITUTE
else:
Expand Down
1 change: 0 additions & 1 deletion sentry_sdk/integrations/django/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ def patch_channels_asgi_handler_impl(cls):
from sentry_sdk.integrations.django import DjangoIntegration

if channels.__version__ < "3.0.0":

old_app = cls.__call__

async def sentry_patched_asgi_handler(self, receive, send):
Expand Down
1 change: 0 additions & 1 deletion sentry_sdk/integrations/django/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ def sentry_wrapped_method(*args, **kwargs):
class SentryWrappingMiddleware(
_asgi_middleware_mixin_factory(_check_middleware_span) # type: ignore
):

async_capable = getattr(middleware, "async_capable", False)

def __init__(self, get_response=None, *args, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion sentry_sdk/integrations/django/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def sentry_patched_make_view_atomic(self, *args, **kwargs):
integration = hub.get_integration(DjangoIntegration)

if integration is not None and integration.middleware_spans:

if (
iscoroutinefunction is not None
and wrap_async_view is not None
Expand Down
1 change: 0 additions & 1 deletion sentry_sdk/integrations/starlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def patch_app_init() -> None:
old__init__ = Starlite.__init__

def injection_wrapper(self: "Starlite", *args: "Any", **kwargs: "Any") -> None:

after_exception = kwargs.pop("after_exception", [])
kwargs.update(
after_exception=[
Expand Down
1 change: 0 additions & 1 deletion sentry_sdk/integrations/trytond.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def __init__(self): # type: () -> None

@staticmethod
def setup_once(): # type: () -> None

app.wsgi_app = sentry_sdk.integrations.wsgi.SentryWsgiMiddleware(app.wsgi_app)

def error_handler(e): # type: (Exception) -> None
Expand Down
2 changes: 1 addition & 1 deletion sentry_sdk/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def flush(self):

envelope.add_session(session)

for (attrs, states) in pending_aggregates.items():
for attrs, states in pending_aggregates.items():
if len(envelope.items) == MAX_ENVELOPE_ITEMS:
self.capture_func(envelope)
envelope = Envelope()
Expand Down
1 change: 0 additions & 1 deletion tests/integrations/gcp/test_gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def init_sdk(timeout_warning=False, **extra_init_args):
@pytest.fixture
def run_cloud_function():
def inner(code, subprocess_kwargs=()):

events = []
envelopes = []
return_value = None
Expand Down
1 change: 0 additions & 1 deletion tests/integrations/grpc/grpc_test_service_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion tests/integrations/redis/test_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ def test_data_truncation_custom(sentry_init, capture_events):


def test_breadcrumbs(sentry_init, capture_events):

sentry_init(
integrations=[RedisIntegration(max_data_size=30)],
send_default_pii=True,
Expand Down
1 change: 0 additions & 1 deletion tests/integrations/rediscluster/test_rediscluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

@pytest.fixture(autouse=True)
def monkeypatch_rediscluster_classes(reset_integrations):

try:
pipeline_cls = rediscluster.pipeline.ClusterPipeline
except AttributeError:
Expand Down
1 change: 0 additions & 1 deletion tests/integrations/rq/test_rq.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def test_transport_shutdown(sentry_init, capture_events_forksafe):
def test_transaction_with_error(
sentry_init, capture_events, DictionaryContaining # noqa:N803
):

sentry_init(integrations=[RqIntegration()], traces_sample_rate=1.0)
events = capture_events()

Expand Down
1 change: 0 additions & 1 deletion tests/integrations/sqlalchemy/test_sqlalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ class Address(Base):
sys.version_info < (3,), reason="This sqla usage seems to be broken on Py2"
)
def test_transactions(sentry_init, capture_events, render_span_tree):

sentry_init(
integrations=[SqlalchemyIntegration()],
_experiments={"record_sql_params": True},
Expand Down
2 changes: 0 additions & 2 deletions tests/integrations/stdlib/test_httplib.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ def test_outgoing_trace_headers(sentry_init, monkeypatch):
op="greeting.sniff",
trace_id="12312012123120121231201212312012",
) as transaction:

HTTPSConnection("www.squirrelchasers.com").request("GET", "/top-chasers")

(request_str,) = mock_send.call_args[0]
Expand Down Expand Up @@ -326,7 +325,6 @@ def test_option_trace_propagation_targets(
op="greeting.sniff",
trace_id="12312012123120121231201212312012",
) as transaction:

HTTPSConnection(host).request("GET", path)

(request_str,) = mock_send.call_args[0]
Expand Down
3 changes: 0 additions & 3 deletions tests/test_conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
def test_string_containing(
test_string, expected_result, StringContaining # noqa: N803
):

assert (test_string == StringContaining("dogs")) is expected_result


Expand All @@ -49,7 +48,6 @@ def test_string_containing(
def test_dictionary_containing(
test_dict, expected_result, DictionaryContaining # noqa: N803
):

assert (
test_dict == DictionaryContaining({"dogs": "yes", "cats": "maybe"})
) is expected_result
Expand Down Expand Up @@ -98,7 +96,6 @@ def test_object_described_by(
attrs_only_result,
ObjectDescribedBy, # noqa: N803
):

assert (
test_obj == ObjectDescribedBy(type=Dog, attrs={"name": "Maisey", "age": 7})
) is type_and_attrs_result
Expand Down
1 change: 0 additions & 1 deletion tests/tracing/test_http_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

@pytest.mark.parametrize("sampled", [True, False, None])
def test_to_traceparent(sentry_init, sampled):

transaction = Transaction(
name="/interactions/other-dogs/new-dog",
op="greeting.sniff",
Expand Down
2 changes: 0 additions & 2 deletions tests/tracing/test_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ def test_uses_traces_sample_rate_correctly(
sentry_init(traces_sample_rate=traces_sample_rate)

with mock.patch.object(random, "random", return_value=0.5):

transaction = start_transaction(name="dogpark")
assert transaction.sampled is expected_decision

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

with mock.patch.object(random, "random", return_value=0.5):

transaction = start_transaction(name="dogpark")
assert transaction.sampled is expected_decision

Expand Down

0 comments on commit 65dd77d

Please sign in to comment.