Skip to content

Commit

Permalink
re(crons): Consistent import of .base in endpoints (#70787)
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser authored May 13, 2024
1 parent 0fc316c commit 51d0f05
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@
from sentry.models.organization import Organization
from sentry.models.project import Project
from sentry.models.projectkey import ProjectKey
from sentry.monitors.endpoints.base import (
ProjectMonitorPermission,
get_monitor_by_org_id_or_slug,
try_checkin_lookup,
)
from sentry.monitors.models import Monitor, MonitorCheckIn
from sentry.utils.sdk import bind_organization_context

from .base import ProjectMonitorPermission, get_monitor_by_org_id_or_slug, try_checkin_lookup

MAX_ATTACHMENT_SIZE = 1024 * 100 # 100kb


Expand Down
5 changes: 3 additions & 2 deletions src/sentry/monitors/endpoints/organization_monitor_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
RESPONSE_UNAUTHORIZED,
)
from sentry.apidocs.parameters import GlobalParams, MonitorParams
from sentry.monitors.endpoints.base import MonitorEndpoint
from sentry.monitors.endpoints.base_monitor_details import MonitorDetailsMixin
from sentry.monitors.serializers import MonitorSerializer
from sentry.monitors.validators import MonitorValidator
from sentry.utils.auth import AuthenticatedHttpRequest

from .base import MonitorEndpoint
from .base_monitor_details import MonitorDetailsMixin


@region_silo_endpoint
@extend_schema(tags=["Crons"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
RESPONSE_UNAUTHORIZED,
)
from sentry.apidocs.parameters import GlobalParams, MonitorParams
from sentry.monitors.endpoints.base import MonitorEndpoint
from sentry.monitors.endpoints.base_monitor_environment_details import (
MonitorEnvironmentDetailsMixin,
)
from sentry.monitors.serializers import MonitorSerializer

from .base import MonitorEndpoint
from .base_monitor_environment_details import MonitorEnvironmentDetailsMixin


@region_silo_endpoint
@extend_schema(tags=["Crons"])
Expand Down
5 changes: 3 additions & 2 deletions src/sentry/monitors/endpoints/project_monitor_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
RESPONSE_UNAUTHORIZED,
)
from sentry.apidocs.parameters import GlobalParams, MonitorParams
from sentry.monitors.endpoints.base import ProjectMonitorEndpoint
from sentry.monitors.endpoints.base_monitor_details import MonitorDetailsMixin
from sentry.monitors.serializers import MonitorSerializer
from sentry.monitors.validators import MonitorValidator
from sentry.utils.auth import AuthenticatedHttpRequest

from .base import ProjectMonitorEndpoint
from .base_monitor_details import MonitorDetailsMixin


@region_silo_endpoint
@extend_schema(tags=["Crons"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
RESPONSE_UNAUTHORIZED,
)
from sentry.apidocs.parameters import GlobalParams, MonitorParams
from sentry.monitors.endpoints.base import ProjectMonitorEnvironmentEndpoint
from sentry.monitors.endpoints.base_monitor_environment_details import (
MonitorEnvironmentDetailsMixin,
)
from sentry.monitors.serializers import MonitorSerializer

from .base import ProjectMonitorEnvironmentEndpoint
from .base_monitor_environment_details import MonitorEnvironmentDetailsMixin


@region_silo_endpoint
@extend_schema(tags=["Crons"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
from sentry.apidocs.constants import RESPONSE_FORBIDDEN, RESPONSE_NOT_FOUND, RESPONSE_UNAUTHORIZED
from sentry.apidocs.parameters import GlobalParams, MonitorParams
from sentry.apidocs.utils import inline_sentry_response_serializer
from sentry.monitors.endpoints.base import ProjectMonitorEndpoint
from sentry.monitors.processing_errors import (
CheckinProcessErrorsManager,
CheckinProcessingErrorData,
)
from sentry.utils.auth import AuthenticatedHttpRequest

from .base import ProjectMonitorEndpoint


@region_silo_endpoint
@extend_schema(tags=["Crons"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
)
from sentry.apidocs.parameters import GlobalParams, MonitorParams
from sentry.models.project import Project
from sentry.monitors.endpoints.base import ProjectMonitorPermission
from sentry.monitors.processing_errors import CheckinProcessErrorsManager, InvalidProjectError

from .base import ProjectMonitorPermission


@region_silo_endpoint
@extend_schema(tags=["Crons"])
Expand Down

0 comments on commit 51d0f05

Please sign in to comment.