From ec2675354cf55b06c23276946d5ae2ac6aa0df50 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Wed, 15 Apr 2026 12:06:03 +0200 Subject: [PATCH] ref(celery): Remove duplicate NoOpMgr from utils NoOpMgr was defined in both celery/__init__.py and celery/utils.py. The utils copy was unused, so remove it. Co-Authored-By: Claude Opus 4.6 (1M context) --- sentry_sdk/integrations/celery/utils.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sentry_sdk/integrations/celery/utils.py b/sentry_sdk/integrations/celery/utils.py index f9378558c1..3a526ccdfa 100644 --- a/sentry_sdk/integrations/celery/utils.py +++ b/sentry_sdk/integrations/celery/utils.py @@ -2,7 +2,7 @@ from typing import TYPE_CHECKING, cast if TYPE_CHECKING: - from typing import Any, Tuple + from typing import Tuple from sentry_sdk._types import MonitorConfigScheduleUnit @@ -29,11 +29,3 @@ def _get_humanized_interval(seconds: float) -> "Tuple[int, MonitorConfigSchedule return (interval, cast("MonitorConfigScheduleUnit", unit)) return (int(seconds), "second") - - -class NoOpMgr: - def __enter__(self) -> None: - return None - - def __exit__(self, exc_type: "Any", exc_value: "Any", traceback: "Any") -> None: - return None