Browse Source

ref: fix some typing accidental re-exports (#50661)

<!-- Describe your PR here. -->
anthony sottile 1 year ago
parent
commit
f5a40a2530

+ 0 - 13
pyproject.toml

@@ -488,7 +488,6 @@ module = [
     "sentry.charts.chartcuterie",
     "sentry.conf.urls",
     "sentry.coreapi",
-    "sentry.data_export.endpoints.data_export",
     "sentry.data_export.models",
     "sentry.data_export.processors.issues_by_tag",
     "sentry.data_export.tasks",
@@ -746,7 +745,6 @@ module = [
     "sentry.mediators.mediator",
     "sentry.mediators.param",
     "sentry.mediators.plugins.migrator",
-    "sentry.mediators.project_rules.creator",
     "sentry.mediators.project_rules.updater",
     "sentry.mediators.sentry_app_installations.installation_notifier",
     "sentry.mediators.sentry_app_installations.updater",
@@ -1047,7 +1045,6 @@ module = [
     "sentry.scim.endpoints.utils",
     "sentry.sdk_updates",
     "sentry.search.events.builder.discover",
-    "sentry.search.events.builder.issue_platform",
     "sentry.search.events.builder.metrics",
     "sentry.search.events.builder.spans_metrics",
     "sentry.search.events.constants",
@@ -1104,7 +1101,6 @@ module = [
     "sentry.similarity.featuresv2",
     "sentry.snuba.discover",
     "sentry.snuba.entity_subscription",
-    "sentry.snuba.functions",
     "sentry.snuba.issue_platform",
     "sentry.snuba.metrics",
     "sentry.snuba.metrics.datasource",
@@ -1118,7 +1114,6 @@ module = [
     "sentry.snuba.metrics_performance",
     "sentry.snuba.models",
     "sentry.snuba.outcomes",
-    "sentry.snuba.profiles",
     "sentry.snuba.query_subscriptions.run",
     "sentry.snuba.referrer",
     "sentry.snuba.sessions",
@@ -1139,7 +1134,6 @@ module = [
     "sentry.tasks.base",
     "sentry.tasks.beacon",
     "sentry.tasks.check_auth",
-    "sentry.tasks.clear_expired_rulesnoozes",
     "sentry.tasks.codeowners.update_code_owners_schema",
     "sentry.tasks.commit_context",
     "sentry.tasks.commits",
@@ -1395,7 +1389,6 @@ module = [
     "tests.acceptance.test_oauth_authorize",
     "tests.acceptance.test_onboarding",
     "tests.acceptance.test_organization_activity",
-    "tests.acceptance.test_organization_alert_rule_details",
     "tests.acceptance.test_organization_dashboards",
     "tests.acceptance.test_organization_developer_settings",
     "tests.acceptance.test_organization_document_integration_detailed_view",
@@ -1517,7 +1510,6 @@ module = [
     "tests.sentry.api.endpoints.test_team_notification_settings",
     "tests.sentry.api.endpoints.test_user_authenticator_details",
     "tests.sentry.api.endpoints.test_user_authenticator_enroll",
-    "tests.sentry.api.endpoints.test_user_authenticator_index",
     "tests.sentry.api.endpoints.test_user_details",
     "tests.sentry.api.endpoints.test_user_notification_fine_tuning",
     "tests.sentry.api.endpoints.test_user_notification_settings",
@@ -1830,8 +1822,6 @@ module = [
     "tests.sentry.mediators.project_rules.test_creator",
     "tests.sentry.mediators.project_rules.test_updater",
     "tests.sentry.mediators.sentry_app_installations.test_installation_notifier",
-    "tests.sentry.mediators.test_mediator",
-    "tests.sentry.mediators.test_param",
     "tests.sentry.mediators.token_exchange.test_grant_exchanger",
     "tests.sentry.mediators.token_exchange.test_refresher",
     "tests.sentry.mediators.token_exchange.test_validator",
@@ -1898,7 +1888,6 @@ module = [
     "tests.sentry.models.test_releaseenvironment",
     "tests.sentry.models.test_releasefile",
     "tests.sentry.models.test_releaseprojectenvironment",
-    "tests.sentry.models.test_rulesnooze",
     "tests.sentry.models.test_sentryapp",
     "tests.sentry.models.test_sentryappinstallation",
     "tests.sentry.models.test_sentryappinstallationtoken",
@@ -2001,7 +1990,6 @@ module = [
     "tests.sentry.runner.test_initializer",
     "tests.sentry.search.events.builder.test_discover",
     "tests.sentry.search.events.builder.test_metrics",
-    "tests.sentry.search.events.builder.test_profile_functions",
     "tests.sentry.search.events.test_fields",
     "tests.sentry.search.events.test_filter",
     "tests.sentry.search.test_utils",
@@ -2058,7 +2046,6 @@ module = [
     "tests.sentry.tasks.test_auto_resolve_issues",
     "tests.sentry.tasks.test_check_auth",
     "tests.sentry.tasks.test_clear_expired_resolutions",
-    "tests.sentry.tasks.test_clear_expired_rulesnoozes",
     "tests.sentry.tasks.test_clear_expired_snoozes",
     "tests.sentry.tasks.test_code_owners",
     "tests.sentry.tasks.test_collect_project_platforms",

+ 1 - 1
src/sentry/api/endpoints/organization_events_facets_performance.py

@@ -16,8 +16,8 @@ from sentry.api.paginator import GenericOffsetPaginator
 from sentry.search.events.builder import QueryBuilder
 from sentry.search.events.fields import DateArg
 from sentry.snuba import discover
+from sentry.snuba.dataset import Dataset
 from sentry.utils.cursors import Cursor, CursorResult
-from sentry.utils.snuba import Dataset
 
 ALLOWED_AGGREGATE_COLUMNS = {
     "transaction.duration",

+ 2 - 1
src/sentry/api/endpoints/organization_events_span_ops.py

@@ -8,7 +8,8 @@ from sentry.api.bases import NoProjects, OrganizationEventsEndpointBase
 from sentry.api.paginator import GenericOffsetPaginator
 from sentry.models import Organization
 from sentry.search.events.builder import QueryBuilder
-from sentry.utils.snuba import Dataset, raw_snql_query
+from sentry.snuba.dataset import Dataset
+from sentry.utils.snuba import raw_snql_query
 
 
 class SpanOp(TypedDict):

+ 2 - 1
src/sentry/api/endpoints/organization_events_spans_performance.py

@@ -24,8 +24,9 @@ from sentry.models import Organization
 from sentry.search.events.builder import QueryBuilder, TimeseriesQueryBuilder
 from sentry.search.events.types import ParamsType
 from sentry.snuba import discover
+from sentry.snuba.dataset import Dataset
 from sentry.utils.cursors import Cursor, CursorResult
-from sentry.utils.snuba import Dataset, SnubaTSResult, raw_snql_query
+from sentry.utils.snuba import SnubaTSResult, raw_snql_query
 from sentry.utils.time_window import TimeWindow, remove_time_windows, union_time_windows
 from sentry.utils.validators import INVALID_SPAN_ID, is_span_id
 

+ 2 - 1
src/sentry/api/endpoints/organization_events_trace.py

@@ -32,10 +32,11 @@ from sentry.eventstore.models import Event
 from sentry.models import Group, Organization
 from sentry.search.events.builder import QueryBuilder
 from sentry.snuba import discover
+from sentry.snuba.dataset import Dataset
 from sentry.utils.numbers import base32_encode, format_grouped_length
 from sentry.utils.performance_issues.performance_detection import EventPerformanceProblem
 from sentry.utils.sdk import set_measurement
-from sentry.utils.snuba import Dataset, bulk_snql_query
+from sentry.utils.snuba import bulk_snql_query
 from sentry.utils.validators import INVALID_ID_DETAILS, is_event_id
 
 logger: logging.Logger = logging.getLogger(__name__)

+ 2 - 1
src/sentry/api/endpoints/organization_events_trends.py

@@ -20,7 +20,8 @@ from sentry.search.events.fields import DateArg, parse_function
 from sentry.search.events.types import Alias, SelectType, WhereType
 from sentry.search.utils import InvalidQuery, parse_datetime_string
 from sentry.snuba import discover
-from sentry.utils.snuba import Dataset, raw_snql_query
+from sentry.snuba.dataset import Dataset
+from sentry.utils.snuba import raw_snql_query
 
 
 class TrendColumns(TypedDict):

+ 2 - 1
src/sentry/api/endpoints/project_dynamic_sampling.py

@@ -16,8 +16,9 @@ from sentry.models import Project
 from sentry.search.events.builder import QueryBuilder
 from sentry.search.events.constants import TRACE_PARENT_SPAN_CONTEXT
 from sentry.snuba import discover
+from sentry.snuba.dataset import Dataset
 from sentry.snuba.referrer import Referrer
-from sentry.utils.snuba import Dataset, parse_snuba_datetime, raw_snql_query
+from sentry.utils.snuba import parse_snuba_datetime, raw_snql_query
 
 
 class EmptyTransactionDatasetException(Exception):

+ 2 - 9
src/sentry/api/endpoints/project_rule_details.py

@@ -11,19 +11,12 @@ from sentry.api.serializers.models.rule import RuleSerializer
 from sentry.api.serializers.rest_framework.rule import RuleSerializer as DrfRuleSerializer
 from sentry.integrations.slack.utils import RedisRuleStatus
 from sentry.mediators import project_rules
-from sentry.models import (
-    RuleActivity,
-    RuleActivityType,
-    RuleSnooze,
-    RuleStatus,
-    SentryAppComponent,
-    Team,
-    User,
-)
+from sentry.models import RuleActivity, RuleActivityType, RuleStatus, SentryAppComponent, Team, User
 from sentry.models.integrations.sentry_app_installation import (
     SentryAppInstallation,
     prepare_ui_component,
 )
+from sentry.models.rulesnooze import RuleSnooze
 from sentry.rules.actions import trigger_sentry_app_action_creators_for_issues
 from sentry.services.hybrid_cloud.user.service import user_service
 from sentry.signals import alert_rule_edited

+ 2 - 1
src/sentry/api/endpoints/rule_snooze.py

@@ -11,7 +11,8 @@ from sentry.api.bases.project import ProjectAlertRulePermission, ProjectEndpoint
 from sentry.api.serializers import Serializer, register, serialize
 from sentry.api.serializers.rest_framework.base import CamelSnakeSerializer
 from sentry.incidents.models import AlertRule
-from sentry.models import Organization, OrganizationMember, Rule, RuleSnooze
+from sentry.models import Organization, OrganizationMember, Rule
+from sentry.models.rulesnooze import RuleSnooze
 
 
 class RuleSnoozeValidator(CamelSnakeSerializer):

+ 4 - 7
src/sentry/api/event_search.py

@@ -10,6 +10,7 @@ from parsimonious.expressions import Optional
 from parsimonious.grammar import Grammar, NodeVisitor
 from parsimonious.nodes import Node
 
+from sentry.exceptions import InvalidSearchQuery
 from sentry.search.events.constants import (
     DURATION_UNITS,
     OPERATOR_NEGATION_MAP,
@@ -20,7 +21,7 @@ from sentry.search.events.constants import (
     TAG_KEY_RE,
     TEAM_KEY_TRANSACTION_ALIAS,
 )
-from sentry.search.events.fields import FIELD_ALIASES, FUNCTIONS, InvalidSearchQuery
+from sentry.search.events.fields import FIELD_ALIASES, FUNCTIONS
 from sentry.search.utils import (
     InvalidQuery,
     parse_datetime_range,
@@ -31,12 +32,8 @@ from sentry.search.utils import (
     parse_percentage,
     parse_size,
 )
-from sentry.utils.snuba import (
-    Dataset,
-    is_duration_measurement,
-    is_measurement,
-    is_span_op_breakdown,
-)
+from sentry.snuba.dataset import Dataset
+from sentry.utils.snuba import is_duration_measurement, is_measurement, is_span_op_breakdown
 from sentry.utils.validators import is_event_id, is_span_id
 
 # A wildcard is an asterisk prefixed by an even number of back slashes.

Some files were not shown because too many files changed in this diff