diff --git a/sentry_sdk/integrations/dramatiq.py b/sentry_sdk/integrations/dramatiq.py index f8f72d0ecd..f9ef13e20b 100644 --- a/sentry_sdk/integrations/dramatiq.py +++ b/sentry_sdk/integrations/dramatiq.py @@ -140,7 +140,7 @@ def inner(event, hint): return inner -class DramatiqMessageExtractor(object): +class DramatiqMessageExtractor: def __init__(self, message): # type: (Message) -> None self.message_data = dict(message.asdict()) diff --git a/sentry_sdk/integrations/logging.py b/sentry_sdk/integrations/logging.py index 103c4ab7b6..5d23440ad1 100644 --- a/sentry_sdk/integrations/logging.py +++ b/sentry_sdk/integrations/logging.py @@ -111,7 +111,7 @@ def sentry_patched_callhandlers(self, record): logging.Logger.callHandlers = sentry_patched_callhandlers # type: ignore -class _BaseHandler(logging.Handler, object): +class _BaseHandler(logging.Handler): COMMON_RECORD_ATTRS = frozenset( ( "args", diff --git a/sentry_sdk/profiler/continuous_profiler.py b/sentry_sdk/profiler/continuous_profiler.py index d3f3438357..5d64896b93 100644 --- a/sentry_sdk/profiler/continuous_profiler.py +++ b/sentry_sdk/profiler/continuous_profiler.py @@ -164,7 +164,7 @@ def get_profiler_id(): return _scheduler.profiler_id -class ContinuousScheduler(object): +class ContinuousScheduler: mode = "unknown" # type: ContinuousProfilerMode def __init__(self, frequency, options, sdk_info, capture_func): @@ -410,7 +410,7 @@ def teardown(self): PROFILE_BUFFER_SECONDS = 10 -class ProfileBuffer(object): +class ProfileBuffer: def __init__(self, options, sdk_info, buffer_size, capture_func): # type: (Dict[str, Any], SDKInfo, int, Callable[[Envelope], None]) -> None self.options = options @@ -458,7 +458,7 @@ def flush(self): self.capture_func(envelope) -class ProfileChunk(object): +class ProfileChunk: def __init__(self): # type: () -> None self.chunk_id = uuid.uuid4().hex diff --git a/sentry_sdk/scope.py b/sentry_sdk/scope.py index 83cb1e5cbe..6e0d0925c8 100644 --- a/sentry_sdk/scope.py +++ b/sentry_sdk/scope.py @@ -154,7 +154,7 @@ def wrapper(self, *args, **kwargs): return wrapper # type: ignore -class Scope(object): +class Scope: """The scope holds extra information that should be sent with all events that belong to it. """ diff --git a/sentry_sdk/scrubber.py b/sentry_sdk/scrubber.py index 2bd0c8e4ba..f4755ea93b 100644 --- a/sentry_sdk/scrubber.py +++ b/sentry_sdk/scrubber.py @@ -59,7 +59,7 @@ ] -class EventScrubber(object): +class EventScrubber: def __init__( self, denylist=None, recursive=False, send_default_pii=False, pii_denylist=None ): diff --git a/tests/integrations/beam/test_beam.py b/tests/integrations/beam/test_beam.py index 5235b93031..8c503b4c8c 100644 --- a/tests/integrations/beam/test_beam.py +++ b/tests/integrations/beam/test_beam.py @@ -45,7 +45,7 @@ def process(self): return self.fn() -class B(A, object): +class B(A): def fa(self, x, element=False, another_element=False): if x or (element and not another_element): # print(self.r) diff --git a/tests/integrations/ray/test_ray.py b/tests/integrations/ray/test_ray.py index 83d8b04b67..f1c109533b 100644 --- a/tests/integrations/ray/test_ray.py +++ b/tests/integrations/ray/test_ray.py @@ -172,7 +172,7 @@ def test_ray_actor(): ) @ray.remote - class Counter(object): + class Counter: def __init__(self): self.n = 0