|
2 | 2 |
|
3 | 3 | from collections.abc import Collection, Mapping, Sequence
|
4 | 4 | from enum import IntEnum
|
5 |
| -from typing import Any, ClassVar |
| 5 | +from typing import TYPE_CHECKING, Any, ClassVar |
6 | 6 |
|
7 | 7 | from django.conf import settings
|
8 | 8 | from django.db import models, router, transaction
|
|
20 | 20 | EVENTS_MEMBER_ADMIN_DEFAULT,
|
21 | 21 | RESERVED_ORGANIZATION_SLUGS,
|
22 | 22 | )
|
23 |
| -from sentry.db.models import ( |
24 |
| - BaseManager, |
25 |
| - BoundedPositiveIntegerField, |
26 |
| - OptionManager, |
27 |
| - region_silo_model, |
28 |
| - sane_repr, |
29 |
| -) |
| 23 | +from sentry.db.models import BaseManager, BoundedPositiveIntegerField, region_silo_model, sane_repr |
30 | 24 | from sentry.db.models.fields.slug import SentryOrgSlugField
|
31 | 25 | from sentry.db.models.manager import ValidateFunction
|
32 | 26 | from sentry.db.models.outboxes import ReplicatedRegionModel
|
|
44 | 38 | from sentry.utils.retries import TimedRetryPolicy
|
45 | 39 | from sentry.utils.snowflake import generate_snowflake_id, save_with_snowflake_id, snowflake_id_model
|
46 | 40 |
|
| 41 | +if TYPE_CHECKING: |
| 42 | + from sentry.models.options.organization_option import OrganizationOptionManager |
| 43 | + |
47 | 44 | SENTRY_USE_SNOWFLAKE = getattr(settings, "SENTRY_USE_SNOWFLAKE", False)
|
48 | 45 | NON_MEMBER_SCOPES = frozenset(["org:write", "project:write", "team:write"])
|
49 | 46 |
|
@@ -407,7 +404,7 @@ def get_members_with_org_roles(
|
407 | 404 | return members_with_role
|
408 | 405 |
|
409 | 406 | @property
|
410 |
| - def option_manager(self) -> OptionManager: |
| 407 | + def option_manager(self) -> OrganizationOptionManager: |
411 | 408 | from sentry.models.options.organization_option import OrganizationOption
|
412 | 409 |
|
413 | 410 | return OrganizationOption.objects
|
|
0 commit comments