diff --git a/.github/actions/artifacts/do_upload.py b/.github/actions/artifacts/do_upload.py index c0fcffafa562f5..51cfa870b9d81a 100755 --- a/.github/actions/artifacts/do_upload.py +++ b/.github/actions/artifacts/do_upload.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +from typing import int import glob import itertools import os diff --git a/.github/actions/artifacts/download_codecov_cli.py b/.github/actions/artifacts/download_codecov_cli.py index e6b02d1a4b6811..084ab3e4f6e7a3 100755 --- a/.github/actions/artifacts/download_codecov_cli.py +++ b/.github/actions/artifacts/download_codecov_cli.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +from typing import int import os import subprocess import urllib.request diff --git a/bin/extension_language_map.py b/bin/extension_language_map.py index 3366fef414840b..69c66fc69b99e8 100644 --- a/bin/extension_language_map.py +++ b/bin/extension_language_map.py @@ -1,3 +1,4 @@ +from typing import int """ Generate a mapping from file extensions to language for languages that are part of platforms supported by Sentry. """ diff --git a/bin/react-to-product-owners-yml-changes.py b/bin/react-to-product-owners-yml-changes.py index ab010b96d16ca1..2cbad606d5c3da 100755 --- a/bin/react-to-product-owners-yml-changes.py +++ b/bin/react-to-product-owners-yml-changes.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 from __future__ import annotations +from typing import int import os import sys diff --git a/bin/send_metrics.py b/bin/send_metrics.py index f33c4424b29fd7..4e41bd25ac071d 100644 --- a/bin/send_metrics.py +++ b/bin/send_metrics.py @@ -1,6 +1,7 @@ # pylint: skip-file # flake8: noqa +from typing import int import base64 import datetime import functools diff --git a/devenv/post_fetch.py b/devenv/post_fetch.py index 590bb4ace44be4..787d6c856e3d35 100644 --- a/devenv/post_fetch.py +++ b/devenv/post_fetch.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import configparser diff --git a/devenv/sync.py b/devenv/sync.py index 806dfd4cfeb87c..1a6584f3b64574 100644 --- a/devenv/sync.py +++ b/devenv/sync.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import importlib.metadata import json diff --git a/fixtures/apidocs_test_case.py b/fixtures/apidocs_test_case.py index 11098075dfb6a5..2f35e48a7f8404 100644 --- a/fixtures/apidocs_test_case.py +++ b/fixtures/apidocs_test_case.py @@ -1,3 +1,4 @@ +from typing import int import functools import os diff --git a/fixtures/bitbucket.py b/fixtures/bitbucket.py index 84c3927f61018d..fc255f3d842ced 100644 --- a/fixtures/bitbucket.py +++ b/fixtures/bitbucket.py @@ -1,3 +1,4 @@ +from typing import int COMPARE_COMMITS_EXAMPLE = b"""{ "pagelen": 30, "values": diff --git a/fixtures/bitbucket_server.py b/fixtures/bitbucket_server.py index 0e07e78724f648..3279a259fe8924 100644 --- a/fixtures/bitbucket_server.py +++ b/fixtures/bitbucket_server.py @@ -1,3 +1,4 @@ +from typing import int EXAMPLE_PRIVATE_KEY = """-----BEGIN RSA PRIVATE KEY----- MIICWwIBAAKBgQC1cd9t8sA03awggLiX2gjZxyvOVUPJksLly1E662tttTeR3Wm9 eo6onNeI8HRD+O4wubUp4h4Chc7DtLDmFEPhUZ8Qkwztiifm99Xo3s0nUq4Pygp5 diff --git a/fixtures/github.py b/fixtures/github.py index c070ea6cb1826a..f3d1ce0f86dc0e 100644 --- a/fixtures/github.py +++ b/fixtures/github.py @@ -1,4 +1,5 @@ # we keep this as a raw string as order matters for hmac signing +from typing import int PUSH_EVENT_EXAMPLE_INSTALLATION = r"""{ "ref": "refs/heads/changes", "installation" : { diff --git a/fixtures/github_enterprise.py b/fixtures/github_enterprise.py index 9f5ebd6b953606..a38a1be1d0a223 100644 --- a/fixtures/github_enterprise.py +++ b/fixtures/github_enterprise.py @@ -1,4 +1,5 @@ # we keep this as a raw string as order matters for hmac signing +from typing import int PUSH_EVENT_EXAMPLE = r"""{ "ref": "refs/heads/changes", "before": "9049f1265b7d61be4a8904a9a27120d2064dab3b", diff --git a/fixtures/gitlab.py b/fixtures/gitlab.py index a90408e5e3d8df..cb515cc0d2bc42 100644 --- a/fixtures/gitlab.py +++ b/fixtures/gitlab.py @@ -1,3 +1,4 @@ +from typing import int from time import time from sentry.integrations.gitlab.integration import GitlabIntegration diff --git a/fixtures/integrations/__init__.py b/fixtures/integrations/__init__.py index 660624a409bd97..68cc155b7ffcf8 100644 --- a/fixtures/integrations/__init__.py +++ b/fixtures/integrations/__init__.py @@ -1,3 +1,4 @@ +from typing import int import os FIXTURE_DIRECTORY = os.path.join(os.path.dirname(os.path.abspath(__file__))) diff --git a/fixtures/integrations/jira/__init__.py b/fixtures/integrations/jira/__init__.py index 2a23bacabd968a..1dc6e8c0f02c66 100644 --- a/fixtures/integrations/jira/__init__.py +++ b/fixtures/integrations/jira/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .mock import MockJira # noqa from .stub_client import StubJiraApiClient # noqa diff --git a/fixtures/integrations/jira/mock.py b/fixtures/integrations/jira/mock.py index fc565b060b2e4e..268f6ae9952a49 100644 --- a/fixtures/integrations/jira/mock.py +++ b/fixtures/integrations/jira/mock.py @@ -1,3 +1,4 @@ +from typing import int from fixtures.integrations.jira.stub_client import StubJiraApiClient from fixtures.integrations.mock_service import MockService diff --git a/fixtures/integrations/jira/stub_client.py b/fixtures/integrations/jira/stub_client.py index 02fb94cd46ca08..146320281f8c9b 100644 --- a/fixtures/integrations/jira/stub_client.py +++ b/fixtures/integrations/jira/stub_client.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from fixtures.integrations.stub_service import StubService from sentry.shared_integrations.exceptions import ApiError diff --git a/fixtures/integrations/mock_service.py b/fixtures/integrations/mock_service.py index e2b018c2b3f1e6..b06eb9fc219d74 100644 --- a/fixtures/integrations/mock_service.py +++ b/fixtures/integrations/mock_service.py @@ -3,7 +3,7 @@ import os import shutil from collections import defaultdict -from typing import Any +from typing import int, Any import orjson diff --git a/fixtures/integrations/stub_service.py b/fixtures/integrations/stub_service.py index dc35e3b6ec07f3..5e823ffda2e4e2 100644 --- a/fixtures/integrations/stub_service.py +++ b/fixtures/integrations/stub_service.py @@ -2,7 +2,7 @@ import os from copy import deepcopy -from typing import Any +from typing import int, Any import orjson diff --git a/fixtures/models.py b/fixtures/models.py index bb22753337aae9..6c418fe37f1108 100644 --- a/fixtures/models.py +++ b/fixtures/models.py @@ -1 +1,2 @@ +from typing import int # this file is necessary for some reason for test models such as tests/sentry/db/models/fields/bitfield/test_bitfield.py diff --git a/fixtures/page_objects/base.py b/fixtures/page_objects/base.py index b46f484fefc254..21cc97964d9bf9 100644 --- a/fixtures/page_objects/base.py +++ b/fixtures/page_objects/base.py @@ -1,3 +1,4 @@ +from typing import int from selenium.webdriver.common.by import By from sentry.testutils.pytest.selenium import Browser diff --git a/fixtures/page_objects/dashboard_detail.py b/fixtures/page_objects/dashboard_detail.py index 0671a569c68b45..07c191631f4ff2 100644 --- a/fixtures/page_objects/dashboard_detail.py +++ b/fixtures/page_objects/dashboard_detail.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.dashboard import Dashboard from sentry.models.organization import Organization diff --git a/fixtures/page_objects/explore_logs.py b/fixtures/page_objects/explore_logs.py index 52dfade0aac97f..2b1af08f30657b 100644 --- a/fixtures/page_objects/explore_logs.py +++ b/fixtures/page_objects/explore_logs.py @@ -1,3 +1,4 @@ +from typing import int from selenium.webdriver.common.by import By from .base import BasePage diff --git a/fixtures/page_objects/explore_spans.py b/fixtures/page_objects/explore_spans.py index aa869bb10de012..4ecf04c9bba978 100644 --- a/fixtures/page_objects/explore_spans.py +++ b/fixtures/page_objects/explore_spans.py @@ -1,3 +1,4 @@ +from typing import int from selenium.webdriver.common.by import By from .base import BasePage diff --git a/fixtures/page_objects/global_selection.py b/fixtures/page_objects/global_selection.py index 8daf56bf141f53..0f5f218ba7d2c9 100644 --- a/fixtures/page_objects/global_selection.py +++ b/fixtures/page_objects/global_selection.py @@ -1,3 +1,4 @@ +from typing import int from .base import BasePage diff --git a/fixtures/page_objects/issue_details.py b/fixtures/page_objects/issue_details.py index 7c6c190853b273..910c81110b6fe6 100644 --- a/fixtures/page_objects/issue_details.py +++ b/fixtures/page_objects/issue_details.py @@ -1,3 +1,4 @@ +from typing import int from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions from selenium.webdriver.support.wait import WebDriverWait diff --git a/fixtures/page_objects/issue_list.py b/fixtures/page_objects/issue_list.py index 4479ac18e01b62..1f81674c34f1ac 100644 --- a/fixtures/page_objects/issue_list.py +++ b/fixtures/page_objects/issue_list.py @@ -1,3 +1,4 @@ +from typing import int from .base import BasePage from .global_selection import GlobalSelectionPage from .issue_details import IssueDetailsPage diff --git a/fixtures/page_objects/organization_integration_settings.py b/fixtures/page_objects/organization_integration_settings.py index 20b6534df82b55..8f4720aae7f1bb 100644 --- a/fixtures/page_objects/organization_integration_settings.py +++ b/fixtures/page_objects/organization_integration_settings.py @@ -1,3 +1,4 @@ +from typing import int from selenium.webdriver.common.by import By from .base import BasePage, ButtonElement, ModalElement diff --git a/fixtures/page_objects/trace_view.py b/fixtures/page_objects/trace_view.py index cccdff8b2b7163..7f51339d33a9ee 100644 --- a/fixtures/page_objects/trace_view.py +++ b/fixtures/page_objects/trace_view.py @@ -1,3 +1,4 @@ +from typing import int from selenium.webdriver.common.by import By from .base import BasePage diff --git a/fixtures/page_objects/transaction_summary.py b/fixtures/page_objects/transaction_summary.py index 4764e1295ea5ca..42c696914ba9a4 100644 --- a/fixtures/page_objects/transaction_summary.py +++ b/fixtures/page_objects/transaction_summary.py @@ -1,3 +1,4 @@ +from typing import int from .base import BasePage diff --git a/fixtures/safe_migrations_apps/bad_flow_add_column_with_default_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_add_column_with_default_app/migrations/0001_initial.py index 69de29635772a4..df0d4c04e9e361 100644 --- a/fixtures/safe_migrations_apps/bad_flow_add_column_with_default_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_add_column_with_default_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_add_column_with_default_app/migrations/0002_add_field_default.py b/fixtures/safe_migrations_apps/bad_flow_add_column_with_default_app/migrations/0002_add_field_default.py index 895e62f606e565..11a5ef709f9578 100644 --- a/fixtures/safe_migrations_apps/bad_flow_add_column_with_default_app/migrations/0002_add_field_default.py +++ b/fixtures/safe_migrations_apps/bad_flow_add_column_with_default_app/migrations/0002_add_field_default.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_add_column_with_default_app/models.py b/fixtures/safe_migrations_apps/bad_flow_add_column_with_default_app/models.py index 770fa149c355ce..937edddf4ce190 100644 --- a/fixtures/safe_migrations_apps/bad_flow_add_column_with_default_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_add_column_with_default_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_app/migrations/0001_initial.py index cb45cd7d6daeca..b7f68a12be108b 100644 --- a/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:45 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_app/migrations/0002_add_field_notnull.py b/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_app/migrations/0002_add_field_notnull.py index 0b7d7cae9a8024..0919377de7cfb2 100644 --- a/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_app/migrations/0002_add_field_notnull.py +++ b/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_app/migrations/0002_add_field_notnull.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:46 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_app/models.py b/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_app/models.py index 8efed5fb7b3950..2543a87fcf95d6 100644 --- a/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_default_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_default_app/migrations/0001_initial.py index 8c7786cb85d438..822a18e40fc65b 100644 --- a/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_default_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_default_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:41 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_default_app/migrations/0002_add_field_notnull_default.py b/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_default_app/migrations/0002_add_field_notnull_default.py index 3c9fcff934259a..f240568182fcda 100644 --- a/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_default_app/migrations/0002_add_field_notnull_default.py +++ b/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_default_app/migrations/0002_add_field_notnull_default.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:43 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_default_app/models.py b/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_default_app/models.py index fdd098a3654536..f206add65af599 100644 --- a/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_default_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_add_column_with_notnull_default_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/bad_flow_change_char_type_that_unsafe_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_change_char_type_that_unsafe_app/migrations/0001_initial.py index 784f4b39b3ae7a..978f1afb25c3b5 100644 --- a/fixtures/safe_migrations_apps/bad_flow_change_char_type_that_unsafe_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_change_char_type_that_unsafe_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:37 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_change_char_type_that_unsafe_app/migrations/0002_change_type_from_char120_to_char100.py b/fixtures/safe_migrations_apps/bad_flow_change_char_type_that_unsafe_app/migrations/0002_change_type_from_char120_to_char100.py index dbe41f8fd9722d..fb7fcd01e26e06 100644 --- a/fixtures/safe_migrations_apps/bad_flow_change_char_type_that_unsafe_app/migrations/0002_change_type_from_char120_to_char100.py +++ b/fixtures/safe_migrations_apps/bad_flow_change_char_type_that_unsafe_app/migrations/0002_change_type_from_char120_to_char100.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:38 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_change_char_type_that_unsafe_app/models.py b/fixtures/safe_migrations_apps/bad_flow_change_char_type_that_unsafe_app/models.py index fa34c9376f2dbb..5dc32c0fb193eb 100644 --- a/fixtures/safe_migrations_apps/bad_flow_change_char_type_that_unsafe_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_change_char_type_that_unsafe_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/migrations/0001_initial.py index 27b7cdf8c1b768..50d51372945d94 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/migrations/0002_delete_pending.py b/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/migrations/0002_delete_pending.py index c4933d32cfcede..1a740f46ca000b 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/migrations/0002_delete_pending.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/migrations/0002_delete_pending.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/migrations/0003_double_pending.py b/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/migrations/0003_double_pending.py index ce220395342ff9..a40f127de178dc 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/migrations/0003_double_pending.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/migrations/0003_double_pending.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/models.py b/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/models.py index 770fa149c355ce..937edddf4ce190 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_field_double_pending_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_fk_constraint_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_fk_constraint_app/migrations/0001_initial.py index 4446837fa33671..f11fa65cb02286 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_fk_constraint_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_fk_constraint_app/migrations/0001_initial.py @@ -1,3 +1,4 @@ +from typing import int import django from django.db import migrations, models diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_fk_constraint_app/migrations/0002_delete_without_pending.py b/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_fk_constraint_app/migrations/0002_delete_without_pending.py index f036396f10a590..82150f636a7a43 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_fk_constraint_app/migrations/0002_delete_without_pending.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_fk_constraint_app/migrations/0002_delete_without_pending.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_fk_constraint_app/models.py b/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_fk_constraint_app/models.py index d936d5039213f7..0c5ac21deb14dc 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_fk_constraint_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_fk_constraint_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.db.models import FlexibleForeignKey diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_not_null_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_not_null_app/migrations/0001_initial.py index fd1e8c68b7800c..d5e1323083f271 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_not_null_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_not_null_app/migrations/0001_initial.py @@ -1,3 +1,4 @@ +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_not_null_app/migrations/0002_delete_without_pending.py b/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_not_null_app/migrations/0002_delete_without_pending.py index 6502d91d97cd39..6338b4d05c443d 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_not_null_app/migrations/0002_delete_without_pending.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_not_null_app/migrations/0002_delete_without_pending.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_not_null_app/models.py b/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_not_null_app/models.py index 770fa149c355ce..937edddf4ce190 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_not_null_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_field_pending_with_not_null_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_field_without_pending_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_delete_field_without_pending_app/migrations/0001_initial.py index 482ebcd0ab28f4..e6891e754218d2 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_field_without_pending_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_field_without_pending_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_field_without_pending_app/migrations/0002_delete_without_pending.py b/fixtures/safe_migrations_apps/bad_flow_delete_field_without_pending_app/migrations/0002_delete_without_pending.py index b4cad5043fc589..1207f31a89d00d 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_field_without_pending_app/migrations/0002_delete_without_pending.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_field_without_pending_app/migrations/0002_delete_without_pending.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_field_without_pending_app/models.py b/fixtures/safe_migrations_apps/bad_flow_delete_field_without_pending_app/models.py index 770fa149c355ce..937edddf4ce190 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_field_without_pending_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_field_without_pending_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_model_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_delete_model_app/migrations/0001_initial.py index 69de29635772a4..df0d4c04e9e361 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_model_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_model_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_model_app/migrations/0002_delete_model.py b/fixtures/safe_migrations_apps/bad_flow_delete_model_app/migrations/0002_delete_model.py index 4e298eeccf446e..8f5090451e4898 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_model_app/migrations/0002_delete_model.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_model_app/migrations/0002_delete_model.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_model_app/models.py b/fixtures/safe_migrations_apps/bad_flow_delete_model_app/models.py index e7024a875763f6..4bd05d83442af9 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_model_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_model_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/migrations/0001_initial.py index 69de29635772a4..df0d4c04e9e361 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/migrations/0002_delete_pending.py b/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/migrations/0002_delete_pending.py index 917b83001e8a8d..109cfc9ff1d77c 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/migrations/0002_delete_pending.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/migrations/0002_delete_pending.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/migrations/0003_double_pending.py b/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/migrations/0003_double_pending.py index e52a64272a2020..7a058f1c99a794 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/migrations/0003_double_pending.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/migrations/0003_double_pending.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/models.py b/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/models.py index 770fa149c355ce..937edddf4ce190 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_model_double_pending_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_model_without_pending_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_delete_model_without_pending_app/migrations/0001_initial.py index 69de29635772a4..df0d4c04e9e361 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_model_without_pending_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_model_without_pending_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_model_without_pending_app/migrations/0002_delete_without_pending.py b/fixtures/safe_migrations_apps/bad_flow_delete_model_without_pending_app/migrations/0002_delete_without_pending.py index 10d83c4d9c3e39..5e1008cd5e3d8a 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_model_without_pending_app/migrations/0002_delete_without_pending.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_model_without_pending_app/migrations/0002_delete_without_pending.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_model_without_pending_app/models.py b/fixtures/safe_migrations_apps/bad_flow_delete_model_without_pending_app/models.py index 770fa149c355ce..937edddf4ce190 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_model_without_pending_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_model_without_pending_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_pending_with_fk_constraints_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_delete_pending_with_fk_constraints_app/migrations/0001_initial.py index 2747f841d8a570..93538ffb52b28c 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_pending_with_fk_constraints_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_pending_with_fk_constraints_app/migrations/0001_initial.py @@ -1,3 +1,4 @@ +from typing import int import django from django.db import migrations, models diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_pending_with_fk_constraints_app/migrations/0002_delete_without_pending.py b/fixtures/safe_migrations_apps/bad_flow_delete_pending_with_fk_constraints_app/migrations/0002_delete_without_pending.py index 721c22b2798a0e..b72bccc18809c4 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_pending_with_fk_constraints_app/migrations/0002_delete_without_pending.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_pending_with_fk_constraints_app/migrations/0002_delete_without_pending.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/bad_flow_delete_pending_with_fk_constraints_app/models.py b/fixtures/safe_migrations_apps/bad_flow_delete_pending_with_fk_constraints_app/models.py index d936d5039213f7..0c5ac21deb14dc 100644 --- a/fixtures/safe_migrations_apps/bad_flow_delete_pending_with_fk_constraints_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_delete_pending_with_fk_constraints_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.db.models import FlexibleForeignKey diff --git a/fixtures/safe_migrations_apps/bad_flow_remove_field_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_remove_field_app/migrations/0001_initial.py index fd1e8c68b7800c..d5e1323083f271 100644 --- a/fixtures/safe_migrations_apps/bad_flow_remove_field_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_remove_field_app/migrations/0001_initial.py @@ -1,3 +1,4 @@ +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_remove_field_app/migrations/0002_remove_field.py b/fixtures/safe_migrations_apps/bad_flow_remove_field_app/migrations/0002_remove_field.py index 6ed938db3a0785..9fbc37fc8b650a 100644 --- a/fixtures/safe_migrations_apps/bad_flow_remove_field_app/migrations/0002_remove_field.py +++ b/fixtures/safe_migrations_apps/bad_flow_remove_field_app/migrations/0002_remove_field.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_remove_field_app/models.py b/fixtures/safe_migrations_apps/bad_flow_remove_field_app/models.py index 8efed5fb7b3950..2543a87fcf95d6 100644 --- a/fixtures/safe_migrations_apps/bad_flow_remove_field_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_remove_field_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/bad_flow_rename_field_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_rename_field_app/migrations/0001_initial.py index 482ebcd0ab28f4..e6891e754218d2 100644 --- a/fixtures/safe_migrations_apps/bad_flow_rename_field_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_rename_field_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_rename_field_app/migrations/0002_rename_field.py b/fixtures/safe_migrations_apps/bad_flow_rename_field_app/migrations/0002_rename_field.py index 25464de2a8605b..7d641b07338c32 100644 --- a/fixtures/safe_migrations_apps/bad_flow_rename_field_app/migrations/0002_rename_field.py +++ b/fixtures/safe_migrations_apps/bad_flow_rename_field_app/migrations/0002_rename_field.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_rename_field_app/models.py b/fixtures/safe_migrations_apps/bad_flow_rename_field_app/models.py index 8efed5fb7b3950..2543a87fcf95d6 100644 --- a/fixtures/safe_migrations_apps/bad_flow_rename_field_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_rename_field_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/bad_flow_rename_table_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_rename_table_app/migrations/0001_initial.py index 69de29635772a4..df0d4c04e9e361 100644 --- a/fixtures/safe_migrations_apps/bad_flow_rename_table_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_rename_table_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_rename_table_app/migrations/0002_rename_table.py b/fixtures/safe_migrations_apps/bad_flow_rename_table_app/migrations/0002_rename_table.py index 79ba2ba25b0443..cac572a8c42985 100644 --- a/fixtures/safe_migrations_apps/bad_flow_rename_table_app/migrations/0002_rename_table.py +++ b/fixtures/safe_migrations_apps/bad_flow_rename_table_app/migrations/0002_rename_table.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_rename_table_app/models.py b/fixtures/safe_migrations_apps/bad_flow_rename_table_app/models.py index e7024a875763f6..4bd05d83442af9 100644 --- a/fixtures/safe_migrations_apps/bad_flow_rename_table_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_rename_table_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/bad_flow_run_sql_disabled_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_run_sql_disabled_app/migrations/0001_initial.py index f2d6948af6b53c..5f6d3db568b10c 100644 --- a/fixtures/safe_migrations_apps/bad_flow_run_sql_disabled_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_run_sql_disabled_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/bad_flow_run_sql_disabled_app/models.py b/fixtures/safe_migrations_apps/bad_flow_run_sql_disabled_app/models.py index 770fa149c355ce..937edddf4ce190 100644 --- a/fixtures/safe_migrations_apps/bad_flow_run_sql_disabled_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_run_sql_disabled_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/bad_flow_run_sql_nested_disabled_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/bad_flow_run_sql_nested_disabled_app/migrations/0001_initial.py index 4b496344079189..5a9edd93ff2df8 100644 --- a/fixtures/safe_migrations_apps/bad_flow_run_sql_nested_disabled_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/bad_flow_run_sql_nested_disabled_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations from django.db.migrations import SeparateDatabaseAndState diff --git a/fixtures/safe_migrations_apps/bad_flow_run_sql_nested_disabled_app/models.py b/fixtures/safe_migrations_apps/bad_flow_run_sql_nested_disabled_app/models.py index 770fa149c355ce..937edddf4ce190 100644 --- a/fixtures/safe_migrations_apps/bad_flow_run_sql_nested_disabled_app/models.py +++ b/fixtures/safe_migrations_apps/bad_flow_run_sql_nested_disabled_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/decimal_to_float_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/decimal_to_float_app/migrations/0001_initial.py index 53269504e5bc84..b73b4cdedfbef6 100644 --- a/fixtures/safe_migrations_apps/decimal_to_float_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/decimal_to_float_app/migrations/0001_initial.py @@ -1,3 +1,4 @@ +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/decimal_to_float_app/migrations/0002_type_conversion.py b/fixtures/safe_migrations_apps/decimal_to_float_app/migrations/0002_type_conversion.py index f51e467d8e1db6..d8a85236fefb4b 100644 --- a/fixtures/safe_migrations_apps/decimal_to_float_app/migrations/0002_type_conversion.py +++ b/fixtures/safe_migrations_apps/decimal_to_float_app/migrations/0002_type_conversion.py @@ -1,3 +1,4 @@ +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/decimal_to_float_app/models.py b/fixtures/safe_migrations_apps/decimal_to_float_app/models.py index 8760fdf5afe71c..e11e822b05cb05 100644 --- a/fixtures/safe_migrations_apps/decimal_to_float_app/models.py +++ b/fixtures/safe_migrations_apps/decimal_to_float_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/good_flow_add_column_with_notnull_db_default_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/good_flow_add_column_with_notnull_db_default_app/migrations/0001_initial.py index 8c7786cb85d438..822a18e40fc65b 100644 --- a/fixtures/safe_migrations_apps/good_flow_add_column_with_notnull_db_default_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/good_flow_add_column_with_notnull_db_default_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:41 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/good_flow_add_column_with_notnull_db_default_app/migrations/0002_add_field_notnull_db_default.py b/fixtures/safe_migrations_apps/good_flow_add_column_with_notnull_db_default_app/migrations/0002_add_field_notnull_db_default.py index 8ddfade9aa173b..3e3a3dbef2a3ad 100644 --- a/fixtures/safe_migrations_apps/good_flow_add_column_with_notnull_db_default_app/migrations/0002_add_field_notnull_db_default.py +++ b/fixtures/safe_migrations_apps/good_flow_add_column_with_notnull_db_default_app/migrations/0002_add_field_notnull_db_default.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:43 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/good_flow_add_column_with_notnull_db_default_app/models.py b/fixtures/safe_migrations_apps/good_flow_add_column_with_notnull_db_default_app/models.py index dcead4b757d81f..2b32973625e9d1 100644 --- a/fixtures/safe_migrations_apps/good_flow_add_column_with_notnull_db_default_app/models.py +++ b/fixtures/safe_migrations_apps/good_flow_add_column_with_notnull_db_default_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/migrations/0001_initial.py index 85f25fffd727f5..616f9d1ebf7271 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/migrations/0001_initial.py @@ -1,4 +1,5 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int import django from django.db import migrations, models diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/migrations/0002_remove_constraints_and_pending.py b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/migrations/0002_remove_constraints_and_pending.py index 767c38e610f98b..073510769da20e 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/migrations/0002_remove_constraints_and_pending.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/migrations/0002_remove_constraints_and_pending.py @@ -1,3 +1,4 @@ +from typing import int import django from django.db import migrations diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/migrations/0003_delete.py b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/migrations/0003_delete.py index adae7ffa190165..1fc5d64049be98 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/migrations/0003_delete.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/migrations/0003_delete.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/models.py b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/models.py index e78bdd99a9322d..5494ddce9a221c 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/models.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_fk_constraint_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.db.models import FlexibleForeignKey diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/migrations/0001_initial.py index 1a0f0a785f5159..c14afa8b3c73cc 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/migrations/0001_initial.py @@ -1,4 +1,5 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/migrations/0002_remove_not_null_and_pending.py b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/migrations/0002_remove_not_null_and_pending.py index e413d67d2a23b6..10a449c035b503 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/migrations/0002_remove_not_null_and_pending.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/migrations/0002_remove_not_null_and_pending.py @@ -1,3 +1,4 @@ +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/migrations/0003_delete.py b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/migrations/0003_delete.py index 98ed7ffbe84c48..989864b22b83d6 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/migrations/0003_delete.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/migrations/0003_delete.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/models.py b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/models.py index 770fa149c355ce..937edddf4ce190 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/models.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_m2m_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_m2m_app/migrations/0001_initial.py index 0c0b198c43b88f..de301738e7d7a5 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_m2m_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_m2m_app/migrations/0001_initial.py @@ -1,3 +1,4 @@ +from typing import int from django.db import migrations, models from sentry.db.models import FlexibleForeignKey diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_m2m_app/migrations/0002_delete_without_pending.py b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_m2m_app/migrations/0002_delete_without_pending.py index 7cd3b1a05e1e07..9c733d8cfd5984 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_m2m_app/migrations/0002_delete_without_pending.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_m2m_app/migrations/0002_delete_without_pending.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_m2m_app/models.py b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_m2m_app/models.py index 90c1bc2b9e0f5e..8ec11db1e0cb73 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_m2m_app/models.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_pending_with_not_null_m2m_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.db.models import FlexibleForeignKey diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/migrations/0001_initial.py index 2540b245ec0644..39c70f8b3c7611 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/migrations/0001_initial.py @@ -1,3 +1,4 @@ +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/migrations/0002_set_pending.py b/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/migrations/0002_set_pending.py index 48b502df50c460..79a0d281684c92 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/migrations/0002_set_pending.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/migrations/0002_set_pending.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/migrations/0003_delete.py b/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/migrations/0003_delete.py index e57524bf66d90d..bf6469e89bd5ac 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/migrations/0003_delete.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/migrations/0003_delete.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/models.py b/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/models.py index f472e7d8e90506..3931d6469aa724 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/models.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_field_simple_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/migrations/0001_initial.py index 69de29635772a4..df0d4c04e9e361 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/migrations/0002_delete_model_state.py b/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/migrations/0002_delete_model_state.py index 4d9779f1c977f0..098112627f8349 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/migrations/0002_delete_model_state.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/migrations/0002_delete_model_state.py @@ -1,4 +1,5 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/migrations/0003_delete_table.py b/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/migrations/0003_delete_table.py index 8a6e05080a31bc..4bb15418d26c68 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/migrations/0003_delete_table.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/migrations/0003_delete_table.py @@ -1,4 +1,5 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/models.py b/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/models.py index e7024a875763f6..4bd05d83442af9 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/models.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_model_state_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/migrations/0001_initial.py index 6f55cccc2e683d..6c8ea066084c34 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/migrations/0001_initial.py @@ -1,4 +1,5 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int import django from django.db import migrations, models diff --git a/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/migrations/0002_remove_constraints_and_pending.py b/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/migrations/0002_remove_constraints_and_pending.py index cdb0408e096d99..7926ed9ff55c52 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/migrations/0002_remove_constraints_and_pending.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/migrations/0002_remove_constraints_and_pending.py @@ -1,3 +1,4 @@ +from typing import int import django from django.db import migrations diff --git a/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/migrations/0003_delete.py b/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/migrations/0003_delete.py index ac2813a8d7f014..3a5c450008ffee 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/migrations/0003_delete.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/migrations/0003_delete.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/models.py b/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/models.py index d936d5039213f7..0c5ac21deb14dc 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/models.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_pending_with_fk_constraints_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.db.models import FlexibleForeignKey diff --git a/fixtures/safe_migrations_apps/good_flow_delete_simple_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/good_flow_delete_simple_app/migrations/0001_initial.py index 2b6d293ee049e6..9a0f10c6f625fb 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_simple_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_simple_app/migrations/0001_initial.py @@ -1,3 +1,4 @@ +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/good_flow_delete_simple_app/migrations/0002_set_pending.py b/fixtures/safe_migrations_apps/good_flow_delete_simple_app/migrations/0002_set_pending.py index c7475e451e0bcd..9a261d91bf50a9 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_simple_app/migrations/0002_set_pending.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_simple_app/migrations/0002_set_pending.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/good_flow_delete_simple_app/migrations/0003_delete.py b/fixtures/safe_migrations_apps/good_flow_delete_simple_app/migrations/0003_delete.py index 796cf774758675..b6145c13c7dd74 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_simple_app/migrations/0003_delete.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_simple_app/migrations/0003_delete.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/fixtures/safe_migrations_apps/good_flow_delete_simple_app/models.py b/fixtures/safe_migrations_apps/good_flow_delete_simple_app/models.py index 770fa149c355ce..937edddf4ce190 100644 --- a/fixtures/safe_migrations_apps/good_flow_delete_simple_app/models.py +++ b/fixtures/safe_migrations_apps/good_flow_delete_simple_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/good_flow_safe_run_sql_with_run_sql_disabled_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/good_flow_safe_run_sql_with_run_sql_disabled_app/migrations/0001_initial.py index 2eb90d49e551ba..6b171aa28ed4db 100644 --- a/fixtures/safe_migrations_apps/good_flow_safe_run_sql_with_run_sql_disabled_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/good_flow_safe_run_sql_with_run_sql_disabled_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.special import SafeRunSQL diff --git a/fixtures/safe_migrations_apps/good_flow_safe_run_sql_with_run_sql_disabled_app/models.py b/fixtures/safe_migrations_apps/good_flow_safe_run_sql_with_run_sql_disabled_app/models.py index 770fa149c355ce..937edddf4ce190 100644 --- a/fixtures/safe_migrations_apps/good_flow_safe_run_sql_with_run_sql_disabled_app/models.py +++ b/fixtures/safe_migrations_apps/good_flow_safe_run_sql_with_run_sql_disabled_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/migration_test_app/migrations/0001_create_migration_run_test.py b/fixtures/safe_migrations_apps/migration_test_app/migrations/0001_create_migration_run_test.py index 3bf04bcd147fa6..d349182d68fc10 100644 --- a/fixtures/safe_migrations_apps/migration_test_app/migrations/0001_create_migration_run_test.py +++ b/fixtures/safe_migrations_apps/migration_test_app/migrations/0001_create_migration_run_test.py @@ -1,3 +1,4 @@ +from typing import int from django.db import migrations, models import sentry.db.models.fields.bounded diff --git a/fixtures/safe_migrations_apps/migration_test_app/models.py b/fixtures/safe_migrations_apps/migration_test_app/models.py index d8dcea14da46b5..392d6e9f49aef8 100644 --- a/fixtures/safe_migrations_apps/migration_test_app/models.py +++ b/fixtures/safe_migrations_apps/migration_test_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models diff --git a/fixtures/safe_migrations_apps/safe_run_sql_app/migrations/0001_initial.py b/fixtures/safe_migrations_apps/safe_run_sql_app/migrations/0001_initial.py index e28e3c8885dce0..cccc6825c1e826 100644 --- a/fixtures/safe_migrations_apps/safe_run_sql_app/migrations/0001_initial.py +++ b/fixtures/safe_migrations_apps/safe_run_sql_app/migrations/0001_initial.py @@ -1,5 +1,6 @@ # Generated by Django 3.1 on 2019-09-22 21:47 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/safe_run_sql_app/migrations/0002_run_sql.py b/fixtures/safe_migrations_apps/safe_run_sql_app/migrations/0002_run_sql.py index 5d3d4fd89afb2f..052981693d3a03 100644 --- a/fixtures/safe_migrations_apps/safe_run_sql_app/migrations/0002_run_sql.py +++ b/fixtures/safe_migrations_apps/safe_run_sql_app/migrations/0002_run_sql.py @@ -1,3 +1,4 @@ +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/fixtures/safe_migrations_apps/safe_run_sql_app/migrations/0003_add_col.py b/fixtures/safe_migrations_apps/safe_run_sql_app/migrations/0003_add_col.py index 9e771e1004efbb..f38f38bbffd289 100644 --- a/fixtures/safe_migrations_apps/safe_run_sql_app/migrations/0003_add_col.py +++ b/fixtures/safe_migrations_apps/safe_run_sql_app/migrations/0003_add_col.py @@ -1,3 +1,4 @@ +from typing import int from django.db import migrations from sentry.db.models import BoundedPositiveIntegerField diff --git a/fixtures/safe_migrations_apps/safe_run_sql_app/models.py b/fixtures/safe_migrations_apps/safe_run_sql_app/models.py index 0b8aaeb8b7b8ec..7370fb70f0d117 100644 --- a/fixtures/safe_migrations_apps/safe_run_sql_app/models.py +++ b/fixtures/safe_migrations_apps/safe_run_sql_app/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.db.models import BoundedPositiveIntegerField diff --git a/fixtures/schema_validation.py b/fixtures/schema_validation.py index 889aafe92f63e2..f8e5b3a7dc1c01 100644 --- a/fixtures/schema_validation.py +++ b/fixtures/schema_validation.py @@ -1,3 +1,4 @@ +from typing import int import functools from collections.abc import Callable diff --git a/fixtures/sdk_crash_detection/crash_event_android.py b/fixtures/sdk_crash_detection/crash_event_android.py index d7990c3ecb4cfb..a9d897e1eedbda 100644 --- a/fixtures/sdk_crash_detection/crash_event_android.py +++ b/fixtures/sdk_crash_detection/crash_event_android.py @@ -1,3 +1,4 @@ +from typing import int import time from collections.abc import Mapping, MutableMapping, Sequence diff --git a/fixtures/sdk_crash_detection/crash_event_cocoa.py b/fixtures/sdk_crash_detection/crash_event_cocoa.py index 6d810d098d0f9e..5aae16718b3352 100644 --- a/fixtures/sdk_crash_detection/crash_event_cocoa.py +++ b/fixtures/sdk_crash_detection/crash_event_cocoa.py @@ -1,5 +1,5 @@ from collections.abc import Collection, Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any IN_APP_FRAME = { "function": "LoginViewController.viewDidAppear", diff --git a/fixtures/sdk_crash_detection/crash_event_dart.py b/fixtures/sdk_crash_detection/crash_event_dart.py index 0d7e43185f2039..534c329e9338ed 100644 --- a/fixtures/sdk_crash_detection/crash_event_dart.py +++ b/fixtures/sdk_crash_detection/crash_event_dart.py @@ -1,3 +1,4 @@ +from typing import int import time from collections.abc import Mapping, MutableMapping, Sequence diff --git a/fixtures/sdk_crash_detection/crash_event_dotnet.py b/fixtures/sdk_crash_detection/crash_event_dotnet.py index 8e4c7ae2e77222..74623c3e278eac 100644 --- a/fixtures/sdk_crash_detection/crash_event_dotnet.py +++ b/fixtures/sdk_crash_detection/crash_event_dotnet.py @@ -1,3 +1,4 @@ +from typing import int import time from collections.abc import Mapping, MutableMapping, Sequence diff --git a/fixtures/sdk_crash_detection/crash_event_native.py b/fixtures/sdk_crash_detection/crash_event_native.py index ed965ae2a6fb3d..d0703dddd6b243 100644 --- a/fixtures/sdk_crash_detection/crash_event_native.py +++ b/fixtures/sdk_crash_detection/crash_event_native.py @@ -1,3 +1,4 @@ +from typing import int import time from collections.abc import Mapping, MutableMapping, Sequence diff --git a/fixtures/sdk_crash_detection/crash_event_react_native.py b/fixtures/sdk_crash_detection/crash_event_react_native.py index d812b346f4083b..57718abb9702d2 100644 --- a/fixtures/sdk_crash_detection/crash_event_react_native.py +++ b/fixtures/sdk_crash_detection/crash_event_react_native.py @@ -1,3 +1,4 @@ +from typing import int import time from collections.abc import Mapping, MutableMapping, Sequence diff --git a/fixtures/sudo_testutils.py b/fixtures/sudo_testutils.py index 809d588e92188f..80b1a6387ad90d 100644 --- a/fixtures/sudo_testutils.py +++ b/fixtures/sudo_testutils.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.auth.models import AbstractBaseUser, AnonymousUser, User from django.db import models from django.test import RequestFactory, TestCase diff --git a/fixtures/vercel.py b/fixtures/vercel.py index 903f21745b9ade..ba896025c065b5 100644 --- a/fixtures/vercel.py +++ b/fixtures/vercel.py @@ -1,3 +1,4 @@ +from typing import int SIGNATURE = "cecad6333f8652af7d4e9c7b6ad87f1c922a76d3" SECRET = "AiK52QASLJXmCXX3X9gO2Zyh" diff --git a/fixtures/vsts.py b/fixtures/vsts.py index 4c9f4678670f21..4992ffb0772986 100644 --- a/fixtures/vsts.py +++ b/fixtures/vsts.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from urllib.parse import parse_qs, urlencode, urlparse import pytest diff --git a/self-hosted/sentry.conf.py b/self-hosted/sentry.conf.py index 71a4c2598b2153..2b65a380fea03e 100644 --- a/self-hosted/sentry.conf.py +++ b/self-hosted/sentry.conf.py @@ -3,6 +3,7 @@ # This file is just Python, with a touch of Django which means # you can inherit and tweak settings to your hearts content. +from typing import int import os import os.path diff --git a/src/bitfield/__init__.py b/src/bitfield/__init__.py index a48afa0e08fe59..c24a122098fcf6 100644 --- a/src/bitfield/__init__.py +++ b/src/bitfield/__init__.py @@ -1,3 +1,4 @@ +from typing import int from bitfield.models import BitField, TypedClassBitField, typed_dict_bitfield # NOQA from bitfield.types import Bit, BitHandler diff --git a/src/bitfield/apps.py b/src/bitfield/apps.py index 093112a964c5dd..c87a0c9ad3d050 100644 --- a/src/bitfield/apps.py +++ b/src/bitfield/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/bitfield/compat.py b/src/bitfield/compat.py index c25e7af0fbbebd..8174ea78214044 100644 --- a/src/bitfield/compat.py +++ b/src/bitfield/compat.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ("bitand", "bitor") diff --git a/src/bitfield/models.py b/src/bitfield/models.py index 43f5204b11db9a..0a6a59e3c4297d 100644 --- a/src/bitfield/models.py +++ b/src/bitfield/models.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, Sequence -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, cast, int from django.db.models import Model from django.db.models.fields import BigIntegerField diff --git a/src/bitfield/query.py b/src/bitfield/query.py index 3fa215f30441da..ce1072513e6329 100644 --- a/src/bitfield/query.py +++ b/src/bitfield/query.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models.lookups import Exact from bitfield.types import Bit, BitHandler diff --git a/src/bitfield/types.py b/src/bitfield/types.py index 5cc30ec5eedc31..4b9ffb4b23b869 100644 --- a/src/bitfield/types.py +++ b/src/bitfield/types.py @@ -1,3 +1,4 @@ +from typing import int def cmp(a, b): return (a > b) - (a < b) diff --git a/src/django_picklefield/__init__.py b/src/django_picklefield/__init__.py index e43368dcff5d01..f5c587aa03262c 100644 --- a/src/django_picklefield/__init__.py +++ b/src/django_picklefield/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .constants import DEFAULT_PROTOCOL from .fields import PickledObjectField diff --git a/src/django_picklefield/constants.py b/src/django_picklefield/constants.py index dc6d5c16c34570..04a3802d4bd03b 100644 --- a/src/django_picklefield/constants.py +++ b/src/django_picklefield/constants.py @@ -1 +1,2 @@ +from typing import int DEFAULT_PROTOCOL = 2 diff --git a/src/django_picklefield/fields.py b/src/django_picklefield/fields.py index 2df8a010e3415d..d71dfd040d65f6 100644 --- a/src/django_picklefield/fields.py +++ b/src/django_picklefield/fields.py @@ -1,7 +1,7 @@ from base64 import b64decode, b64encode from copy import deepcopy from pickle import dumps, loads -from typing import Any +from typing import int, Any from zlib import compress, decompress from django.conf import settings diff --git a/src/flagpole/__init__.py b/src/flagpole/__init__.py index 5533f86828ae19..7ecdcc327200db 100644 --- a/src/flagpole/__init__.py +++ b/src/flagpole/__init__.py @@ -65,7 +65,7 @@ import dataclasses import functools import os -from typing import Any +from typing import int, Any import jsonschema import orjson diff --git a/src/flagpole/conditions.py b/src/flagpole/conditions.py index ac530ffbeb6de8..0318608bc1d85e 100644 --- a/src/flagpole/conditions.py +++ b/src/flagpole/conditions.py @@ -2,7 +2,7 @@ from abc import abstractmethod from collections.abc import Mapping from enum import Enum -from typing import Any, Self, TypeVar +from typing import Any, Self, TypeVar, int from flagpole.evaluation_context import EvaluationContext diff --git a/src/flagpole/evaluation_context.py b/src/flagpole/evaluation_context.py index 975c1b41f677ef..5e549791412743 100644 --- a/src/flagpole/evaluation_context.py +++ b/src/flagpole/evaluation_context.py @@ -3,7 +3,7 @@ import hashlib from collections.abc import Callable from copy import deepcopy -from typing import Any, Generic, TypeVar +from typing import Any, Generic, TypeVar, int ValidContextTypes = TypeVar( "ValidContextTypes", diff --git a/src/flagpole/flagpole_eval.py b/src/flagpole/flagpole_eval.py index 5f9374c2c6072b..a67d01c77e8af4 100755 --- a/src/flagpole/flagpole_eval.py +++ b/src/flagpole/flagpole_eval.py @@ -5,7 +5,7 @@ import dataclasses import sys from pathlib import Path -from typing import Any, cast +from typing import Any, cast, int import yaml diff --git a/src/sentry/__init__.py b/src/sentry/__init__.py index da0af3f8ea2882..ecc77984180b2f 100644 --- a/src/sentry/__init__.py +++ b/src/sentry/__init__.py @@ -1,5 +1,6 @@ # this must import first +from typing import int import importlib.metadata import os import os.path diff --git a/src/sentry/__main__.py b/src/sentry/__main__.py index 405e75a75dc178..0083b659914beb 100644 --- a/src/sentry/__main__.py +++ b/src/sentry/__main__.py @@ -1,3 +1,4 @@ +from typing import int from .runner.main import main if __name__ == "__main__": diff --git a/src/sentry/adoption/__init__.py b/src/sentry/adoption/__init__.py index cfc4e3e0db77ac..8979a860e4ee48 100644 --- a/src/sentry/adoption/__init__.py +++ b/src/sentry/adoption/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .manager import AdoptionManager manager = AdoptionManager() diff --git a/src/sentry/adoption/manager.py b/src/sentry/adoption/manager.py index 4b969338d047ed..e273226cd9e6a7 100644 --- a/src/sentry/adoption/manager.py +++ b/src/sentry/adoption/manager.py @@ -1,3 +1,4 @@ +from typing import int from collections import defaultdict, namedtuple FEATURE_LOCATION = {"language", "integration", "code", "web", "admin", "api"} diff --git a/src/sentry/analytics/__init__.py b/src/sentry/analytics/__init__.py index 177bd18fb670a9..602f0c422e30c2 100644 --- a/src/sentry/analytics/__init__.py +++ b/src/sentry/analytics/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry import options from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/analytics/base.py b/src/sentry/analytics/base.py index 707f6eef769646..02d27bace76e0f 100644 --- a/src/sentry/analytics/base.py +++ b/src/sentry/analytics/base.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import abc diff --git a/src/sentry/analytics/event.py b/src/sentry/analytics/event.py index f238119d11e20e..6da15c6f14bce0 100644 --- a/src/sentry/analytics/event.py +++ b/src/sentry/analytics/event.py @@ -5,7 +5,7 @@ from collections.abc import Callable from dataclasses import asdict, dataclass, field, fields from datetime import datetime as dt -from typing import Any, ClassVar, Self, cast, dataclass_transform, overload +from typing import Any, ClassVar, Self, cast, dataclass_transform, overload, int from uuid import UUID, uuid1 from django.utils import timezone diff --git a/src/sentry/analytics/event_manager.py b/src/sentry/analytics/event_manager.py index 6a2bdcca2c5064..94055750dbe4d7 100644 --- a/src/sentry/analytics/event_manager.py +++ b/src/sentry/analytics/event_manager.py @@ -1,7 +1,7 @@ __all__ = ("default_manager", "EventManager") from collections.abc import MutableMapping -from typing import Any +from typing import int, Any from sentry.analytics.event import Event diff --git a/src/sentry/analytics/events/__init__.py b/src/sentry/analytics/events/__init__.py index 6b45474edc3338..8a83e5461a2cb9 100644 --- a/src/sentry/analytics/events/__init__.py +++ b/src/sentry/analytics/events/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .advanced_search_feature_gated import * # noqa: F401,F403 from .ai_autofix_pr_events import * # noqa: F401,F403 from .alert_created import * # noqa: F401,F403 diff --git a/src/sentry/analytics/events/advanced_search_feature_gated.py b/src/sentry/analytics/events/advanced_search_feature_gated.py index e6992776fc07f8..6664bebf6b7eb0 100644 --- a/src/sentry/analytics/events/advanced_search_feature_gated.py +++ b/src/sentry/analytics/events/advanced_search_feature_gated.py @@ -1,4 +1,5 @@ from sentry import analytics +from typing import int @analytics.eventclass("advanced_search.feature_gated") diff --git a/src/sentry/analytics/events/agent_monitoring_events.py b/src/sentry/analytics/events/agent_monitoring_events.py index 235f787923e625..f92deb098767f3 100644 --- a/src/sentry/analytics/events/agent_monitoring_events.py +++ b/src/sentry/analytics/events/agent_monitoring_events.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/ai_autofix_pr_events.py b/src/sentry/analytics/events/ai_autofix_pr_events.py index 427282ba274212..363cb52b5c5c36 100644 --- a/src/sentry/analytics/events/ai_autofix_pr_events.py +++ b/src/sentry/analytics/events/ai_autofix_pr_events.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/alert_created.py b/src/sentry/analytics/events/alert_created.py index a87c7d77158161..50d572afc5a031 100644 --- a/src/sentry/analytics/events/alert_created.py +++ b/src/sentry/analytics/events/alert_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/alert_edited.py b/src/sentry/analytics/events/alert_edited.py index d110f3f89be60f..895e5224d393aa 100644 --- a/src/sentry/analytics/events/alert_edited.py +++ b/src/sentry/analytics/events/alert_edited.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/alert_rule_ui_component_webhook_sent.py b/src/sentry/analytics/events/alert_rule_ui_component_webhook_sent.py index b7360085ec07e0..69f5c573835749 100644 --- a/src/sentry/analytics/events/alert_rule_ui_component_webhook_sent.py +++ b/src/sentry/analytics/events/alert_rule_ui_component_webhook_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/alert_sent.py b/src/sentry/analytics/events/alert_sent.py index ca45b53516cc5f..bd848f3bec27f2 100644 --- a/src/sentry/analytics/events/alert_sent.py +++ b/src/sentry/analytics/events/alert_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/api_token_created.py b/src/sentry/analytics/events/api_token_created.py index 0b57bd6be2bd2b..c2770bad5b5b8a 100644 --- a/src/sentry/analytics/events/api_token_created.py +++ b/src/sentry/analytics/events/api_token_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/api_token_deleted.py b/src/sentry/analytics/events/api_token_deleted.py index 9bd3dcace2df2e..33df0af863cf02 100644 --- a/src/sentry/analytics/events/api_token_deleted.py +++ b/src/sentry/analytics/events/api_token_deleted.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/auth_v2.py b/src/sentry/analytics/events/auth_v2.py index f1048516242674..42637344b34b83 100644 --- a/src/sentry/analytics/events/auth_v2.py +++ b/src/sentry/analytics/events/auth_v2.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/base_notification_sent.py b/src/sentry/analytics/events/base_notification_sent.py index 615dfdf92c2b40..35074e4907042d 100644 --- a/src/sentry/analytics/events/base_notification_sent.py +++ b/src/sentry/analytics/events/base_notification_sent.py @@ -1,3 +1,4 @@ +from typing import int import abc from sentry import analytics diff --git a/src/sentry/analytics/events/checkin_processing_error_stored.py b/src/sentry/analytics/events/checkin_processing_error_stored.py index c826d1092303cd..417da23dcd29f1 100644 --- a/src/sentry/analytics/events/checkin_processing_error_stored.py +++ b/src/sentry/analytics/events/checkin_processing_error_stored.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/codeowners_assignment.py b/src/sentry/analytics/events/codeowners_assignment.py index 0fa3f7c530998e..431186f4b967ac 100644 --- a/src/sentry/analytics/events/codeowners_assignment.py +++ b/src/sentry/analytics/events/codeowners_assignment.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/codeowners_created.py b/src/sentry/analytics/events/codeowners_created.py index 61c9ae62333434..1ea015c62854bd 100644 --- a/src/sentry/analytics/events/codeowners_created.py +++ b/src/sentry/analytics/events/codeowners_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/codeowners_max_length_exceeded.py b/src/sentry/analytics/events/codeowners_max_length_exceeded.py index 14084b122ee338..252746509b59a2 100644 --- a/src/sentry/analytics/events/codeowners_max_length_exceeded.py +++ b/src/sentry/analytics/events/codeowners_max_length_exceeded.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/codeowners_updated.py b/src/sentry/analytics/events/codeowners_updated.py index 6bca93715c695f..4598b08c6a261a 100644 --- a/src/sentry/analytics/events/codeowners_updated.py +++ b/src/sentry/analytics/events/codeowners_updated.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/comment_webhooks.py b/src/sentry/analytics/events/comment_webhooks.py index 1355c61cccacba..627aebedaf8ab3 100644 --- a/src/sentry/analytics/events/comment_webhooks.py +++ b/src/sentry/analytics/events/comment_webhooks.py @@ -1,3 +1,4 @@ +from typing import int import abc from sentry import analytics diff --git a/src/sentry/analytics/events/cron_monitor_broken_status_recovery.py b/src/sentry/analytics/events/cron_monitor_broken_status_recovery.py index 120e73e721825b..21612a1fe70512 100644 --- a/src/sentry/analytics/events/cron_monitor_broken_status_recovery.py +++ b/src/sentry/analytics/events/cron_monitor_broken_status_recovery.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/cron_monitor_created.py b/src/sentry/analytics/events/cron_monitor_created.py index e939432062a102..9f624bb99a04e1 100644 --- a/src/sentry/analytics/events/cron_monitor_created.py +++ b/src/sentry/analytics/events/cron_monitor_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/data_consent_org_creation.py b/src/sentry/analytics/events/data_consent_org_creation.py index 56d4fb5ab86b94..c232cb6c052744 100644 --- a/src/sentry/analytics/events/data_consent_org_creation.py +++ b/src/sentry/analytics/events/data_consent_org_creation.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/eventuser_endpoint_request.py b/src/sentry/analytics/events/eventuser_endpoint_request.py index f54012239e4bac..b7c8bf7818f505 100644 --- a/src/sentry/analytics/events/eventuser_endpoint_request.py +++ b/src/sentry/analytics/events/eventuser_endpoint_request.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/eventuser_equality_check.py b/src/sentry/analytics/events/eventuser_equality_check.py index 1286abc54a886d..1678015de56e2b 100644 --- a/src/sentry/analytics/events/eventuser_equality_check.py +++ b/src/sentry/analytics/events/eventuser_equality_check.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/eventuser_snuba_for_projects.py b/src/sentry/analytics/events/eventuser_snuba_for_projects.py index 8ee70ede2a9686..7f3bbf58a05118 100644 --- a/src/sentry/analytics/events/eventuser_snuba_for_projects.py +++ b/src/sentry/analytics/events/eventuser_snuba_for_projects.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/eventuser_snuba_query.py b/src/sentry/analytics/events/eventuser_snuba_query.py index 950539844b9e9a..8e321c82036b22 100644 --- a/src/sentry/analytics/events/eventuser_snuba_query.py +++ b/src/sentry/analytics/events/eventuser_snuba_query.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/first_cron_checkin_sent.py b/src/sentry/analytics/events/first_cron_checkin_sent.py index 56bbbfc208afda..fbf6bf78eda41f 100644 --- a/src/sentry/analytics/events/first_cron_checkin_sent.py +++ b/src/sentry/analytics/events/first_cron_checkin_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/first_event_sent.py b/src/sentry/analytics/events/first_event_sent.py index 5c8e6c6d38d52c..dd39836f7a0b7f 100644 --- a/src/sentry/analytics/events/first_event_sent.py +++ b/src/sentry/analytics/events/first_event_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/first_feedback_sent.py b/src/sentry/analytics/events/first_feedback_sent.py index 45fb79e9b1766c..224830408e5d20 100644 --- a/src/sentry/analytics/events/first_feedback_sent.py +++ b/src/sentry/analytics/events/first_feedback_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/first_flag_sent.py b/src/sentry/analytics/events/first_flag_sent.py index 773a4a1305516b..7e1d686405db5e 100644 --- a/src/sentry/analytics/events/first_flag_sent.py +++ b/src/sentry/analytics/events/first_flag_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/first_insight_span_sent.py b/src/sentry/analytics/events/first_insight_span_sent.py index 473d95ac882f6f..5011568081692c 100644 --- a/src/sentry/analytics/events/first_insight_span_sent.py +++ b/src/sentry/analytics/events/first_insight_span_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/first_log_sent.py b/src/sentry/analytics/events/first_log_sent.py index c3b1ebe5bbbaba..b7d6fd6e8d567e 100644 --- a/src/sentry/analytics/events/first_log_sent.py +++ b/src/sentry/analytics/events/first_log_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/first_new_feedback_sent.py b/src/sentry/analytics/events/first_new_feedback_sent.py index f72af78a45e2dc..b5d9cbc88ba183 100644 --- a/src/sentry/analytics/events/first_new_feedback_sent.py +++ b/src/sentry/analytics/events/first_new_feedback_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/first_profile_sent.py b/src/sentry/analytics/events/first_profile_sent.py index 8ec146785ee937..630529bc166562 100644 --- a/src/sentry/analytics/events/first_profile_sent.py +++ b/src/sentry/analytics/events/first_profile_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/first_release_tag_sent.py b/src/sentry/analytics/events/first_release_tag_sent.py index 0f5acffba82c2a..afa11d92c9634c 100644 --- a/src/sentry/analytics/events/first_release_tag_sent.py +++ b/src/sentry/analytics/events/first_release_tag_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/first_replay_sent.py b/src/sentry/analytics/events/first_replay_sent.py index 6ea4d244fb500e..4f5f24a6979439 100644 --- a/src/sentry/analytics/events/first_replay_sent.py +++ b/src/sentry/analytics/events/first_replay_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/first_sourcemaps_sent.py b/src/sentry/analytics/events/first_sourcemaps_sent.py index 82dca62c32f028..2da6520379bfc7 100644 --- a/src/sentry/analytics/events/first_sourcemaps_sent.py +++ b/src/sentry/analytics/events/first_sourcemaps_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/first_trace_metric_sent.py b/src/sentry/analytics/events/first_trace_metric_sent.py index 4fb647f1b0a68c..f4c3e63c186e09 100644 --- a/src/sentry/analytics/events/first_trace_metric_sent.py +++ b/src/sentry/analytics/events/first_trace_metric_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/first_transaction_sent.py b/src/sentry/analytics/events/first_transaction_sent.py index 9d009dde0da015..2f67a4252c603b 100644 --- a/src/sentry/analytics/events/first_transaction_sent.py +++ b/src/sentry/analytics/events/first_transaction_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/first_user_context_sent.py b/src/sentry/analytics/events/first_user_context_sent.py index ac8339b0e217c8..4704545eb62f14 100644 --- a/src/sentry/analytics/events/first_user_context_sent.py +++ b/src/sentry/analytics/events/first_user_context_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/groupowner_assignment.py b/src/sentry/analytics/events/groupowner_assignment.py index e8583da5ec37d0..1223c2e833c0f5 100644 --- a/src/sentry/analytics/events/groupowner_assignment.py +++ b/src/sentry/analytics/events/groupowner_assignment.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/inapp_request.py b/src/sentry/analytics/events/inapp_request.py index a8873115b35322..e5d809ea95957b 100644 --- a/src/sentry/analytics/events/inapp_request.py +++ b/src/sentry/analytics/events/inapp_request.py @@ -1,3 +1,4 @@ +from typing import int import abc from sentry import analytics diff --git a/src/sentry/analytics/events/integration_commit_context_all_frames.py b/src/sentry/analytics/events/integration_commit_context_all_frames.py index a04c7ac2d75b22..9c76ca07c3f5a9 100644 --- a/src/sentry/analytics/events/integration_commit_context_all_frames.py +++ b/src/sentry/analytics/events/integration_commit_context_all_frames.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/integration_failed_to_fetch_commit_context.py b/src/sentry/analytics/events/integration_failed_to_fetch_commit_context.py index 9bb7b618dd8d3f..349b8741c2dc5d 100644 --- a/src/sentry/analytics/events/integration_failed_to_fetch_commit_context.py +++ b/src/sentry/analytics/events/integration_failed_to_fetch_commit_context.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/integration_pipeline_step.py b/src/sentry/analytics/events/integration_pipeline_step.py index 5196bae6923e13..2c4f2e9f264bd7 100644 --- a/src/sentry/analytics/events/integration_pipeline_step.py +++ b/src/sentry/analytics/events/integration_pipeline_step.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/integration_serverless_setup.py b/src/sentry/analytics/events/integration_serverless_setup.py index 0d5fb148288b85..e8df8003efe936 100644 --- a/src/sentry/analytics/events/integration_serverless_setup.py +++ b/src/sentry/analytics/events/integration_serverless_setup.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/internal_integration_created.py b/src/sentry/analytics/events/internal_integration_created.py index 46891405232438..475fb9c3a4ea46 100644 --- a/src/sentry/analytics/events/internal_integration_created.py +++ b/src/sentry/analytics/events/internal_integration_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/issue_alert_fired.py b/src/sentry/analytics/events/issue_alert_fired.py index ac7eb827ccd504..bb9ab79dc93adf 100644 --- a/src/sentry/analytics/events/issue_alert_fired.py +++ b/src/sentry/analytics/events/issue_alert_fired.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/issue_archived.py b/src/sentry/analytics/events/issue_archived.py index e151e204855b49..427e8dfd4abc05 100644 --- a/src/sentry/analytics/events/issue_archived.py +++ b/src/sentry/analytics/events/issue_archived.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/issue_assigned.py b/src/sentry/analytics/events/issue_assigned.py index 2fef64d8bb909d..6523ab68a342dd 100644 --- a/src/sentry/analytics/events/issue_assigned.py +++ b/src/sentry/analytics/events/issue_assigned.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/issue_auto_resolved.py b/src/sentry/analytics/events/issue_auto_resolved.py index 31092008040604..898e63c2c400d9 100644 --- a/src/sentry/analytics/events/issue_auto_resolved.py +++ b/src/sentry/analytics/events/issue_auto_resolved.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/issue_deleted.py b/src/sentry/analytics/events/issue_deleted.py index 3d5ec94d642c78..fc7ba79963e99a 100644 --- a/src/sentry/analytics/events/issue_deleted.py +++ b/src/sentry/analytics/events/issue_deleted.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/issue_escalating.py b/src/sentry/analytics/events/issue_escalating.py index cf61bfc95c06dd..432f19bf70b6ab 100644 --- a/src/sentry/analytics/events/issue_escalating.py +++ b/src/sentry/analytics/events/issue_escalating.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/issue_ignored.py b/src/sentry/analytics/events/issue_ignored.py index 2028d658cb9670..64cf5f59d9eda5 100644 --- a/src/sentry/analytics/events/issue_ignored.py +++ b/src/sentry/analytics/events/issue_ignored.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/issue_mark_reviewed.py b/src/sentry/analytics/events/issue_mark_reviewed.py index db066ed9ecf8a8..076a378fb0c7e2 100644 --- a/src/sentry/analytics/events/issue_mark_reviewed.py +++ b/src/sentry/analytics/events/issue_mark_reviewed.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/issue_priority.py b/src/sentry/analytics/events/issue_priority.py index 3a2fbc3c229dcc..beb69ae7086c4f 100644 --- a/src/sentry/analytics/events/issue_priority.py +++ b/src/sentry/analytics/events/issue_priority.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/issue_resolved.py b/src/sentry/analytics/events/issue_resolved.py index a75e771ccd390c..cceb4cd9b0d302 100644 --- a/src/sentry/analytics/events/issue_resolved.py +++ b/src/sentry/analytics/events/issue_resolved.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/issue_search_endpoint_queried.py b/src/sentry/analytics/events/issue_search_endpoint_queried.py index db80113b3c6c50..8172348ce3ea1a 100644 --- a/src/sentry/analytics/events/issue_search_endpoint_queried.py +++ b/src/sentry/analytics/events/issue_search_endpoint_queried.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/issue_tracker_used.py b/src/sentry/analytics/events/issue_tracker_used.py index 975a05cf62de14..da4d44c57f4471 100644 --- a/src/sentry/analytics/events/issue_tracker_used.py +++ b/src/sentry/analytics/events/issue_tracker_used.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/issue_unignored.py b/src/sentry/analytics/events/issue_unignored.py index 697d2a62bab5c1..04b9be64c01f98 100644 --- a/src/sentry/analytics/events/issue_unignored.py +++ b/src/sentry/analytics/events/issue_unignored.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/issue_unresolved.py b/src/sentry/analytics/events/issue_unresolved.py index 59ea3c75cc45a8..118337d0539438 100644 --- a/src/sentry/analytics/events/issue_unresolved.py +++ b/src/sentry/analytics/events/issue_unresolved.py @@ -1,4 +1,4 @@ -from typing import Literal +from typing import int, Literal from sentry import analytics diff --git a/src/sentry/analytics/events/issueowners_assignment.py b/src/sentry/analytics/events/issueowners_assignment.py index 13621130ac0a2e..7fa70ca0dcbebc 100644 --- a/src/sentry/analytics/events/issueowners_assignment.py +++ b/src/sentry/analytics/events/issueowners_assignment.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/join_request_created.py b/src/sentry/analytics/events/join_request_created.py index 9614fb0189f451..38866a34b59d0d 100644 --- a/src/sentry/analytics/events/join_request_created.py +++ b/src/sentry/analytics/events/join_request_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/join_request_link_viewed.py b/src/sentry/analytics/events/join_request_link_viewed.py index 2b9d96e25c267d..b6236b4732446d 100644 --- a/src/sentry/analytics/events/join_request_link_viewed.py +++ b/src/sentry/analytics/events/join_request_link_viewed.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/manual_issue_assignment.py b/src/sentry/analytics/events/manual_issue_assignment.py index 4edf64e2f3ee54..b64e1e9100d170 100644 --- a/src/sentry/analytics/events/manual_issue_assignment.py +++ b/src/sentry/analytics/events/manual_issue_assignment.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/member_invited.py b/src/sentry/analytics/events/member_invited.py index 9850c4b50f7ff0..de48dc82076757 100644 --- a/src/sentry/analytics/events/member_invited.py +++ b/src/sentry/analytics/events/member_invited.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/metric_alert_with_ui_component_created.py b/src/sentry/analytics/events/metric_alert_with_ui_component_created.py index 002a5fd661dc65..b7a6bf409f9ac3 100644 --- a/src/sentry/analytics/events/metric_alert_with_ui_component_created.py +++ b/src/sentry/analytics/events/metric_alert_with_ui_component_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/missing_members_nudge.py b/src/sentry/analytics/events/missing_members_nudge.py index 6b63fb7721ab58..12d4abea5fabd0 100644 --- a/src/sentry/analytics/events/missing_members_nudge.py +++ b/src/sentry/analytics/events/missing_members_nudge.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/monitor_mark_failed.py b/src/sentry/analytics/events/monitor_mark_failed.py index 4c209f31163903..33b8d0d069c204 100644 --- a/src/sentry/analytics/events/monitor_mark_failed.py +++ b/src/sentry/analytics/events/monitor_mark_failed.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/onboarding_complete.py b/src/sentry/analytics/events/onboarding_complete.py index a1bb9186c23737..508fd56cdbe66a 100644 --- a/src/sentry/analytics/events/onboarding_complete.py +++ b/src/sentry/analytics/events/onboarding_complete.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/onboarding_continuation_sent.py b/src/sentry/analytics/events/onboarding_continuation_sent.py index c65042c40dbad2..afca2ad43c8097 100644 --- a/src/sentry/analytics/events/onboarding_continuation_sent.py +++ b/src/sentry/analytics/events/onboarding_continuation_sent.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/org_auth_token_created.py b/src/sentry/analytics/events/org_auth_token_created.py index 1167ecd806bbb9..585b392d8fef89 100644 --- a/src/sentry/analytics/events/org_auth_token_created.py +++ b/src/sentry/analytics/events/org_auth_token_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/org_auth_token_deleted.py b/src/sentry/analytics/events/org_auth_token_deleted.py index 549b2e30110f25..ceb153c295bc9c 100644 --- a/src/sentry/analytics/events/org_auth_token_deleted.py +++ b/src/sentry/analytics/events/org_auth_token_deleted.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/organization_created.py b/src/sentry/analytics/events/organization_created.py index 6636d0ac114b3e..3f72679b4b64a8 100644 --- a/src/sentry/analytics/events/organization_created.py +++ b/src/sentry/analytics/events/organization_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/organization_joined.py b/src/sentry/analytics/events/organization_joined.py index d1fb7367292c2c..8aefaf0bb917dd 100644 --- a/src/sentry/analytics/events/organization_joined.py +++ b/src/sentry/analytics/events/organization_joined.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/organization_removed.py b/src/sentry/analytics/events/organization_removed.py index c5a7238623a755..1697c6d22b7b4d 100644 --- a/src/sentry/analytics/events/organization_removed.py +++ b/src/sentry/analytics/events/organization_removed.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/plugin_enabled.py b/src/sentry/analytics/events/plugin_enabled.py index 92e75d8d2d6f62..a7b07c78a100c1 100644 --- a/src/sentry/analytics/events/plugin_enabled.py +++ b/src/sentry/analytics/events/plugin_enabled.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/project_created.py b/src/sentry/analytics/events/project_created.py index e1323eedbc286b..dc08f5229f06f3 100644 --- a/src/sentry/analytics/events/project_created.py +++ b/src/sentry/analytics/events/project_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/project_issue_searched.py b/src/sentry/analytics/events/project_issue_searched.py index 653ac944cbf414..0e653a406bc2bd 100644 --- a/src/sentry/analytics/events/project_issue_searched.py +++ b/src/sentry/analytics/events/project_issue_searched.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/project_transferred.py b/src/sentry/analytics/events/project_transferred.py index 1b71de42da8a58..f0d8c8590c5b34 100644 --- a/src/sentry/analytics/events/project_transferred.py +++ b/src/sentry/analytics/events/project_transferred.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/quick_trace_connected_services.py b/src/sentry/analytics/events/quick_trace_connected_services.py index a43c47a8f5b4c7..34d9952f22c90a 100644 --- a/src/sentry/analytics/events/quick_trace_connected_services.py +++ b/src/sentry/analytics/events/quick_trace_connected_services.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/release_created.py b/src/sentry/analytics/events/release_created.py index c6804a8ca683a1..96c81e1a073601 100644 --- a/src/sentry/analytics/events/release_created.py +++ b/src/sentry/analytics/events/release_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/release_get_previous_commits.py b/src/sentry/analytics/events/release_get_previous_commits.py index 9ab983273485d2..bb51d8061c744c 100644 --- a/src/sentry/analytics/events/release_get_previous_commits.py +++ b/src/sentry/analytics/events/release_get_previous_commits.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/release_set_commits.py b/src/sentry/analytics/events/release_set_commits.py index 0b12109314f5d4..c9e4cf0badca67 100644 --- a/src/sentry/analytics/events/release_set_commits.py +++ b/src/sentry/analytics/events/release_set_commits.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/relocation_created.py b/src/sentry/analytics/events/relocation_created.py index 57b85443e6c9c6..b55e94b59ee478 100644 --- a/src/sentry/analytics/events/relocation_created.py +++ b/src/sentry/analytics/events/relocation_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/relocation_forked.py b/src/sentry/analytics/events/relocation_forked.py index e2c57a310dfbcb..607fc576080ec4 100644 --- a/src/sentry/analytics/events/relocation_forked.py +++ b/src/sentry/analytics/events/relocation_forked.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/relocation_organization_imported.py b/src/sentry/analytics/events/relocation_organization_imported.py index a40b0f672d7f46..de4adba8eed40f 100644 --- a/src/sentry/analytics/events/relocation_organization_imported.py +++ b/src/sentry/analytics/events/relocation_organization_imported.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/repo_linked.py b/src/sentry/analytics/events/repo_linked.py index c30dea79afd6b1..11a1cf07232cdd 100644 --- a/src/sentry/analytics/events/repo_linked.py +++ b/src/sentry/analytics/events/repo_linked.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/rule_disable_opt_out.py b/src/sentry/analytics/events/rule_disable_opt_out.py index c3177a66f971e7..3380102b60c833 100644 --- a/src/sentry/analytics/events/rule_disable_opt_out.py +++ b/src/sentry/analytics/events/rule_disable_opt_out.py @@ -1,3 +1,4 @@ +from typing import int import abc from sentry import analytics diff --git a/src/sentry/analytics/events/rule_reenable.py b/src/sentry/analytics/events/rule_reenable.py index add26f7fe21571..a2a6afed810e0c 100644 --- a/src/sentry/analytics/events/rule_reenable.py +++ b/src/sentry/analytics/events/rule_reenable.py @@ -1,3 +1,4 @@ +from typing import int import abc from sentry import analytics diff --git a/src/sentry/analytics/events/rule_snooze.py b/src/sentry/analytics/events/rule_snooze.py index 2f3b0c61350676..c2d231ad44e999 100644 --- a/src/sentry/analytics/events/rule_snooze.py +++ b/src/sentry/analytics/events/rule_snooze.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/search_saved.py b/src/sentry/analytics/events/search_saved.py index 75c65c16b7108b..cd6553c01a05ab 100644 --- a/src/sentry/analytics/events/search_saved.py +++ b/src/sentry/analytics/events/search_saved.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/second_platform_added.py b/src/sentry/analytics/events/second_platform_added.py index dad4a2dd006ac7..b263e1c9fa1d12 100644 --- a/src/sentry/analytics/events/second_platform_added.py +++ b/src/sentry/analytics/events/second_platform_added.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/sentry_app_created.py b/src/sentry/analytics/events/sentry_app_created.py index 649d35ec3cedb8..fd39d4fe7f0fd2 100644 --- a/src/sentry/analytics/events/sentry_app_created.py +++ b/src/sentry/analytics/events/sentry_app_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/sentry_app_deleted.py b/src/sentry/analytics/events/sentry_app_deleted.py index e9231189befe24..7b2b9f49b47d75 100644 --- a/src/sentry/analytics/events/sentry_app_deleted.py +++ b/src/sentry/analytics/events/sentry_app_deleted.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/sentry_app_installation_token_created.py b/src/sentry/analytics/events/sentry_app_installation_token_created.py index 9341e860d176f6..cfcd0ee3f324d6 100644 --- a/src/sentry/analytics/events/sentry_app_installation_token_created.py +++ b/src/sentry/analytics/events/sentry_app_installation_token_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/sentry_app_installation_token_deleted.py b/src/sentry/analytics/events/sentry_app_installation_token_deleted.py index fb60a64855c0ea..cac316eefe67df 100644 --- a/src/sentry/analytics/events/sentry_app_installation_token_deleted.py +++ b/src/sentry/analytics/events/sentry_app_installation_token_deleted.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/sentry_app_installation_updated.py b/src/sentry/analytics/events/sentry_app_installation_updated.py index 98f76ba852cd61..28b2954c58542d 100644 --- a/src/sentry/analytics/events/sentry_app_installation_updated.py +++ b/src/sentry/analytics/events/sentry_app_installation_updated.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/sentry_app_installed.py b/src/sentry/analytics/events/sentry_app_installed.py index 9ffa972daa3c97..06623e8269a438 100644 --- a/src/sentry/analytics/events/sentry_app_installed.py +++ b/src/sentry/analytics/events/sentry_app_installed.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/sentry_app_schema_validation_error.py b/src/sentry/analytics/events/sentry_app_schema_validation_error.py index 90fd07635c7568..e771ee616a6bb1 100644 --- a/src/sentry/analytics/events/sentry_app_schema_validation_error.py +++ b/src/sentry/analytics/events/sentry_app_schema_validation_error.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/sentry_app_token_exchanged.py b/src/sentry/analytics/events/sentry_app_token_exchanged.py index 057d2b5dfec678..ce627454b87be8 100644 --- a/src/sentry/analytics/events/sentry_app_token_exchanged.py +++ b/src/sentry/analytics/events/sentry_app_token_exchanged.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/sentry_app_uninstalled.py b/src/sentry/analytics/events/sentry_app_uninstalled.py index 30134d61a58f07..489bdbf8ff77b6 100644 --- a/src/sentry/analytics/events/sentry_app_uninstalled.py +++ b/src/sentry/analytics/events/sentry_app_uninstalled.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/sentry_app_updated.py b/src/sentry/analytics/events/sentry_app_updated.py index 88a5d4cd6d2cd1..71480fcd2f0970 100644 --- a/src/sentry/analytics/events/sentry_app_updated.py +++ b/src/sentry/analytics/events/sentry_app_updated.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/sentryapp_issue_webhooks.py b/src/sentry/analytics/events/sentryapp_issue_webhooks.py index add8bf6c52c61e..d170af6864282b 100644 --- a/src/sentry/analytics/events/sentryapp_issue_webhooks.py +++ b/src/sentry/analytics/events/sentryapp_issue_webhooks.py @@ -1,3 +1,4 @@ +from typing import int import abc from sentry import analytics diff --git a/src/sentry/analytics/events/sso_enabled.py b/src/sentry/analytics/events/sso_enabled.py index c86f64b986e7c4..bad5bbc7b74e17 100644 --- a/src/sentry/analytics/events/sso_enabled.py +++ b/src/sentry/analytics/events/sso_enabled.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/suspectcommit_assignment.py b/src/sentry/analytics/events/suspectcommit_assignment.py index 5a0121a7b62744..20240991a9b56f 100644 --- a/src/sentry/analytics/events/suspectcommit_assignment.py +++ b/src/sentry/analytics/events/suspectcommit_assignment.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/team_created.py b/src/sentry/analytics/events/team_created.py index 8ba77537f88d05..99fbf224fe547f 100644 --- a/src/sentry/analytics/events/team_created.py +++ b/src/sentry/analytics/events/team_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/user_created.py b/src/sentry/analytics/events/user_created.py index e69f0f01a5b5a1..6c63cab560866e 100644 --- a/src/sentry/analytics/events/user_created.py +++ b/src/sentry/analytics/events/user_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/user_signup.py b/src/sentry/analytics/events/user_signup.py index b92cab462adc55..b59a583dee6b56 100644 --- a/src/sentry/analytics/events/user_signup.py +++ b/src/sentry/analytics/events/user_signup.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/webhook_repository_created.py b/src/sentry/analytics/events/webhook_repository_created.py index 963503a264aef9..7e1e2a8e38bfe7 100644 --- a/src/sentry/analytics/events/webhook_repository_created.py +++ b/src/sentry/analytics/events/webhook_repository_created.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/events/weekly_report.py b/src/sentry/analytics/events/weekly_report.py index d9785a5e0cb32c..c1b07481a93e4c 100644 --- a/src/sentry/analytics/events/weekly_report.py +++ b/src/sentry/analytics/events/weekly_report.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/analytics/pubsub.py b/src/sentry/analytics/pubsub.py index f7a312733033a0..1a43179b192d1a 100644 --- a/src/sentry/analytics/pubsub.py +++ b/src/sentry/analytics/pubsub.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.analytics.event import EventEnvelope diff --git a/src/sentry/api/__init__.py b/src/sentry/api/__init__.py index 616aa3d1f4cb46..adac606f70ce39 100644 --- a/src/sentry/api/__init__.py +++ b/src/sentry/api/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .analytics import * # NOQA from .client import ApiClient diff --git a/src/sentry/api/analytics.py b/src/sentry/api/analytics.py index 448eb73c8d707d..b3f5e8dfb9cf39 100644 --- a/src/sentry/api/analytics.py +++ b/src/sentry/api/analytics.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/api/api_owners.py b/src/sentry/api/api_owners.py index abfbbdf08a2999..a08f8e55d19589 100644 --- a/src/sentry/api/api_owners.py +++ b/src/sentry/api/api_owners.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum diff --git a/src/sentry/api/api_publish_status.py b/src/sentry/api/api_publish_status.py index fe701e53a019e1..7454762e59cfcf 100644 --- a/src/sentry/api/api_publish_status.py +++ b/src/sentry/api/api_publish_status.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum diff --git a/src/sentry/api/authentication.py b/src/sentry/api/authentication.py index cb870f400e673d..8f062d8caa2326 100644 --- a/src/sentry/api/authentication.py +++ b/src/sentry/api/authentication.py @@ -4,7 +4,7 @@ import hmac import logging from collections.abc import Callable, Iterable -from typing import Any, ClassVar +from typing import Any, ClassVar, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/api/base.py b/src/sentry/api/base.py index 3a771320a86551..d3e6fb6b481b23 100644 --- a/src/sentry/api/base.py +++ b/src/sentry/api/base.py @@ -6,7 +6,7 @@ import time from collections.abc import Callable, Iterable, Mapping from datetime import datetime, timedelta, timezone -from typing import Any, TypedDict +from typing import Any, TypedDict, int from urllib.parse import quote as urlquote import sentry_sdk diff --git a/src/sentry/api/bases/__init__.py b/src/sentry/api/bases/__init__.py index 737426b0542226..02e9a16f690051 100644 --- a/src/sentry/api/bases/__init__.py +++ b/src/sentry/api/bases/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .organization import * # NOQA from .organization_events import * # NOQA from .organizationmember import * # NOQA diff --git a/src/sentry/api/bases/avatar.py b/src/sentry/api/bases/avatar.py index 34dbcc7e51b432..1b13ae976d8619 100644 --- a/src/sentry/api/bases/avatar.py +++ b/src/sentry/api/bases/avatar.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, ClassVar, Generic, TypeVar +from typing import Any, ClassVar, Generic, TypeVar, int from rest_framework import serializers, status from rest_framework.request import Request diff --git a/src/sentry/api/bases/incident.py b/src/sentry/api/bases/incident.py index 27288d2f06f61e..37364a1647abcd 100644 --- a/src/sentry/api/bases/incident.py +++ b/src/sentry/api/bases/incident.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from rest_framework.exceptions import PermissionDenied from rest_framework.request import Request diff --git a/src/sentry/api/bases/organization.py b/src/sentry/api/bases/organization.py index 8823d12ca2451f..e5dbe066b2170e 100644 --- a/src/sentry/api/bases/organization.py +++ b/src/sentry/api/bases/organization.py @@ -2,7 +2,7 @@ from collections.abc import Sequence from datetime import datetime -from typing import Any, Literal, NotRequired, TypedDict, overload +from typing import Any, Literal, NotRequired, TypedDict, overload, int import sentry_sdk from django.core.cache import cache diff --git a/src/sentry/api/bases/organization_events.py b/src/sentry/api/bases/organization_events.py index c880968ebc98ee..ffebca69d5b892 100644 --- a/src/sentry/api/bases/organization_events.py +++ b/src/sentry/api/bases/organization_events.py @@ -4,7 +4,7 @@ import logging from collections.abc import Callable, Iterable, Sequence from datetime import timedelta -from typing import Any, cast +from typing import Any, cast, int from urllib.parse import quote as urlquote import sentry_sdk diff --git a/src/sentry/api/bases/organization_flag.py b/src/sentry/api/bases/organization_flag.py index ae42a98b43718a..05c4198d37741a 100644 --- a/src/sentry/api/bases/organization_flag.py +++ b/src/sentry/api/bases/organization_flag.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from rest_framework.request import Request diff --git a/src/sentry/api/bases/organization_request_change.py b/src/sentry/api/bases/organization_request_change.py index 905325f6ec1626..12a0a633bad9a0 100644 --- a/src/sentry/api/bases/organization_request_change.py +++ b/src/sentry/api/bases/organization_request_change.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from rest_framework.request import Request diff --git a/src/sentry/api/bases/organizationmember.py b/src/sentry/api/bases/organizationmember.py index 284b8fcf8eaac7..96d69eb39c18a7 100644 --- a/src/sentry/api/bases/organizationmember.py +++ b/src/sentry/api/bases/organizationmember.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, Literal, NotRequired, TypedDict +from typing import Any, Literal, NotRequired, TypedDict, int from rest_framework import serializers from rest_framework.fields import empty diff --git a/src/sentry/api/bases/project.py b/src/sentry/api/bases/project.py index a0be94683b23a1..ddd2ebc10ba80d 100644 --- a/src/sentry/api/bases/project.py +++ b/src/sentry/api/bases/project.py @@ -2,7 +2,7 @@ import http from collections.abc import Mapping -from typing import Any +from typing import int, Any import sentry_sdk from rest_framework.permissions import BasePermission diff --git a/src/sentry/api/bases/project_transaction_threshold_override.py b/src/sentry/api/bases/project_transaction_threshold_override.py index 7249ce548650e1..a6872dd4fac35e 100644 --- a/src/sentry/api/bases/project_transaction_threshold_override.py +++ b/src/sentry/api/bases/project_transaction_threshold_override.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.bases.organization import OrganizationPermission diff --git a/src/sentry/api/bases/rule.py b/src/sentry/api/bases/rule.py index 824780c2f0c45f..2676fb1f9d2d5b 100644 --- a/src/sentry/api/bases/rule.py +++ b/src/sentry/api/bases/rule.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from rest_framework.request import Request diff --git a/src/sentry/api/bases/team.py b/src/sentry/api/bases/team.py index cd73b066c631e4..ce8402bef2d74e 100644 --- a/src/sentry/api/bases/team.py +++ b/src/sentry/api/bases/team.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import Any +from typing import int, Any from rest_framework.permissions import BasePermission from rest_framework.request import Request diff --git a/src/sentry/api/client.py b/src/sentry/api/client.py index 03048352946b01..3eefe188ffc0ef 100644 --- a/src/sentry/api/client.py +++ b/src/sentry/api/client.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TypeAlias +from typing import int, TypeAlias import orjson from django.conf import settings diff --git a/src/sentry/api/decorators.py b/src/sentry/api/decorators.py index 8ca9117360d6c8..8fcda6eb334434 100644 --- a/src/sentry/api/decorators.py +++ b/src/sentry/api/decorators.py @@ -1,6 +1,6 @@ from collections.abc import Callable from functools import wraps -from typing import Concatenate +from typing import int, Concatenate from django.contrib.auth.models import AnonymousUser from django.http.response import HttpResponseBase diff --git a/src/sentry/api/endpoints/accept_organization_invite.py b/src/sentry/api/endpoints/accept_organization_invite.py index 11967e7c2f248e..ebb5c1792031d0 100644 --- a/src/sentry/api/endpoints/accept_organization_invite.py +++ b/src/sentry/api/endpoints/accept_organization_invite.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Mapping diff --git a/src/sentry/api/endpoints/accept_project_transfer.py b/src/sentry/api/endpoints/accept_project_transfer.py index 22c6dd3a96d31a..a6f0e233a35e6f 100644 --- a/src/sentry/api/endpoints/accept_project_transfer.py +++ b/src/sentry/api/endpoints/accept_project_transfer.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.core.signing import BadSignature, SignatureExpired diff --git a/src/sentry/api/endpoints/admin_project_configs.py b/src/sentry/api/endpoints/admin_project_configs.py index 80db2adaa46a73..d90140630921e9 100644 --- a/src/sentry/api/endpoints/admin_project_configs.py +++ b/src/sentry/api/endpoints/admin_project_configs.py @@ -1,5 +1,5 @@ from collections.abc import MutableMapping -from typing import Any +from typing import int, Any from django.http import Http404 from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/api_application_details.py b/src/sentry/api/endpoints/api_application_details.py index 8b83edaff192af..f68c32c7b4d484 100644 --- a/src/sentry/api/endpoints/api_application_details.py +++ b/src/sentry/api/endpoints/api_application_details.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from rest_framework import serializers from rest_framework.authentication import SessionAuthentication diff --git a/src/sentry/api/endpoints/api_application_rotate_secret.py b/src/sentry/api/endpoints/api_application_rotate_secret.py index 000c0a4029d4e8..b0486f8e61798e 100644 --- a/src/sentry/api/endpoints/api_application_rotate_secret.py +++ b/src/sentry/api/endpoints/api_application_rotate_secret.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.authentication import SessionAuthentication from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/api_applications.py b/src/sentry/api/endpoints/api_applications.py index 2d346afb54a2aa..1b17e01fb100fe 100644 --- a/src/sentry/api/endpoints/api_applications.py +++ b/src/sentry/api/endpoints/api_applications.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.authentication import SessionAuthentication from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/api_authorizations.py b/src/sentry/api/endpoints/api_authorizations.py index 9711451d69d2be..7a98478bf97cb5 100644 --- a/src/sentry/api/endpoints/api_authorizations.py +++ b/src/sentry/api/endpoints/api_authorizations.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from rest_framework.authentication import SessionAuthentication from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/api_token_details.py b/src/sentry/api/endpoints/api_token_details.py index 4c6a0939c7f0d4..11bfa0000fb44a 100644 --- a/src/sentry/api/endpoints/api_token_details.py +++ b/src/sentry/api/endpoints/api_token_details.py @@ -1,3 +1,4 @@ +from typing import int from django.utils.decorators import method_decorator from django.views.decorators.cache import never_cache from rest_framework import serializers diff --git a/src/sentry/api/endpoints/api_tokens.py b/src/sentry/api/endpoints/api_tokens.py index eef78f0c93c342..e561b43c5a2500 100644 --- a/src/sentry/api/endpoints/api_tokens.py +++ b/src/sentry/api/endpoints/api_tokens.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.db import router, transaction from django.utils.decorators import method_decorator diff --git a/src/sentry/api/endpoints/artifact_bundles.py b/src/sentry/api/endpoints/artifact_bundles.py index bd25c8c7f24944..bd78296f4b4aff 100644 --- a/src/sentry/api/endpoints/artifact_bundles.py +++ b/src/sentry/api/endpoints/artifact_bundles.py @@ -1,3 +1,4 @@ +from typing import int import uuid from collections import defaultdict diff --git a/src/sentry/api/endpoints/artifact_lookup.py b/src/sentry/api/endpoints/artifact_lookup.py index fba0ca7d5b9e6e..7f0aa74df51d39 100644 --- a/src/sentry/api/endpoints/artifact_lookup.py +++ b/src/sentry/api/endpoints/artifact_lookup.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int from django.db.models.query import QuerySet from django.http import Http404, HttpResponse, HttpResponseBadRequest, StreamingHttpResponse diff --git a/src/sentry/api/endpoints/assistant.py b/src/sentry/api/endpoints/assistant.py index b774be068900d5..f1fcf63e98c9ce 100644 --- a/src/sentry/api/endpoints/assistant.py +++ b/src/sentry/api/endpoints/assistant.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum from django.db import IntegrityError diff --git a/src/sentry/api/endpoints/auth_config.py b/src/sentry/api/endpoints/auth_config.py index b3945a238b2168..ece1e79d43cdf3 100644 --- a/src/sentry/api/endpoints/auth_config.py +++ b/src/sentry/api/endpoints/auth_config.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.http.request import HttpRequest diff --git a/src/sentry/api/endpoints/auth_index.py b/src/sentry/api/endpoints/auth_index.py index d4c2ebfa682ed3..51cc2d0c1825c9 100644 --- a/src/sentry/api/endpoints/auth_index.py +++ b/src/sentry/api/endpoints/auth_index.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.conf import settings diff --git a/src/sentry/api/endpoints/auth_login.py b/src/sentry/api/endpoints/auth_login.py index ffe24e6d8bf4f3..a8c248965af40b 100644 --- a/src/sentry/api/endpoints/auth_login.py +++ b/src/sentry/api/endpoints/auth_login.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/auth_validate.py b/src/sentry/api/endpoints/auth_validate.py index cca8c62c914ed4..3604d1c0572b62 100644 --- a/src/sentry/api/endpoints/auth_validate.py +++ b/src/sentry/api/endpoints/auth_validate.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework.authentication import SessionAuthentication diff --git a/src/sentry/api/endpoints/broadcast_details.py b/src/sentry/api/endpoints/broadcast_details.py index 8caec957c581b7..49590b1ca45b3c 100644 --- a/src/sentry/api/endpoints/broadcast_details.py +++ b/src/sentry/api/endpoints/broadcast_details.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db import IntegrityError, router, transaction diff --git a/src/sentry/api/endpoints/broadcast_index.py b/src/sentry/api/endpoints/broadcast_index.py index ec6228241784e2..373a621ba44282 100644 --- a/src/sentry/api/endpoints/broadcast_index.py +++ b/src/sentry/api/endpoints/broadcast_index.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from functools import reduce diff --git a/src/sentry/api/endpoints/builtin_symbol_sources.py b/src/sentry/api/endpoints/builtin_symbol_sources.py index af34b014c4632f..cc7842097e0cf4 100644 --- a/src/sentry/api/endpoints/builtin_symbol_sources.py +++ b/src/sentry/api/endpoints/builtin_symbol_sources.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/catchall.py b/src/sentry/api/endpoints/catchall.py index 683678baed2a50..04551d3caec805 100644 --- a/src/sentry/api/endpoints/catchall.py +++ b/src/sentry/api/endpoints/catchall.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpResponse, JsonResponse from django.views.decorators.csrf import csrf_exempt from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/check_am2_compatibility.py b/src/sentry/api/endpoints/check_am2_compatibility.py index d5b23bbb01b011..708e3b16c18bfd 100644 --- a/src/sentry/api/endpoints/check_am2_compatibility.py +++ b/src/sentry/api/endpoints/check_am2_compatibility.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/chunk.py b/src/sentry/api/endpoints/chunk.py index c0889eea4f1918..172a515f824737 100644 --- a/src/sentry/api/endpoints/chunk.py +++ b/src/sentry/api/endpoints/chunk.py @@ -1,3 +1,4 @@ +from typing import int import logging import re from gzip import GzipFile diff --git a/src/sentry/api/endpoints/custom_rules.py b/src/sentry/api/endpoints/custom_rules.py index e1fc33d348bbe8..576daee98fabc7 100644 --- a/src/sentry/api/endpoints/custom_rules.py +++ b/src/sentry/api/endpoints/custom_rules.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from enum import Enum diff --git a/src/sentry/api/endpoints/data_scrubbing_selector_suggestions.py b/src/sentry/api/endpoints/data_scrubbing_selector_suggestions.py index dcfbc09f86095e..51605220420170 100644 --- a/src/sentry/api/endpoints/data_scrubbing_selector_suggestions.py +++ b/src/sentry/api/endpoints/data_scrubbing_selector_suggestions.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import orjson from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/debug_files.py b/src/sentry/api/endpoints/debug_files.py index 1ec3c4ca598cb1..292d6812d77270 100644 --- a/src/sentry/api/endpoints/debug_files.py +++ b/src/sentry/api/endpoints/debug_files.py @@ -1,3 +1,4 @@ +from typing import int import logging import posixpath import re diff --git a/src/sentry/api/endpoints/email_capture.py b/src/sentry/api/endpoints/email_capture.py index 0062fca64b4ef0..9c47627dc94347 100644 --- a/src/sentry/api/endpoints/email_capture.py +++ b/src/sentry/api/endpoints/email_capture.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from rest_framework.permissions import IsAuthenticated # noqa S012 from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/event_apple_crash_report.py b/src/sentry/api/endpoints/event_apple_crash_report.py index 77d462ed9df68a..aef04233bb42b1 100644 --- a/src/sentry/api/endpoints/event_apple_crash_report.py +++ b/src/sentry/api/endpoints/event_apple_crash_report.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpResponse, StreamingHttpResponse from django.http.response import HttpResponseBase from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/event_attachment_details.py b/src/sentry/api/endpoints/event_attachment_details.py index cb228d6a0bb5aa..f6b6a4e8ecaa08 100644 --- a/src/sentry/api/endpoints/event_attachment_details.py +++ b/src/sentry/api/endpoints/event_attachment_details.py @@ -1,6 +1,6 @@ import contextlib import posixpath -from typing import IO, ContextManager +from typing import IO, ContextManager, int import sentry_sdk from django.http import StreamingHttpResponse diff --git a/src/sentry/api/endpoints/event_attachments.py b/src/sentry/api/endpoints/event_attachments.py index 37e2a50073ddcd..ec87d23c21f2a0 100644 --- a/src/sentry/api/endpoints/event_attachments.py +++ b/src/sentry/api/endpoints/event_attachments.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/event_file_committers.py b/src/sentry/api/endpoints/event_file_committers.py index 0a3e6f2d086fd4..b8c0b0c145b2ff 100644 --- a/src/sentry/api/endpoints/event_file_committers.py +++ b/src/sentry/api/endpoints/event_file_committers.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.exceptions import NotFound from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/filechange.py b/src/sentry/api/endpoints/filechange.py index 4d2308e67a2ae2..0990f55e6667db 100644 --- a/src/sentry/api/endpoints/filechange.py +++ b/src/sentry/api/endpoints/filechange.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/frontend_version.py b/src/sentry/api/endpoints/frontend_version.py index bfe4cf94895647..97ef4af0ec572d 100644 --- a/src/sentry/api/endpoints/frontend_version.py +++ b/src/sentry/api/endpoints/frontend_version.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/index.py b/src/sentry/api/endpoints/index.py index 718e5b669a2408..a6bb9db9d04f75 100644 --- a/src/sentry/api/endpoints/index.py +++ b/src/sentry/api/endpoints/index.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/internal/__init__.py b/src/sentry/api/endpoints/internal/__init__.py index 8610f419ad07e3..23c246926b5608 100644 --- a/src/sentry/api/endpoints/internal/__init__.py +++ b/src/sentry/api/endpoints/internal/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .beacon import InternalBeaconEndpoint from .environment import InternalEnvironmentEndpoint from .feature_flags import InternalFeatureFlagsEndpoint diff --git a/src/sentry/api/endpoints/internal/beacon.py b/src/sentry/api/endpoints/internal/beacon.py index e232d242ed9188..ac1307edef52c5 100644 --- a/src/sentry/api/endpoints/internal/beacon.py +++ b/src/sentry/api/endpoints/internal/beacon.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework import serializers, status diff --git a/src/sentry/api/endpoints/internal/environment.py b/src/sentry/api/endpoints/internal/environment.py index e20aacd61374a7..bca5e1fe96ff06 100644 --- a/src/sentry/api/endpoints/internal/environment.py +++ b/src/sentry/api/endpoints/internal/environment.py @@ -1,3 +1,4 @@ +from typing import int import sys from django.conf import settings diff --git a/src/sentry/api/endpoints/internal/feature_flags.py b/src/sentry/api/endpoints/internal/feature_flags.py index 76ab87d9c3ba27..d8f65de18df6d9 100644 --- a/src/sentry/api/endpoints/internal/feature_flags.py +++ b/src/sentry/api/endpoints/internal/feature_flags.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/internal/mail.py b/src/sentry/api/endpoints/internal/mail.py index 437d415634d536..8294ec82bfd8e2 100644 --- a/src/sentry/api/endpoints/internal/mail.py +++ b/src/sentry/api/endpoints/internal/mail.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/internal/packages.py b/src/sentry/api/endpoints/internal/packages.py index f98358bcbd853c..fa616da68dd491 100644 --- a/src/sentry/api/endpoints/internal/packages.py +++ b/src/sentry/api/endpoints/internal/packages.py @@ -1,3 +1,4 @@ +from typing import int import importlib.metadata from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/internal/rpc.py b/src/sentry/api/endpoints/internal/rpc.py index ee5765861f7fff..933410104df1d9 100644 --- a/src/sentry/api/endpoints/internal/rpc.py +++ b/src/sentry/api/endpoints/internal/rpc.py @@ -1,3 +1,4 @@ +from typing import int import pydantic import sentry_sdk from rest_framework.exceptions import NotFound, ParseError, PermissionDenied, ValidationError diff --git a/src/sentry/api/endpoints/internal/warnings.py b/src/sentry/api/endpoints/internal/warnings.py index 2be91e4b2e0b48..2feb273eb7d79a 100644 --- a/src/sentry/api/endpoints/internal/warnings.py +++ b/src/sentry/api/endpoints/internal/warnings.py @@ -1,3 +1,4 @@ +from typing import int import functools from collections import defaultdict diff --git a/src/sentry/api/endpoints/internal_ea_features.py b/src/sentry/api/endpoints/internal_ea_features.py index b87daf60e11614..b4d3593274d536 100644 --- a/src/sentry/api/endpoints/internal_ea_features.py +++ b/src/sentry/api/endpoints/internal_ea_features.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/oauth_userinfo.py b/src/sentry/api/endpoints/oauth_userinfo.py index 56ba0c686e5a3d..42ed47b5456fbe 100644 --- a/src/sentry/api/endpoints/oauth_userinfo.py +++ b/src/sentry/api/endpoints/oauth_userinfo.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from rest_framework.authentication import get_authorization_header from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_access_request_details.py b/src/sentry/api/endpoints/organization_access_request_details.py index 174524a72be521..b1d243bbf16239 100644 --- a/src/sentry/api/endpoints/organization_access_request_details.py +++ b/src/sentry/api/endpoints/organization_access_request_details.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db import IntegrityError, router, transaction diff --git a/src/sentry/api/endpoints/organization_ai_conversations.py b/src/sentry/api/endpoints/organization_ai_conversations.py index 8a6c6dee694bec..698894138dab0f 100644 --- a/src/sentry/api/endpoints/organization_ai_conversations.py +++ b/src/sentry/api/endpoints/organization_ai_conversations.py @@ -2,7 +2,7 @@ import logging from collections import defaultdict from concurrent.futures import ThreadPoolExecutor -from typing import Any, cast +from typing import Any, cast, int from rest_framework import serializers from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_api_key_details.py b/src/sentry/api/endpoints/organization_api_key_details.py index 66e59a3316a76e..bb519aeb960498 100644 --- a/src/sentry/api/endpoints/organization_api_key_details.py +++ b/src/sentry/api/endpoints/organization_api_key_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers, status from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_api_key_index.py b/src/sentry/api/endpoints/organization_api_key_index.py index 06713f169f6d26..6c251a91de4b1d 100644 --- a/src/sentry/api/endpoints/organization_api_key_index.py +++ b/src/sentry/api/endpoints/organization_api_key_index.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_artifactbundle_assemble.py b/src/sentry/api/endpoints/organization_artifactbundle_assemble.py index 910093fe6e24fe..59af17766fa85f 100644 --- a/src/sentry/api/endpoints/organization_artifactbundle_assemble.py +++ b/src/sentry/api/endpoints/organization_artifactbundle_assemble.py @@ -1,3 +1,4 @@ +from typing import int import jsonschema import orjson import sentry_sdk diff --git a/src/sentry/api/endpoints/organization_auditlogs.py b/src/sentry/api/endpoints/organization_auditlogs.py index 7d6d8c135e410d..599ad371114b3e 100644 --- a/src/sentry/api/endpoints/organization_auditlogs.py +++ b/src/sentry/api/endpoints/organization_auditlogs.py @@ -1,3 +1,4 @@ # Compatibility shim for moved endpoint # This file exists to maintain backwards compatibility for external consumers +from typing import int from sentry.core.endpoints.organization_auditlogs import * # noqa: F403,F401 diff --git a/src/sentry/api/endpoints/organization_auth_provider_details.py b/src/sentry/api/endpoints/organization_auth_provider_details.py index 1fcd3162c7c534..0d8f31818b609d 100644 --- a/src/sentry/api/endpoints/organization_auth_provider_details.py +++ b/src/sentry/api/endpoints/organization_auth_provider_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_auth_providers.py b/src/sentry/api/endpoints/organization_auth_providers.py index 7395a46f404cfa..d270ae08da2423 100644 --- a/src/sentry/api/endpoints/organization_auth_providers.py +++ b/src/sentry/api/endpoints/organization_auth_providers.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_auth_token_details.py b/src/sentry/api/endpoints/organization_auth_token_details.py index 7f99bbc90608b6..d7f964ee97ef33 100644 --- a/src/sentry/api/endpoints/organization_auth_token_details.py +++ b/src/sentry/api/endpoints/organization_auth_token_details.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_auth_tokens.py b/src/sentry/api/endpoints/organization_auth_tokens.py index 8e35040bf02210..09c2abbbef878d 100644 --- a/src/sentry/api/endpoints/organization_auth_tokens.py +++ b/src/sentry/api/endpoints/organization_auth_tokens.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime from django.core.exceptions import ValidationError diff --git a/src/sentry/api/endpoints/organization_config_repositories.py b/src/sentry/api/endpoints/organization_config_repositories.py index dd3ceeef5d7082..9e71376d0a6e64 100644 --- a/src/sentry/api/endpoints/organization_config_repositories.py +++ b/src/sentry/api/endpoints/organization_config_repositories.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_details.py b/src/sentry/api/endpoints/organization_details.py index 5afbc7dfed9cc9..b19135d5590228 100644 --- a/src/sentry/api/endpoints/organization_details.py +++ b/src/sentry/api/endpoints/organization_details.py @@ -1,3 +1,4 @@ # Compatibility shim for moved endpoint # This file exists to maintain backwards compatibility for external consumers +from typing import int from sentry.core.endpoints.organization_details import * # noqa: F403,F401 diff --git a/src/sentry/api/endpoints/organization_events.py b/src/sentry/api/endpoints/organization_events.py index b2f8582221e00e..acfbbec988724f 100644 --- a/src/sentry/api/endpoints/organization_events.py +++ b/src/sentry/api/endpoints/organization_events.py @@ -1,7 +1,7 @@ import logging from collections.abc import Mapping from concurrent.futures import ThreadPoolExecutor, as_completed -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int import sentry_sdk from drf_spectacular.utils import OpenApiResponse, extend_schema diff --git a/src/sentry/api/endpoints/organization_events_facets.py b/src/sentry/api/endpoints/organization_events_facets.py index 235e6c3afbb652..ca9c6f3d7f16b4 100644 --- a/src/sentry/api/endpoints/organization_events_facets.py +++ b/src/sentry/api/endpoints/organization_events_facets.py @@ -1,5 +1,5 @@ from collections import defaultdict -from typing import TypedDict +from typing import int, TypedDict import sentry_sdk from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_events_facets_performance.py b/src/sentry/api/endpoints/organization_events_facets_performance.py index 381ce043fc633f..4ef666d7c42e2a 100644 --- a/src/sentry/api/endpoints/organization_events_facets_performance.py +++ b/src/sentry/api/endpoints/organization_events_facets_performance.py @@ -1,6 +1,6 @@ import math from collections.abc import Mapping -from typing import Any +from typing import int, Any import sentry_sdk from django.http import Http404 diff --git a/src/sentry/api/endpoints/organization_events_has_measurements.py b/src/sentry/api/endpoints/organization_events_has_measurements.py index e80cd126979913..c7110bc1d82bcb 100644 --- a/src/sentry/api/endpoints/organization_events_has_measurements.py +++ b/src/sentry/api/endpoints/organization_events_has_measurements.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import sentry_sdk diff --git a/src/sentry/api/endpoints/organization_events_histogram.py b/src/sentry/api/endpoints/organization_events_histogram.py index df9aa008891688..593f1643e88aa1 100644 --- a/src/sentry/api/endpoints/organization_events_histogram.py +++ b/src/sentry/api/endpoints/organization_events_histogram.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework import serializers from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_events_meta.py b/src/sentry/api/endpoints/organization_events_meta.py index 24d8380fc15c4a..699f06c70bb741 100644 --- a/src/sentry/api/endpoints/organization_events_meta.py +++ b/src/sentry/api/endpoints/organization_events_meta.py @@ -1,3 +1,4 @@ +from typing import int import re import sentry_sdk diff --git a/src/sentry/api/endpoints/organization_events_root_cause_analysis.py b/src/sentry/api/endpoints/organization_events_root_cause_analysis.py index 6ccce4429c467a..67b0865fdef8db 100644 --- a/src/sentry/api/endpoints/organization_events_root_cause_analysis.py +++ b/src/sentry/api/endpoints/organization_events_root_cause_analysis.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_events_span_ops.py b/src/sentry/api/endpoints/organization_events_span_ops.py index d89f81fdd4b6b9..e1a8a32d09e56f 100644 --- a/src/sentry/api/endpoints/organization_events_span_ops.py +++ b/src/sentry/api/endpoints/organization_events_span_ops.py @@ -1,4 +1,4 @@ -from typing import Any, TypedDict +from typing import Any, TypedDict, int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_events_spans_histogram.py b/src/sentry/api/endpoints/organization_events_spans_histogram.py index 24ba9f85259613..6716d9a69f7022 100644 --- a/src/sentry/api/endpoints/organization_events_spans_histogram.py +++ b/src/sentry/api/endpoints/organization_events_spans_histogram.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework import serializers from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_events_spans_performance.py b/src/sentry/api/endpoints/organization_events_spans_performance.py index 4ecabd837909c4..fd5bc6375b8740 100644 --- a/src/sentry/api/endpoints/organization_events_spans_performance.py +++ b/src/sentry/api/endpoints/organization_events_spans_performance.py @@ -4,7 +4,7 @@ from collections.abc import Callable from datetime import timedelta from itertools import chain -from typing import Any, Never, TypedDict +from typing import Any, Never, TypedDict, int import sentry_sdk from rest_framework import serializers diff --git a/src/sentry/api/endpoints/organization_events_stats.py b/src/sentry/api/endpoints/organization_events_stats.py index 9e2e9886468e81..f1f90a056c90ae 100644 --- a/src/sentry/api/endpoints/organization_events_stats.py +++ b/src/sentry/api/endpoints/organization_events_stats.py @@ -1,6 +1,6 @@ from collections.abc import Mapping from datetime import timedelta -from typing import Any +from typing import int, Any import sentry_sdk from rest_framework.exceptions import ParseError, ValidationError diff --git a/src/sentry/api/endpoints/organization_events_timeseries.py b/src/sentry/api/endpoints/organization_events_timeseries.py index 5c0c9eca9de9c2..b3b81b8d0ef9c0 100644 --- a/src/sentry/api/endpoints/organization_events_timeseries.py +++ b/src/sentry/api/endpoints/organization_events_timeseries.py @@ -1,6 +1,6 @@ from collections.abc import Mapping from datetime import datetime, timedelta -from typing import Any +from typing import int, Any import sentry_sdk from rest_framework.exceptions import ParseError diff --git a/src/sentry/api/endpoints/organization_events_trace.py b/src/sentry/api/endpoints/organization_events_trace.py index e7d37956ac81f2..c3680fc225e92a 100644 --- a/src/sentry/api/endpoints/organization_events_trace.py +++ b/src/sentry/api/endpoints/organization_events_trace.py @@ -6,7 +6,7 @@ from collections.abc import Callable, Iterable, Mapping, Sequence from concurrent.futures import ThreadPoolExecutor, as_completed from datetime import datetime, timedelta -from typing import Any, Deque, Optional, TypedDict, TypeVar, cast +from typing import Any, Deque, Optional, TypedDict, TypeVar, cast, int import sentry_sdk from django.http import Http404, HttpRequest, HttpResponse diff --git a/src/sentry/api/endpoints/organization_events_trends.py b/src/sentry/api/endpoints/organization_events_trends.py index c4e396dbde9eea..79cef7fed5b456 100644 --- a/src/sentry/api/endpoints/organization_events_trends.py +++ b/src/sentry/api/endpoints/organization_events_trends.py @@ -1,6 +1,6 @@ from datetime import timedelta from re import Match -from typing import TypedDict +from typing import int, TypedDict import sentry_sdk from rest_framework.exceptions import ParseError diff --git a/src/sentry/api/endpoints/organization_events_trends_v2.py b/src/sentry/api/endpoints/organization_events_trends_v2.py index cfb6bc5f09319c..5d525847beb74e 100644 --- a/src/sentry/api/endpoints/organization_events_trends_v2.py +++ b/src/sentry/api/endpoints/organization_events_trends_v2.py @@ -1,3 +1,4 @@ +from typing import int import logging from concurrent.futures import ThreadPoolExecutor diff --git a/src/sentry/api/endpoints/organization_events_vitals.py b/src/sentry/api/endpoints/organization_events_vitals.py index 3d081046ff853f..dff88790a40868 100644 --- a/src/sentry/api/endpoints/organization_events_vitals.py +++ b/src/sentry/api/endpoints/organization_events_vitals.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework.exceptions import ParseError from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_fork.py b/src/sentry/api/endpoints/organization_fork.py index 3bf518a71df57c..dd45a94383d257 100644 --- a/src/sentry/api/endpoints/organization_fork.py +++ b/src/sentry/api/endpoints/organization_fork.py @@ -1,3 +1,4 @@ +from typing import int import logging from string import Template diff --git a/src/sentry/api/endpoints/organization_insights_tree.py b/src/sentry/api/endpoints/organization_insights_tree.py index 9bdab883c93863..6724d2aaa3df0f 100644 --- a/src/sentry/api/endpoints/organization_insights_tree.py +++ b/src/sentry/api/endpoints/organization_insights_tree.py @@ -1,3 +1,4 @@ +from typing import int import logging import re diff --git a/src/sentry/api/endpoints/organization_measurements_meta.py b/src/sentry/api/endpoints/organization_measurements_meta.py index bbca2d6a7b9a21..410418f3f89eb1 100644 --- a/src/sentry/api/endpoints/organization_measurements_meta.py +++ b/src/sentry/api/endpoints/organization_measurements_meta.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response from sentry_sdk import start_span diff --git a/src/sentry/api/endpoints/organization_metrics_meta.py b/src/sentry/api/endpoints/organization_metrics_meta.py index bfe8cc11d62348..d749f4c5aaef41 100644 --- a/src/sentry/api/endpoints/organization_metrics_meta.py +++ b/src/sentry/api/endpoints/organization_metrics_meta.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response from sentry_sdk import set_tag diff --git a/src/sentry/api/endpoints/organization_missing_org_members.py b/src/sentry/api/endpoints/organization_missing_org_members.py index e28e1d472004e8..3aeac765ab1b46 100644 --- a/src/sentry/api/endpoints/organization_missing_org_members.py +++ b/src/sentry/api/endpoints/organization_missing_org_members.py @@ -5,7 +5,7 @@ from datetime import timedelta from email.headerregistry import Address from functools import reduce -from typing import Any +from typing import int, Any from django.db.models import Q from django.utils import timezone diff --git a/src/sentry/api/endpoints/organization_on_demand_metrics_estimation_stats.py b/src/sentry/api/endpoints/organization_on_demand_metrics_estimation_stats.py index 3fdce282d167de..aecf0e60083a2c 100644 --- a/src/sentry/api/endpoints/organization_on_demand_metrics_estimation_stats.py +++ b/src/sentry/api/endpoints/organization_on_demand_metrics_estimation_stats.py @@ -2,7 +2,7 @@ from datetime import timedelta from enum import Enum from types import ModuleType -from typing import TypedDict, Union, cast +from typing import TypedDict, Union, cast, int import sentry_sdk from rest_framework.exceptions import ValidationError diff --git a/src/sentry/api/endpoints/organization_onboarding_continuation_email.py b/src/sentry/api/endpoints/organization_onboarding_continuation_email.py index 6d4729a5f7dc60..c0f702508a5dba 100644 --- a/src/sentry/api/endpoints/organization_onboarding_continuation_email.py +++ b/src/sentry/api/endpoints/organization_onboarding_continuation_email.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.auth.models import AnonymousUser from rest_framework import serializers from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_onboarding_tasks.py b/src/sentry/api/endpoints/organization_onboarding_tasks.py index 5df084120e6feb..1890fe9440d2de 100644 --- a/src/sentry/api/endpoints/organization_onboarding_tasks.py +++ b/src/sentry/api/endpoints/organization_onboarding_tasks.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from django.utils import timezone from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_pinned_searches.py b/src/sentry/api/endpoints/organization_pinned_searches.py index 3f0ad784a6ff53..389841695310d8 100644 --- a/src/sentry/api/endpoints/organization_pinned_searches.py +++ b/src/sentry/api/endpoints/organization_pinned_searches.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_plugin_deprecation_info.py b/src/sentry/api/endpoints/organization_plugin_deprecation_info.py index ff157c600f6fd5..ea1788cb87f2a2 100644 --- a/src/sentry/api/endpoints/organization_plugin_deprecation_info.py +++ b/src/sentry/api/endpoints/organization_plugin_deprecation_info.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.response import Response from sentry.api.api_owners import ApiOwner diff --git a/src/sentry/api/endpoints/organization_plugins_configs.py b/src/sentry/api/endpoints/organization_plugins_configs.py index f6f41085ade27e..c6554a5b5a8b20 100644 --- a/src/sentry/api/endpoints/organization_plugins_configs.py +++ b/src/sentry/api/endpoints/organization_plugins_configs.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.http.response import Http404 from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_plugins_index.py b/src/sentry/api/endpoints/organization_plugins_index.py index 5f9588625bc9f9..f2625c51a392ea 100644 --- a/src/sentry/api/endpoints/organization_plugins_index.py +++ b/src/sentry/api/endpoints/organization_plugins_index.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_profiling_functions.py b/src/sentry/api/endpoints/organization_profiling_functions.py index 768f0710f2e5cc..0419526025fdad 100644 --- a/src/sentry/api/endpoints/organization_profiling_functions.py +++ b/src/sentry/api/endpoints/organization_profiling_functions.py @@ -2,7 +2,7 @@ from datetime import timedelta from enum import Enum -from typing import Any +from typing import int, Any from rest_framework import serializers from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_profiling_profiles.py b/src/sentry/api/endpoints/organization_profiling_profiles.py index 133e4e1c46fa9b..e0a2abd56a2ea8 100644 --- a/src/sentry/api/endpoints/organization_profiling_profiles.py +++ b/src/sentry/api/endpoints/organization_profiling_profiles.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpResponse from rest_framework import serializers from rest_framework.exceptions import ParseError diff --git a/src/sentry/api/endpoints/organization_projects_sent_first_event.py b/src/sentry/api/endpoints/organization_projects_sent_first_event.py index 825fdb976d0686..6eede1518fb0db 100644 --- a/src/sentry/api/endpoints/organization_projects_sent_first_event.py +++ b/src/sentry/api/endpoints/organization_projects_sent_first_event.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_recent_searches.py b/src/sentry/api/endpoints/organization_recent_searches.py index b1b70726b798bc..4d954d4a849ea5 100644 --- a/src/sentry/api/endpoints/organization_recent_searches.py +++ b/src/sentry/api/endpoints/organization_recent_searches.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from rest_framework import serializers from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_relay_usage.py b/src/sentry/api/endpoints/organization_relay_usage.py index c72127ac56d299..907d5f3d8354f6 100644 --- a/src/sentry/api/endpoints/organization_relay_usage.py +++ b/src/sentry/api/endpoints/organization_relay_usage.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_releases.py b/src/sentry/api/endpoints/organization_releases.py index bde8654f36301d..d15440c054ddeb 100644 --- a/src/sentry/api/endpoints/organization_releases.py +++ b/src/sentry/api/endpoints/organization_releases.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import re from datetime import datetime, timedelta diff --git a/src/sentry/api/endpoints/organization_sampling_admin_metrics.py b/src/sentry/api/endpoints/organization_sampling_admin_metrics.py index f00c1f8d0de745..fa3983d8312932 100644 --- a/src/sentry/api/endpoints/organization_sampling_admin_metrics.py +++ b/src/sentry/api/endpoints/organization_sampling_admin_metrics.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_sampling_effective_sample_rate.py b/src/sentry/api/endpoints/organization_sampling_effective_sample_rate.py index 0670b18af4ab1b..42d0b10f82d5f1 100644 --- a/src/sentry/api/endpoints/organization_sampling_effective_sample_rate.py +++ b/src/sentry/api/endpoints/organization_sampling_effective_sample_rate.py @@ -1,5 +1,5 @@ from datetime import timedelta -from typing import TypedDict +from typing import int, TypedDict from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_sampling_project_rates.py b/src/sentry/api/endpoints/organization_sampling_project_rates.py index 7036c4d604000c..0e992b2db2145d 100644 --- a/src/sentry/api/endpoints/organization_sampling_project_rates.py +++ b/src/sentry/api/endpoints/organization_sampling_project_rates.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, MutableMapping -from typing import Any +from typing import int, Any from django.db import router, transaction from rest_framework import serializers diff --git a/src/sentry/api/endpoints/organization_sampling_project_span_counts.py b/src/sentry/api/endpoints/organization_sampling_project_span_counts.py index 7c8bdbf726306b..49549d27e3dc48 100644 --- a/src/sentry/api/endpoints/organization_sampling_project_span_counts.py +++ b/src/sentry/api/endpoints/organization_sampling_project_span_counts.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_sdk_deprecations.py b/src/sentry/api/endpoints/organization_sdk_deprecations.py index ce2d75622163d7..328bab3b498ab0 100644 --- a/src/sentry/api/endpoints/organization_sdk_deprecations.py +++ b/src/sentry/api/endpoints/organization_sdk_deprecations.py @@ -1,5 +1,5 @@ from collections import defaultdict -from typing import DefaultDict, TypedDict +from typing import DefaultDict, TypedDict, int import sentry_sdk from packaging.version import InvalidVersion diff --git a/src/sentry/api/endpoints/organization_sdk_updates.py b/src/sentry/api/endpoints/organization_sdk_updates.py index efc043b98cbca9..e8b74cb5faa976 100644 --- a/src/sentry/api/endpoints/organization_sdk_updates.py +++ b/src/sentry/api/endpoints/organization_sdk_updates.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from itertools import chain, groupby diff --git a/src/sentry/api/endpoints/organization_search_details.py b/src/sentry/api/endpoints/organization_search_details.py index 8cf0d27db64831..fd0ef92cd128a0 100644 --- a/src/sentry/api/endpoints/organization_search_details.py +++ b/src/sentry/api/endpoints/organization_search_details.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Q from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_sessions.py b/src/sentry/api/endpoints/organization_sessions.py index 22a703c60a9ff7..e35eff45f9a864 100644 --- a/src/sentry/api/endpoints/organization_sessions.py +++ b/src/sentry/api/endpoints/organization_sessions.py @@ -1,3 +1,4 @@ +from typing import int from contextlib import contextmanager import sentry_sdk diff --git a/src/sentry/api/endpoints/organization_spans_fields.py b/src/sentry/api/endpoints/organization_spans_fields.py index 259496d1d69f2a..a190ec1204d28c 100644 --- a/src/sentry/api/endpoints/organization_spans_fields.py +++ b/src/sentry/api/endpoints/organization_spans_fields.py @@ -1,6 +1,6 @@ from abc import ABC, abstractmethod from datetime import timedelta -from typing import Literal +from typing import int, Literal import sentry_sdk from google.protobuf.timestamp_pb2 import Timestamp diff --git a/src/sentry/api/endpoints/organization_spans_fields_stats.py b/src/sentry/api/endpoints/organization_spans_fields_stats.py index e763aad87414e8..eafaca21fef524 100644 --- a/src/sentry/api/endpoints/organization_spans_fields_stats.py +++ b/src/sentry/api/endpoints/organization_spans_fields_stats.py @@ -1,3 +1,4 @@ +from typing import int from google.protobuf.json_format import MessageToDict from rest_framework import serializers from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_stats.py b/src/sentry/api/endpoints/organization_stats.py index c3e21ec92cd99d..da2084f1d052a5 100644 --- a/src/sentry/api/endpoints/organization_stats.py +++ b/src/sentry/api/endpoints/organization_stats.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_stats_summary.py b/src/sentry/api/endpoints/organization_stats_summary.py index e4737f06c23f0a..b358a03600af63 100644 --- a/src/sentry/api/endpoints/organization_stats_summary.py +++ b/src/sentry/api/endpoints/organization_stats_summary.py @@ -1,7 +1,7 @@ import csv from contextlib import contextmanager from io import StringIO -from typing import Any, TypedDict +from typing import Any, TypedDict, int import sentry_sdk from django.http import HttpResponse diff --git a/src/sentry/api/endpoints/organization_stats_v2.py b/src/sentry/api/endpoints/organization_stats_v2.py index bc5b6771e455d7..8691806bc95cc8 100644 --- a/src/sentry/api/endpoints/organization_stats_v2.py +++ b/src/sentry/api/endpoints/organization_stats_v2.py @@ -1,5 +1,5 @@ from contextlib import contextmanager -from typing import Any, TypedDict +from typing import Any, TypedDict, int import sentry_sdk from drf_spectacular.utils import extend_schema diff --git a/src/sentry/api/endpoints/organization_tagkey_values.py b/src/sentry/api/endpoints/organization_tagkey_values.py index 778cdd91515879..1efe3085320708 100644 --- a/src/sentry/api/endpoints/organization_tagkey_values.py +++ b/src/sentry/api/endpoints/organization_tagkey_values.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework.exceptions import ParseError from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_tags.py b/src/sentry/api/endpoints/organization_tags.py index 1dee2162dda9f6..f7289e0909bf80 100644 --- a/src/sentry/api/endpoints/organization_tags.py +++ b/src/sentry/api/endpoints/organization_tags.py @@ -1,3 +1,4 @@ +from typing import int import datetime import sentry_sdk diff --git a/src/sentry/api/endpoints/organization_trace.py b/src/sentry/api/endpoints/organization_trace.py index ae680f29a3732a..e635cf83bc8ac9 100644 --- a/src/sentry/api/endpoints/organization_trace.py +++ b/src/sentry/api/endpoints/organization_trace.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from django.http import HttpRequest, HttpResponse from rest_framework.exceptions import ParseError diff --git a/src/sentry/api/endpoints/organization_trace_item_attributes.py b/src/sentry/api/endpoints/organization_trace_item_attributes.py index 3fc0061c4ff91b..cac20cde523f52 100644 --- a/src/sentry/api/endpoints/organization_trace_item_attributes.py +++ b/src/sentry/api/endpoints/organization_trace_item_attributes.py @@ -1,6 +1,6 @@ from collections.abc import Callable, Sequence from datetime import datetime, timedelta -from typing import Literal, NotRequired, TypedDict +from typing import Literal, NotRequired, TypedDict, int import sentry_sdk from google.protobuf.timestamp_pb2 import Timestamp diff --git a/src/sentry/api/endpoints/organization_trace_item_attributes_ranked.py b/src/sentry/api/endpoints/organization_trace_item_attributes_ranked.py index a1c365bae7a907..20d699708b29e4 100644 --- a/src/sentry/api/endpoints/organization_trace_item_attributes_ranked.py +++ b/src/sentry/api/endpoints/organization_trace_item_attributes_ranked.py @@ -1,7 +1,7 @@ import logging from collections import defaultdict from concurrent.futures import ThreadPoolExecutor -from typing import Any, cast +from typing import Any, cast, int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/organization_trace_item_stats.py b/src/sentry/api/endpoints/organization_trace_item_stats.py index a64c1865a6f035..d034524a34d81b 100644 --- a/src/sentry/api/endpoints/organization_trace_item_stats.py +++ b/src/sentry/api/endpoints/organization_trace_item_stats.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework import serializers diff --git a/src/sentry/api/endpoints/organization_trace_logs.py b/src/sentry/api/endpoints/organization_trace_logs.py index cd51df3664f2e4..71ccc6351d1a60 100644 --- a/src/sentry/api/endpoints/organization_trace_logs.py +++ b/src/sentry/api/endpoints/organization_trace_logs.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from django.http import HttpRequest, HttpResponse from rest_framework.exceptions import ParseError diff --git a/src/sentry/api/endpoints/organization_trace_meta.py b/src/sentry/api/endpoints/organization_trace_meta.py index 37cb7b48cee62f..2a47751cb5ac96 100644 --- a/src/sentry/api/endpoints/organization_trace_meta.py +++ b/src/sentry/api/endpoints/organization_trace_meta.py @@ -1,6 +1,6 @@ import logging from concurrent.futures import ThreadPoolExecutor -from typing import TypedDict +from typing import int, TypedDict from django.http import HttpRequest, HttpResponse from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/organization_traces.py b/src/sentry/api/endpoints/organization_traces.py index 6f52c66cc58472..7a1acd8885c805 100644 --- a/src/sentry/api/endpoints/organization_traces.py +++ b/src/sentry/api/endpoints/organization_traces.py @@ -3,7 +3,7 @@ from collections.abc import Callable, Generator, Mapping, MutableMapping from contextlib import contextmanager from datetime import datetime, timedelta -from typing import Any, Literal, NotRequired, TypedDict +from typing import Any, Literal, NotRequired, TypedDict, int import sentry_sdk from django.utils import timezone diff --git a/src/sentry/api/endpoints/organization_unsubscribe.py b/src/sentry/api/endpoints/organization_unsubscribe.py index 92adfda6308c68..ff8a9a5436db3f 100644 --- a/src/sentry/api/endpoints/organization_unsubscribe.py +++ b/src/sentry/api/endpoints/organization_unsubscribe.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, Generic, TypeVar +from typing import Any, Generic, TypeVar, int from rest_framework.exceptions import NotFound from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/project_artifact_bundle_file_details.py b/src/sentry/api/endpoints/project_artifact_bundle_file_details.py index e4349b7dc3153a..80cb18255ccbb7 100644 --- a/src/sentry/api/endpoints/project_artifact_bundle_file_details.py +++ b/src/sentry/api/endpoints/project_artifact_bundle_file_details.py @@ -1,3 +1,4 @@ +from typing import int import base64 import binascii import posixpath diff --git a/src/sentry/api/endpoints/project_artifact_bundle_files.py b/src/sentry/api/endpoints/project_artifact_bundle_files.py index cb5217704c08f0..dd97ca0fb02256 100644 --- a/src/sentry/api/endpoints/project_artifact_bundle_files.py +++ b/src/sentry/api/endpoints/project_artifact_bundle_files.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from django.utils.functional import cached_property diff --git a/src/sentry/api/endpoints/project_commits.py b/src/sentry/api/endpoints/project_commits.py index b280df59dbeece..11a5a0acc9fd92 100644 --- a/src/sentry/api/endpoints/project_commits.py +++ b/src/sentry/api/endpoints/project_commits.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/project_create_sample.py b/src/sentry/api/endpoints/project_create_sample.py index 133876253978fd..0239a674d86f05 100644 --- a/src/sentry/api/endpoints/project_create_sample.py +++ b/src/sentry/api/endpoints/project_create_sample.py @@ -1,3 +1,4 @@ +from typing import int from django.core.exceptions import SuspiciousFileOperation from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/project_create_sample_transaction.py b/src/sentry/api/endpoints/project_create_sample_transaction.py index 14acba2995b1c8..5d7a37b6b10b15 100644 --- a/src/sentry/api/endpoints/project_create_sample_transaction.py +++ b/src/sentry/api/endpoints/project_create_sample_transaction.py @@ -1,3 +1,4 @@ +from typing import int import os from datetime import datetime, timedelta, timezone from uuid import uuid4 diff --git a/src/sentry/api/endpoints/project_filter_details.py b/src/sentry/api/endpoints/project_filter_details.py index d7baf4357b1769..c69ea0626c4213 100644 --- a/src/sentry/api/endpoints/project_filter_details.py +++ b/src/sentry/api/endpoints/project_filter_details.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Iterable from drf_spectacular.utils import extend_schema diff --git a/src/sentry/api/endpoints/project_filters.py b/src/sentry/api/endpoints/project_filters.py index afeddac6afd1cb..2f409ab4ea2b0c 100644 --- a/src/sentry/api/endpoints/project_filters.py +++ b/src/sentry/api/endpoints/project_filters.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/project_member_index.py b/src/sentry/api/endpoints/project_member_index.py index eafd400af3ca72..fa8cc29b24323a 100644 --- a/src/sentry/api/endpoints/project_member_index.py +++ b/src/sentry/api/endpoints/project_member_index.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Q from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/project_overview.py b/src/sentry/api/endpoints/project_overview.py index 1f46ea02df7fac..dc2c4811870eab 100644 --- a/src/sentry/api/endpoints/project_overview.py +++ b/src/sentry/api/endpoints/project_overview.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/project_performance_general_settings.py b/src/sentry/api/endpoints/project_performance_general_settings.py index 5bfff4fb7a1ef9..6e5af12dca2ede 100644 --- a/src/sentry/api/endpoints/project_performance_general_settings.py +++ b/src/sentry/api/endpoints/project_performance_general_settings.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers, status from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/project_plugin_details.py b/src/sentry/api/endpoints/project_plugin_details.py index 01a6d8ae3dc58e..dc333d678a9d03 100644 --- a/src/sentry/api/endpoints/project_plugin_details.py +++ b/src/sentry/api/endpoints/project_plugin_details.py @@ -1,3 +1,4 @@ +from typing import int from django import forms from django.http.response import Http404 from django.urls import reverse diff --git a/src/sentry/api/endpoints/project_plugins.py b/src/sentry/api/endpoints/project_plugins.py index 1add765e041ba9..7e3c24d13bc26b 100644 --- a/src/sentry/api/endpoints/project_plugins.py +++ b/src/sentry/api/endpoints/project_plugins.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/project_profiling_profile.py b/src/sentry/api/endpoints/project_profiling_profile.py index f85754731a499b..41a0104ad05f0e 100644 --- a/src/sentry/api/endpoints/project_profiling_profile.py +++ b/src/sentry/api/endpoints/project_profiling_profile.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import orjson from django.http import HttpResponse diff --git a/src/sentry/api/endpoints/project_repo_path_parsing.py b/src/sentry/api/endpoints/project_repo_path_parsing.py index b4f06ccbec3786..3ca5b970e7ebcf 100644 --- a/src/sentry/api/endpoints/project_repo_path_parsing.py +++ b/src/sentry/api/endpoints/project_repo_path_parsing.py @@ -1,5 +1,5 @@ from pathlib import PurePath, PureWindowsPath -from typing import Any +from typing import int, Any from urllib.parse import urlparse from rest_framework import serializers, status diff --git a/src/sentry/api/endpoints/project_reprocessing.py b/src/sentry/api/endpoints/project_reprocessing.py index 4355171cc94d35..20661dba5c18d8 100644 --- a/src/sentry/api/endpoints/project_reprocessing.py +++ b/src/sentry/api/endpoints/project_reprocessing.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/project_rule_actions.py b/src/sentry/api/endpoints/project_rule_actions.py index 91961bfa734b23..31dbdf6358fd52 100644 --- a/src/sentry/api/endpoints/project_rule_actions.py +++ b/src/sentry/api/endpoints/project_rule_actions.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/api/endpoints/project_rule_details.py b/src/sentry/api/endpoints/project_rule_details.py index 87ded0c6ea68b1..291c3c9596a448 100644 --- a/src/sentry/api/endpoints/project_rule_details.py +++ b/src/sentry/api/endpoints/project_rule_details.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/api/endpoints/project_rule_enable.py b/src/sentry/api/endpoints/project_rule_enable.py index 293cbcf1e1036e..009bbb64deacb1 100644 --- a/src/sentry/api/endpoints/project_rule_enable.py +++ b/src/sentry/api/endpoints/project_rule_enable.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/project_rule_preview.py b/src/sentry/api/endpoints/project_rule_preview.py index 0ee40b273db646..d100a808a2948b 100644 --- a/src/sentry/api/endpoints/project_rule_preview.py +++ b/src/sentry/api/endpoints/project_rule_preview.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from django.utils import timezone from rest_framework.exceptions import ValidationError diff --git a/src/sentry/api/endpoints/project_rule_task_details.py b/src/sentry/api/endpoints/project_rule_task_details.py index 693462e51cccfd..31139f221e81ee 100644 --- a/src/sentry/api/endpoints/project_rule_task_details.py +++ b/src/sentry/api/endpoints/project_rule_task_details.py @@ -1,3 +1,4 @@ +from typing import int from django.http import Http404 from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/project_rules.py b/src/sentry/api/endpoints/project_rules.py index 12c7386b5bd1a0..d2ffa91b152fff 100644 --- a/src/sentry/api/endpoints/project_rules.py +++ b/src/sentry/api/endpoints/project_rules.py @@ -1,6 +1,6 @@ from collections.abc import Callable from dataclasses import dataclass -from typing import Any, Literal +from typing import Any, Literal, int from django.conf import settings from django.db.models.signals import pre_save diff --git a/src/sentry/api/endpoints/project_rules_configuration.py b/src/sentry/api/endpoints/project_rules_configuration.py index 54c552821badd5..0c1b31ab733ed8 100644 --- a/src/sentry/api/endpoints/project_rules_configuration.py +++ b/src/sentry/api/endpoints/project_rules_configuration.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/project_servicehook_details.py b/src/sentry/api/endpoints/project_servicehook_details.py index 8c1b1b60f54693..19e469f209791f 100644 --- a/src/sentry/api/endpoints/project_servicehook_details.py +++ b/src/sentry/api/endpoints/project_servicehook_details.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/project_servicehook_stats.py b/src/sentry/api/endpoints/project_servicehook_stats.py index c6d6c1e35a758e..14b064f9c3a76a 100644 --- a/src/sentry/api/endpoints/project_servicehook_stats.py +++ b/src/sentry/api/endpoints/project_servicehook_stats.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/project_servicehooks.py b/src/sentry/api/endpoints/project_servicehooks.py index cc1af074094d40..34814fc1bfd999 100644 --- a/src/sentry/api/endpoints/project_servicehooks.py +++ b/src/sentry/api/endpoints/project_servicehooks.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/project_stacktrace_coverage.py b/src/sentry/api/endpoints/project_stacktrace_coverage.py index e8a30a9db81ebe..8159f9ad036bc6 100644 --- a/src/sentry/api/endpoints/project_stacktrace_coverage.py +++ b/src/sentry/api/endpoints/project_stacktrace_coverage.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import sentry_sdk from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/project_statistical_detectors.py b/src/sentry/api/endpoints/project_statistical_detectors.py index 9521d29b9c89e5..479041021f60e3 100644 --- a/src/sentry/api/endpoints/project_statistical_detectors.py +++ b/src/sentry/api/endpoints/project_statistical_detectors.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/project_symbol_sources.py b/src/sentry/api/endpoints/project_symbol_sources.py index bc070bf96ce252..51adb92d194f55 100644 --- a/src/sentry/api/endpoints/project_symbol_sources.py +++ b/src/sentry/api/endpoints/project_symbol_sources.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 import orjson diff --git a/src/sentry/api/endpoints/project_tagkey_details.py b/src/sentry/api/endpoints/project_tagkey_details.py index 2e9577b8ffc4c0..960cb67873149e 100644 --- a/src/sentry/api/endpoints/project_tagkey_details.py +++ b/src/sentry/api/endpoints/project_tagkey_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/project_tagkey_values.py b/src/sentry/api/endpoints/project_tagkey_values.py index 73f81404ef9dbc..bd57a2553b0192 100644 --- a/src/sentry/api/endpoints/project_tagkey_values.py +++ b/src/sentry/api/endpoints/project_tagkey_values.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/project_tags.py b/src/sentry/api/endpoints/project_tags.py index 3c59f41c6898d4..5df80a55c4c530 100644 --- a/src/sentry/api/endpoints/project_tags.py +++ b/src/sentry/api/endpoints/project_tags.py @@ -1,3 +1,4 @@ +from typing import int import datetime from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/project_template_detail.py b/src/sentry/api/endpoints/project_template_detail.py index e3b152feeba114..013707688b898f 100644 --- a/src/sentry/api/endpoints/project_template_detail.py +++ b/src/sentry/api/endpoints/project_template_detail.py @@ -1,3 +1,4 @@ +from typing import int from django.shortcuts import get_object_or_404 from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/project_templates_index.py b/src/sentry/api/endpoints/project_templates_index.py index c92db91e23356c..df1d8efe6218cd 100644 --- a/src/sentry/api/endpoints/project_templates_index.py +++ b/src/sentry/api/endpoints/project_templates_index.py @@ -1,3 +1,4 @@ +from typing import int from functools import wraps from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/project_trace_item_details.py b/src/sentry/api/endpoints/project_trace_item_details.py index b2cb706d84fcd2..66ed33ee98c750 100644 --- a/src/sentry/api/endpoints/project_trace_item_details.py +++ b/src/sentry/api/endpoints/project_trace_item_details.py @@ -1,6 +1,6 @@ import time import uuid -from typing import Any, Literal +from typing import Any, Literal, int import sentry_sdk from google.protobuf.json_format import MessageToDict diff --git a/src/sentry/api/endpoints/project_transaction_names.py b/src/sentry/api/endpoints/project_transaction_names.py index a5844e52e07031..afbf1041267f8f 100644 --- a/src/sentry/api/endpoints/project_transaction_names.py +++ b/src/sentry/api/endpoints/project_transaction_names.py @@ -1,3 +1,4 @@ +from typing import int from itertools import islice from rest_framework.exceptions import ParseError diff --git a/src/sentry/api/endpoints/project_transaction_threshold.py b/src/sentry/api/endpoints/project_transaction_threshold.py index e1b79fbb0f4a5b..ec51881635bbe2 100644 --- a/src/sentry/api/endpoints/project_transaction_threshold.py +++ b/src/sentry/api/endpoints/project_transaction_threshold.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers, status from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/project_transaction_threshold_override.py b/src/sentry/api/endpoints/project_transaction_threshold_override.py index 95bbd472165cc0..e24be92135d9d8 100644 --- a/src/sentry/api/endpoints/project_transaction_threshold_override.py +++ b/src/sentry/api/endpoints/project_transaction_threshold_override.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from rest_framework import serializers, status from rest_framework.exceptions import ParseError diff --git a/src/sentry/api/endpoints/project_user_stats.py b/src/sentry/api/endpoints/project_user_stats.py index 60fa98de8adc26..9ba5ec11152d12 100644 --- a/src/sentry/api/endpoints/project_user_stats.py +++ b/src/sentry/api/endpoints/project_user_stats.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/src/sentry/api/endpoints/prompts_activity.py b/src/sentry/api/endpoints/prompts_activity.py index ffd74853602d73..29935390d6cc18 100644 --- a/src/sentry/api/endpoints/prompts_activity.py +++ b/src/sentry/api/endpoints/prompts_activity.py @@ -1,5 +1,5 @@ import calendar -from typing import Any +from typing import int, Any from django.db import IntegrityError, router, transaction from django.db.models import Q diff --git a/src/sentry/api/endpoints/relay/__init__.py b/src/sentry/api/endpoints/relay/__init__.py index 289407466cc683..c2b1f7e53aa3c3 100644 --- a/src/sentry/api/endpoints/relay/__init__.py +++ b/src/sentry/api/endpoints/relay/__init__.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers diff --git a/src/sentry/api/endpoints/relay/constants.py b/src/sentry/api/endpoints/relay/constants.py index 5725137da02a17..272739333eb8bb 100644 --- a/src/sentry/api/endpoints/relay/constants.py +++ b/src/sentry/api/endpoints/relay/constants.py @@ -1,3 +1,4 @@ +from typing import int from sentry.ratelimits.config import RateLimitConfig from sentry.types.ratelimit import RateLimit, RateLimitCategory diff --git a/src/sentry/api/endpoints/relay/details.py b/src/sentry/api/endpoints/relay/details.py index 5d1d393164df57..8b31b76f2825dc 100644 --- a/src/sentry/api/endpoints/relay/details.py +++ b/src/sentry/api/endpoints/relay/details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/relay/health_check.py b/src/sentry/api/endpoints/relay/health_check.py index 3f9f4bb3de1e7b..36603e2aa0240e 100644 --- a/src/sentry/api/endpoints/relay/health_check.py +++ b/src/sentry/api/endpoints/relay/health_check.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/relay/index.py b/src/sentry/api/endpoints/relay/index.py index ca5456412cc272..93dc883271d353 100644 --- a/src/sentry/api/endpoints/relay/index.py +++ b/src/sentry/api/endpoints/relay/index.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/relay/project_configs.py b/src/sentry/api/endpoints/relay/project_configs.py index b1a92480dbcd2f..b8b3c641b74450 100644 --- a/src/sentry/api/endpoints/relay/project_configs.py +++ b/src/sentry/api/endpoints/relay/project_configs.py @@ -1,6 +1,6 @@ import logging from collections.abc import MutableMapping -from typing import Any +from typing import int, Any from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/relay/project_ids.py b/src/sentry/api/endpoints/relay/project_ids.py index 39cd10259a8041..ce66057e441f70 100644 --- a/src/sentry/api/endpoints/relay/project_ids.py +++ b/src/sentry/api/endpoints/relay/project_ids.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/relay/public_keys.py b/src/sentry/api/endpoints/relay/public_keys.py index 5d8f643e161e53..e4e5c98df6b82e 100644 --- a/src/sentry/api/endpoints/relay/public_keys.py +++ b/src/sentry/api/endpoints/relay/public_keys.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/relay/register_challenge.py b/src/sentry/api/endpoints/relay/register_challenge.py index a96889474f92e4..121f85a29828ab 100644 --- a/src/sentry/api/endpoints/relay/register_challenge.py +++ b/src/sentry/api/endpoints/relay/register_challenge.py @@ -1,3 +1,4 @@ +from typing import int import orjson from django.conf import settings from rest_framework import serializers, status diff --git a/src/sentry/api/endpoints/relay/register_response.py b/src/sentry/api/endpoints/relay/register_response.py index 18f018ab90d23c..d91cd79fceef88 100644 --- a/src/sentry/api/endpoints/relay/register_response.py +++ b/src/sentry/api/endpoints/relay/register_response.py @@ -1,3 +1,4 @@ +from typing import int import orjson from django.utils import timezone from rest_framework import serializers, status diff --git a/src/sentry/api/endpoints/release_thresholds/constants.py b/src/sentry/api/endpoints/release_thresholds/constants.py index 9188a8b1f48ef3..af79684439d4dd 100644 --- a/src/sentry/api/endpoints/release_thresholds/constants.py +++ b/src/sentry/api/endpoints/release_thresholds/constants.py @@ -1,2 +1,3 @@ +from typing import int CRASH_SESSIONS_DISPLAY: str = "sessions" CRASH_USERS_DISPLAY: str = "users" diff --git a/src/sentry/api/endpoints/release_thresholds/health_checks/__init__.py b/src/sentry/api/endpoints/release_thresholds/health_checks/__init__.py index e1ab8d12b01ea4..3eba31b1dd5554 100644 --- a/src/sentry/api/endpoints/release_thresholds/health_checks/__init__.py +++ b/src/sentry/api/endpoints/release_thresholds/health_checks/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .is_crash_free_rate_healthy import * # noqa: F401,F403 from .is_error_count_healthy import * # noqa: F401,F403 from .is_new_issues_count_healthy import * # noqa: F401,F403 diff --git a/src/sentry/api/endpoints/release_thresholds/health_checks/is_crash_free_rate_healthy.py b/src/sentry/api/endpoints/release_thresholds/health_checks/is_crash_free_rate_healthy.py index d8e38821d3fd45..73b5f7f4a3fcfc 100644 --- a/src/sentry/api/endpoints/release_thresholds/health_checks/is_crash_free_rate_healthy.py +++ b/src/sentry/api/endpoints/release_thresholds/health_checks/is_crash_free_rate_healthy.py @@ -2,7 +2,7 @@ import logging from datetime import datetime -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from dateutil import parser diff --git a/src/sentry/api/endpoints/release_thresholds/health_checks/is_error_count_healthy.py b/src/sentry/api/endpoints/release_thresholds/health_checks/is_error_count_healthy.py index e20a616324c812..727aebb6f55f95 100644 --- a/src/sentry/api/endpoints/release_thresholds/health_checks/is_error_count_healthy.py +++ b/src/sentry/api/endpoints/release_thresholds/health_checks/is_error_count_healthy.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from dateutil import parser diff --git a/src/sentry/api/endpoints/release_thresholds/health_checks/is_new_issues_count_healthy.py b/src/sentry/api/endpoints/release_thresholds/health_checks/is_new_issues_count_healthy.py index eae8534efee609..b20a536a143df6 100644 --- a/src/sentry/api/endpoints/release_thresholds/health_checks/is_new_issues_count_healthy.py +++ b/src/sentry/api/endpoints/release_thresholds/health_checks/is_new_issues_count_healthy.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.models.release_threshold.constants import TriggerType diff --git a/src/sentry/api/endpoints/release_thresholds/release_threshold.py b/src/sentry/api/endpoints/release_thresholds/release_threshold.py index 8f514e7ef34111..49f6c0a0cb340f 100644 --- a/src/sentry/api/endpoints/release_thresholds/release_threshold.py +++ b/src/sentry/api/endpoints/release_thresholds/release_threshold.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from django.http import HttpResponse from rest_framework import serializers diff --git a/src/sentry/api/endpoints/release_thresholds/release_threshold_details.py b/src/sentry/api/endpoints/release_thresholds/release_threshold_details.py index 326df32b2b723b..879c0e1c289871 100644 --- a/src/sentry/api/endpoints/release_thresholds/release_threshold_details.py +++ b/src/sentry/api/endpoints/release_thresholds/release_threshold_details.py @@ -1,5 +1,5 @@ import logging -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.http import HttpResponse from rest_framework import serializers diff --git a/src/sentry/api/endpoints/release_thresholds/release_threshold_index.py b/src/sentry/api/endpoints/release_thresholds/release_threshold_index.py index f83c25a5a91144..2e7dd2361620a4 100644 --- a/src/sentry/api/endpoints/release_thresholds/release_threshold_index.py +++ b/src/sentry/api/endpoints/release_thresholds/release_threshold_index.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from django.db.models import Q from django.http import HttpResponse diff --git a/src/sentry/api/endpoints/release_thresholds/release_threshold_status_index.py b/src/sentry/api/endpoints/release_thresholds/release_threshold_status_index.py index 70d8630ad9a749..8deddd262bee41 100644 --- a/src/sentry/api/endpoints/release_thresholds/release_threshold_status_index.py +++ b/src/sentry/api/endpoints/release_thresholds/release_threshold_status_index.py @@ -3,7 +3,7 @@ import logging from collections import defaultdict from datetime import datetime, timedelta, timezone -from typing import TYPE_CHECKING, Any, DefaultDict, TypedDict +from typing import TYPE_CHECKING, Any, DefaultDict, TypedDict, int from django.db.models import F, Q from django.http import HttpResponse diff --git a/src/sentry/api/endpoints/release_thresholds/types.py b/src/sentry/api/endpoints/release_thresholds/types.py index 44d97faa5ae7c5..52526c8deadcee 100644 --- a/src/sentry/api/endpoints/release_thresholds/types.py +++ b/src/sentry/api/endpoints/release_thresholds/types.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int class SerializedThreshold(TypedDict, total=False): diff --git a/src/sentry/api/endpoints/release_thresholds/utils/__init__.py b/src/sentry/api/endpoints/release_thresholds/utils/__init__.py index c3004dc3b90d62..e5bd6dc4a2b5ed 100644 --- a/src/sentry/api/endpoints/release_thresholds/utils/__init__.py +++ b/src/sentry/api/endpoints/release_thresholds/utils/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .fetch_sessions_data import * # noqa: 403, 401 from .get_errors_counts_timeseries import * # noqa: 403,401 from .get_new_issue_counts import * # noqa: 403, 401 diff --git a/src/sentry/api/endpoints/release_thresholds/utils/fetch_sessions_data.py b/src/sentry/api/endpoints/release_thresholds/utils/fetch_sessions_data.py index b41946136e8fc2..50e1e1cb682576 100644 --- a/src/sentry/api/endpoints/release_thresholds/utils/fetch_sessions_data.py +++ b/src/sentry/api/endpoints/release_thresholds/utils/fetch_sessions_data.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import datetime -from typing import Any +from typing import int, Any from django.utils.datastructures import MultiValueDict from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/release_thresholds/utils/get_errors_counts_timeseries.py b/src/sentry/api/endpoints/release_thresholds/utils/get_errors_counts_timeseries.py index 4f3f2bada004d8..d750b85b4dc5e5 100644 --- a/src/sentry/api/endpoints/release_thresholds/utils/get_errors_counts_timeseries.py +++ b/src/sentry/api/endpoints/release_thresholds/utils/get_errors_counts_timeseries.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import datetime -from typing import Any +from typing import int, Any from snuba_sdk import Request as SnubaRequest from snuba_sdk.column import Column diff --git a/src/sentry/api/endpoints/release_thresholds/utils/get_new_issue_counts.py b/src/sentry/api/endpoints/release_thresholds/utils/get_new_issue_counts.py index 772f0ea69661c1..4b6c8eebcdcaea 100644 --- a/src/sentry/api/endpoints/release_thresholds/utils/get_new_issue_counts.py +++ b/src/sentry/api/endpoints/release_thresholds/utils/get_new_issue_counts.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.db.models import CharField, Count, Q, QuerySet, Value diff --git a/src/sentry/api/endpoints/rule_snooze.py b/src/sentry/api/endpoints/rule_snooze.py index 32ef9c95034681..ed93271b78c6b3 100644 --- a/src/sentry/api/endpoints/rule_snooze.py +++ b/src/sentry/api/endpoints/rule_snooze.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Generic, TypeVar +from typing import Any, Generic, TypeVar, int import sentry_sdk from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/api/endpoints/secret_scanning/github.py b/src/sentry/api/endpoints/secret_scanning/github.py index a62c0c4c786d7d..bab627c2b9af8e 100644 --- a/src/sentry/api/endpoints/secret_scanning/github.py +++ b/src/sentry/api/endpoints/secret_scanning/github.py @@ -1,6 +1,6 @@ import hashlib import logging -from typing import Any +from typing import int, Any import sentry_sdk from django.http import HttpResponse diff --git a/src/sentry/api/endpoints/seer_models.py b/src/sentry/api/endpoints/seer_models.py index 06cca95dc2722b..dbb604c32145de 100644 --- a/src/sentry/api/endpoints/seer_models.py +++ b/src/sentry/api/endpoints/seer_models.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import TypedDict +from typing import int, TypedDict import requests from django.conf import settings diff --git a/src/sentry/api/endpoints/setup_wizard.py b/src/sentry/api/endpoints/setup_wizard.py index 0e4e625fee57ad..ff8584aa672b8f 100644 --- a/src/sentry/api/endpoints/setup_wizard.py +++ b/src/sentry/api/endpoints/setup_wizard.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/api/endpoints/source_map_debug_blue_thunder_edition.py b/src/sentry/api/endpoints/source_map_debug_blue_thunder_edition.py index 900ceb51af42b5..328781b097fcca 100644 --- a/src/sentry/api/endpoints/source_map_debug_blue_thunder_edition.py +++ b/src/sentry/api/endpoints/source_map_debug_blue_thunder_edition.py @@ -1,4 +1,4 @@ -from typing import Literal, TypedDict +from typing import Literal, TypedDict, int import sentry_sdk from django.utils.encoding import force_bytes, force_str diff --git a/src/sentry/api/endpoints/system_health.py b/src/sentry/api/endpoints/system_health.py index d6db8d4277583e..f6216f778fd1d9 100644 --- a/src/sentry/api/endpoints/system_health.py +++ b/src/sentry/api/endpoints/system_health.py @@ -1,3 +1,4 @@ +from typing import int import itertools from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/system_options.py b/src/sentry/api/endpoints/system_options.py index b68189e344f8d5..ac1a99edd9c344 100644 --- a/src/sentry/api/endpoints/system_options.py +++ b/src/sentry/api/endpoints/system_options.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from django.conf import settings from django.db import router, transaction diff --git a/src/sentry/api/endpoints/timeseries.py b/src/sentry/api/endpoints/timeseries.py index 4ae2e2221a44ec..8afa14f2ea3947 100644 --- a/src/sentry/api/endpoints/timeseries.py +++ b/src/sentry/api/endpoints/timeseries.py @@ -1,4 +1,4 @@ -from typing import Any, Literal, NotRequired, TypedDict +from typing import Any, Literal, NotRequired, TypedDict, int class StatsMeta(TypedDict): diff --git a/src/sentry/api/endpoints/user_organizationintegrations.py b/src/sentry/api/endpoints/user_organizationintegrations.py index ced6ea411bd85d..cf766faf9a06fc 100644 --- a/src/sentry/api/endpoints/user_organizationintegrations.py +++ b/src/sentry/api/endpoints/user_organizationintegrations.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/endpoints/user_organizations.py b/src/sentry/api/endpoints/user_organizations.py index 7df96295f03ff9..d51bcb90b392d2 100644 --- a/src/sentry/api/endpoints/user_organizations.py +++ b/src/sentry/api/endpoints/user_organizations.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db.models import Q from rest_framework.request import Request diff --git a/src/sentry/api/endpoints/user_subscriptions.py b/src/sentry/api/endpoints/user_subscriptions.py index 2be221c670bff9..d1bb6bff4efeaf 100644 --- a/src/sentry/api/endpoints/user_subscriptions.py +++ b/src/sentry/api/endpoints/user_subscriptions.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import F from django.utils import timezone from rest_framework import serializers diff --git a/src/sentry/api/endpoints/warmup.py b/src/sentry/api/endpoints/warmup.py index d33192376f9238..035d925d252fa9 100644 --- a/src/sentry/api/endpoints/warmup.py +++ b/src/sentry/api/endpoints/warmup.py @@ -1,3 +1,4 @@ +from typing import int import django.contrib.messages.storage.fallback import django.contrib.sessions.serializers import django.db.models.sql.compiler # NOQA diff --git a/src/sentry/api/event_search.py b/src/sentry/api/event_search.py index 3dc44b3d233da8..5aa9b43d10b7d1 100644 --- a/src/sentry/api/event_search.py +++ b/src/sentry/api/event_search.py @@ -5,7 +5,7 @@ from collections.abc import Callable, Generator, Mapping, Sequence from dataclasses import asdict, dataclass, field from datetime import datetime -from typing import TYPE_CHECKING, Any, Literal, NamedTuple, TypeIs, overload +from typing import TYPE_CHECKING, Any, Literal, NamedTuple, TypeIs, overload, int from django.utils.functional import cached_property from parsimonious.exceptions import IncompleteParseError diff --git a/src/sentry/api/exceptions.py b/src/sentry/api/exceptions.py index bb870a52e636e0..f9250fe80f3b7b 100644 --- a/src/sentry/api/exceptions.py +++ b/src/sentry/api/exceptions.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.contrib.auth import REDIRECT_FIELD_NAME from django.http.request import HttpRequest diff --git a/src/sentry/api/fields/__init__.py b/src/sentry/api/fields/__init__.py index 06a9fa40a454ae..b2aaeb4f21741e 100644 --- a/src/sentry/api/fields/__init__.py +++ b/src/sentry/api/fields/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .actor import * # noqa: F401,F403 from .avatar import * # noqa: F401,F403 from .empty_decimal import * # noqa: F401,F403 diff --git a/src/sentry/api/fields/actor.py b/src/sentry/api/fields/actor.py index fb13c515b6ae3e..93366fe48ba393 100644 --- a/src/sentry/api/fields/actor.py +++ b/src/sentry/api/fields/actor.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from drf_spectacular.types import OpenApiTypes from drf_spectacular.utils import extend_schema_field diff --git a/src/sentry/api/fields/avatar.py b/src/sentry/api/fields/avatar.py index 8ab2703f4cdec1..09db6f53cdde9c 100644 --- a/src/sentry/api/fields/avatar.py +++ b/src/sentry/api/fields/avatar.py @@ -1,3 +1,4 @@ +from typing import int from base64 import b64decode from io import BytesIO diff --git a/src/sentry/api/fields/empty_decimal.py b/src/sentry/api/fields/empty_decimal.py index 2ef254476d3025..af0e5e7b65cd83 100644 --- a/src/sentry/api/fields/empty_decimal.py +++ b/src/sentry/api/fields/empty_decimal.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from rest_framework.fields import empty diff --git a/src/sentry/api/fields/empty_integer.py b/src/sentry/api/fields/empty_integer.py index e5e8d6f5825966..3ce3917ef284e4 100644 --- a/src/sentry/api/fields/empty_integer.py +++ b/src/sentry/api/fields/empty_integer.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from rest_framework.fields import empty diff --git a/src/sentry/api/fields/sentry_slug.py b/src/sentry/api/fields/sentry_slug.py index 262d76b5689be0..51ecf5cc79849f 100644 --- a/src/sentry/api/fields/sentry_slug.py +++ b/src/sentry/api/fields/sentry_slug.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from drf_spectacular.types import OpenApiTypes from drf_spectacular.utils import extend_schema_field diff --git a/src/sentry/api/fields/serializedfile.py b/src/sentry/api/fields/serializedfile.py index 0b1bd692a94c22..f781c99c971744 100644 --- a/src/sentry/api/fields/serializedfile.py +++ b/src/sentry/api/fields/serializedfile.py @@ -1,3 +1,4 @@ +from typing import int from base64 import b64decode, b64encode from dataclasses import dataclass from io import BytesIO diff --git a/src/sentry/api/fields/user.py b/src/sentry/api/fields/user.py index 6ce4150d4ddac9..f57d752cb9c6fd 100644 --- a/src/sentry/api/fields/user.py +++ b/src/sentry/api/fields/user.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from rest_framework import serializers diff --git a/src/sentry/api/handlers.py b/src/sentry/api/handlers.py index cd4e2112bc99f3..3e4d584b90e419 100644 --- a/src/sentry/api/handlers.py +++ b/src/sentry/api/handlers.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework.exceptions import Throttled from rest_framework.views import exception_handler diff --git a/src/sentry/api/helpers/actionable_items_helper.py b/src/sentry/api/helpers/actionable_items_helper.py index 43c86b8fa433ba..78d06f52f15268 100644 --- a/src/sentry/api/helpers/actionable_items_helper.py +++ b/src/sentry/api/helpers/actionable_items_helper.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.eventerror import EventError from sentry.models.sourcemapprocessingissue import SourceMapProcessingIssue diff --git a/src/sentry/api/helpers/android_models.py b/src/sentry/api/helpers/android_models.py index 348b9c3234ae9b..299aa461544146 100644 --- a/src/sentry/api/helpers/android_models.py +++ b/src/sentry/api/helpers/android_models.py @@ -1,3 +1,4 @@ +from typing import int """ The following mapping was obtained from this link: https://support.google.com/googleplay/answer/1727131 Steps on how to generate this mapping diff --git a/src/sentry/api/helpers/constants.py b/src/sentry/api/helpers/constants.py index f8e0673b021b8f..7c3a1b4a5c82ea 100644 --- a/src/sentry/api/helpers/constants.py +++ b/src/sentry/api/helpers/constants.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int MAX_QUERY_SUBSCRIPTIONS_HEADER = "X-Sentry-Alert-Rule-Limit" ALERT_RULES_COUNT_HEADER = "X-Sentry-Alert-Rule-Hits" diff --git a/src/sentry/api/helpers/default_inbound_filters.py b/src/sentry/api/helpers/default_inbound_filters.py index eb97f4be35a6d1..b85301a447ce98 100644 --- a/src/sentry/api/helpers/default_inbound_filters.py +++ b/src/sentry/api/helpers/default_inbound_filters.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from sentry.ingest import inbound_filters diff --git a/src/sentry/api/helpers/default_symbol_sources.py b/src/sentry/api/helpers/default_symbol_sources.py index a0adf06a64083a..2b1806ebea35ee 100644 --- a/src/sentry/api/helpers/default_symbol_sources.py +++ b/src/sentry/api/helpers/default_symbol_sources.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.project import Project from sentry.projects.services.project import RpcProject diff --git a/src/sentry/api/helpers/deprecation.py b/src/sentry/api/helpers/deprecation.py index 03d4fa808a7ba9..4efaa481cbf618 100644 --- a/src/sentry/api/helpers/deprecation.py +++ b/src/sentry/api/helpers/deprecation.py @@ -4,7 +4,7 @@ import logging from collections.abc import Callable from datetime import datetime, timedelta -from typing import Concatenate, ParamSpec, TypeVar +from typing import Concatenate, ParamSpec, TypeVar, int from cronsim import CronSim, CronSimError from django.conf import settings diff --git a/src/sentry/api/helpers/environments.py b/src/sentry/api/helpers/environments.py index 865752cfb121b4..72f96f216ca9ec 100644 --- a/src/sentry/api/helpers/environments.py +++ b/src/sentry/api/helpers/environments.py @@ -2,7 +2,7 @@ import functools from collections.abc import Callable -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from rest_framework.request import Request diff --git a/src/sentry/api/helpers/error_upsampling.py b/src/sentry/api/helpers/error_upsampling.py index 0a6ae624531b27..00ec0db1837590 100644 --- a/src/sentry/api/helpers/error_upsampling.py +++ b/src/sentry/api/helpers/error_upsampling.py @@ -1,6 +1,6 @@ from collections.abc import Sequence from types import ModuleType -from typing import Any +from typing import int, Any from rest_framework.request import Request diff --git a/src/sentry/api/helpers/events.py b/src/sentry/api/helpers/events.py index 7c3b2dd1e3a877..8ae3f9bc3db0a9 100644 --- a/src/sentry/api/helpers/events.py +++ b/src/sentry/api/helpers/events.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/api/helpers/group_index/__init__.py b/src/sentry/api/helpers/group_index/__init__.py index cf19a6371caca8..5564b513721001 100644 --- a/src/sentry/api/helpers/group_index/__init__.py +++ b/src/sentry/api/helpers/group_index/__init__.py @@ -1,5 +1,5 @@ from collections.abc import Callable, Mapping -from typing import Any +from typing import int, Any from sentry.models.group import Group from sentry.utils.cursors import CursorResult diff --git a/src/sentry/api/helpers/group_index/delete.py b/src/sentry/api/helpers/group_index/delete.py index e06fa67209e421..4af830140ca838 100644 --- a/src/sentry/api/helpers/group_index/delete.py +++ b/src/sentry/api/helpers/group_index/delete.py @@ -3,7 +3,7 @@ import logging from collections import defaultdict from collections.abc import Sequence -from typing import Literal +from typing import int, Literal from uuid import uuid4 import sentry_sdk diff --git a/src/sentry/api/helpers/group_index/index.py b/src/sentry/api/helpers/group_index/index.py index 79656750e5b0cc..69c1f635768d96 100644 --- a/src/sentry/api/helpers/group_index/index.py +++ b/src/sentry/api/helpers/group_index/index.py @@ -2,7 +2,7 @@ from collections.abc import Callable, Sequence from datetime import datetime -from typing import Any +from typing import int, Any import sentry_sdk from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/api/helpers/group_index/types.py b/src/sentry/api/helpers/group_index/types.py index d8f68bf695b462..8b7acec275a8b5 100644 --- a/src/sentry/api/helpers/group_index/types.py +++ b/src/sentry/api/helpers/group_index/types.py @@ -1,4 +1,4 @@ -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int from sentry.api.helpers.group_index.validators.status_details import StatusDetailsResult from sentry.api.serializers.models.actor import ActorSerializerResponse diff --git a/src/sentry/api/helpers/group_index/update.py b/src/sentry/api/helpers/group_index/update.py index 632ccd9d79cfd9..a1fd0b98ae3eed 100644 --- a/src/sentry/api/helpers/group_index/update.py +++ b/src/sentry/api/helpers/group_index/update.py @@ -5,7 +5,7 @@ from collections import defaultdict from collections.abc import Mapping, MutableMapping, Sequence from http import HTTPStatus -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int from urllib.parse import urlparse import rest_framework diff --git a/src/sentry/api/helpers/group_index/validators/__init__.py b/src/sentry/api/helpers/group_index/validators/__init__.py index c64a455185e8ec..56f1c908ad9936 100644 --- a/src/sentry/api/helpers/group_index/validators/__init__.py +++ b/src/sentry/api/helpers/group_index/validators/__init__.py @@ -1,4 +1,5 @@ # TODO(mgaeta): I'm being lazy and importing in non-alphabetical order. +from typing import int from .in_commit import InCommitValidator from .inbox_details import InboxDetailsValidator from .status_details import StatusDetailsValidator diff --git a/src/sentry/api/helpers/group_index/validators/group.py b/src/sentry/api/helpers/group_index/validators/group.py index 0be6d0ac397d84..43d6a75057c669 100644 --- a/src/sentry/api/helpers/group_index/validators/group.py +++ b/src/sentry/api/helpers/group_index/validators/group.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from drf_spectacular.utils import extend_schema_serializer from rest_framework import serializers diff --git a/src/sentry/api/helpers/group_index/validators/in_commit.py b/src/sentry/api/helpers/group_index/validators/in_commit.py index bdb72a31645b95..3095674c34de5f 100644 --- a/src/sentry/api/helpers/group_index/validators/in_commit.py +++ b/src/sentry/api/helpers/group_index/validators/in_commit.py @@ -1,4 +1,4 @@ -from typing import Any, TypedDict +from typing import Any, TypedDict, int from drf_spectacular.utils import extend_schema_serializer from rest_framework import serializers diff --git a/src/sentry/api/helpers/group_index/validators/inbox_details.py b/src/sentry/api/helpers/group_index/validators/inbox_details.py index bb9f28a8c7bd45..12c06b8a75c276 100644 --- a/src/sentry/api/helpers/group_index/validators/inbox_details.py +++ b/src/sentry/api/helpers/group_index/validators/inbox_details.py @@ -1,4 +1,4 @@ -from typing import Never +from typing import int, Never from rest_framework import serializers diff --git a/src/sentry/api/helpers/group_index/validators/status_details.py b/src/sentry/api/helpers/group_index/validators/status_details.py index 0c9ea2916a4a3f..6d27ec2742f9b2 100644 --- a/src/sentry/api/helpers/group_index/validators/status_details.py +++ b/src/sentry/api/helpers/group_index/validators/status_details.py @@ -1,4 +1,4 @@ -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int from drf_spectacular.utils import extend_schema_serializer from rest_framework import serializers diff --git a/src/sentry/api/helpers/ios_models.py b/src/sentry/api/helpers/ios_models.py index db4e1e6c82d5d2..59e7d76ee7ff80 100644 --- a/src/sentry/api/helpers/ios_models.py +++ b/src/sentry/api/helpers/ios_models.py @@ -1,3 +1,4 @@ +from typing import int IPHONE4 = "iPhone 4" IPHONE5 = "iPhone 5" IPHONE5C = "iPhone 5c" diff --git a/src/sentry/api/helpers/mobile.py b/src/sentry/api/helpers/mobile.py index c991c3d2526670..66c5b02a6c4b21 100644 --- a/src/sentry/api/helpers/mobile.py +++ b/src/sentry/api/helpers/mobile.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.api.helpers.android_models import ANDROID_MODELS from sentry.api.helpers.ios_models import IOS_MODELS diff --git a/src/sentry/api/helpers/releases.py b/src/sentry/api/helpers/releases.py index 75407ba06ba0f2..6d0b736ecc0de1 100644 --- a/src/sentry/api/helpers/releases.py +++ b/src/sentry/api/helpers/releases.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.exceptions import ResourceDoesNotExist from sentry.models.grouplink import GroupLink from sentry.models.groupresolution import GroupResolution diff --git a/src/sentry/api/helpers/slugs.py b/src/sentry/api/helpers/slugs.py index e05eea523b8cc1..ade74c6acb672f 100644 --- a/src/sentry/api/helpers/slugs.py +++ b/src/sentry/api/helpers/slugs.py @@ -1,3 +1,4 @@ +from typing import int import random import string diff --git a/src/sentry/api/helpers/source_map_helper.py b/src/sentry/api/helpers/source_map_helper.py index c28a57a92d6338..5651247f8960c1 100644 --- a/src/sentry/api/helpers/source_map_helper.py +++ b/src/sentry/api/helpers/source_map_helper.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from urllib.parse import ParseResult, ParseResultBytes, urlparse from django.utils.encoding import force_bytes, force_str diff --git a/src/sentry/api/helpers/teams.py b/src/sentry/api/helpers/teams.py index 9238e9f185a201..03ae2171927158 100644 --- a/src/sentry/api/helpers/teams.py +++ b/src/sentry/api/helpers/teams.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Iterable diff --git a/src/sentry/api/helpers/user_reports.py b/src/sentry/api/helpers/user_reports.py index 2ee5fb44cf03ca..e1f4c4e47c5300 100644 --- a/src/sentry/api/helpers/user_reports.py +++ b/src/sentry/api/helpers/user_reports.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from sentry.models.group import Group, GroupStatus diff --git a/src/sentry/api/invite_helper.py b/src/sentry/api/invite_helper.py index 9017da93f2e37a..3d8e3725cdf321 100644 --- a/src/sentry/api/invite_helper.py +++ b/src/sentry/api/invite_helper.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import dataclasses from logging import Logger diff --git a/src/sentry/api/paginator.py b/src/sentry/api/paginator.py index 6e01f307b95496..5fb97aee4e87d7 100644 --- a/src/sentry/api/paginator.py +++ b/src/sentry/api/paginator.py @@ -5,7 +5,7 @@ import math from collections.abc import Callable, Iterable, Sequence from datetime import datetime, timezone -from typing import Any, Protocol +from typing import Any, Protocol, int from urllib.parse import quote from django.core.exceptions import EmptyResultSet, ObjectDoesNotExist diff --git a/src/sentry/api/permissions.py b/src/sentry/api/permissions.py index 329a443d8c9fd4..4c1a1244b24003 100644 --- a/src/sentry/api/permissions.py +++ b/src/sentry/api/permissions.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Sequence -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from rest_framework.permissions import SAFE_METHODS, BasePermission, IsAuthenticated # noqa: S012 from rest_framework.request import Request diff --git a/src/sentry/api/release_search.py b/src/sentry/api/release_search.py index 9a498a256db196..b6461e30161e00 100644 --- a/src/sentry/api/release_search.py +++ b/src/sentry/api/release_search.py @@ -1,3 +1,4 @@ +from typing import int from functools import partial from sentry.api.event_search import SearchConfig, default_config diff --git a/src/sentry/api/serializers/__init__.py b/src/sentry/api/serializers/__init__.py index 08b72c4af621b2..cfc5e7938ff849 100644 --- a/src/sentry/api/serializers/__init__.py +++ b/src/sentry/api/serializers/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .base import * # NOQA from .models import * # NOQA diff --git a/src/sentry/api/serializers/base.py b/src/sentry/api/serializers/base.py index 6242e26c073868..c2e139150f0d43 100644 --- a/src/sentry/api/serializers/base.py +++ b/src/sentry/api/serializers/base.py @@ -2,7 +2,7 @@ import logging from collections.abc import Callable, Mapping, MutableMapping, Sequence -from typing import Any, TypeVar +from typing import Any, TypeVar, int import sentry_sdk from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/api/serializers/models/__init__.py b/src/sentry/api/serializers/models/__init__.py index b448e543f26c5a..63a8bf761a1111 100644 --- a/src/sentry/api/serializers/models/__init__.py +++ b/src/sentry/api/serializers/models/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .activity import * # noqa: F401,F403 from .actor import * # noqa: F401,F403 from .apiapplication import * # noqa: F401,F403 diff --git a/src/sentry/api/serializers/models/activity.py b/src/sentry/api/serializers/models/activity.py index 079973c7d3e65e..b16633203b5ef4 100644 --- a/src/sentry/api/serializers/models/activity.py +++ b/src/sentry/api/serializers/models/activity.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register, serialize from sentry.api.serializers.models.commit import CommitWithReleaseSerializer from sentry.models.activity import Activity diff --git a/src/sentry/api/serializers/models/actor.py b/src/sentry/api/serializers/models/actor.py index d873d8fce3369a..53bf177b1b8397 100644 --- a/src/sentry/api/serializers/models/actor.py +++ b/src/sentry/api/serializers/models/actor.py @@ -1,4 +1,4 @@ -from typing import Literal, NotRequired, TypedDict +from typing import Literal, NotRequired, TypedDict, int from sentry.api.serializers import Serializer diff --git a/src/sentry/api/serializers/models/apiapplication.py b/src/sentry/api/serializers/models/apiapplication.py index b4033d360a0c57..f4379afa5aa495 100644 --- a/src/sentry/api/serializers/models/apiapplication.py +++ b/src/sentry/api/serializers/models/apiapplication.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/src/sentry/api/serializers/models/apiauthorization.py b/src/sentry/api/serializers/models/apiauthorization.py index 4dc4517e9e9ece..7b8c7d8d031e58 100644 --- a/src/sentry/api/serializers/models/apiauthorization.py +++ b/src/sentry/api/serializers/models/apiauthorization.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register, serialize from sentry.models.apiauthorization import ApiAuthorization from sentry.organizations.services.organization import organization_service diff --git a/src/sentry/api/serializers/models/apikey.py b/src/sentry/api/serializers/models/apikey.py index 3ce8b16d98d593..caac1c951b509b 100644 --- a/src/sentry/api/serializers/models/apikey.py +++ b/src/sentry/api/serializers/models/apikey.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.models.apikey import ApiKey diff --git a/src/sentry/api/serializers/models/apitoken.py b/src/sentry/api/serializers/models/apitoken.py index 13d206a8feb86c..e5ade519efcf37 100644 --- a/src/sentry/api/serializers/models/apitoken.py +++ b/src/sentry/api/serializers/models/apitoken.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register, serialize from sentry.models.apitoken import ApiToken from sentry.types.token import AuthTokenType diff --git a/src/sentry/api/serializers/models/artifactbundle.py b/src/sentry/api/serializers/models/artifactbundle.py index ad4dcedfe59cc6..0f3140cdea21ae 100644 --- a/src/sentry/api/serializers/models/artifactbundle.py +++ b/src/sentry/api/serializers/models/artifactbundle.py @@ -1,3 +1,4 @@ +from typing import int import base64 from sentry.api.serializers import Serializer diff --git a/src/sentry/api/serializers/models/auditlogentry.py b/src/sentry/api/serializers/models/auditlogentry.py index 40e7afb45755d1..d4a5225c84f279 100644 --- a/src/sentry/api/serializers/models/auditlogentry.py +++ b/src/sentry/api/serializers/models/auditlogentry.py @@ -1,3 +1,4 @@ +from typing import int import re from django.db.models import prefetch_related_objects diff --git a/src/sentry/api/serializers/models/auth_provider.py b/src/sentry/api/serializers/models/auth_provider.py index c99f887dfeae82..186ce1b26915b0 100644 --- a/src/sentry/api/serializers/models/auth_provider.py +++ b/src/sentry/api/serializers/models/auth_provider.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser from django.db.models import F diff --git a/src/sentry/api/serializers/models/broadcast.py b/src/sentry/api/serializers/models/broadcast.py index 4c6d5a041c2369..12ab2708f31993 100644 --- a/src/sentry/api/serializers/models/broadcast.py +++ b/src/sentry/api/serializers/models/broadcast.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Count from sentry.api.serializers import Serializer, register diff --git a/src/sentry/api/serializers/models/commit.py b/src/sentry/api/serializers/models/commit.py index 40b869a893fad7..4c7e003a5f85a8 100644 --- a/src/sentry/api/serializers/models/commit.py +++ b/src/sentry/api/serializers/models/commit.py @@ -1,7 +1,7 @@ from collections import defaultdict from collections.abc import Mapping from datetime import datetime -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int from sentry.api.serializers import Serializer, register, serialize from sentry.api.serializers.models.pullrequest import PullRequestSerializerResponse diff --git a/src/sentry/api/serializers/models/dashboard.py b/src/sentry/api/serializers/models/dashboard.py index 2c496fd67b71f2..14384d53e5f69f 100644 --- a/src/sentry/api/serializers/models/dashboard.py +++ b/src/sentry/api/serializers/models/dashboard.py @@ -2,7 +2,7 @@ from collections import defaultdict from datetime import datetime -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int from urllib.parse import urlencode from django.db.models import prefetch_related_objects diff --git a/src/sentry/api/serializers/models/debug_file.py b/src/sentry/api/serializers/models/debug_file.py index ec3d7ffc6a7050..1e0218dacaefaa 100644 --- a/src/sentry/api/serializers/models/debug_file.py +++ b/src/sentry/api/serializers/models/debug_file.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.models.debugfile import ProjectDebugFile diff --git a/src/sentry/api/serializers/models/deploy.py b/src/sentry/api/serializers/models/deploy.py index b5ea43c20b1f02..b904cdf2e9a9b4 100644 --- a/src/sentry/api/serializers/models/deploy.py +++ b/src/sentry/api/serializers/models/deploy.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.models.deploy import Deploy from sentry.models.environment import Environment diff --git a/src/sentry/api/serializers/models/discoversavedquery.py b/src/sentry/api/serializers/models/discoversavedquery.py index 8465f35f25857d..405dad3e5fa48c 100644 --- a/src/sentry/api/serializers/models/discoversavedquery.py +++ b/src/sentry/api/serializers/models/discoversavedquery.py @@ -1,5 +1,5 @@ from collections import defaultdict -from typing import DefaultDict, TypedDict +from typing import DefaultDict, TypedDict, int from sentry.api.serializers import Serializer, register from sentry.constants import ALL_ACCESS_PROJECTS diff --git a/src/sentry/api/serializers/models/environment.py b/src/sentry/api/serializers/models/environment.py index 4f69d7468d4d08..83f5bce8ed54ad 100644 --- a/src/sentry/api/serializers/models/environment.py +++ b/src/sentry/api/serializers/models/environment.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from sentry.api.serializers import Serializer, register from sentry.models.environment import Environment, EnvironmentProject diff --git a/src/sentry/api/serializers/models/event.py b/src/sentry/api/serializers/models/event.py index 0a3c0ab96aa991..80b7214d0ccf4e 100644 --- a/src/sentry/api/serializers/models/event.py +++ b/src/sentry/api/serializers/models/event.py @@ -4,7 +4,7 @@ from collections import defaultdict from collections.abc import Sequence from datetime import datetime, timezone -from typing import Any, TypedDict +from typing import Any, TypedDict, int import sentry_sdk import sqlparse diff --git a/src/sentry/api/serializers/models/eventattachment.py b/src/sentry/api/serializers/models/eventattachment.py index eccfb68e8f495f..d66ea09166bf3e 100644 --- a/src/sentry/api/serializers/models/eventattachment.py +++ b/src/sentry/api/serializers/models/eventattachment.py @@ -1,3 +1,4 @@ +from typing import int import mimetypes from sentry.api.serializers import Serializer, register diff --git a/src/sentry/api/serializers/models/eventuser.py b/src/sentry/api/serializers/models/eventuser.py index 2fd7ee04dfb3d4..a673c4f4707fbe 100644 --- a/src/sentry/api/serializers/models/eventuser.py +++ b/src/sentry/api/serializers/models/eventuser.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from sentry.api.serializers import Serializer, register from sentry.utils.avatar import get_gravatar_url diff --git a/src/sentry/api/serializers/models/exploresavedquery.py b/src/sentry/api/serializers/models/exploresavedquery.py index 135c78095923e5..c28f3c6887aa24 100644 --- a/src/sentry/api/serializers/models/exploresavedquery.py +++ b/src/sentry/api/serializers/models/exploresavedquery.py @@ -1,5 +1,5 @@ from collections import defaultdict -from typing import DefaultDict, TypedDict +from typing import DefaultDict, TypedDict, int from sentry.api.serializers import Serializer, register from sentry.constants import ALL_ACCESS_PROJECTS diff --git a/src/sentry/api/serializers/models/exporteddata.py b/src/sentry/api/serializers/models/exporteddata.py index 6f3b379d4b67e6..4ad198c83abe6c 100644 --- a/src/sentry/api/serializers/models/exporteddata.py +++ b/src/sentry/api/serializers/models/exporteddata.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.data_export.base import ExportQueryType from sentry.data_export.models import ExportedData diff --git a/src/sentry/api/serializers/models/filechange.py b/src/sentry/api/serializers/models/filechange.py index 558692ed7ccbb1..530763e3df7c59 100644 --- a/src/sentry/api/serializers/models/filechange.py +++ b/src/sentry/api/serializers/models/filechange.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.api.serializers import Serializer, register from sentry.api.serializers.models.commit import get_users_for_commits diff --git a/src/sentry/api/serializers/models/group.py b/src/sentry/api/serializers/models/group.py index 68ad288a0d6d7d..82e825bfc9ce09 100644 --- a/src/sentry/api/serializers/models/group.py +++ b/src/sentry/api/serializers/models/group.py @@ -6,7 +6,7 @@ from collections import defaultdict from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence from datetime import datetime, timedelta, timezone -from typing import Any, Protocol, TypedDict, TypeGuard +from typing import Any, Protocol, TypedDict, TypeGuard, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/api/serializers/models/group_stream.py b/src/sentry/api/serializers/models/group_stream.py index 3cb01b82d2ea84..1695234bbf4f1b 100644 --- a/src/sentry/api/serializers/models/group_stream.py +++ b/src/sentry/api/serializers/models/group_stream.py @@ -4,7 +4,7 @@ from abc import abstractmethod from collections.abc import Mapping, Sequence from datetime import datetime, timedelta -from typing import Any, NamedTuple, NotRequired, Protocol, TypedDict +from typing import Any, NamedTuple, NotRequired, Protocol, TypedDict, int from django.contrib.auth.models import AnonymousUser from django.utils import timezone diff --git a/src/sentry/api/serializers/models/grouprelease.py b/src/sentry/api/serializers/models/grouprelease.py index 95a90914378311..7380f06812cc1a 100644 --- a/src/sentry/api/serializers/models/grouprelease.py +++ b/src/sentry/api/serializers/models/grouprelease.py @@ -1,3 +1,4 @@ +from typing import int from collections import namedtuple from datetime import timedelta diff --git a/src/sentry/api/serializers/models/groupsearchview.py b/src/sentry/api/serializers/models/groupsearchview.py index b2a2b71e49d16c..07b0855382f59b 100644 --- a/src/sentry/api/serializers/models/groupsearchview.py +++ b/src/sentry/api/serializers/models/groupsearchview.py @@ -1,5 +1,5 @@ from collections.abc import MutableMapping -from typing import Any, TypedDict +from typing import Any, TypedDict, int from sentry.api.serializers import Serializer, register from sentry.models.groupsearchview import GroupSearchView diff --git a/src/sentry/api/serializers/models/groupsearchviewstarred.py b/src/sentry/api/serializers/models/groupsearchviewstarred.py index 2335a063b8f09d..152c4acc6e4cf5 100644 --- a/src/sentry/api/serializers/models/groupsearchviewstarred.py +++ b/src/sentry/api/serializers/models/groupsearchviewstarred.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from sentry.api.serializers import Serializer, register, serialize from sentry.api.serializers.models.groupsearchview import ( diff --git a/src/sentry/api/serializers/models/groupseen.py b/src/sentry/api/serializers/models/groupseen.py index 859704f8c35e2e..6e5d31a00c1b23 100644 --- a/src/sentry/api/serializers/models/groupseen.py +++ b/src/sentry/api/serializers/models/groupseen.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.models.groupseen import GroupSeen from sentry.users.services.user.service import user_service diff --git a/src/sentry/api/serializers/models/grouptombstone.py b/src/sentry/api/serializers/models/grouptombstone.py index 38bf7cfb85d78c..11239a50982920 100644 --- a/src/sentry/api/serializers/models/grouptombstone.py +++ b/src/sentry/api/serializers/models/grouptombstone.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.constants import LOG_LEVELS from sentry.models.grouptombstone import GroupTombstone diff --git a/src/sentry/api/serializers/models/incidentactivity.py b/src/sentry/api/serializers/models/incidentactivity.py index 1ea7b114d6e7a7..db26bb55f281ff 100644 --- a/src/sentry/api/serializers/models/incidentactivity.py +++ b/src/sentry/api/serializers/models/incidentactivity.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import TypedDict +from typing import int, TypedDict from django.db.models import prefetch_related_objects diff --git a/src/sentry/api/serializers/models/organization.py b/src/sentry/api/serializers/models/organization.py index f54778fc77e2db..a54084c3221d2f 100644 --- a/src/sentry/api/serializers/models/organization.py +++ b/src/sentry/api/serializers/models/organization.py @@ -3,7 +3,7 @@ import logging from collections.abc import Callable, Mapping, MutableMapping, Sequence from datetime import datetime, timezone -from typing import TYPE_CHECKING, Any, TypedDict, cast +from typing import TYPE_CHECKING, Any, TypedDict, cast, int import sentry_sdk from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/api/serializers/models/organization_access_request.py b/src/sentry/api/serializers/models/organization_access_request.py index f96ad98652a2a5..7520f6727d03cd 100644 --- a/src/sentry/api/serializers/models/organization_access_request.py +++ b/src/sentry/api/serializers/models/organization_access_request.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register, serialize from sentry.models.organizationaccessrequest import OrganizationAccessRequest from sentry.users.services.user.service import user_service diff --git a/src/sentry/api/serializers/models/organization_member/__init__.py b/src/sentry/api/serializers/models/organization_member/__init__.py index 50df9a9a27ba7b..96bfb0b8b631a8 100644 --- a/src/sentry/api/serializers/models/organization_member/__init__.py +++ b/src/sentry/api/serializers/models/organization_member/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .base import OrganizationMemberSerializer from .expand.projects import OrganizationMemberWithProjectsSerializer from .response import OrganizationMemberSCIMSerializerResponse, SCIMMeta diff --git a/src/sentry/api/serializers/models/organization_member/base.py b/src/sentry/api/serializers/models/organization_member/base.py index c5cdca5fe46f32..7cd9c4af374b8d 100644 --- a/src/sentry/api/serializers/models/organization_member/base.py +++ b/src/sentry/api/serializers/models/organization_member/base.py @@ -1,6 +1,6 @@ from collections import defaultdict from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/api/serializers/models/organization_member/expand/projects.py b/src/sentry/api/serializers/models/organization_member/expand/projects.py index a69b5380e7d7db..f78f921f81843a 100644 --- a/src/sentry/api/serializers/models/organization_member/expand/projects.py +++ b/src/sentry/api/serializers/models/organization_member/expand/projects.py @@ -1,6 +1,6 @@ from collections import defaultdict from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any, cast +from typing import Any, cast, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/api/serializers/models/organization_member/expand/roles.py b/src/sentry/api/serializers/models/organization_member/expand/roles.py index 9a114d528767be..57f6d839d2a40f 100644 --- a/src/sentry/api/serializers/models/organization_member/expand/roles.py +++ b/src/sentry/api/serializers/models/organization_member/expand/roles.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Iterable, Mapping, MutableMapping, Sequence -from typing import Any, cast +from typing import Any, cast, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/api/serializers/models/organization_member/expand/teams.py b/src/sentry/api/serializers/models/organization_member/expand/teams.py index 23877a3f4a9480..9512fe8a1ffc73 100644 --- a/src/sentry/api/serializers/models/organization_member/expand/teams.py +++ b/src/sentry/api/serializers/models/organization_member/expand/teams.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any, cast +from typing import Any, cast, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/api/serializers/models/organization_member/response.py b/src/sentry/api/serializers/models/organization_member/response.py index 862f80206d88d6..8e5cee1dd333c3 100644 --- a/src/sentry/api/serializers/models/organization_member/response.py +++ b/src/sentry/api/serializers/models/organization_member/response.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int from drf_spectacular.utils import extend_schema_serializer diff --git a/src/sentry/api/serializers/models/organization_member/scim.py b/src/sentry/api/serializers/models/organization_member/scim.py index c5488df98173ce..7281256e1d0cc7 100644 --- a/src/sentry/api/serializers/models/organization_member/scim.py +++ b/src/sentry/api/serializers/models/organization_member/scim.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from sentry.api.serializers import Serializer from sentry.core.endpoints.scim.constants import SCIM_SCHEMA_USER diff --git a/src/sentry/api/serializers/models/organization_member/utils.py b/src/sentry/api/serializers/models/organization_member/utils.py index d51d134fbdaf0d..7964e0f404c25f 100644 --- a/src/sentry/api/serializers/models/organization_member/utils.py +++ b/src/sentry/api/serializers/models/organization_member/utils.py @@ -1,6 +1,6 @@ from collections import defaultdict from collections.abc import Sequence -from typing import Any, TypeVar +from typing import Any, TypeVar, int from sentry.models.organizationmember import OrganizationMember from sentry.models.organizationmemberteam import OrganizationMemberTeam diff --git a/src/sentry/api/serializers/models/organization_plugin.py b/src/sentry/api/serializers/models/organization_plugin.py index d0680f9746f3ba..da372228574101 100644 --- a/src/sentry/api/serializers/models/organization_plugin.py +++ b/src/sentry/api/serializers/models/organization_plugin.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers.models.plugin import PluginSerializer diff --git a/src/sentry/api/serializers/models/organizationmemberinvite.py b/src/sentry/api/serializers/models/organizationmemberinvite.py index f847560a18c249..ac03e62ca704ea 100644 --- a/src/sentry/api/serializers/models/organizationmemberinvite.py +++ b/src/sentry/api/serializers/models/organizationmemberinvite.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/api/serializers/models/orgauthtoken.py b/src/sentry/api/serializers/models/orgauthtoken.py index 83644b4c4591ed..11be76f43635f5 100644 --- a/src/sentry/api/serializers/models/orgauthtoken.py +++ b/src/sentry/api/serializers/models/orgauthtoken.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.models.orgauthtoken import OrgAuthToken diff --git a/src/sentry/api/serializers/models/plugin.py b/src/sentry/api/serializers/models/plugin.py index 854fe3005c73a4..1a0eb47ea6033e 100644 --- a/src/sentry/api/serializers/models/plugin.py +++ b/src/sentry/api/serializers/models/plugin.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from django.utils.text import slugify diff --git a/src/sentry/api/serializers/models/project.py b/src/sentry/api/serializers/models/project.py index 08e94dd4aff119..30da2cc81fb624 100644 --- a/src/sentry/api/serializers/models/project.py +++ b/src/sentry/api/serializers/models/project.py @@ -3,7 +3,7 @@ from collections import defaultdict from collections.abc import Iterable, Mapping, MutableMapping, Sequence from datetime import datetime, timedelta -from typing import TYPE_CHECKING, Any, Final, NotRequired, TypedDict +from typing import TYPE_CHECKING, Any, Final, NotRequired, TypedDict, int import orjson import sentry_sdk diff --git a/src/sentry/api/serializers/models/project_key.py b/src/sentry/api/serializers/models/project_key.py index c6ba825d2b9ce8..109382f8d12001 100644 --- a/src/sentry/api/serializers/models/project_key.py +++ b/src/sentry/api/serializers/models/project_key.py @@ -1,6 +1,6 @@ from collections.abc import Mapping from datetime import datetime -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int from sentry.api.serializers import Serializer, register from sentry.auth.superuser import is_active_superuser diff --git a/src/sentry/api/serializers/models/project_platform.py b/src/sentry/api/serializers/models/project_platform.py index 33dd8c50993041..73950e293868cd 100644 --- a/src/sentry/api/serializers/models/project_platform.py +++ b/src/sentry/api/serializers/models/project_platform.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.models.projectplatform import ProjectPlatform diff --git a/src/sentry/api/serializers/models/project_template.py b/src/sentry/api/serializers/models/project_template.py index 023f79c0276de7..df90ae7acb963e 100644 --- a/src/sentry/api/serializers/models/project_template.py +++ b/src/sentry/api/serializers/models/project_template.py @@ -2,7 +2,7 @@ from collections.abc import Iterable, Mapping, Sequence from datetime import datetime from enum import StrEnum -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser from rest_framework import serializers diff --git a/src/sentry/api/serializers/models/project_transaction_threshold.py b/src/sentry/api/serializers/models/project_transaction_threshold.py index 16196e8b7cf45f..bb341f751a3820 100644 --- a/src/sentry/api/serializers/models/project_transaction_threshold.py +++ b/src/sentry/api/serializers/models/project_transaction_threshold.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.models.transaction_threshold import ( TRANSACTION_METRICS, diff --git a/src/sentry/api/serializers/models/projectcodeowners.py b/src/sentry/api/serializers/models/projectcodeowners.py index f0d8be8799c2be..599c1cab7e295d 100644 --- a/src/sentry/api/serializers/models/projectcodeowners.py +++ b/src/sentry/api/serializers/models/projectcodeowners.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from sentry.api.serializers import Serializer, register, serialize from sentry.integrations.api.serializers.models.repository_project_path_config import ( diff --git a/src/sentry/api/serializers/models/projectownership.py b/src/sentry/api/serializers/models/projectownership.py index ea993e006124d0..b0942c06585a92 100644 --- a/src/sentry/api/serializers/models/projectownership.py +++ b/src/sentry/api/serializers/models/projectownership.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import TypedDict +from typing import int, TypedDict from sentry.api.serializers import Serializer, register from sentry.models.projectownership import ProjectOwnership diff --git a/src/sentry/api/serializers/models/pullrequest.py b/src/sentry/api/serializers/models/pullrequest.py index 0af9f0ef616399..c7f578ece61e49 100644 --- a/src/sentry/api/serializers/models/pullrequest.py +++ b/src/sentry/api/serializers/models/pullrequest.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import TypedDict +from typing import int, TypedDict from sentry.api.serializers import Serializer, register, serialize from sentry.api.serializers.models.release import Author, get_users_for_authors diff --git a/src/sentry/api/serializers/models/recentsearch.py b/src/sentry/api/serializers/models/recentsearch.py index e008a18d9aba96..670348abb0a38a 100644 --- a/src/sentry/api/serializers/models/recentsearch.py +++ b/src/sentry/api/serializers/models/recentsearch.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.models.recentsearch import RecentSearch diff --git a/src/sentry/api/serializers/models/relay.py b/src/sentry/api/serializers/models/relay.py index d78f369d727bd3..a863bd828ac99d 100644 --- a/src/sentry/api/serializers/models/relay.py +++ b/src/sentry/api/serializers/models/relay.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from sentry.api.serializers import Serializer, register from sentry.models.relay import Relay diff --git a/src/sentry/api/serializers/models/relayusage.py b/src/sentry/api/serializers/models/relayusage.py index ce5ca7ee639f25..abeedb50b3eac5 100644 --- a/src/sentry/api/serializers/models/relayusage.py +++ b/src/sentry/api/serializers/models/relayusage.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.models.relay import RelayUsage diff --git a/src/sentry/api/serializers/models/release.py b/src/sentry/api/serializers/models/release.py index 508ab23018fea8..efd66a931a2b77 100644 --- a/src/sentry/api/serializers/models/release.py +++ b/src/sentry/api/serializers/models/release.py @@ -3,7 +3,7 @@ import datetime from collections import defaultdict from collections.abc import Mapping, Sequence -from typing import Any, NotRequired, TypedDict, Union +from typing import Any, NotRequired, TypedDict, Union, int from django.contrib.auth.models import AnonymousUser from django.core.cache import cache diff --git a/src/sentry/api/serializers/models/release_file.py b/src/sentry/api/serializers/models/release_file.py index 609b600682fa90..619f87f680201e 100644 --- a/src/sentry/api/serializers/models/release_file.py +++ b/src/sentry/api/serializers/models/release_file.py @@ -1,3 +1,4 @@ +from typing import int from base64 import urlsafe_b64decode, urlsafe_b64encode from sentry.api.serializers import Serializer, register diff --git a/src/sentry/api/serializers/models/release_threshold.py b/src/sentry/api/serializers/models/release_threshold.py index 45e28d090b58a0..fd1aedc9eca32f 100644 --- a/src/sentry/api/serializers/models/release_threshold.py +++ b/src/sentry/api/serializers/models/release_threshold.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register, serialize from sentry.models.release_threshold.constants import ( THRESHOLD_TYPE_INT_TO_STR, diff --git a/src/sentry/api/serializers/models/repository.py b/src/sentry/api/serializers/models/repository.py index 2f2b77bf88c73a..5e4eb483e48307 100644 --- a/src/sentry/api/serializers/models/repository.py +++ b/src/sentry/api/serializers/models/repository.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import TypedDict +from typing import int, TypedDict from sentry.api.serializers import Serializer, register from sentry.models.repository import Repository diff --git a/src/sentry/api/serializers/models/role.py b/src/sentry/api/serializers/models/role.py index e73ba65ef06356..6e6f0564d31c2f 100644 --- a/src/sentry/api/serializers/models/role.py +++ b/src/sentry/api/serializers/models/role.py @@ -1,5 +1,5 @@ from collections.abc import Collection, Mapping -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/api/serializers/models/rule.py b/src/sentry/api/serializers/models/rule.py index ce027b90c23dbb..06a1e11d4da37f 100644 --- a/src/sentry/api/serializers/models/rule.py +++ b/src/sentry/api/serializers/models/rule.py @@ -4,7 +4,7 @@ from collections.abc import Mapping, Sequence from datetime import datetime from functools import reduce -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.db.models import Max, Prefetch, Q, prefetch_related_objects from rest_framework import serializers diff --git a/src/sentry/api/serializers/models/savedsearch.py b/src/sentry/api/serializers/models/savedsearch.py index 50a28ed47c7d5c..995247d8249c38 100644 --- a/src/sentry/api/serializers/models/savedsearch.py +++ b/src/sentry/api/serializers/models/savedsearch.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.models.savedsearch import SavedSearch diff --git a/src/sentry/api/serializers/models/tagvalue.py b/src/sentry/api/serializers/models/tagvalue.py index cbb0dfc528e5ff..2daede25fac11e 100644 --- a/src/sentry/api/serializers/models/tagvalue.py +++ b/src/sentry/api/serializers/models/tagvalue.py @@ -1,4 +1,4 @@ -from typing import Any, cast +from typing import Any, cast, int from sentry.api.serializers import Serializer from sentry.search.utils import convert_user_tag_to_query diff --git a/src/sentry/api/serializers/models/team.py b/src/sentry/api/serializers/models/team.py index 64a8290d6fcb27..26b1bf6c1108b0 100644 --- a/src/sentry/api/serializers/models/team.py +++ b/src/sentry/api/serializers/models/team.py @@ -4,7 +4,7 @@ from collections import defaultdict from collections.abc import Mapping, Sequence from datetime import datetime -from typing import TYPE_CHECKING, Any, TypedDict +from typing import TYPE_CHECKING, Any, TypedDict, int from django.contrib.auth.models import AnonymousUser from django.db.models import Count diff --git a/src/sentry/api/serializers/models/user_social_auth.py b/src/sentry/api/serializers/models/user_social_auth.py index abd4b35804c5da..2b3066166972e9 100644 --- a/src/sentry/api/serializers/models/user_social_auth.py +++ b/src/sentry/api/serializers/models/user_social_auth.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.api.serializers import Serializer, register diff --git a/src/sentry/api/serializers/models/userreport.py b/src/sentry/api/serializers/models/userreport.py index ea7ab510054441..9d8fddf1fcc602 100644 --- a/src/sentry/api/serializers/models/userreport.py +++ b/src/sentry/api/serializers/models/userreport.py @@ -1,5 +1,5 @@ from datetime import timedelta -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.utils import timezone diff --git a/src/sentry/api/serializers/models/userrollback.py b/src/sentry/api/serializers/models/userrollback.py index f7ee1f31f54ee9..6a261871659233 100644 --- a/src/sentry/api/serializers/models/userrollback.py +++ b/src/sentry/api/serializers/models/userrollback.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from sentry.api.serializers import Serializer diff --git a/src/sentry/api/serializers/release_details_types.py b/src/sentry/api/serializers/release_details_types.py index 72d9084d87ba00..1aef152c54a65d 100644 --- a/src/sentry/api/serializers/release_details_types.py +++ b/src/sentry/api/serializers/release_details_types.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int class VersionInfoOptional(TypedDict, total=False): diff --git a/src/sentry/api/serializers/rest_framework/__init__.py b/src/sentry/api/serializers/rest_framework/__init__.py index 1bcedaa824f77b..71639dc8354ee1 100644 --- a/src/sentry/api/serializers/rest_framework/__init__.py +++ b/src/sentry/api/serializers/rest_framework/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .base import * # noqa: F401,F403 from .commit import * # noqa: F401,F403 from .dashboard import * # noqa: F401,F403 diff --git a/src/sentry/api/serializers/rest_framework/base.py b/src/sentry/api/serializers/rest_framework/base.py index c0d934f98b6e5f..c4ef5c3ce34299 100644 --- a/src/sentry/api/serializers/rest_framework/base.py +++ b/src/sentry/api/serializers/rest_framework/base.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TypeVar +from typing import int, TypeVar from django.db.models import Model from django.utils.text import re_camel_case diff --git a/src/sentry/api/serializers/rest_framework/commit.py b/src/sentry/api/serializers/rest_framework/commit.py index 269581f2c2fe64..9293515a3627f9 100644 --- a/src/sentry/api/serializers/rest_framework/commit.py +++ b/src/sentry/api/serializers/rest_framework/commit.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from sentry.models.commitfilechange import CommitFileChange diff --git a/src/sentry/api/serializers/rest_framework/dashboard.py b/src/sentry/api/serializers/rest_framework/dashboard.py index a357f4f45a07bb..3d4302a04294cc 100644 --- a/src/sentry/api/serializers/rest_framework/dashboard.py +++ b/src/sentry/api/serializers/rest_framework/dashboard.py @@ -3,7 +3,7 @@ from datetime import datetime, timedelta from enum import Enum from math import floor -from typing import TypedDict +from typing import int, TypedDict import sentry_sdk from django.db.models import Max diff --git a/src/sentry/api/serializers/rest_framework/environment.py b/src/sentry/api/serializers/rest_framework/environment.py index 970d1cbb939a13..24d607d580a66e 100644 --- a/src/sentry/api/serializers/rest_framework/environment.py +++ b/src/sentry/api/serializers/rest_framework/environment.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from sentry.models.environment import Environment diff --git a/src/sentry/api/serializers/rest_framework/group_notes.py b/src/sentry/api/serializers/rest_framework/group_notes.py index 84b1fdded4e7d0..6e3158a3df351a 100644 --- a/src/sentry/api/serializers/rest_framework/group_notes.py +++ b/src/sentry/api/serializers/rest_framework/group_notes.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TypedDict +from typing import int, TypedDict from rest_framework import serializers from rest_framework.serializers import ListField diff --git a/src/sentry/api/serializers/rest_framework/groupsearchview.py b/src/sentry/api/serializers/rest_framework/groupsearchview.py index 9bf07b9a5dc918..1f08649919aa40 100644 --- a/src/sentry/api/serializers/rest_framework/groupsearchview.py +++ b/src/sentry/api/serializers/rest_framework/groupsearchview.py @@ -1,4 +1,4 @@ -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int from rest_framework import serializers diff --git a/src/sentry/api/serializers/rest_framework/list.py b/src/sentry/api/serializers/rest_framework/list.py index e42c40ef76f0ee..5979e275125b8c 100644 --- a/src/sentry/api/serializers/rest_framework/list.py +++ b/src/sentry/api/serializers/rest_framework/list.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.serializers import ListField diff --git a/src/sentry/api/serializers/rest_framework/notification_action.py b/src/sentry/api/serializers/rest_framework/notification_action.py index 6274b1fc455a2b..12b01e823f4acb 100644 --- a/src/sentry/api/serializers/rest_framework/notification_action.py +++ b/src/sentry/api/serializers/rest_framework/notification_action.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.api.serializers.notification_action_request import ( NotificationActionInputData, ) diff --git a/src/sentry/api/serializers/rest_framework/organizationmemberinvite.py b/src/sentry/api/serializers/rest_framework/organizationmemberinvite.py index 784f2066daf090..ad832a0bc1916e 100644 --- a/src/sentry/api/serializers/rest_framework/organizationmemberinvite.py +++ b/src/sentry/api/serializers/rest_framework/organizationmemberinvite.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Q from rest_framework import serializers diff --git a/src/sentry/api/serializers/rest_framework/origin.py b/src/sentry/api/serializers/rest_framework/origin.py index 3e2899ff4c6c27..2d651530d294ca 100644 --- a/src/sentry/api/serializers/rest_framework/origin.py +++ b/src/sentry/api/serializers/rest_framework/origin.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from sentry.utils.http import parse_uri_match diff --git a/src/sentry/api/serializers/rest_framework/project.py b/src/sentry/api/serializers/rest_framework/project.py index 894fd132d1eb08..39caea825ed01f 100644 --- a/src/sentry/api/serializers/rest_framework/project.py +++ b/src/sentry/api/serializers/rest_framework/project.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Collection from drf_spectacular.types import OpenApiTypes diff --git a/src/sentry/api/serializers/rest_framework/project_key.py b/src/sentry/api/serializers/rest_framework/project_key.py index d60ce6c97efb83..7cfdd7505cc9ee 100644 --- a/src/sentry/api/serializers/rest_framework/project_key.py +++ b/src/sentry/api/serializers/rest_framework/project_key.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema_serializer from rest_framework import serializers diff --git a/src/sentry/api/serializers/rest_framework/release.py b/src/sentry/api/serializers/rest_framework/release.py index ee8599856721a1..48f39516d11f7f 100644 --- a/src/sentry/api/serializers/rest_framework/release.py +++ b/src/sentry/api/serializers/rest_framework/release.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from sentry.api.fields.user import UserField diff --git a/src/sentry/api/serializers/rest_framework/rule.py b/src/sentry/api/serializers/rest_framework/rule.py index fbdf9deb83b610..20013a0a0168f1 100644 --- a/src/sentry/api/serializers/rest_framework/rule.py +++ b/src/sentry/api/serializers/rest_framework/rule.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from uuid import UUID, uuid4 import orjson diff --git a/src/sentry/api/serializers/rest_framework/savedsearch.py b/src/sentry/api/serializers/rest_framework/savedsearch.py index b11bcec2b0df6a..520cdebe4183b8 100644 --- a/src/sentry/api/serializers/rest_framework/savedsearch.py +++ b/src/sentry/api/serializers/rest_framework/savedsearch.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from sentry.models.savedsearch import SortOptions, Visibility diff --git a/src/sentry/api/serializers/snuba.py b/src/sentry/api/serializers/snuba.py index 1149b9d09b3d55..528edd621f9a96 100644 --- a/src/sentry/api/serializers/snuba.py +++ b/src/sentry/api/serializers/snuba.py @@ -1,3 +1,4 @@ +from typing import int import itertools diff --git a/src/sentry/api/serializers/types.py b/src/sentry/api/serializers/types.py index 32b2274e70bfa3..a0d6f0c713431a 100644 --- a/src/sentry/api/serializers/types.py +++ b/src/sentry/api/serializers/types.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int from sentry.api.serializers.release_details_types import Author, LastDeploy, Project, VersionInfo diff --git a/src/sentry/api/urls.py b/src/sentry/api/urls.py index 7f520600067c81..8183054c501015 100644 --- a/src/sentry/api/urls.py +++ b/src/sentry/api/urls.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.conf.urls import include from django.urls import URLPattern, URLResolver, re_path diff --git a/src/sentry/api/utils.py b/src/sentry/api/utils.py index 30dc469ad07fe8..04cc8f236f7319 100644 --- a/src/sentry/api/utils.py +++ b/src/sentry/api/utils.py @@ -7,7 +7,7 @@ from collections.abc import Generator, Mapping from contextlib import contextmanager from datetime import timedelta -from typing import Any, Literal, overload +from typing import Any, Literal, overload, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/api/validators/__init__.py b/src/sentry/api/validators/__init__.py index 06223c29e1c944..278b03e1d85243 100644 --- a/src/sentry/api/validators/__init__.py +++ b/src/sentry/api/validators/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .auth import * # noqa: F401,F403 from .broadcast import * # noqa: F401,F403 from .email import * # noqa: F401,F403 diff --git a/src/sentry/api/validators/auth.py b/src/sentry/api/validators/auth.py index 858b4953bde029..5ea279d4fbcf9a 100644 --- a/src/sentry/api/validators/auth.py +++ b/src/sentry/api/validators/auth.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers MISSING_PASSWORD_OR_U2F_CODE = "missing_password_or_u2f" diff --git a/src/sentry/api/validators/broadcast.py b/src/sentry/api/validators/broadcast.py index c464c064f46f7c..de1226eba49845 100644 --- a/src/sentry/api/validators/broadcast.py +++ b/src/sentry/api/validators/broadcast.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from sentry.models.broadcast import BROADCAST_CATEGORIES diff --git a/src/sentry/api/validators/email.py b/src/sentry/api/validators/email.py index d8a2f0bf999c44..e976e21a1eb576 100644 --- a/src/sentry/api/validators/email.py +++ b/src/sentry/api/validators/email.py @@ -1,3 +1,4 @@ +from typing import int from sentry.users.api.parsers.email import AllowedEmailField __all__ = ("AllowedEmailField",) diff --git a/src/sentry/api/validators/project.py b/src/sentry/api/validators/project.py index acd142976f6cfb..3f1a569de99598 100644 --- a/src/sentry/api/validators/project.py +++ b/src/sentry/api/validators/project.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.exceptions import PermissionDenied from sentry.constants import ALL_ACCESS_PROJECTS diff --git a/src/sentry/api/validators/project_codeowners.py b/src/sentry/api/validators/project_codeowners.py index cf90dec4248fa4..bd244d6687f4f6 100644 --- a/src/sentry/api/validators/project_codeowners.py +++ b/src/sentry/api/validators/project_codeowners.py @@ -4,7 +4,7 @@ from collections.abc import Collection, Mapping, Sequence from functools import reduce from operator import or_ -from typing import Any +from typing import int, Any from django.db.models import Subquery from django.db.models.query_utils import Q diff --git a/src/sentry/apidocs/api_ownership_allowlist_dont_modify.py b/src/sentry/apidocs/api_ownership_allowlist_dont_modify.py index 58e233884ac9a7..790cd5126122de 100644 --- a/src/sentry/apidocs/api_ownership_allowlist_dont_modify.py +++ b/src/sentry/apidocs/api_ownership_allowlist_dont_modify.py @@ -1,3 +1,4 @@ +from typing import int """ This list is tracking old api endpoints that we couldn't find owners for. The goal is to eventually find owners for all and shrink this list. diff --git a/src/sentry/apidocs/api_publish_status_allowlist_dont_modify.py b/src/sentry/apidocs/api_publish_status_allowlist_dont_modify.py index ea13eb36554f33..a4884df868de3e 100644 --- a/src/sentry/apidocs/api_publish_status_allowlist_dont_modify.py +++ b/src/sentry/apidocs/api_publish_status_allowlist_dont_modify.py @@ -1,3 +1,4 @@ +from typing import int """ This list is tracking old api endpoints that we couldn't decide publish status for. The goal is to eventually find owners for all and shrink this list. diff --git a/src/sentry/apidocs/build.py b/src/sentry/apidocs/build.py index 285911becc7880..b6e5f6b2728dc4 100644 --- a/src/sentry/apidocs/build.py +++ b/src/sentry/apidocs/build.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import orjson diff --git a/src/sentry/apidocs/constants.py b/src/sentry/apidocs/constants.py index 77fdca98577f7b..421226d2d2ddc5 100644 --- a/src/sentry/apidocs/constants.py +++ b/src/sentry/apidocs/constants.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiResponse # 200 diff --git a/src/sentry/apidocs/examples/autofix_examples.py b/src/sentry/apidocs/examples/autofix_examples.py index bf24aa04552ef5..e9bc36a6e1c6d4 100644 --- a/src/sentry/apidocs/examples/autofix_examples.py +++ b/src/sentry/apidocs/examples/autofix_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample AUTOFIX_POST_RESPONSE = [ diff --git a/src/sentry/apidocs/examples/dashboard_examples.py b/src/sentry/apidocs/examples/dashboard_examples.py index 29291aac345fbd..884e1ba8efa036 100644 --- a/src/sentry/apidocs/examples/dashboard_examples.py +++ b/src/sentry/apidocs/examples/dashboard_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample DASHBOARD_OBJECT = { diff --git a/src/sentry/apidocs/examples/discover_performance_examples.py b/src/sentry/apidocs/examples/discover_performance_examples.py index da9db1a6892c47..ecf7415a1ca84f 100644 --- a/src/sentry/apidocs/examples/discover_performance_examples.py +++ b/src/sentry/apidocs/examples/discover_performance_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample diff --git a/src/sentry/apidocs/examples/discover_saved_query_examples.py b/src/sentry/apidocs/examples/discover_saved_query_examples.py index 6b73cfb2fbaa56..e759b5a8c009c7 100644 --- a/src/sentry/apidocs/examples/discover_saved_query_examples.py +++ b/src/sentry/apidocs/examples/discover_saved_query_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample DISCOVER_SAVED_QUERY_OBJ = { diff --git a/src/sentry/apidocs/examples/environment_examples.py b/src/sentry/apidocs/examples/environment_examples.py index 15d489356c2e34..4406f6a8ce02ba 100644 --- a/src/sentry/apidocs/examples/environment_examples.py +++ b/src/sentry/apidocs/examples/environment_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample diff --git a/src/sentry/apidocs/examples/event_examples.py b/src/sentry/apidocs/examples/event_examples.py index f3c7fe0268061a..dda0203df76542 100644 --- a/src/sentry/apidocs/examples/event_examples.py +++ b/src/sentry/apidocs/examples/event_examples.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from drf_spectacular.utils import OpenApiExample diff --git a/src/sentry/apidocs/examples/explore_saved_query_examples.py b/src/sentry/apidocs/examples/explore_saved_query_examples.py index 542d4e0665e79c..40732c9f3fc299 100644 --- a/src/sentry/apidocs/examples/explore_saved_query_examples.py +++ b/src/sentry/apidocs/examples/explore_saved_query_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample EXPLORE_SAVED_QUERY_OBJ = { diff --git a/src/sentry/apidocs/examples/integration_examples.py b/src/sentry/apidocs/examples/integration_examples.py index 32a712fc4f3b6c..26c97f2d22b0fd 100644 --- a/src/sentry/apidocs/examples/integration_examples.py +++ b/src/sentry/apidocs/examples/integration_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample diff --git a/src/sentry/apidocs/examples/issue_alert_examples.py b/src/sentry/apidocs/examples/issue_alert_examples.py index c149f243ca6a45..bcd9a97a1e9b16 100644 --- a/src/sentry/apidocs/examples/issue_alert_examples.py +++ b/src/sentry/apidocs/examples/issue_alert_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample diff --git a/src/sentry/apidocs/examples/issue_examples.py b/src/sentry/apidocs/examples/issue_examples.py index 47e8e8a256868c..24d06045a59b9f 100644 --- a/src/sentry/apidocs/examples/issue_examples.py +++ b/src/sentry/apidocs/examples/issue_examples.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from drf_spectacular.utils import OpenApiExample diff --git a/src/sentry/apidocs/examples/metric_alert_examples.py b/src/sentry/apidocs/examples/metric_alert_examples.py index d1e61a0470a2e4..b0e3f96922c913 100644 --- a/src/sentry/apidocs/examples/metric_alert_examples.py +++ b/src/sentry/apidocs/examples/metric_alert_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample diff --git a/src/sentry/apidocs/examples/notification_examples.py b/src/sentry/apidocs/examples/notification_examples.py index d41e381d5b22cb..bddef87db5a4d7 100644 --- a/src/sentry/apidocs/examples/notification_examples.py +++ b/src/sentry/apidocs/examples/notification_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample NOTIFICATION_ACTION_ONE = { diff --git a/src/sentry/apidocs/examples/organization_examples.py b/src/sentry/apidocs/examples/organization_examples.py index 548b906c4f9406..2a8e2427fa96a3 100644 --- a/src/sentry/apidocs/examples/organization_examples.py +++ b/src/sentry/apidocs/examples/organization_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample from sentry.seer.autofix.constants import AutofixAutomationTuningSettings diff --git a/src/sentry/apidocs/examples/organization_member_examples.py b/src/sentry/apidocs/examples/organization_member_examples.py index ae7d7b91d6daf8..2782e20e9ce824 100644 --- a/src/sentry/apidocs/examples/organization_member_examples.py +++ b/src/sentry/apidocs/examples/organization_member_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample ORGANIZATION_MEMBER = { diff --git a/src/sentry/apidocs/examples/ownership_examples.py b/src/sentry/apidocs/examples/ownership_examples.py index 025f178a516dae..a0ab4dbff29ef2 100644 --- a/src/sentry/apidocs/examples/ownership_examples.py +++ b/src/sentry/apidocs/examples/ownership_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample GET_PROJECT_OWNERSHIP = [ diff --git a/src/sentry/apidocs/examples/project_examples.py b/src/sentry/apidocs/examples/project_examples.py index 460b6d9f394c13..49abc6948a80be 100644 --- a/src/sentry/apidocs/examples/project_examples.py +++ b/src/sentry/apidocs/examples/project_examples.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from drf_spectacular.utils import OpenApiExample diff --git a/src/sentry/apidocs/examples/release_threshold_examples.py b/src/sentry/apidocs/examples/release_threshold_examples.py index 0f63ed4809e6d7..99dc10e8006d0c 100644 --- a/src/sentry/apidocs/examples/release_threshold_examples.py +++ b/src/sentry/apidocs/examples/release_threshold_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample from .project_examples import BASE_PROJECT diff --git a/src/sentry/apidocs/examples/replay_examples.py b/src/sentry/apidocs/examples/replay_examples.py index 7dc96ad4888b9e..8a6bbe7fe8e620 100644 --- a/src/sentry/apidocs/examples/replay_examples.py +++ b/src/sentry/apidocs/examples/replay_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample replay_example = { diff --git a/src/sentry/apidocs/examples/scim_examples.py b/src/sentry/apidocs/examples/scim_examples.py index 14ea7fe0beaf6c..b5277ed9397826 100644 --- a/src/sentry/apidocs/examples/scim_examples.py +++ b/src/sentry/apidocs/examples/scim_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample diff --git a/src/sentry/apidocs/examples/sentry_app_examples.py b/src/sentry/apidocs/examples/sentry_app_examples.py index 6c784f65127938..4a65057b0fd170 100644 --- a/src/sentry/apidocs/examples/sentry_app_examples.py +++ b/src/sentry/apidocs/examples/sentry_app_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample diff --git a/src/sentry/apidocs/examples/session_examples.py b/src/sentry/apidocs/examples/session_examples.py index 3be5a176d8c307..bf6f51be430a22 100644 --- a/src/sentry/apidocs/examples/session_examples.py +++ b/src/sentry/apidocs/examples/session_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample diff --git a/src/sentry/apidocs/examples/tags_examples.py b/src/sentry/apidocs/examples/tags_examples.py index de4cf843ea0dc5..51aa62f999909b 100644 --- a/src/sentry/apidocs/examples/tags_examples.py +++ b/src/sentry/apidocs/examples/tags_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample SIMPLE_TAG_DETAILS = { diff --git a/src/sentry/apidocs/examples/team_examples.py b/src/sentry/apidocs/examples/team_examples.py index 53dd4470822417..ea2c19c03e3444 100644 --- a/src/sentry/apidocs/examples/team_examples.py +++ b/src/sentry/apidocs/examples/team_examples.py @@ -1,3 +1,4 @@ +from typing import int from copy import deepcopy from drf_spectacular.utils import OpenApiExample diff --git a/src/sentry/apidocs/examples/user_examples.py b/src/sentry/apidocs/examples/user_examples.py index 6a7c21e3e4e240..06e1b9c5e202fb 100644 --- a/src/sentry/apidocs/examples/user_examples.py +++ b/src/sentry/apidocs/examples/user_examples.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample diff --git a/src/sentry/apidocs/extensions.py b/src/sentry/apidocs/extensions.py index 3e5480dd85e8f1..2f8f72c9b1c975 100644 --- a/src/sentry/apidocs/extensions.py +++ b/src/sentry/apidocs/extensions.py @@ -1,4 +1,4 @@ -from typing import Any, get_type_hints +from typing import Any, get_type_hints, int from drf_spectacular.extensions import ( OpenApiAuthenticationExtension, diff --git a/src/sentry/apidocs/hooks.py b/src/sentry/apidocs/hooks.py index 4acea4cb0de22c..64c3428a9811be 100644 --- a/src/sentry/apidocs/hooks.py +++ b/src/sentry/apidocs/hooks.py @@ -3,7 +3,7 @@ import re from collections import OrderedDict from collections.abc import Mapping -from typing import Any, Literal, TypedDict +from typing import Any, Literal, TypedDict, int from drf_spectacular.generators import EndpointEnumerator, SchemaGenerator diff --git a/src/sentry/apidocs/parameters.py b/src/sentry/apidocs/parameters.py index 163013551e241a..50fa52fc67898b 100644 --- a/src/sentry/apidocs/parameters.py +++ b/src/sentry/apidocs/parameters.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from drf_spectacular.plumbing import build_array_type, build_basic_type from drf_spectacular.types import OpenApiTypes diff --git a/src/sentry/apidocs/schema.py b/src/sentry/apidocs/schema.py index 25b046c53d3ae5..d00353a031a814 100644 --- a/src/sentry/apidocs/schema.py +++ b/src/sentry/apidocs/schema.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.openapi import AutoSchema from drf_spectacular.plumbing import get_doc diff --git a/src/sentry/apidocs/spectacular_ports.py b/src/sentry/apidocs/spectacular_ports.py index fbcef035a4ea80..943eab536dea9e 100644 --- a/src/sentry/apidocs/spectacular_ports.py +++ b/src/sentry/apidocs/spectacular_ports.py @@ -34,7 +34,7 @@ from collections import defaultdict from enum import Enum from types import UnionType -from typing import Any, Literal, Union +from typing import Any, Literal, Union, int from typing import get_type_hints as _get_type_hints from typing import is_typeddict diff --git a/src/sentry/apidocs/utils.py b/src/sentry/apidocs/utils.py index 19f42c07a98674..9082cf56357764 100644 --- a/src/sentry/apidocs/utils.py +++ b/src/sentry/apidocs/utils.py @@ -5,7 +5,7 @@ import typing from collections.abc import Generator from contextlib import contextmanager -from typing import Any +from typing import int, Any from drf_spectacular.plumbing import UnableToProceedError diff --git a/src/sentry/app.py b/src/sentry/app.py index ee7a195f78bc8b..30077684871c52 100644 --- a/src/sentry/app.py +++ b/src/sentry/app.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import contextlib from collections.abc import Generator diff --git a/src/sentry/assistant/__init__.py b/src/sentry/assistant/__init__.py index 73c270a80c552f..c79a9c6fefc666 100644 --- a/src/sentry/assistant/__init__.py +++ b/src/sentry/assistant/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .guides import GUIDES from .manager import AssistantManager diff --git a/src/sentry/assistant/guides.py b/src/sentry/assistant/guides.py index 88e794940f7878..89948e5d5ff72a 100644 --- a/src/sentry/assistant/guides.py +++ b/src/sentry/assistant/guides.py @@ -6,6 +6,7 @@ # Guide UI elements are configured on the frontend in `getGuideContent.tsx`. +from typing import int GUIDES = { "issue": 1, "issue_stream": 3, diff --git a/src/sentry/assistant/manager.py b/src/sentry/assistant/manager.py index fb6bda69d7d5e0..e3b68247e0a207 100644 --- a/src/sentry/assistant/manager.py +++ b/src/sentry/assistant/manager.py @@ -1,3 +1,4 @@ +from typing import int class AssistantManager: def __init__(self): self._guides = {} diff --git a/src/sentry/attachments/__init__.py b/src/sentry/attachments/__init__.py index 9eabaa957d77ad..aa2c35fe3590cc 100644 --- a/src/sentry/attachments/__init__.py +++ b/src/sentry/attachments/__init__.py @@ -10,7 +10,7 @@ ] from collections.abc import Generator -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/attachments/base.py b/src/sentry/attachments/base.py index 8e555ec19c2461..9cc3fb125b07ad 100644 --- a/src/sentry/attachments/base.py +++ b/src/sentry/attachments/base.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator import zstandard diff --git a/src/sentry/attachments/default.py b/src/sentry/attachments/default.py index 13ef0f27ec9ea9..cec281954bb184 100644 --- a/src/sentry/attachments/default.py +++ b/src/sentry/attachments/default.py @@ -1,3 +1,4 @@ +from typing import int from sentry.cache import default_cache from .base import BaseAttachmentCache diff --git a/src/sentry/attachments/redis.py b/src/sentry/attachments/redis.py index 6f76d4902f20af..40198886714027 100644 --- a/src/sentry/attachments/redis.py +++ b/src/sentry/attachments/redis.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.conf import settings diff --git a/src/sentry/audit_log/__init__.py b/src/sentry/audit_log/__init__.py index 147dde6807706c..a3b3def44ec731 100644 --- a/src/sentry/audit_log/__init__.py +++ b/src/sentry/audit_log/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.audit_log.manager import * # NOQA from sentry.audit_log.register import default_manager diff --git a/src/sentry/audit_log/events.py b/src/sentry/audit_log/events.py index 0ac39f9be9867f..806194c6faef13 100644 --- a/src/sentry/audit_log/events.py +++ b/src/sentry/audit_log/events.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.audit_log.manager import AuditLogEvent from sentry.utils.strings import truncatechars diff --git a/src/sentry/audit_log/manager.py b/src/sentry/audit_log/manager.py index fa2e0fac0b99f1..10d01948094052 100644 --- a/src/sentry/audit_log/manager.py +++ b/src/sentry/audit_log/manager.py @@ -1,7 +1,7 @@ from __future__ import annotations from dataclasses import dataclass -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING if TYPE_CHECKING: from sentry.models.auditlogentry import AuditLogEntry diff --git a/src/sentry/audit_log/register.py b/src/sentry/audit_log/register.py index 55a9fd3cf404f8..1a851601b935d3 100644 --- a/src/sentry/audit_log/register.py +++ b/src/sentry/audit_log/register.py @@ -1,3 +1,4 @@ +from typing import int from sentry.audit_log import events from sentry.audit_log.manager import AuditLogEvent, AuditLogEventManager diff --git a/src/sentry/audit_log/services/log/__init__.py b/src/sentry/audit_log/services/log/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/audit_log/services/log/__init__.py +++ b/src/sentry/audit_log/services/log/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/audit_log/services/log/impl.py b/src/sentry/audit_log/services/log/impl.py index 72dff994faf99b..878af02fed5f3b 100644 --- a/src/sentry/audit_log/services/log/impl.py +++ b/src/sentry/audit_log/services/log/impl.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import datetime import logging diff --git a/src/sentry/audit_log/services/log/model.py b/src/sentry/audit_log/services/log/model.py index 4f1642d36d9a59..57d8d5afb0fff1 100644 --- a/src/sentry/audit_log/services/log/model.py +++ b/src/sentry/audit_log/services/log/model.py @@ -5,7 +5,7 @@ import datetime from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.hybridcloud.rpc import DEFAULT_DATE, RpcModel diff --git a/src/sentry/audit_log/services/log/service.py b/src/sentry/audit_log/services/log/service.py index 6b2aaae1ddcf77..b28320262ce5cc 100644 --- a/src/sentry/audit_log/services/log/service.py +++ b/src/sentry/audit_log/services/log/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int import abc from sentry.hybridcloud.rpc import silo_mode_delegation diff --git a/src/sentry/auth/__init__.py b/src/sentry/auth/__init__.py index 45f1d1d9bbc144..323dfa3497e501 100644 --- a/src/sentry/auth/__init__.py +++ b/src/sentry/auth/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .manager import ProviderManager manager = ProviderManager() diff --git a/src/sentry/auth/access.py b/src/sentry/auth/access.py index 0df1596cddc728..13f924e01d688f 100644 --- a/src/sentry/auth/access.py +++ b/src/sentry/auth/access.py @@ -4,7 +4,7 @@ from collections.abc import Collection, Iterable, Mapping from dataclasses import dataclass from functools import cached_property -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/auth/authenticators/__init__.py b/src/sentry/auth/authenticators/__init__.py index 20576ab32a6e30..822cee6f62132e 100644 --- a/src/sentry/auth/authenticators/__init__.py +++ b/src/sentry/auth/authenticators/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from .base import AuthenticatorInterface from .recovery_code import RecoveryCodeInterface diff --git a/src/sentry/auth/authenticators/base.py b/src/sentry/auth/authenticators/base.py index 30efd2336e8afb..a161ada7546023 100644 --- a/src/sentry/auth/authenticators/base.py +++ b/src/sentry/auth/authenticators/base.py @@ -1,7 +1,7 @@ from __future__ import annotations from enum import Enum -from typing import TYPE_CHECKING, Any, Literal, Self +from typing import TYPE_CHECKING, Any, Literal, Self, int from django.core.cache import cache from django.http import HttpRequest diff --git a/src/sentry/auth/authenticators/recovery_code.py b/src/sentry/auth/authenticators/recovery_code.py index 04c66503fc0f5f..283fa636531982 100644 --- a/src/sentry/auth/authenticators/recovery_code.py +++ b/src/sentry/auth/authenticators/recovery_code.py @@ -5,7 +5,7 @@ from binascii import hexlify from hashlib import sha1 from os import urandom -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.utils.translation import gettext_lazy as _ diff --git a/src/sentry/auth/authenticators/sms.py b/src/sentry/auth/authenticators/sms.py index afcef5cd501433..4fb0e427779d37 100644 --- a/src/sentry/auth/authenticators/sms.py +++ b/src/sentry/auth/authenticators/sms.py @@ -2,7 +2,7 @@ import logging from hashlib import md5 -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.http.request import HttpRequest from django.utils.functional import classproperty diff --git a/src/sentry/auth/authenticators/totp.py b/src/sentry/auth/authenticators/totp.py index be4555fcc29907..a7a62550e84d78 100644 --- a/src/sentry/auth/authenticators/totp.py +++ b/src/sentry/auth/authenticators/totp.py @@ -1,3 +1,4 @@ +from typing import int from django.utils.translation import gettext_lazy as _ from .base import OtpMixin diff --git a/src/sentry/auth/authenticators/u2f.py b/src/sentry/auth/authenticators/u2f.py index 3fbc6427fbb773..8e9ff6664521cb 100644 --- a/src/sentry/auth/authenticators/u2f.py +++ b/src/sentry/auth/authenticators/u2f.py @@ -4,7 +4,7 @@ from base64 import urlsafe_b64encode from functools import cached_property from time import time -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from urllib.parse import urlparse import orjson diff --git a/src/sentry/auth/elevated_mode.py b/src/sentry/auth/elevated_mode.py index 188a5f5524e06d..03ef0923ccb7d1 100644 --- a/src/sentry/auth/elevated_mode.py +++ b/src/sentry/auth/elevated_mode.py @@ -1,7 +1,7 @@ from abc import ABC, abstractmethod from datetime import datetime from enum import Enum -from typing import Any +from typing import int, Any from django.contrib.auth.models import AnonymousUser from django.http import HttpResponse diff --git a/src/sentry/auth/email.py b/src/sentry/auth/email.py index dff490a775fcf8..af1cbc35c3f825 100644 --- a/src/sentry/auth/email.py +++ b/src/sentry/auth/email.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import abc from collections.abc import Collection, Iterable diff --git a/src/sentry/auth/exceptions.py b/src/sentry/auth/exceptions.py index 729326aeaa43a0..5162fce2bef408 100644 --- a/src/sentry/auth/exceptions.py +++ b/src/sentry/auth/exceptions.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["ProviderNotRegistered"] from sentry.exceptions import NotRegistered diff --git a/src/sentry/auth/helper.py b/src/sentry/auth/helper.py index 60913af29170ca..19f26873da8be7 100644 --- a/src/sentry/auth/helper.py +++ b/src/sentry/auth/helper.py @@ -4,7 +4,7 @@ from collections.abc import Collection, Mapping, Sequence from dataclasses import dataclass from functools import cached_property -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from uuid import uuid4 import orjson diff --git a/src/sentry/auth/idpmigration.py b/src/sentry/auth/idpmigration.py index 706a2f3c76507f..d819537e319d28 100644 --- a/src/sentry/auth/idpmigration.py +++ b/src/sentry/auth/idpmigration.py @@ -2,7 +2,7 @@ from dataclasses import dataclass from datetime import timedelta -from typing import Any +from typing import int, Any import orjson from django.conf import settings diff --git a/src/sentry/auth/manager.py b/src/sentry/auth/manager.py index ec4146261de75d..46f1a2d33de2cb 100644 --- a/src/sentry/auth/manager.py +++ b/src/sentry/auth/manager.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Iterator -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from .exceptions import ProviderNotRegistered diff --git a/src/sentry/auth/partnership_configs.py b/src/sentry/auth/partnership_configs.py index 616e4eeccc044e..b7a6e6b8f069d6 100644 --- a/src/sentry/auth/partnership_configs.py +++ b/src/sentry/auth/partnership_configs.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum diff --git a/src/sentry/auth/password_validation.py b/src/sentry/auth/password_validation.py index 0f4694220c4cde..c231327d859770 100644 --- a/src/sentry/auth/password_validation.py +++ b/src/sentry/auth/password_validation.py @@ -1,6 +1,6 @@ import logging from hashlib import sha1 -from typing import Any +from typing import int, Any import requests from django.conf import settings diff --git a/src/sentry/auth/provider.py b/src/sentry/auth/provider.py index 84cf287b3de44b..125bef335d2c24 100644 --- a/src/sentry/auth/provider.py +++ b/src/sentry/auth/provider.py @@ -4,7 +4,7 @@ import logging from collections import namedtuple from collections.abc import Callable, Mapping, Sequence -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.http.request import HttpRequest from django.utils.encoding import force_str diff --git a/src/sentry/auth/providers/dummy.py b/src/sentry/auth/providers/dummy.py index 15b2292838e013..5835d8bc11746d 100644 --- a/src/sentry/auth/providers/dummy.py +++ b/src/sentry/auth/providers/dummy.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from django.http import HttpRequest from django.http.response import HttpResponse, HttpResponseBase diff --git a/src/sentry/auth/providers/fly/apps.py b/src/sentry/auth/providers/fly/apps.py index dd02c9eb0a6b23..33e95a497a6e76 100644 --- a/src/sentry/auth/providers/fly/apps.py +++ b/src/sentry/auth/providers/fly/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/auth/providers/fly/client.py b/src/sentry/auth/providers/fly/client.py index 9d8c423aea3ac0..2b68db099f2c03 100644 --- a/src/sentry/auth/providers/fly/client.py +++ b/src/sentry/auth/providers/fly/client.py @@ -1,7 +1,7 @@ from __future__ import annotations from types import TracebackType -from typing import Any +from typing import int, Any import orjson from requests.exceptions import RequestException diff --git a/src/sentry/auth/providers/fly/constants.py b/src/sentry/auth/providers/fly/constants.py index 99eb4585cb7da7..e3a514480d24df 100644 --- a/src/sentry/auth/providers/fly/constants.py +++ b/src/sentry/auth/providers/fly/constants.py @@ -1,3 +1,4 @@ +from typing import int AUTHORIZE_URL = "https://api.fly.io/oauth/authorize" ACCESS_TOKEN_URL = "https://api.fly.io/oauth/token" diff --git a/src/sentry/auth/providers/fly/provider.py b/src/sentry/auth/providers/fly/provider.py index 204310f6d86470..17f5243aa1fea8 100644 --- a/src/sentry/auth/providers/fly/provider.py +++ b/src/sentry/auth/providers/fly/provider.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Mapping -from typing import Any +from typing import int, Any from django.http.request import HttpRequest diff --git a/src/sentry/auth/providers/fly/views.py b/src/sentry/auth/providers/fly/views.py index d5642d80dfd57e..5933d9e2f129ec 100644 --- a/src/sentry/auth/providers/fly/views.py +++ b/src/sentry/auth/providers/fly/views.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.http import HttpRequest from django.http.response import HttpResponseBase diff --git a/src/sentry/auth/providers/github/apps.py b/src/sentry/auth/providers/github/apps.py index 79ea824c67a038..c9ef2263d1c10b 100644 --- a/src/sentry/auth/providers/github/apps.py +++ b/src/sentry/auth/providers/github/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/auth/providers/github/client.py b/src/sentry/auth/providers/github/client.py index e737d611ede1f3..1efa6aae95755e 100644 --- a/src/sentry/auth/providers/github/client.py +++ b/src/sentry/auth/providers/github/client.py @@ -1,7 +1,7 @@ from __future__ import annotations from types import TracebackType -from typing import Any +from typing import int, Any import orjson from requests.exceptions import RequestException diff --git a/src/sentry/auth/providers/github/constants.py b/src/sentry/auth/providers/github/constants.py index 4086ac7b733899..9b04ce6adf961b 100644 --- a/src/sentry/auth/providers/github/constants.py +++ b/src/sentry/auth/providers/github/constants.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings CLIENT_ID = settings.GITHUB_APP_ID diff --git a/src/sentry/auth/providers/github/provider.py b/src/sentry/auth/providers/github/provider.py index f7f46bb76f368d..8abc39415e1dc6 100644 --- a/src/sentry/auth/providers/github/provider.py +++ b/src/sentry/auth/providers/github/provider.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Mapping -from typing import Any +from typing import int, Any from django.http.request import HttpRequest diff --git a/src/sentry/auth/providers/github/views.py b/src/sentry/auth/providers/github/views.py index e75af0cab48332..9b653340343a02 100644 --- a/src/sentry/auth/providers/github/views.py +++ b/src/sentry/auth/providers/github/views.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django import forms from django.http import HttpRequest diff --git a/src/sentry/auth/providers/google/apps.py b/src/sentry/auth/providers/google/apps.py index 8b9b7b26e8b306..d1a6d4254bc03b 100644 --- a/src/sentry/auth/providers/google/apps.py +++ b/src/sentry/auth/providers/google/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/auth/providers/google/constants.py b/src/sentry/auth/providers/google/constants.py index 9ede232243d43a..a10f7ad31dfa8c 100644 --- a/src/sentry/auth/providers/google/constants.py +++ b/src/sentry/auth/providers/google/constants.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings AUTHORIZE_URL = "https://accounts.google.com/o/oauth2/auth" diff --git a/src/sentry/auth/providers/google/provider.py b/src/sentry/auth/providers/google/provider.py index 5f10f917bbaefe..42781be60c2331 100644 --- a/src/sentry/auth/providers/google/provider.py +++ b/src/sentry/auth/providers/google/provider.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Mapping -from typing import Any +from typing import int, Any from django.http import HttpRequest diff --git a/src/sentry/auth/providers/google/views.py b/src/sentry/auth/providers/google/views.py index 87ffab557dd104..afbb7ad3e2e6bb 100644 --- a/src/sentry/auth/providers/google/views.py +++ b/src/sentry/auth/providers/google/views.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any import orjson from django.http import HttpRequest diff --git a/src/sentry/auth/providers/oauth2.py b/src/sentry/auth/providers/oauth2.py index 3f11932652e1a4..3f1eb7b3dc683d 100644 --- a/src/sentry/auth/providers/oauth2.py +++ b/src/sentry/auth/providers/oauth2.py @@ -5,7 +5,7 @@ import secrets from collections.abc import Mapping from time import time -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from urllib.parse import parse_qsl, urlencode import orjson diff --git a/src/sentry/auth/providers/saml2/activedirectory/apps.py b/src/sentry/auth/providers/saml2/activedirectory/apps.py index cf26ccc4ee72ec..18f5cd75045493 100644 --- a/src/sentry/auth/providers/saml2/activedirectory/apps.py +++ b/src/sentry/auth/providers/saml2/activedirectory/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig ACTIVE_DIRECTORY_PROVIDER_NAME = "active-directory" diff --git a/src/sentry/auth/providers/saml2/activedirectory/provider.py b/src/sentry/auth/providers/saml2/activedirectory/provider.py index d830cbae734e93..a88e79634cebe1 100644 --- a/src/sentry/auth/providers/saml2/activedirectory/provider.py +++ b/src/sentry/auth/providers/saml2/activedirectory/provider.py @@ -1,3 +1,4 @@ +from typing import int from sentry.auth.providers.saml2.generic.provider import GenericSAML2Provider diff --git a/src/sentry/auth/providers/saml2/auth0/apps.py b/src/sentry/auth/providers/saml2/auth0/apps.py index 62e46535acc44a..215018551db6ec 100644 --- a/src/sentry/auth/providers/saml2/auth0/apps.py +++ b/src/sentry/auth/providers/saml2/auth0/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/auth/providers/saml2/auth0/provider.py b/src/sentry/auth/providers/saml2/auth0/provider.py index 08b66a138d31f3..193daa883ccba7 100644 --- a/src/sentry/auth/providers/saml2/auth0/provider.py +++ b/src/sentry/auth/providers/saml2/auth0/provider.py @@ -1,3 +1,4 @@ +from typing import int from sentry.auth.providers.saml2.forms import URLMetadataForm from sentry.auth.providers.saml2.provider import Attributes, SAML2Provider from sentry.auth.providers.saml2.views import make_simple_setup diff --git a/src/sentry/auth/providers/saml2/forms.py b/src/sentry/auth/providers/saml2/forms.py index a4d5140ab68803..b4be3277f4c06d 100644 --- a/src/sentry/auth/providers/saml2/forms.py +++ b/src/sentry/auth/providers/saml2/forms.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django import forms from django.forms.utils import ErrorList diff --git a/src/sentry/auth/providers/saml2/generic/apps.py b/src/sentry/auth/providers/saml2/generic/apps.py index 398ffcad44aa4b..2d5e239177e803 100644 --- a/src/sentry/auth/providers/saml2/generic/apps.py +++ b/src/sentry/auth/providers/saml2/generic/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/auth/providers/saml2/generic/provider.py b/src/sentry/auth/providers/saml2/generic/provider.py index 5df85ee4a8a03f..eef7a7f6b2b33e 100644 --- a/src/sentry/auth/providers/saml2/generic/provider.py +++ b/src/sentry/auth/providers/saml2/generic/provider.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Callable diff --git a/src/sentry/auth/providers/saml2/generic/views.py b/src/sentry/auth/providers/saml2/generic/views.py index edcedb8edc9d3c..d977c235f1372e 100644 --- a/src/sentry/auth/providers/saml2/generic/views.py +++ b/src/sentry/auth/providers/saml2/generic/views.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.forms import Form from django.http.request import HttpRequest diff --git a/src/sentry/auth/providers/saml2/jumpcloud/apps.py b/src/sentry/auth/providers/saml2/jumpcloud/apps.py index e07a51a3036577..26bffedb38e152 100644 --- a/src/sentry/auth/providers/saml2/jumpcloud/apps.py +++ b/src/sentry/auth/providers/saml2/jumpcloud/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/auth/providers/saml2/jumpcloud/provider.py b/src/sentry/auth/providers/saml2/jumpcloud/provider.py index af26125137fbd7..23da3f5d1e29bb 100644 --- a/src/sentry/auth/providers/saml2/jumpcloud/provider.py +++ b/src/sentry/auth/providers/saml2/jumpcloud/provider.py @@ -1,3 +1,4 @@ +from typing import int from sentry.auth.providers.saml2.generic.provider import GenericSAML2Provider diff --git a/src/sentry/auth/providers/saml2/okta/apps.py b/src/sentry/auth/providers/saml2/okta/apps.py index b4c29bd5d06053..5d4f681b0d5214 100644 --- a/src/sentry/auth/providers/saml2/okta/apps.py +++ b/src/sentry/auth/providers/saml2/okta/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/auth/providers/saml2/okta/provider.py b/src/sentry/auth/providers/saml2/okta/provider.py index 1daffdbcd4aabb..5d4a9a4a0cf3d5 100644 --- a/src/sentry/auth/providers/saml2/okta/provider.py +++ b/src/sentry/auth/providers/saml2/okta/provider.py @@ -1,3 +1,4 @@ +from typing import int from sentry.auth.providers.saml2.forms import URLMetadataForm from sentry.auth.providers.saml2.provider import Attributes, SAML2Provider from sentry.auth.providers.saml2.views import make_simple_setup diff --git a/src/sentry/auth/providers/saml2/onelogin/apps.py b/src/sentry/auth/providers/saml2/onelogin/apps.py index 07ac19910be1ef..be37c1f366c252 100644 --- a/src/sentry/auth/providers/saml2/onelogin/apps.py +++ b/src/sentry/auth/providers/saml2/onelogin/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/auth/providers/saml2/onelogin/provider.py b/src/sentry/auth/providers/saml2/onelogin/provider.py index 0c047acd086746..dcf1ee0935bf9f 100644 --- a/src/sentry/auth/providers/saml2/onelogin/provider.py +++ b/src/sentry/auth/providers/saml2/onelogin/provider.py @@ -1,3 +1,4 @@ +from typing import int from django import forms from sentry.auth.providers.saml2.forms import URLMetadataForm diff --git a/src/sentry/auth/providers/saml2/provider.py b/src/sentry/auth/providers/saml2/provider.py index 6bf78f5420ecb9..c0de4b39a543e6 100644 --- a/src/sentry/auth/providers/saml2/provider.py +++ b/src/sentry/auth/providers/saml2/provider.py @@ -2,7 +2,7 @@ import abc from collections.abc import Mapping -from typing import Any, NotRequired, TypedDict, _TypedDict +from typing import Any, NotRequired, TypedDict, _TypedDict, int from urllib.parse import urlparse import sentry_sdk diff --git a/src/sentry/auth/providers/saml2/rippling/apps.py b/src/sentry/auth/providers/saml2/rippling/apps.py index 8ea3dea93c6c2c..c80195ee7b9f22 100644 --- a/src/sentry/auth/providers/saml2/rippling/apps.py +++ b/src/sentry/auth/providers/saml2/rippling/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/auth/providers/saml2/rippling/provider.py b/src/sentry/auth/providers/saml2/rippling/provider.py index deaafad2d1f776..cba7b962fcb45d 100644 --- a/src/sentry/auth/providers/saml2/rippling/provider.py +++ b/src/sentry/auth/providers/saml2/rippling/provider.py @@ -1,3 +1,4 @@ +from typing import int from django.http.request import HttpRequest from django.http.response import HttpResponseBase diff --git a/src/sentry/auth/providers/saml2/views.py b/src/sentry/auth/providers/saml2/views.py index dbe8a2b54c8494..8fa4375301dbbe 100644 --- a/src/sentry/auth/providers/saml2/views.py +++ b/src/sentry/auth/providers/saml2/views.py @@ -1,3 +1,4 @@ +from typing import int from django import forms from django.http.request import HttpRequest from django.http.response import HttpResponseBase diff --git a/src/sentry/auth/services/access/impl.py b/src/sentry/auth/services/access/impl.py index 2814b8d00493d7..3bb6a2727270ab 100644 --- a/src/sentry/auth/services/access/impl.py +++ b/src/sentry/auth/services/access/impl.py @@ -1,3 +1,4 @@ +from typing import int from sentry import roles from sentry.auth.services.access.service import AccessService from sentry.auth.services.auth import RpcAuthIdentity, RpcAuthProvider diff --git a/src/sentry/auth/services/access/service.py b/src/sentry/auth/services/access/service.py index f153a8c7c138f8..f1a818fb60dbb8 100644 --- a/src/sentry/auth/services/access/service.py +++ b/src/sentry/auth/services/access/service.py @@ -1,3 +1,4 @@ +from typing import int import abc from datetime import timedelta diff --git a/src/sentry/auth/services/auth/__init__.py b/src/sentry/auth/services/auth/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/auth/services/auth/__init__.py +++ b/src/sentry/auth/services/auth/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/auth/services/auth/impl.py b/src/sentry/auth/services/auth/impl.py index b6f5929d33d25e..686b82c4ec343d 100644 --- a/src/sentry/auth/services/auth/impl.py +++ b/src/sentry/auth/services/auth/impl.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from django.db import router, transaction from django.db.models import Count, F diff --git a/src/sentry/auth/services/auth/model.py b/src/sentry/auth/services/auth/model.py index 7bae2ac78bd9b6..b94883f3b586fd 100644 --- a/src/sentry/auth/services/auth/model.py +++ b/src/sentry/auth/services/auth/model.py @@ -6,7 +6,7 @@ import contextlib import datetime from collections.abc import Collection, Generator, Mapping -from typing import TYPE_CHECKING, Any, Optional, Union +from typing import TYPE_CHECKING, Any, Optional, Union, int from django.http.request import HttpRequest from pydantic.fields import Field diff --git a/src/sentry/auth/services/auth/serial.py b/src/sentry/auth/services/auth/serial.py index 722649ed210584..7b39216d75915c 100644 --- a/src/sentry/auth/services/auth/serial.py +++ b/src/sentry/auth/services/auth/serial.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.auth.services.auth import ( RpcApiKey, diff --git a/src/sentry/auth/services/auth/service.py b/src/sentry/auth/services/auth/service.py index c8b19cb75e678c..5f97a0cd767f54 100644 --- a/src/sentry/auth/services/auth/service.py +++ b/src/sentry/auth/services/auth/service.py @@ -5,7 +5,7 @@ import abc from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.auth.services.auth import RpcApiKey, RpcAuthProvider, RpcOrganizationAuthConfig from sentry.hybridcloud.rpc.service import RpcService, rpc_method diff --git a/src/sentry/auth/services/orgauthtoken/__init__.py b/src/sentry/auth/services/orgauthtoken/__init__.py index 8404f443605b9c..853ba1a02ab19d 100644 --- a/src/sentry/auth/services/orgauthtoken/__init__.py +++ b/src/sentry/auth/services/orgauthtoken/__init__.py @@ -1 +1,2 @@ +from typing import int from .service import * # noqa diff --git a/src/sentry/auth/services/orgauthtoken/impl.py b/src/sentry/auth/services/orgauthtoken/impl.py index ea9673f7377eb6..63498d29687293 100644 --- a/src/sentry/auth/services/orgauthtoken/impl.py +++ b/src/sentry/auth/services/orgauthtoken/impl.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.auth.services.orgauthtoken.service import OrgAuthTokenService from sentry.hybridcloud.models.outbox import RegionOutbox, outbox_context diff --git a/src/sentry/auth/services/orgauthtoken/model.py b/src/sentry/auth/services/orgauthtoken/model.py index 67a1f73113d903..c166ef8e3c706e 100644 --- a/src/sentry/auth/services/orgauthtoken/model.py +++ b/src/sentry/auth/services/orgauthtoken/model.py @@ -1,3 +1,4 @@ +from typing import int import datetime from pydantic import Field diff --git a/src/sentry/auth/services/orgauthtoken/serial.py b/src/sentry/auth/services/orgauthtoken/serial.py index c279e4255cd27e..3695bdb0de64fd 100644 --- a/src/sentry/auth/services/orgauthtoken/serial.py +++ b/src/sentry/auth/services/orgauthtoken/serial.py @@ -1,3 +1,4 @@ +from typing import int from sentry.auth.services.orgauthtoken.model import RpcOrgAuthToken from sentry.models.orgauthtoken import OrgAuthToken diff --git a/src/sentry/auth/services/orgauthtoken/service.py b/src/sentry/auth/services/orgauthtoken/service.py index c7bd3ba6d8e19c..91002383eb4837 100644 --- a/src/sentry/auth/services/orgauthtoken/service.py +++ b/src/sentry/auth/services/orgauthtoken/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from abc import abstractmethod from datetime import datetime diff --git a/src/sentry/auth/staff.py b/src/sentry/auth/staff.py index e7dfd4f88f85e0..24f2492b84f321 100644 --- a/src/sentry/auth/staff.py +++ b/src/sentry/auth/staff.py @@ -5,7 +5,7 @@ import logging from collections.abc import Iterable from datetime import datetime, timedelta, timezone -from typing import Any, Final +from typing import Any, Final, int from django.conf import settings from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/auth/store.py b/src/sentry/auth/store.py index 73bd0a887a49c2..e7f3c92b051494 100644 --- a/src/sentry/auth/store.py +++ b/src/sentry/auth/store.py @@ -1,3 +1,4 @@ +from typing import int from sentry.pipeline.store import PipelineSessionStore from sentry.utils.session_store import redis_property diff --git a/src/sentry/auth/superuser.py b/src/sentry/auth/superuser.py index 199c8776e94519..18eb6080e403f0 100644 --- a/src/sentry/auth/superuser.py +++ b/src/sentry/auth/superuser.py @@ -16,7 +16,7 @@ import logging from collections.abc import Container, Iterable from datetime import datetime, timedelta, timezone -from typing import Any, Final, Never, TypeIs, overload +from typing import Any, Final, Never, TypeIs, overload, int import orjson from django.conf import settings diff --git a/src/sentry/auth/system.py b/src/sentry/auth/system.py index 2f4a38c320d6a6..d64b48a15229db 100644 --- a/src/sentry/auth/system.py +++ b/src/sentry/auth/system.py @@ -3,7 +3,7 @@ import ipaddress import logging import secrets -from typing import Any +from typing import int, Any from django.conf import settings from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/auth/view.py b/src/sentry/auth/view.py index d44437fe4a4f1b..744bbb86ac2518 100644 --- a/src/sentry/auth/view.py +++ b/src/sentry/auth/view.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.web.frontend.base import BaseView diff --git a/src/sentry/auth_v2/apps.py b/src/sentry/auth_v2/apps.py index b9f94e7ad47f4a..5f3f1b49aedf1b 100644 --- a/src/sentry/auth_v2/apps.py +++ b/src/sentry/auth_v2/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/auth_v2/endpoints/auth_merge_user_accounts.py b/src/sentry/auth_v2/endpoints/auth_merge_user_accounts.py index 8dc4c04a79c341..7e49159d61dcc2 100644 --- a/src/sentry/auth_v2/endpoints/auth_merge_user_accounts.py +++ b/src/sentry/auth_v2/endpoints/auth_merge_user_accounts.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/auth_v2/endpoints/auth_user_merge_verification_code.py b/src/sentry/auth_v2/endpoints/auth_user_merge_verification_code.py index 5b9f37ee4610ae..66226df2c4f2da 100644 --- a/src/sentry/auth_v2/endpoints/auth_user_merge_verification_code.py +++ b/src/sentry/auth_v2/endpoints/auth_user_merge_verification_code.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/auth_v2/endpoints/base.py b/src/sentry/auth_v2/endpoints/base.py index 85c5bc44a76663..522ebb82e867a1 100644 --- a/src/sentry/auth_v2/endpoints/base.py +++ b/src/sentry/auth_v2/endpoints/base.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from rest_framework.permissions import BasePermission from rest_framework.request import Request diff --git a/src/sentry/auth_v2/endpoints/csrf.py b/src/sentry/auth_v2/endpoints/csrf.py index e275befa8eae2e..ca39c848348e9e 100644 --- a/src/sentry/auth_v2/endpoints/csrf.py +++ b/src/sentry/auth_v2/endpoints/csrf.py @@ -1,3 +1,4 @@ +from typing import int from django.middleware.csrf import rotate_token from django.utils.decorators import method_decorator from django.views.decorators.csrf import ensure_csrf_cookie diff --git a/src/sentry/auth_v2/endpoints/feature_flag_view.py b/src/sentry/auth_v2/endpoints/feature_flag_view.py index 18ecd9ca343584..541503919c1755 100644 --- a/src/sentry/auth_v2/endpoints/feature_flag_view.py +++ b/src/sentry/auth_v2/endpoints/feature_flag_view.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/auth_v2/endpoints/user_login_view.py b/src/sentry/auth_v2/endpoints/user_login_view.py index f5745c4b7db5b4..b2b9075f2de858 100644 --- a/src/sentry/auth_v2/endpoints/user_login_view.py +++ b/src/sentry/auth_v2/endpoints/user_login_view.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/auth_v2/types.py b/src/sentry/auth_v2/types.py index edb069cd382328..ac3e5d8a777cee 100644 --- a/src/sentry/auth_v2/types.py +++ b/src/sentry/auth_v2/types.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.sessions.backends.base import SessionBase diff --git a/src/sentry/auth_v2/urls.py b/src/sentry/auth_v2/urls.py index 0e4c7d1e6c0446..97c7d45ed97dbd 100644 --- a/src/sentry/auth_v2/urls.py +++ b/src/sentry/auth_v2/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from sentry.auth_v2.endpoints.auth_merge_user_accounts import AuthMergeUserAccountsEndpoint diff --git a/src/sentry/auth_v2/utils/session.py b/src/sentry/auth_v2/utils/session.py index e66a94773beaa1..28b07b171d00b6 100644 --- a/src/sentry/auth_v2/utils/session.py +++ b/src/sentry/auth_v2/utils/session.py @@ -1,6 +1,6 @@ from collections.abc import Mapping from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser from rest_framework.request import Request diff --git a/src/sentry/backup/comparators.py b/src/sentry/backup/comparators.py index 5636fbdf08c46c..6fa64151cc1a32 100644 --- a/src/sentry/backup/comparators.py +++ b/src/sentry/backup/comparators.py @@ -7,7 +7,7 @@ from collections.abc import Callable from datetime import datetime, timezone from functools import lru_cache -from typing import Any +from typing import int, Any from dateutil import parser from django.db import models diff --git a/src/sentry/backup/crypto.py b/src/sentry/backup/crypto.py index 1c9a6ded9f7425..8515a558cb61a1 100644 --- a/src/sentry/backup/crypto.py +++ b/src/sentry/backup/crypto.py @@ -4,7 +4,7 @@ import tarfile from abc import ABC, abstractmethod from functools import lru_cache -from typing import IO, Any, NamedTuple +from typing import IO, Any, NamedTuple, int import orjson from cryptography.fernet import Fernet diff --git a/src/sentry/backup/dependencies.py b/src/sentry/backup/dependencies.py index ac5d2dde497ff0..49574459f842eb 100644 --- a/src/sentry/backup/dependencies.py +++ b/src/sentry/backup/dependencies.py @@ -4,7 +4,7 @@ from dataclasses import dataclass from enum import Enum, auto, unique from functools import lru_cache -from typing import NamedTuple +from typing import int, NamedTuple from django.db import models from django.db.models import Q, UniqueConstraint diff --git a/src/sentry/backup/exports.py b/src/sentry/backup/exports.py index 8ff011dc4cc6c0..f5a9d0f81a9268 100644 --- a/src/sentry/backup/exports.py +++ b/src/sentry/backup/exports.py @@ -6,7 +6,7 @@ # we still use the one from `sentry.utils`, imported as `sentry_json` below. import json as builtin_json # noqa: S003 from abc import ABC, abstractmethod -from typing import IO +from typing import int, IO import orjson diff --git a/src/sentry/backup/findings.py b/src/sentry/backup/findings.py index 1ac7c8712749bd..689a8d2751f5d9 100644 --- a/src/sentry/backup/findings.py +++ b/src/sentry/backup/findings.py @@ -3,7 +3,7 @@ from abc import ABC, abstractmethod from dataclasses import asdict, dataclass from enum import IntEnum, auto, unique -from typing import Any, NamedTuple +from typing import Any, NamedTuple, int from sentry.utils import json diff --git a/src/sentry/backup/helpers.py b/src/sentry/backup/helpers.py index d2ebb964e3a256..1288d81c7e2b67 100644 --- a/src/sentry/backup/helpers.py +++ b/src/sentry/backup/helpers.py @@ -2,7 +2,7 @@ from datetime import UTC, datetime from enum import Enum -from typing import Generic, NamedTuple, TypeVar +from typing import Generic, NamedTuple, TypeVar, int from django.core.serializers.json import DjangoJSONEncoder from django.db import models diff --git a/src/sentry/backup/imports.py b/src/sentry/backup/imports.py index 1ce01e904119e0..984d853f1610fb 100644 --- a/src/sentry/backup/imports.py +++ b/src/sentry/backup/imports.py @@ -3,7 +3,7 @@ import logging from collections.abc import Iterator from dataclasses import dataclass -from typing import IO, Any +from typing import IO, Any, int from uuid import uuid4 import orjson diff --git a/src/sentry/backup/mixins.py b/src/sentry/backup/mixins.py index f79199b07ede61..e928bb6e69929e 100644 --- a/src/sentry/backup/mixins.py +++ b/src/sentry/backup/mixins.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.backup.dependencies import ImportKind, dependencies, get_model_name from sentry.backup.helpers import ImportFlags diff --git a/src/sentry/backup/sanitize.py b/src/sentry/backup/sanitize.py index d84f1d44c5a74a..b137def9916c7f 100644 --- a/src/sentry/backup/sanitize.py +++ b/src/sentry/backup/sanitize.py @@ -5,7 +5,7 @@ from datetime import UTC, datetime, timedelta, timezone from ipaddress import IPv4Address, IPv6Address, ip_address from random import choice, randint -from typing import Any +from typing import int, Any from urllib.parse import urlparse, urlunparse from uuid import UUID, uuid4 diff --git a/src/sentry/backup/scopes.py b/src/sentry/backup/scopes.py index 8a5678481f5995..d58eef35d56c37 100644 --- a/src/sentry/backup/scopes.py +++ b/src/sentry/backup/scopes.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum, auto, unique diff --git a/src/sentry/backup/services/import_export/__init__.py b/src/sentry/backup/services/import_export/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/backup/services/import_export/__init__.py +++ b/src/sentry/backup/services/import_export/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/backup/services/import_export/impl.py b/src/sentry/backup/services/import_export/impl.py index d3c4841b0528ab..23af444d60221f 100644 --- a/src/sentry/backup/services/import_export/impl.py +++ b/src/sentry/backup/services/import_export/impl.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int import ast import logging import traceback diff --git a/src/sentry/backup/services/import_export/model.py b/src/sentry/backup/services/import_export/model.py index 40604e3a2fb91f..61be635edea50b 100644 --- a/src/sentry/backup/services/import_export/model.py +++ b/src/sentry/backup/services/import_export/model.py @@ -5,7 +5,7 @@ from collections import defaultdict from enum import Enum, unique -from typing import Annotated, Any, Literal, Union +from typing import Annotated, Any, Literal, Union, int from pydantic import Field, StrictInt, StrictStr diff --git a/src/sentry/backup/services/import_export/service.py b/src/sentry/backup/services/import_export/service.py index 0a2391e7e4fd0a..df7c9dda2133fd 100644 --- a/src/sentry/backup/services/import_export/service.py +++ b/src/sentry/backup/services/import_export/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from abc import abstractmethod from collections.abc import Callable diff --git a/src/sentry/backup/validate.py b/src/sentry/backup/validate.py index e1e6d05a5c6706..6a8dffd7ff3b7e 100644 --- a/src/sentry/backup/validate.py +++ b/src/sentry/backup/validate.py @@ -5,7 +5,7 @@ from collections import defaultdict from copy import deepcopy from difflib import unified_diff -from typing import Any +from typing import int, Any from sentry.backup.comparators import ComparatorMap, ForeignKeyComparator, get_default_comparators from sentry.backup.dependencies import ImportKind, NormalizedModelName, PrimaryKeyMap, get_model diff --git a/src/sentry/bgtasks/api.py b/src/sentry/bgtasks/api.py index 48468bc82ed128..77126b63d147e2 100644 --- a/src/sentry/bgtasks/api.py +++ b/src/sentry/bgtasks/api.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import random diff --git a/src/sentry/bgtasks/clean_dsymcache.py b/src/sentry/bgtasks/clean_dsymcache.py index 10ab85abc47a7a..e4b65b3bbc67b2 100644 --- a/src/sentry/bgtasks/clean_dsymcache.py +++ b/src/sentry/bgtasks/clean_dsymcache.py @@ -1,3 +1,4 @@ +from typing import int from sentry.bgtasks.api import bgtask from sentry.models.debugfile import ProjectDebugFile diff --git a/src/sentry/buffer/__init__.py b/src/sentry/buffer/__init__.py index 64f349492e0dbc..83515eb49d8f40 100644 --- a/src/sentry/buffer/__init__.py +++ b/src/sentry/buffer/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/buffer/base.py b/src/sentry/buffer/base.py index e8e2d9df9ef9d9..38e7e290d1926f 100644 --- a/src/sentry/buffer/base.py +++ b/src/sentry/buffer/base.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import Any +from typing import int, Any from django.db.models import Expression, F diff --git a/src/sentry/buffer/inprocess.py b/src/sentry/buffer/inprocess.py index 845d64008bd1a3..f53a4ad02082d9 100644 --- a/src/sentry/buffer/inprocess.py +++ b/src/sentry/buffer/inprocess.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.buffer.base import Buffer from sentry.db import models diff --git a/src/sentry/buffer/redis.py b/src/sentry/buffer/redis.py index 239c2a93eb5d8b..3420017432c7fd 100644 --- a/src/sentry/buffer/redis.py +++ b/src/sentry/buffer/redis.py @@ -8,7 +8,7 @@ from datetime import date, datetime, timezone from enum import Enum from time import time -from typing import Any, TypeVar +from typing import Any, TypeVar, int import rb from django.utils.encoding import force_bytes, force_str diff --git a/src/sentry/build/_download.py b/src/sentry/build/_download.py index 932740813bbb83..3612972d68296f 100644 --- a/src/sentry/build/_download.py +++ b/src/sentry/build/_download.py @@ -2,7 +2,7 @@ import time import urllib.request -from typing import IO +from typing import int, IO def urlopen_with_retries(url: str, timeout: int = 5, retries: int = 6) -> IO[bytes]: diff --git a/src/sentry/build/_integration_docs.py b/src/sentry/build/_integration_docs.py index 879dc0d36a5c93..f2665cbcc431e8 100644 --- a/src/sentry/build/_integration_docs.py +++ b/src/sentry/build/_integration_docs.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import argparse import concurrent.futures diff --git a/src/sentry/build/_js_sdk_registry.py b/src/sentry/build/_js_sdk_registry.py index c11014ea22f44d..4ebdd7aa75943d 100644 --- a/src/sentry/build/_js_sdk_registry.py +++ b/src/sentry/build/_js_sdk_registry.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import argparse import json diff --git a/src/sentry/build/_static_assets.py b/src/sentry/build/_static_assets.py index 29c7f080c33f65..7a1b376d32cb55 100644 --- a/src/sentry/build/_static_assets.py +++ b/src/sentry/build/_static_assets.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import argparse import os diff --git a/src/sentry/build/main.py b/src/sentry/build/main.py index a23e1cbd88bced..9c4e87d9fe1229 100644 --- a/src/sentry/build/main.py +++ b/src/sentry/build/main.py @@ -1,3 +1,4 @@ +from typing import int import argparse from sentry.build import _integration_docs, _js_sdk_registry, _static_assets diff --git a/src/sentry/cache/__init__.py b/src/sentry/cache/__init__.py index 7f3bd68b78ae30..e0f727cc1073d5 100644 --- a/src/sentry/cache/__init__.py +++ b/src/sentry/cache/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["default_cache"] from django.conf import settings diff --git a/src/sentry/cache/base.py b/src/sentry/cache/base.py index 80855281e93949..a9eecf9690370d 100644 --- a/src/sentry/cache/base.py +++ b/src/sentry/cache/base.py @@ -1,5 +1,5 @@ from threading import local -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/cache/django.py b/src/sentry/cache/django.py index 1053ba67322c07..0fda04b97b909c 100644 --- a/src/sentry/cache/django.py +++ b/src/sentry/cache/django.py @@ -1,3 +1,4 @@ +from typing import int from django.core.cache import cache from .base import BaseCache diff --git a/src/sentry/cache/redis.py b/src/sentry/cache/redis.py index b3b0adbbf60848..bf1a912d0b6106 100644 --- a/src/sentry/cache/redis.py +++ b/src/sentry/cache/redis.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils import json from sentry.utils.redis import get_cluster_from_options, get_cluster_routing_client, redis_clusters diff --git a/src/sentry/charts/__init__.py b/src/sentry/charts/__init__.py index 8d99933b620d99..6e597304d564da 100644 --- a/src/sentry/charts/__init__.py +++ b/src/sentry/charts/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/charts/base.py b/src/sentry/charts/base.py index 3c625f99358885..70048d562806c3 100644 --- a/src/sentry/charts/base.py +++ b/src/sentry/charts/base.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from sentry import options from sentry.utils.services import Service diff --git a/src/sentry/charts/chartcuterie.py b/src/sentry/charts/chartcuterie.py index 3f20c44336390d..7696c00555d2c1 100644 --- a/src/sentry/charts/chartcuterie.py +++ b/src/sentry/charts/chartcuterie.py @@ -1,5 +1,5 @@ from io import BytesIO -from typing import Any +from typing import int, Any from urllib.parse import urljoin from uuid import uuid4 diff --git a/src/sentry/charts/endpoints.py b/src/sentry/charts/endpoints.py index cfa8c1b5a68506..76db1c1c469fb9 100644 --- a/src/sentry/charts/endpoints.py +++ b/src/sentry/charts/endpoints.py @@ -1,3 +1,4 @@ +from typing import int import os.path from django.http import HttpRequest diff --git a/src/sentry/charts/types.py b/src/sentry/charts/types.py index 24a499bde96d46..54122d1e46816a 100644 --- a/src/sentry/charts/types.py +++ b/src/sentry/charts/types.py @@ -1,5 +1,5 @@ from enum import Enum -from typing import TypedDict +from typing import int, TypedDict class ChartType(Enum): diff --git a/src/sentry/codecov/base.py b/src/sentry/codecov/base.py index 516fd8f07c8764..a4196b307b3157 100644 --- a/src/sentry/codecov/base.py +++ b/src/sentry/codecov/base.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from rest_framework.request import Request diff --git a/src/sentry/codecov/client.py b/src/sentry/codecov/client.py index 94ae3841a0d5d0..81400e62c16ac7 100644 --- a/src/sentry/codecov/client.py +++ b/src/sentry/codecov/client.py @@ -1,7 +1,7 @@ import datetime import logging from enum import StrEnum -from typing import TypeAlias +from typing import int, TypeAlias import requests from django.conf import settings diff --git a/src/sentry/codecov/endpoints/branches/branches.py b/src/sentry/codecov/endpoints/branches/branches.py index 81b4c00a37b267..c30d3c99818d8a 100644 --- a/src/sentry/codecov/endpoints/branches/branches.py +++ b/src/sentry/codecov/endpoints/branches/branches.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/codecov/endpoints/branches/query.py b/src/sentry/codecov/endpoints/branches/query.py index 3b4b1265d44979..e94d46c3c52b50 100644 --- a/src/sentry/codecov/endpoints/branches/query.py +++ b/src/sentry/codecov/endpoints/branches/query.py @@ -1,3 +1,4 @@ +from typing import int query = """query GetBranches( $owner: String! $repo: String! diff --git a/src/sentry/codecov/endpoints/branches/serializers.py b/src/sentry/codecov/endpoints/branches/serializers.py index 2fbea7f7894613..f95ef596332d0e 100644 --- a/src/sentry/codecov/endpoints/branches/serializers.py +++ b/src/sentry/codecov/endpoints/branches/serializers.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/codecov/endpoints/common/serializers.py b/src/sentry/codecov/endpoints/common/serializers.py index b63a69d16b1873..b7cce347c26b6f 100644 --- a/src/sentry/codecov/endpoints/common/serializers.py +++ b/src/sentry/codecov/endpoints/common/serializers.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers diff --git a/src/sentry/codecov/endpoints/repositories/query.py b/src/sentry/codecov/endpoints/repositories/query.py index 8c6e1250e2a8ae..241b3cb8bdfbb7 100644 --- a/src/sentry/codecov/endpoints/repositories/query.py +++ b/src/sentry/codecov/endpoints/repositories/query.py @@ -1,3 +1,4 @@ +from typing import int query = """query ReposForOwner( $owner: String! $filters: RepositorySetFilters! diff --git a/src/sentry/codecov/endpoints/repositories/repositories.py b/src/sentry/codecov/endpoints/repositories/repositories.py index 9012a55d1fa6b2..9386c38fb77e43 100644 --- a/src/sentry/codecov/endpoints/repositories/repositories.py +++ b/src/sentry/codecov/endpoints/repositories/repositories.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/codecov/endpoints/repositories/serializers.py b/src/sentry/codecov/endpoints/repositories/serializers.py index da60f174a22ebf..ac49a8288c9aa8 100644 --- a/src/sentry/codecov/endpoints/repositories/serializers.py +++ b/src/sentry/codecov/endpoints/repositories/serializers.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/codecov/endpoints/repository/query.py b/src/sentry/codecov/endpoints/repository/query.py index 2b306abb89fbf0..607858db0664e5 100644 --- a/src/sentry/codecov/endpoints/repository/query.py +++ b/src/sentry/codecov/endpoints/repository/query.py @@ -1,3 +1,4 @@ +from typing import int query = """query GetRepo( $owner: String! $repo: String! diff --git a/src/sentry/codecov/endpoints/repository/repository.py b/src/sentry/codecov/endpoints/repository/repository.py index 12c53c1af794a0..d3788a461cff0c 100644 --- a/src/sentry/codecov/endpoints/repository/repository.py +++ b/src/sentry/codecov/endpoints/repository/repository.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/codecov/endpoints/repository/serializers.py b/src/sentry/codecov/endpoints/repository/serializers.py index 7f259055113418..d1e3a16d1943e6 100644 --- a/src/sentry/codecov/endpoints/repository/serializers.py +++ b/src/sentry/codecov/endpoints/repository/serializers.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/codecov/endpoints/repository_token_regenerate/query.py b/src/sentry/codecov/endpoints/repository_token_regenerate/query.py index 315c832548801a..a1031dcbde7f2d 100644 --- a/src/sentry/codecov/endpoints/repository_token_regenerate/query.py +++ b/src/sentry/codecov/endpoints/repository_token_regenerate/query.py @@ -1,3 +1,4 @@ +from typing import int query = """ mutation RegenerateRepositoryUploadToken( $owner: String! diff --git a/src/sentry/codecov/endpoints/repository_token_regenerate/repository_token_regenerate.py b/src/sentry/codecov/endpoints/repository_token_regenerate/repository_token_regenerate.py index 01a1bd4b2f7a6d..33338274c4f8dc 100644 --- a/src/sentry/codecov/endpoints/repository_token_regenerate/repository_token_regenerate.py +++ b/src/sentry/codecov/endpoints/repository_token_regenerate/repository_token_regenerate.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/codecov/endpoints/repository_token_regenerate/serializers.py b/src/sentry/codecov/endpoints/repository_token_regenerate/serializers.py index 5457f94ef35150..2efc73b214f7d5 100644 --- a/src/sentry/codecov/endpoints/repository_token_regenerate/serializers.py +++ b/src/sentry/codecov/endpoints/repository_token_regenerate/serializers.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/codecov/endpoints/repository_tokens/query.py b/src/sentry/codecov/endpoints/repository_tokens/query.py index 87586bbf3c865a..5ed6af85811f5b 100644 --- a/src/sentry/codecov/endpoints/repository_tokens/query.py +++ b/src/sentry/codecov/endpoints/repository_tokens/query.py @@ -1,3 +1,4 @@ +from typing import int query = """query RepoTokensForOwner( $owner: String! $ordering: RepositoryOrdering! diff --git a/src/sentry/codecov/endpoints/repository_tokens/repository_tokens.py b/src/sentry/codecov/endpoints/repository_tokens/repository_tokens.py index c22d90772ee5bb..084a5b8b5a9930 100644 --- a/src/sentry/codecov/endpoints/repository_tokens/repository_tokens.py +++ b/src/sentry/codecov/endpoints/repository_tokens/repository_tokens.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/codecov/endpoints/repository_tokens/serializers.py b/src/sentry/codecov/endpoints/repository_tokens/serializers.py index 091c2561038826..93c8c0715dd0d6 100644 --- a/src/sentry/codecov/endpoints/repository_tokens/serializers.py +++ b/src/sentry/codecov/endpoints/repository_tokens/serializers.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/codecov/endpoints/sync_repos/query.py b/src/sentry/codecov/endpoints/sync_repos/query.py index f750180e9c2c8d..a090204336bc8f 100644 --- a/src/sentry/codecov/endpoints/sync_repos/query.py +++ b/src/sentry/codecov/endpoints/sync_repos/query.py @@ -1,3 +1,4 @@ +from typing import int mutation = """ mutation SyncRepos { syncRepos { diff --git a/src/sentry/codecov/endpoints/sync_repos/serializers.py b/src/sentry/codecov/endpoints/sync_repos/serializers.py index a88c0066716420..2b9b3aa1c87e27 100644 --- a/src/sentry/codecov/endpoints/sync_repos/serializers.py +++ b/src/sentry/codecov/endpoints/sync_repos/serializers.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/codecov/endpoints/sync_repos/sync_repos.py b/src/sentry/codecov/endpoints/sync_repos/sync_repos.py index e9fce0ecdd44e5..3fe8556aad8307 100644 --- a/src/sentry/codecov/endpoints/sync_repos/sync_repos.py +++ b/src/sentry/codecov/endpoints/sync_repos/sync_repos.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/codecov/endpoints/test_results/query.py b/src/sentry/codecov/endpoints/test_results/query.py index c50aa2922963c9..80e87ad722226e 100644 --- a/src/sentry/codecov/endpoints/test_results/query.py +++ b/src/sentry/codecov/endpoints/test_results/query.py @@ -1,3 +1,4 @@ +from typing import int query = """query GetTestResults( $owner: String! $repo: String! diff --git a/src/sentry/codecov/endpoints/test_results/serializers.py b/src/sentry/codecov/endpoints/test_results/serializers.py index e63785a74ce386..d741c625713fd4 100644 --- a/src/sentry/codecov/endpoints/test_results/serializers.py +++ b/src/sentry/codecov/endpoints/test_results/serializers.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/codecov/endpoints/test_results/test_results.py b/src/sentry/codecov/endpoints/test_results/test_results.py index 77d6ebd4b8f296..ef904162504a32 100644 --- a/src/sentry/codecov/endpoints/test_results/test_results.py +++ b/src/sentry/codecov/endpoints/test_results/test_results.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/codecov/endpoints/test_results_aggregates/query.py b/src/sentry/codecov/endpoints/test_results_aggregates/query.py index 916dfe7eb3265b..6e319d96ddc9ac 100644 --- a/src/sentry/codecov/endpoints/test_results_aggregates/query.py +++ b/src/sentry/codecov/endpoints/test_results_aggregates/query.py @@ -1,3 +1,4 @@ +from typing import int query = """query GetTestResultsAggregates( $owner: String! $repo: String! diff --git a/src/sentry/codecov/endpoints/test_results_aggregates/serializers.py b/src/sentry/codecov/endpoints/test_results_aggregates/serializers.py index 276109bda483df..56ba49cc6628e2 100644 --- a/src/sentry/codecov/endpoints/test_results_aggregates/serializers.py +++ b/src/sentry/codecov/endpoints/test_results_aggregates/serializers.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/codecov/endpoints/test_results_aggregates/test_results_aggregates.py b/src/sentry/codecov/endpoints/test_results_aggregates/test_results_aggregates.py index d6370912220791..abdf570c61eba3 100644 --- a/src/sentry/codecov/endpoints/test_results_aggregates/test_results_aggregates.py +++ b/src/sentry/codecov/endpoints/test_results_aggregates/test_results_aggregates.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/codecov/endpoints/test_suites/query.py b/src/sentry/codecov/endpoints/test_suites/query.py index 17411547a7a5ae..8f30b56f1584ff 100644 --- a/src/sentry/codecov/endpoints/test_suites/query.py +++ b/src/sentry/codecov/endpoints/test_suites/query.py @@ -1,3 +1,4 @@ +from typing import int query = """query GetTestResultsTestSuites( $owner: String! $repo: String! diff --git a/src/sentry/codecov/endpoints/test_suites/serializers.py b/src/sentry/codecov/endpoints/test_suites/serializers.py index 18109ae5b70056..b9507b159015a8 100644 --- a/src/sentry/codecov/endpoints/test_suites/serializers.py +++ b/src/sentry/codecov/endpoints/test_suites/serializers.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/codecov/endpoints/test_suites/test_suites.py b/src/sentry/codecov/endpoints/test_suites/test_suites.py index a8960a627720fc..adfbe09b0352a4 100644 --- a/src/sentry/codecov/endpoints/test_suites/test_suites.py +++ b/src/sentry/codecov/endpoints/test_suites/test_suites.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/codecov/enums.py b/src/sentry/codecov/enums.py index a78ef5472d4809..be05cb370b0361 100644 --- a/src/sentry/codecov/enums.py +++ b/src/sentry/codecov/enums.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum diff --git a/src/sentry/conduit/auth.py b/src/sentry/conduit/auth.py index a25e6408d63301..b98dd3561061b0 100644 --- a/src/sentry/conduit/auth.py +++ b/src/sentry/conduit/auth.py @@ -2,7 +2,7 @@ import binascii import time import uuid -from typing import NamedTuple +from typing import int, NamedTuple from django.conf import settings diff --git a/src/sentry/conduit/endpoints/organization_conduit_demo.py b/src/sentry/conduit/endpoints/organization_conduit_demo.py index 3c03a39de2eb04..a582bfcd6166d1 100644 --- a/src/sentry/conduit/endpoints/organization_conduit_demo.py +++ b/src/sentry/conduit/endpoints/organization_conduit_demo.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework import serializers, status from rest_framework.request import Request diff --git a/src/sentry/conduit/tasks.py b/src/sentry/conduit/tasks.py index c8f11263a2c6f1..075a74504bdccc 100644 --- a/src/sentry/conduit/tasks.py +++ b/src/sentry/conduit/tasks.py @@ -1,3 +1,4 @@ +from typing import int import datetime import logging import time diff --git a/src/sentry/conf/api_pagination_allowlist_do_not_modify.py b/src/sentry/conf/api_pagination_allowlist_do_not_modify.py index b273fc80ea56f3..4e95050553e0a9 100644 --- a/src/sentry/conf/api_pagination_allowlist_do_not_modify.py +++ b/src/sentry/conf/api_pagination_allowlist_do_not_modify.py @@ -1,3 +1,4 @@ +from typing import int """ This list is tracking old api endpoints that don't correctly implement pagination. The goal is to eventually add pagination for all and shrink this list. diff --git a/src/sentry/conf/locale.py b/src/sentry/conf/locale.py index c9fb4ff78a847e..07c41addad1269 100644 --- a/src/sentry/conf/locale.py +++ b/src/sentry/conf/locale.py @@ -1,3 +1,4 @@ +from typing import int import os import orjson diff --git a/src/sentry/conf/server.py b/src/sentry/conf/server.py index b4cfec04b4a503..a9e690926f5741 100644 --- a/src/sentry/conf/server.py +++ b/src/sentry/conf/server.py @@ -11,7 +11,7 @@ import sys from collections.abc import Callable, Mapping, MutableSequence from datetime import datetime, timedelta -from typing import Any, Final, Literal, Union, cast, overload +from typing import Any, Final, Literal, Union, cast, overload, int from urllib.parse import urlparse import sentry diff --git a/src/sentry/conf/server_mypy.py b/src/sentry/conf/server_mypy.py index 0e00216c035fb3..89ca5fc19ca547 100644 --- a/src/sentry/conf/server_mypy.py +++ b/src/sentry/conf/server_mypy.py @@ -1,3 +1,4 @@ +from typing import int from sentry.runner import configure configure(skip_service_validation=True) diff --git a/src/sentry/conf/types/bgtask.py b/src/sentry/conf/types/bgtask.py index 70e70f2883b36d..6e0f847814932f 100644 --- a/src/sentry/conf/types/bgtask.py +++ b/src/sentry/conf/types/bgtask.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict class BgTaskConfig(TypedDict, total=False): diff --git a/src/sentry/conf/types/kafka_definition.py b/src/sentry/conf/types/kafka_definition.py index 151e1e0f83bb8b..ac698f3a38fccc 100644 --- a/src/sentry/conf/types/kafka_definition.py +++ b/src/sentry/conf/types/kafka_definition.py @@ -2,7 +2,7 @@ from collections.abc import Mapping, Sequence from enum import Enum -from typing import Any, Required, TypedDict +from typing import Any, Required, TypedDict, int import click from sentry_kafka_schemas import get_codec diff --git a/src/sentry/conf/types/logging_config.py b/src/sentry/conf/types/logging_config.py index 2b9cebd8fd0e0c..eb31a8a2d23671 100644 --- a/src/sentry/conf/types/logging_config.py +++ b/src/sentry/conf/types/logging_config.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING if TYPE_CHECKING: from logging.config import _DictConfigArgs diff --git a/src/sentry/conf/types/region_config.py b/src/sentry/conf/types/region_config.py index 66451323679cd8..c79a152a05163c 100644 --- a/src/sentry/conf/types/region_config.py +++ b/src/sentry/conf/types/region_config.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int class RegionConfig(TypedDict): diff --git a/src/sentry/conf/types/role_dict.py b/src/sentry/conf/types/role_dict.py index 1d96cfdee751ae..3237f82c1c3ace 100644 --- a/src/sentry/conf/types/role_dict.py +++ b/src/sentry/conf/types/role_dict.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int class RoleDict(TypedDict): diff --git a/src/sentry/conf/types/sdk_config.py b/src/sentry/conf/types/sdk_config.py index b0fe30e7c76d09..8e8c4cb7111b83 100644 --- a/src/sentry/conf/types/sdk_config.py +++ b/src/sentry/conf/types/sdk_config.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable -from typing import Any, Literal, NotRequired, TypedDict +from typing import Any, Literal, NotRequired, TypedDict, int from sentry_sdk.types import Event, Hint diff --git a/src/sentry/conf/types/sentry_config.py b/src/sentry/conf/types/sentry_config.py index 054e26a1f953e0..dd56a77e639f3e 100644 --- a/src/sentry/conf/types/sentry_config.py +++ b/src/sentry/conf/types/sentry_config.py @@ -1,3 +1,4 @@ +from typing import int from enum import StrEnum SentryMode = StrEnum("SentryMode", ("SELF_HOSTED", "SINGLE_TENANT", "SAAS")) diff --git a/src/sentry/conf/types/service_options.py b/src/sentry/conf/types/service_options.py index 5c1bccb44dbbb6..4ab25f26a92d8c 100644 --- a/src/sentry/conf/types/service_options.py +++ b/src/sentry/conf/types/service_options.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TypedDict +from typing import int, TypedDict class ServiceOptions(TypedDict, total=False): diff --git a/src/sentry/conf/types/taskworker.py b/src/sentry/conf/types/taskworker.py index d09096b5d556b8..e4da4c6e466d01 100644 --- a/src/sentry/conf/types/taskworker.py +++ b/src/sentry/conf/types/taskworker.py @@ -3,7 +3,7 @@ import dataclasses from collections.abc import Mapping from datetime import timedelta -from typing import TypedDict +from typing import int, TypedDict @dataclasses.dataclass diff --git a/src/sentry/conf/types/topic_definition.py b/src/sentry/conf/types/topic_definition.py index bc5aaa44ddef80..81f09c461ccff6 100644 --- a/src/sentry/conf/types/topic_definition.py +++ b/src/sentry/conf/types/topic_definition.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TypedDict +from typing import int, TypedDict class TopicDefinition(TypedDict): diff --git a/src/sentry/conf/types/uptime.py b/src/sentry/conf/types/uptime.py index 8e2787067abb6f..6c8983c59d3abd 100644 --- a/src/sentry/conf/types/uptime.py +++ b/src/sentry/conf/types/uptime.py @@ -1,3 +1,4 @@ +from typing import int import dataclasses diff --git a/src/sentry/conf/urls.py b/src/sentry/conf/urls.py index e3e61a2d723c1e..c96e3919a86861 100644 --- a/src/sentry/conf/urls.py +++ b/src/sentry/conf/urls.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.web.urls import urlpatterns diff --git a/src/sentry/constants.py b/src/sentry/constants.py index 36c307fc35caff..15bed794f047ce 100644 --- a/src/sentry/constants.py +++ b/src/sentry/constants.py @@ -9,7 +9,7 @@ from collections.abc import Sequence from datetime import timedelta from enum import Enum -from typing import cast +from typing import int, cast import sentry_relay.consts import sentry_relay.processing diff --git a/src/sentry/consumers/__init__.py b/src/sentry/consumers/__init__.py index c68474dacf9b1b..4b0c58a6f21244 100644 --- a/src/sentry/consumers/__init__.py +++ b/src/sentry/consumers/__init__.py @@ -3,7 +3,7 @@ import logging import uuid from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any import click from arroyo.backends.abstract import Consumer diff --git a/src/sentry/consumers/dlq.py b/src/sentry/consumers/dlq.py index f055be941fa0ff..9d3ce9a6416062 100644 --- a/src/sentry/consumers/dlq.py +++ b/src/sentry/consumers/dlq.py @@ -1,3 +1,4 @@ +from typing import int import logging import time from collections.abc import Mapping, MutableMapping diff --git a/src/sentry/consumers/profiler.py b/src/sentry/consumers/profiler.py index 11863f0fffb4a0..7909f1cf78090f 100644 --- a/src/sentry/consumers/profiler.py +++ b/src/sentry/consumers/profiler.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import sentry_sdk from arroyo.processing.strategies.abstract import ProcessingStrategy diff --git a/src/sentry/consumers/synchronized.py b/src/sentry/consumers/synchronized.py index bd29c4c09e8814..b1d895b727bdaa 100644 --- a/src/sentry/consumers/synchronized.py +++ b/src/sentry/consumers/synchronized.py @@ -4,7 +4,7 @@ from datetime import datetime from threading import Event, Lock from time import time -from typing import Generic, TypeVar +from typing import Generic, TypeVar, int from arroyo.backends.abstract import Consumer from arroyo.backends.kafka import KafkaPayload diff --git a/src/sentry/consumers/validate_schema.py b/src/sentry/consumers/validate_schema.py index e5138b690b9c1d..17fea1312d18cc 100644 --- a/src/sentry/consumers/validate_schema.py +++ b/src/sentry/consumers/validate_schema.py @@ -1,6 +1,6 @@ import logging import time -from typing import Any +from typing import int, Any import sentry_kafka_schemas import sentry_sdk diff --git a/src/sentry/core/endpoints/organization_auditlogs.py b/src/sentry/core/endpoints/organization_auditlogs.py index a051724a053e79..816e3710871d19 100644 --- a/src/sentry/core/endpoints/organization_auditlogs.py +++ b/src/sentry/core/endpoints/organization_auditlogs.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/core/endpoints/organization_avatar.py b/src/sentry/core/endpoints/organization_avatar.py index a68fb8c51a7475..74b690e781ff52 100644 --- a/src/sentry/core/endpoints/organization_avatar.py +++ b/src/sentry/core/endpoints/organization_avatar.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.api_publish_status import ApiPublishStatus from sentry.api.base import region_silo_endpoint from sentry.api.bases.avatar import AvatarMixin diff --git a/src/sentry/core/endpoints/organization_details.py b/src/sentry/core/endpoints/organization_details.py index fda38b8329cd2e..ad323f97667b4b 100644 --- a/src/sentry/core/endpoints/organization_details.py +++ b/src/sentry/core/endpoints/organization_details.py @@ -3,7 +3,7 @@ import logging from copy import copy from datetime import datetime, timedelta, timezone -from typing import TypedDict +from typing import int, TypedDict from django.db import models, router, transaction from django.db.models.query_utils import DeferredAttribute diff --git a/src/sentry/core/endpoints/organization_environments.py b/src/sentry/core/endpoints/organization_environments.py index af2b0b909eff1a..1d35c1ce988583 100644 --- a/src/sentry/core/endpoints/organization_environments.py +++ b/src/sentry/core/endpoints/organization_environments.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/core/endpoints/organization_index.py b/src/sentry/core/endpoints/organization_index.py index f3b49b6736ab18..023e8ebb3ba3c2 100644 --- a/src/sentry/core/endpoints/organization_index.py +++ b/src/sentry/core/endpoints/organization_index.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/core/endpoints/organization_member_details.py b/src/sentry/core/endpoints/organization_member_details.py index 050c4b2c2b2c69..34e1c766cf68c5 100644 --- a/src/sentry/core/endpoints/organization_member_details.py +++ b/src/sentry/core/endpoints/organization_member_details.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import int, Literal from django.db import router, transaction from django.db.models import Q diff --git a/src/sentry/core/endpoints/organization_member_index.py b/src/sentry/core/endpoints/organization_member_index.py index 7149b9f564f673..09c2011253f6ca 100644 --- a/src/sentry/core/endpoints/organization_member_index.py +++ b/src/sentry/core/endpoints/organization_member_index.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.conf import settings from django.db import router, transaction diff --git a/src/sentry/core/endpoints/organization_member_invite/details.py b/src/sentry/core/endpoints/organization_member_invite/details.py index 2c3e724a3642bb..f090c15e9382b0 100644 --- a/src/sentry/core/endpoints/organization_member_invite/details.py +++ b/src/sentry/core/endpoints/organization_member_invite/details.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/core/endpoints/organization_member_invite/index.py b/src/sentry/core/endpoints/organization_member_invite/index.py index 98ed0e5241a9d7..03e18a5f167121 100644 --- a/src/sentry/core/endpoints/organization_member_invite/index.py +++ b/src/sentry/core/endpoints/organization_member_invite/index.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/core/endpoints/organization_member_invite/reinvite.py b/src/sentry/core/endpoints/organization_member_invite/reinvite.py index 95c1928b8c8b91..25a48488c72276 100644 --- a/src/sentry/core/endpoints/organization_member_invite/reinvite.py +++ b/src/sentry/core/endpoints/organization_member_invite/reinvite.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db import router, transaction from rest_framework import status diff --git a/src/sentry/core/endpoints/organization_member_invite/utils.py b/src/sentry/core/endpoints/organization_member_invite/utils.py index 6be047608e3795..1a89765c6ca94f 100644 --- a/src/sentry/core/endpoints/organization_member_invite/utils.py +++ b/src/sentry/core/endpoints/organization_member_invite/utils.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.bases.organization import OrganizationPermission from sentry.auth.superuser import is_active_superuser, superuser_has_permission diff --git a/src/sentry/core/endpoints/organization_member_requests_invite_details.py b/src/sentry/core/endpoints/organization_member_requests_invite_details.py index 028c5b1352d89d..5a30c6ce8e0f9e 100644 --- a/src/sentry/core/endpoints/organization_member_requests_invite_details.py +++ b/src/sentry/core/endpoints/organization_member_requests_invite_details.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, Literal +from typing import Any, Literal, int from rest_framework import serializers, status from rest_framework.request import Request diff --git a/src/sentry/core/endpoints/organization_member_requests_invite_index.py b/src/sentry/core/endpoints/organization_member_requests_invite_index.py index 976c885aba4655..5a6d7c71cea0f3 100644 --- a/src/sentry/core/endpoints/organization_member_requests_invite_index.py +++ b/src/sentry/core/endpoints/organization_member_requests_invite_index.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from django.db.models import Q from rest_framework.request import Request diff --git a/src/sentry/core/endpoints/organization_member_requests_join.py b/src/sentry/core/endpoints/organization_member_requests_join.py index 330d74da2ec5a7..93c799228e76be 100644 --- a/src/sentry/core/endpoints/organization_member_requests_join.py +++ b/src/sentry/core/endpoints/organization_member_requests_join.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from django.db import IntegrityError from django.db.models import Q diff --git a/src/sentry/core/endpoints/organization_member_team_details.py b/src/sentry/core/endpoints/organization_member_team_details.py index 94f5adf9a2ae33..74d6eb47155dc8 100644 --- a/src/sentry/core/endpoints/organization_member_team_details.py +++ b/src/sentry/core/endpoints/organization_member_team_details.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any, Literal, TypedDict +from typing import Any, Literal, TypedDict, int from drf_spectacular.utils import OpenApiResponse, extend_schema, extend_schema_serializer from rest_framework import serializers, status diff --git a/src/sentry/core/endpoints/organization_member_utils.py b/src/sentry/core/endpoints/organization_member_utils.py index f6aa85f62bf0c6..ccbf325a489358 100644 --- a/src/sentry/core/endpoints/organization_member_utils.py +++ b/src/sentry/core/endpoints/organization_member_utils.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Collection diff --git a/src/sentry/core/endpoints/organization_projects.py b/src/sentry/core/endpoints/organization_projects.py index 190cff2ac9a838..8048a2af2412f7 100644 --- a/src/sentry/core/endpoints/organization_projects.py +++ b/src/sentry/core/endpoints/organization_projects.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db.models import Q from django.db.models.query import QuerySet diff --git a/src/sentry/core/endpoints/organization_projects_experiment.py b/src/sentry/core/endpoints/organization_projects_experiment.py index 07052e954385eb..2e1f30b7f85545 100644 --- a/src/sentry/core/endpoints/organization_projects_experiment.py +++ b/src/sentry/core/endpoints/organization_projects_experiment.py @@ -2,7 +2,7 @@ import random import string from email.headerregistry import Address -from typing import TypedDict, TypeIs +from typing import TypedDict, TypeIs, int from django.contrib.auth.models import AnonymousUser from django.db import IntegrityError, router, transaction diff --git a/src/sentry/core/endpoints/organization_region.py b/src/sentry/core/endpoints/organization_region.py index c34e1d9f87a4ed..2c48872790302c 100644 --- a/src/sentry/core/endpoints/organization_region.py +++ b/src/sentry/core/endpoints/organization_region.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/core/endpoints/organization_request_project_creation.py b/src/sentry/core/endpoints/organization_request_project_creation.py index ac92dfafebb37d..61445f1dbacbed 100644 --- a/src/sentry/core/endpoints/organization_request_project_creation.py +++ b/src/sentry/core/endpoints/organization_request_project_creation.py @@ -1,3 +1,4 @@ +from typing import int from django.utils.translation import gettext_lazy as _ from rest_framework import serializers, status from rest_framework.request import Request diff --git a/src/sentry/core/endpoints/organization_teams.py b/src/sentry/core/endpoints/organization_teams.py index f590c23731c8b0..eaf007ef9add1d 100644 --- a/src/sentry/core/endpoints/organization_teams.py +++ b/src/sentry/core/endpoints/organization_teams.py @@ -1,3 +1,4 @@ +from typing import int from django.db import IntegrityError, router, transaction from django.db.models import Q from drf_spectacular.utils import OpenApiResponse, extend_schema, extend_schema_serializer diff --git a/src/sentry/core/endpoints/organization_user_details.py b/src/sentry/core/endpoints/organization_user_details.py index 5e350c4c6a0b10..59ae0420e11be1 100644 --- a/src/sentry/core/endpoints/organization_user_details.py +++ b/src/sentry/core/endpoints/organization_user_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.exceptions import ValidationError from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/core/endpoints/organization_user_teams.py b/src/sentry/core/endpoints/organization_user_teams.py index 67447480e34430..c911304a2429a7 100644 --- a/src/sentry/core/endpoints/organization_user_teams.py +++ b/src/sentry/core/endpoints/organization_user_teams.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/core/endpoints/organization_users.py b/src/sentry/core/endpoints/organization_users.py index 8367208393b70a..76c581a00799fa 100644 --- a/src/sentry/core/endpoints/organization_users.py +++ b/src/sentry/core/endpoints/organization_users.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/core/endpoints/project_details.py b/src/sentry/core/endpoints/project_details.py index 21b944a4f51c27..877c72a5b763e2 100644 --- a/src/sentry/core/endpoints/project_details.py +++ b/src/sentry/core/endpoints/project_details.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import timedelta from uuid import uuid4 diff --git a/src/sentry/core/endpoints/project_environment_details.py b/src/sentry/core/endpoints/project_environment_details.py index e65109f5dfe54f..4d8310e4e2412a 100644 --- a/src/sentry/core/endpoints/project_environment_details.py +++ b/src/sentry/core/endpoints/project_environment_details.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/core/endpoints/project_environments.py b/src/sentry/core/endpoints/project_environments.py index 687ebe9a8b73fb..3a350c3bc00532 100644 --- a/src/sentry/core/endpoints/project_environments.py +++ b/src/sentry/core/endpoints/project_environments.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiResponse, extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/core/endpoints/project_index.py b/src/sentry/core/endpoints/project_index.py index c84d65fa963c9d..dc902975af1b3e 100644 --- a/src/sentry/core/endpoints/project_index.py +++ b/src/sentry/core/endpoints/project_index.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Q from django.db.models.query import EmptyQuerySet from rest_framework.exceptions import AuthenticationFailed diff --git a/src/sentry/core/endpoints/project_key_details.py b/src/sentry/core/endpoints/project_key_details.py index 79feec83a2c4b6..3dcecf587b3b3b 100644 --- a/src/sentry/core/endpoints/project_key_details.py +++ b/src/sentry/core/endpoints/project_key_details.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import F from drf_spectacular.utils import extend_schema, inline_serializer from rest_framework import serializers, status diff --git a/src/sentry/core/endpoints/project_key_stats.py b/src/sentry/core/endpoints/project_key_stats.py index 58ec37b3ef41b6..e45dd69b463d67 100644 --- a/src/sentry/core/endpoints/project_key_stats.py +++ b/src/sentry/core/endpoints/project_key_stats.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import F from rest_framework.exceptions import ParseError from rest_framework.request import Request diff --git a/src/sentry/core/endpoints/project_keys.py b/src/sentry/core/endpoints/project_keys.py index e73472b0730d37..3fe2f040a3c435 100644 --- a/src/sentry/core/endpoints/project_keys.py +++ b/src/sentry/core/endpoints/project_keys.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import F from drf_spectacular.utils import extend_schema from rest_framework import status diff --git a/src/sentry/core/endpoints/project_stats.py b/src/sentry/core/endpoints/project_stats.py index 53e31fa29249e6..1cf8b08581ba9b 100644 --- a/src/sentry/core/endpoints/project_stats.py +++ b/src/sentry/core/endpoints/project_stats.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/core/endpoints/project_team_details.py b/src/sentry/core/endpoints/project_team_details.py index de546e775ecf06..def150626c16d5 100644 --- a/src/sentry/core/endpoints/project_team_details.py +++ b/src/sentry/core/endpoints/project_team_details.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/core/endpoints/project_teams.py b/src/sentry/core/endpoints/project_teams.py index f9bd54d792c18b..21ea6fb4abfc89 100644 --- a/src/sentry/core/endpoints/project_teams.py +++ b/src/sentry/core/endpoints/project_teams.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/core/endpoints/project_transfer.py b/src/sentry/core/endpoints/project_transfer.py index 2d6e7c2148a36d..6f57e63ae753c5 100644 --- a/src/sentry/core/endpoints/project_transfer.py +++ b/src/sentry/core/endpoints/project_transfer.py @@ -1,3 +1,4 @@ +from typing import int import logging from urllib.parse import urlencode from uuid import uuid4 diff --git a/src/sentry/core/endpoints/project_users.py b/src/sentry/core/endpoints/project_users.py index 3dc4f201f9b014..578b6ee89b6342 100644 --- a/src/sentry/core/endpoints/project_users.py +++ b/src/sentry/core/endpoints/project_users.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/core/endpoints/scim/constants.py b/src/sentry/core/endpoints/scim/constants.py index 10d2caf6345f1d..6055c65cf74d96 100644 --- a/src/sentry/core/endpoints/scim/constants.py +++ b/src/sentry/core/endpoints/scim/constants.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum SCIM_API_LIST = "urn:ietf:params:scim:api:messages:2.0:ListResponse" diff --git a/src/sentry/core/endpoints/scim/members.py b/src/sentry/core/endpoints/scim/members.py index 1f9b03874dfa1f..ba345b34be9849 100644 --- a/src/sentry/core/endpoints/scim/members.py +++ b/src/sentry/core/endpoints/scim/members.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/core/endpoints/scim/schemas.py b/src/sentry/core/endpoints/scim/schemas.py index c9a56d66f172b1..b092dff978cf4f 100644 --- a/src/sentry/core/endpoints/scim/schemas.py +++ b/src/sentry/core/endpoints/scim/schemas.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/core/endpoints/scim/teams.py b/src/sentry/core/endpoints/scim/teams.py index d057c53f25d216..ff6e4c83273462 100644 --- a/src/sentry/core/endpoints/scim/teams.py +++ b/src/sentry/core/endpoints/scim/teams.py @@ -1,6 +1,6 @@ import logging import re -from typing import Any +from typing import int, Any import sentry_sdk from django.db import IntegrityError, router, transaction diff --git a/src/sentry/core/endpoints/scim/utils.py b/src/sentry/core/endpoints/scim/utils.py index 39fe9936828830..2589a790dd20a7 100644 --- a/src/sentry/core/endpoints/scim/utils.py +++ b/src/sentry/core/endpoints/scim/utils.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Iterable -from typing import TypedDict +from typing import int, TypedDict import sentry_sdk from drf_spectacular.utils import extend_schema diff --git a/src/sentry/core/endpoints/team_details.py b/src/sentry/core/endpoints/team_details.py index b7c83de03ed65b..701d1e69d82883 100644 --- a/src/sentry/core/endpoints/team_details.py +++ b/src/sentry/core/endpoints/team_details.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from django.db import router, transaction diff --git a/src/sentry/core/endpoints/team_members.py b/src/sentry/core/endpoints/team_members.py index 2d1f146916deee..1c35ec2e9c59db 100644 --- a/src/sentry/core/endpoints/team_members.py +++ b/src/sentry/core/endpoints/team_members.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Q, prefetch_related_objects from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/core/endpoints/team_projects.py b/src/sentry/core/endpoints/team_projects.py index 43bbca677eea54..b619014311996c 100644 --- a/src/sentry/core/endpoints/team_projects.py +++ b/src/sentry/core/endpoints/team_projects.py @@ -1,5 +1,5 @@ import time -from typing import TypedDict +from typing import int, TypedDict from django.db import IntegrityError, router, transaction from drf_spectacular.utils import OpenApiResponse, extend_schema diff --git a/src/sentry/core/endpoints/team_release_count.py b/src/sentry/core/endpoints/team_release_count.py index 536e701c05369f..f467d9a18de26f 100644 --- a/src/sentry/core/endpoints/team_release_count.py +++ b/src/sentry/core/endpoints/team_release_count.py @@ -1,3 +1,4 @@ +from typing import int from collections import defaultdict from datetime import timedelta diff --git a/src/sentry/core/endpoints/team_stats.py b/src/sentry/core/endpoints/team_stats.py index 1448c267d446c7..b7d58cb4447887 100644 --- a/src/sentry/core/endpoints/team_stats.py +++ b/src/sentry/core/endpoints/team_stats.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/core/endpoints/team_time_to_resolution.py b/src/sentry/core/endpoints/team_time_to_resolution.py index c2f070ed05d2cd..cb98305606038e 100644 --- a/src/sentry/core/endpoints/team_time_to_resolution.py +++ b/src/sentry/core/endpoints/team_time_to_resolution.py @@ -2,7 +2,7 @@ from collections import defaultdict from datetime import timedelta -from typing import TypedDict +from typing import int, TypedDict from django.db.models import Avg, F, Q from django.db.models.functions import Coalesce, TruncDay diff --git a/src/sentry/core/endpoints/team_unresolved_issue_age.py b/src/sentry/core/endpoints/team_unresolved_issue_age.py index 30cb8f5f0dd86a..22bb67ebd864ca 100644 --- a/src/sentry/core/endpoints/team_unresolved_issue_age.py +++ b/src/sentry/core/endpoints/team_unresolved_issue_age.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from django.db.models import Case, Count, Q, TextField, Value, When diff --git a/src/sentry/culprit.py b/src/sentry/culprit.py index 54bc9a0895148c..d8d10da5f455ee 100644 --- a/src/sentry/culprit.py +++ b/src/sentry/culprit.py @@ -1,3 +1,4 @@ +from typing import int """ This file implements the legacy culprit system. The culprit at this point is just used as a fallback if no transaction is set. When a transaction is set diff --git a/src/sentry/dashboards/endpoints/organization_dashboard_details.py b/src/sentry/dashboards/endpoints/organization_dashboard_details.py index c0657aad9138ab..06a96a59cf1e41 100644 --- a/src/sentry/dashboards/endpoints/organization_dashboard_details.py +++ b/src/sentry/dashboards/endpoints/organization_dashboard_details.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import sentry_sdk from django.db import IntegrityError, router, transaction diff --git a/src/sentry/dashboards/endpoints/organization_dashboard_widget_details.py b/src/sentry/dashboards/endpoints/organization_dashboard_widget_details.py index 561b5b675ba29c..03b88e8687725d 100644 --- a/src/sentry/dashboards/endpoints/organization_dashboard_widget_details.py +++ b/src/sentry/dashboards/endpoints/organization_dashboard_widget_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/dashboards/endpoints/organization_dashboards.py b/src/sentry/dashboards/endpoints/organization_dashboards.py index f6c9ccbd71319f..e934570aee6d3a 100644 --- a/src/sentry/dashboards/endpoints/organization_dashboards.py +++ b/src/sentry/dashboards/endpoints/organization_dashboards.py @@ -1,7 +1,7 @@ from __future__ import annotations from enum import IntEnum -from typing import Any, TypedDict +from typing import Any, TypedDict, int import sentry_sdk from django.db import IntegrityError, router, transaction diff --git a/src/sentry/dashboards/endpoints/organization_dashboards_starred.py b/src/sentry/dashboards/endpoints/organization_dashboards_starred.py index 85e5294f03e057..2d31c4b0426fc9 100644 --- a/src/sentry/dashboards/endpoints/organization_dashboards_starred.py +++ b/src/sentry/dashboards/endpoints/organization_dashboards_starred.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from django.db import IntegrityError, router, transaction from rest_framework import status diff --git a/src/sentry/data_export/base.py b/src/sentry/data_export/base.py index 1c60c79e7cc538..d7c33e74c13cd2 100644 --- a/src/sentry/data_export/base.py +++ b/src/sentry/data_export/base.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from enum import Enum diff --git a/src/sentry/data_export/endpoints/data_export.py b/src/sentry/data_export/endpoints/data_export.py index 3e9a6191ec4429..eb1436504acd1b 100644 --- a/src/sentry/data_export/endpoints/data_export.py +++ b/src/sentry/data_export/endpoints/data_export.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any import sentry_sdk from django.core.exceptions import ValidationError diff --git a/src/sentry/data_export/endpoints/data_export_details.py b/src/sentry/data_export/endpoints/data_export_details.py index 9c29dcfd13a922..a1dcd3b243fe7f 100644 --- a/src/sentry/data_export/endpoints/data_export_details.py +++ b/src/sentry/data_export/endpoints/data_export_details.py @@ -1,3 +1,4 @@ +from typing import int from django.http import StreamingHttpResponse from rest_framework.exceptions import PermissionDenied from rest_framework.request import Request diff --git a/src/sentry/data_export/models.py b/src/sentry/data_export/models.py index 15889eac447f99..5105fcf19121b3 100644 --- a/src/sentry/data_export/models.py +++ b/src/sentry/data_export/models.py @@ -2,7 +2,7 @@ import logging from datetime import datetime, timedelta -from typing import Any +from typing import int, Any import orjson from django.conf import settings diff --git a/src/sentry/data_export/processors/discover.py b/src/sentry/data_export/processors/discover.py index 913f63e7c0a564..961617d69618e4 100644 --- a/src/sentry/data_export/processors/discover.py +++ b/src/sentry/data_export/processors/discover.py @@ -1,5 +1,5 @@ import logging -from typing import Any, Protocol +from typing import Any, Protocol, int from sentry_relay.consts import SPAN_STATUS_CODE_TO_NAME diff --git a/src/sentry/data_export/processors/explore.py b/src/sentry/data_export/processors/explore.py index 025f2fc0ae8983..460f44f072a12c 100644 --- a/src/sentry/data_export/processors/explore.py +++ b/src/sentry/data_export/processors/explore.py @@ -1,5 +1,5 @@ import logging -from typing import Any, cast +from typing import Any, cast, int from sentry.api.utils import get_date_range_from_params from sentry.models.environment import Environment diff --git a/src/sentry/data_export/processors/issues_by_tag.py b/src/sentry/data_export/processors/issues_by_tag.py index c148127d9a09c1..e4a2b7af07c7da 100644 --- a/src/sentry/data_export/processors/issues_by_tag.py +++ b/src/sentry/data_export/processors/issues_by_tag.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import NamedTuple +from typing import int, NamedTuple from sentry import tagstore from sentry.models.group import Group, get_group_with_redirect diff --git a/src/sentry/data_export/tasks.py b/src/sentry/data_export/tasks.py index fb5f80f8596daf..c241da305c8d2c 100644 --- a/src/sentry/data_export/tasks.py +++ b/src/sentry/data_export/tasks.py @@ -4,7 +4,7 @@ import tempfile from hashlib import sha1 from io import BufferedRandom -from typing import Any +from typing import int, Any import sentry_sdk from django.core.files.base import ContentFile diff --git a/src/sentry/data_export/utils.py b/src/sentry/data_export/utils.py index 9412e3341bd2da..09470076b7485e 100644 --- a/src/sentry/data_export/utils.py +++ b/src/sentry/data_export/utils.py @@ -1,7 +1,7 @@ import logging from collections.abc import Callable from functools import wraps -from typing import Any +from typing import int, Any from sentry.search.events.constants import TIMEOUT_ERROR_MESSAGE from sentry.snuba import discover diff --git a/src/sentry/data_secrecy/data_secrecy_logic.py b/src/sentry/data_secrecy/data_secrecy_logic.py index f4f6ee33a37ed2..0cd3361b2002da 100644 --- a/src/sentry/data_secrecy/data_secrecy_logic.py +++ b/src/sentry/data_secrecy/data_secrecy_logic.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry import features diff --git a/src/sentry/data_secrecy/models/__init__.py b/src/sentry/data_secrecy/models/__init__.py index 16eb61ea680703..24b31b1e520e43 100644 --- a/src/sentry/data_secrecy/models/__init__.py +++ b/src/sentry/data_secrecy/models/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .data_access_grant import DataAccessGrant __all__ = [ diff --git a/src/sentry/data_secrecy/models/data_access_grant.py b/src/sentry/data_secrecy/models/data_access_grant.py index 3a749c7c8f53ae..7c3938f37f42e7 100644 --- a/src/sentry/data_secrecy/models/data_access_grant.py +++ b/src/sentry/data_secrecy/models/data_access_grant.py @@ -1,3 +1,4 @@ +from typing import int from enum import StrEnum from django.db import models diff --git a/src/sentry/data_secrecy/service/impl.py b/src/sentry/data_secrecy/service/impl.py index b9cbf3fc6e666c..e9a19ebaa8ef40 100644 --- a/src/sentry/data_secrecy/service/impl.py +++ b/src/sentry/data_secrecy/service/impl.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/data_secrecy/service/model.py b/src/sentry/data_secrecy/service/model.py index cfbf7739662dee..1ead1cd90b4be9 100644 --- a/src/sentry/data_secrecy/service/model.py +++ b/src/sentry/data_secrecy/service/model.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from sentry.hybridcloud.rpc import RpcModel diff --git a/src/sentry/data_secrecy/service/serial.py b/src/sentry/data_secrecy/service/serial.py index af401ebc93a6f6..7649253a50a438 100644 --- a/src/sentry/data_secrecy/service/serial.py +++ b/src/sentry/data_secrecy/service/serial.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import Any +from typing import int, Any from sentry.data_secrecy.service.model import RpcEffectiveGrantStatus diff --git a/src/sentry/data_secrecy/service/service.py b/src/sentry/data_secrecy/service/service.py index 2c3c10da3d67db..867592eea2277c 100644 --- a/src/sentry/data_secrecy/service/service.py +++ b/src/sentry/data_secrecy/service/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int import abc from sentry.data_secrecy.service.model import RpcEffectiveGrantStatus diff --git a/src/sentry/db/analyze.py b/src/sentry/db/analyze.py index 854cd68547f00b..bb16cb88dc2004 100644 --- a/src/sentry/db/analyze.py +++ b/src/sentry/db/analyze.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import connections, router diff --git a/src/sentry/db/deletion.py b/src/sentry/db/deletion.py index 79a73908d77e61..b3bc97e36119b2 100644 --- a/src/sentry/db/deletion.py +++ b/src/sentry/db/deletion.py @@ -3,7 +3,7 @@ import itertools from collections.abc import Generator from datetime import timedelta -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.db import connections, router from django.db.models import QuerySet diff --git a/src/sentry/db/exceptions.py b/src/sentry/db/exceptions.py index 5118482306073a..76adc00c5da940 100644 --- a/src/sentry/db/exceptions.py +++ b/src/sentry/db/exceptions.py @@ -1,2 +1,3 @@ +from typing import int class QueryError(Exception): pass diff --git a/src/sentry/db/models/__init__.py b/src/sentry/db/models/__init__.py index 4d05d6afd02ea5..1ddeada4655587 100644 --- a/src/sentry/db/models/__init__.py +++ b/src/sentry/db/models/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .base import * # NOQA from .fields import * # NOQA diff --git a/src/sentry/db/models/base.py b/src/sentry/db/models/base.py index 5955b010976f37..2edf97223fd748 100644 --- a/src/sentry/db/models/base.py +++ b/src/sentry/db/models/base.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Iterable, Mapping -from typing import Any, ClassVar, Self, TypeVar +from typing import Any, ClassVar, Self, TypeVar, int from django.apps.config import AppConfig from django.db import models diff --git a/src/sentry/db/models/fields/__init__.py b/src/sentry/db/models/fields/__init__.py index 1dc117bfb9e472..f104de01078301 100644 --- a/src/sentry/db/models/fields/__init__.py +++ b/src/sentry/db/models/fields/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .bounded import * # NOQA from .citext import * # NOQA from .encryption import * # NOQA diff --git a/src/sentry/db/models/fields/array.py b/src/sentry/db/models/fields/array.py index 11b3d1423c6657..b8e7e1b04b93c9 100644 --- a/src/sentry/db/models/fields/array.py +++ b/src/sentry/db/models/fields/array.py @@ -1,3 +1,4 @@ +from typing import int """DO NOT USE ME. USE django.contrib.postgres.fields.array.ArrayField I am only here for migration compatibility diff --git a/src/sentry/db/models/fields/bounded.py b/src/sentry/db/models/fields/bounded.py index c68991983491d8..3491fef605f04c 100644 --- a/src/sentry/db/models/fields/bounded.py +++ b/src/sentry/db/models/fields/bounded.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import models from django.utils.translation import gettext_lazy as _ diff --git a/src/sentry/db/models/fields/citext.py b/src/sentry/db/models/fields/citext.py index f54f5d68a3b942..864432fe29d311 100644 --- a/src/sentry/db/models/fields/citext.py +++ b/src/sentry/db/models/fields/citext.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import connections, models from django.db.backends.base.base import BaseDatabaseWrapper diff --git a/src/sentry/db/models/fields/encryption.py b/src/sentry/db/models/fields/encryption.py index 83e94aa60a3330..c728980fe539e0 100644 --- a/src/sentry/db/models/fields/encryption.py +++ b/src/sentry/db/models/fields/encryption.py @@ -3,7 +3,7 @@ import base64 import logging from collections.abc import Callable -from typing import Any, Literal, TypedDict +from typing import Any, Literal, TypedDict, int import sentry_sdk from cryptography.fernet import Fernet, InvalidToken diff --git a/src/sentry/db/models/fields/foreignkey.py b/src/sentry/db/models/fields/foreignkey.py index c6fee7d566d98b..b5ea54dc00a61d 100644 --- a/src/sentry/db/models/fields/foreignkey.py +++ b/src/sentry/db/models/fields/foreignkey.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.db import models from django.db.models import ForeignKey diff --git a/src/sentry/db/models/fields/gzippeddict.py b/src/sentry/db/models/fields/gzippeddict.py index 30461d7eed98e5..65bc50818a60e0 100644 --- a/src/sentry/db/models/fields/gzippeddict.py +++ b/src/sentry/db/models/fields/gzippeddict.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import pickle diff --git a/src/sentry/db/models/fields/hybrid_cloud_foreign_key.py b/src/sentry/db/models/fields/hybrid_cloud_foreign_key.py index e0524f104ed614..a0b1d63dabead5 100644 --- a/src/sentry/db/models/fields/hybrid_cloud_foreign_key.py +++ b/src/sentry/db/models/fields/hybrid_cloud_foreign_key.py @@ -47,7 +47,7 @@ from __future__ import annotations from enum import IntEnum -from typing import Any +from typing import int, Any from django.apps import apps from django.db import models diff --git a/src/sentry/db/models/fields/jsonfield.py b/src/sentry/db/models/fields/jsonfield.py index c85d63333f7177..d64f56beb2feb5 100644 --- a/src/sentry/db/models/fields/jsonfield.py +++ b/src/sentry/db/models/fields/jsonfield.py @@ -28,7 +28,7 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.core.exceptions import ValidationError from django.db import models diff --git a/src/sentry/db/models/fields/node.py b/src/sentry/db/models/fields/node.py index f345f3c2f9e365..ee6559311bd49e 100644 --- a/src/sentry/db/models/fields/node.py +++ b/src/sentry/db/models/fields/node.py @@ -2,7 +2,7 @@ import logging from collections.abc import MutableMapping -from typing import Any +from typing import int, Any from django.utils.functional import cached_property diff --git a/src/sentry/db/models/fields/onetoone.py b/src/sentry/db/models/fields/onetoone.py index 1451f3cbd8582b..4db67b63176c3d 100644 --- a/src/sentry/db/models/fields/onetoone.py +++ b/src/sentry/db/models/fields/onetoone.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db import models from django.db.models import OneToOneField diff --git a/src/sentry/db/models/fields/picklefield.py b/src/sentry/db/models/fields/picklefield.py index 0e5eda2d6347f6..a0fa14a9e0fe4a 100644 --- a/src/sentry/db/models/fields/picklefield.py +++ b/src/sentry/db/models/fields/picklefield.py @@ -1,3 +1,4 @@ +from typing import int import django_picklefield from sentry.utils import json diff --git a/src/sentry/db/models/fields/slug.py b/src/sentry/db/models/fields/slug.py index 017e130b0e860f..a60bb7d0dc0003 100644 --- a/src/sentry/db/models/fields/slug.py +++ b/src/sentry/db/models/fields/slug.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import SlugField from django.db.models.lookups import Lookup diff --git a/src/sentry/db/models/fields/text.py b/src/sentry/db/models/fields/text.py index 26f391f0148345..d84ab75ae6c85c 100644 --- a/src/sentry/db/models/fields/text.py +++ b/src/sentry/db/models/fields/text.py @@ -1,3 +1,4 @@ +from typing import int """ Traditional Django model fields, except their type is explicitly `text` as opposed to `varchar`. All other diff --git a/src/sentry/db/models/fields/types.py b/src/sentry/db/models/fields/types.py index 53c3a939113f03..23fc43d8ba3eb2 100644 --- a/src/sentry/db/models/fields/types.py +++ b/src/sentry/db/models/fields/types.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TypeVar +from typing import int, TypeVar # matches what django-stubs field typevars are FieldSetType = TypeVar("FieldSetType", contravariant=True) diff --git a/src/sentry/db/models/fields/uuid.py b/src/sentry/db/models/fields/uuid.py index cd5998468a4561..4e44322ba6a445 100644 --- a/src/sentry/db/models/fields/uuid.py +++ b/src/sentry/db/models/fields/uuid.py @@ -1,3 +1,4 @@ +from typing import int """ Adapted from https://github.com/lukesneeringer/django-pgfields/blob/master/django_pg/models/fields/uuid.py diff --git a/src/sentry/db/models/indexes.py b/src/sentry/db/models/indexes.py index ff8109a63cd58f..e42a3c5f4e853a 100644 --- a/src/sentry/db/models/indexes.py +++ b/src/sentry/db/models/indexes.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models.indexes import Index diff --git a/src/sentry/db/models/manager/base.py b/src/sentry/db/models/manager/base.py index 4d90d2130a1b10..4ad2d2452b2575 100644 --- a/src/sentry/db/models/manager/base.py +++ b/src/sentry/db/models/manager/base.py @@ -6,7 +6,7 @@ from collections.abc import Callable, Collection, Generator, Mapping, MutableMapping, Sequence from contextlib import contextmanager from enum import IntEnum, auto -from typing import Any +from typing import int, Any from django.conf import settings from django.db import models, router diff --git a/src/sentry/db/models/manager/base_query_set.py b/src/sentry/db/models/manager/base_query_set.py index 538192ed5fc018..864b7f34edca1a 100644 --- a/src/sentry/db/models/manager/base_query_set.py +++ b/src/sentry/db/models/manager/base_query_set.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, Self +from typing import Any, Self, int from django.core import exceptions from django.core.exceptions import EmptyResultSet diff --git a/src/sentry/db/models/manager/option.py b/src/sentry/db/models/manager/option.py index 4d5f96c4aaaffd..152d660bb16f8a 100644 --- a/src/sentry/db/models/manager/option.py +++ b/src/sentry/db/models/manager/option.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.core.signals import request_finished from django.db.models import Model diff --git a/src/sentry/db/models/manager/types.py b/src/sentry/db/models/manager/types.py index e33dc686fa0b53..3df7be81746eef 100644 --- a/src/sentry/db/models/manager/types.py +++ b/src/sentry/db/models/manager/types.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TypeVar +from typing import int, TypeVar from django.db.models import Model diff --git a/src/sentry/db/models/paranoia.py b/src/sentry/db/models/paranoia.py index 490dac63fdde8f..91d6d3c860572a 100644 --- a/src/sentry/db/models/paranoia.py +++ b/src/sentry/db/models/paranoia.py @@ -1,4 +1,4 @@ -from typing import ClassVar, Self +from typing import ClassVar, Self, int from django.db import models from django.utils import timezone diff --git a/src/sentry/db/models/query.py b/src/sentry/db/models/query.py index c178bc80515a16..aef2542e8b0274 100644 --- a/src/sentry/db/models/query.py +++ b/src/sentry/db/models/query.py @@ -3,7 +3,7 @@ import itertools import operator from functools import reduce -from typing import TYPE_CHECKING, Any, Literal +from typing import TYPE_CHECKING, Any, Literal, int from django.db import IntegrityError, router, transaction from django.db.models import F, Model, Q diff --git a/src/sentry/db/models/utils.py b/src/sentry/db/models/utils.py index 1c36d75efdd8fb..a359b22ede9e1a 100644 --- a/src/sentry/db/models/utils.py +++ b/src/sentry/db/models/utils.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Container -from typing import TYPE_CHECKING, Any, Generic, Self, overload +from typing import TYPE_CHECKING, Any, Generic, Self, overload, int from uuid import uuid4 from django.db.models import Field, Model diff --git a/src/sentry/db/pending_deletion.py b/src/sentry/db/pending_deletion.py index 55d8a475bdbed2..33c9e3af810569 100644 --- a/src/sentry/db/pending_deletion.py +++ b/src/sentry/db/pending_deletion.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from uuid import uuid4 diff --git a/src/sentry/db/postgres/base.py b/src/sentry/db/postgres/base.py index ddd9f52c9fe07a..4f8baeca85d6f9 100644 --- a/src/sentry/db/postgres/base.py +++ b/src/sentry/db/postgres/base.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Iterable -from typing import Any +from typing import int, Any import psycopg2 from django.db.backends.postgresql.base import DatabaseWrapper as DjangoDatabaseWrapper diff --git a/src/sentry/db/postgres/decorators.py b/src/sentry/db/postgres/decorators.py index 91061756c0ce11..c5f2e756888594 100644 --- a/src/sentry/db/postgres/decorators.py +++ b/src/sentry/db/postgres/decorators.py @@ -1,3 +1,4 @@ +from typing import int from functools import wraps from .helpers import can_reconnect diff --git a/src/sentry/db/postgres/helpers.py b/src/sentry/db/postgres/helpers.py index ae8ffd5deabfbc..de0940c5962a79 100644 --- a/src/sentry/db/postgres/helpers.py +++ b/src/sentry/db/postgres/helpers.py @@ -1,3 +1,4 @@ +from typing import int import psycopg2 from django.db.utils import DatabaseError, InterfaceError diff --git a/src/sentry/db/postgres/schema.py b/src/sentry/db/postgres/schema.py index 4135888ce6aa4d..d6f7c37b62b09c 100644 --- a/src/sentry/db/postgres/schema.py +++ b/src/sentry/db/postgres/schema.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.postgres.constraints import ExclusionConstraint from django.db.backends.postgresql.schema import ( DatabaseSchemaEditor as PostgresDatabaseSchemaEditor, diff --git a/src/sentry/db/postgres/transactions.py b/src/sentry/db/postgres/transactions.py index 5e6cc61eacb65e..fc61cc430dbf3d 100644 --- a/src/sentry/db/postgres/transactions.py +++ b/src/sentry/db/postgres/transactions.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import contextlib import threading diff --git a/src/sentry/db/router.py b/src/sentry/db/router.py index f4be121983b4fe..0cc0d4e5210a3b 100644 --- a/src/sentry/db/router.py +++ b/src/sentry/db/router.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Iterable diff --git a/src/sentry/debug/utils/exception_reporter_filter.py b/src/sentry/debug/utils/exception_reporter_filter.py index 03d5a000a94f6c..17cda72de7706e 100644 --- a/src/sentry/debug/utils/exception_reporter_filter.py +++ b/src/sentry/debug/utils/exception_reporter_filter.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.views.debug import SafeExceptionReporterFilter diff --git a/src/sentry/debug/utils/packages.py b/src/sentry/debug/utils/packages.py index bb08f57df379a5..c651467a003033 100644 --- a/src/sentry/debug/utils/packages.py +++ b/src/sentry/debug/utils/packages.py @@ -1,3 +1,4 @@ +from typing import int import importlib.metadata import sys diff --git a/src/sentry/debug_files/artifact_bundles.py b/src/sentry/debug_files/artifact_bundles.py index 1f05381599d21f..7c17ff47c47194 100644 --- a/src/sentry/debug_files/artifact_bundles.py +++ b/src/sentry/debug_files/artifact_bundles.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import random from datetime import datetime, timedelta diff --git a/src/sentry/debug_files/debug_files.py b/src/sentry/debug_files/debug_files.py index 80f2509eb8bc15..277af307da4cfb 100644 --- a/src/sentry/debug_files/debug_files.py +++ b/src/sentry/debug_files/debug_files.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Sequence from datetime import timedelta diff --git a/src/sentry/debug_files/release_files.py b/src/sentry/debug_files/release_files.py index 81affd318a2bc3..0bee350d877c50 100644 --- a/src/sentry/debug_files/release_files.py +++ b/src/sentry/debug_files/release_files.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import timedelta diff --git a/src/sentry/debug_files/tasks.py b/src/sentry/debug_files/tasks.py index 4c1392e599bcc9..d4ab57dfdfe65b 100644 --- a/src/sentry/debug_files/tasks.py +++ b/src/sentry/debug_files/tasks.py @@ -1,3 +1,4 @@ +from typing import int from sentry.tasks.base import instrumented_task from sentry.taskworker.namespaces import attachments_tasks diff --git a/src/sentry/debug_files/upload.py b/src/sentry/debug_files/upload.py index 314c724821cc85..98e009a02da330 100644 --- a/src/sentry/debug_files/upload.py +++ b/src/sentry/debug_files/upload.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import sentry_sdk diff --git a/src/sentry/deletions/__init__.py b/src/sentry/deletions/__init__.py index 8a6eb71f5c561d..eb3c7a61e94b35 100644 --- a/src/sentry/deletions/__init__.py +++ b/src/sentry/deletions/__init__.py @@ -1,7 +1,7 @@ from __future__ import annotations import functools -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int if TYPE_CHECKING: from sentry.db.models.base import Model diff --git a/src/sentry/deletions/base.py b/src/sentry/deletions/base.py index ce0d56aaab1a01..bead928465e340 100644 --- a/src/sentry/deletions/base.py +++ b/src/sentry/deletions/base.py @@ -3,7 +3,7 @@ import logging import re from collections.abc import Mapping, Sequence -from typing import TYPE_CHECKING, Any, Generic, TypeVar +from typing import TYPE_CHECKING, Any, Generic, TypeVar, int from django.db import router from django.db.models import Q diff --git a/src/sentry/deletions/defaults/__init__.py b/src/sentry/deletions/defaults/__init__.py index 590440795d01d5..6317a7af3f24c3 100644 --- a/src/sentry/deletions/defaults/__init__.py +++ b/src/sentry/deletions/defaults/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .alert_rule_trigger import * # noqa: F401,F403 from .alert_rule_trigger_action import * # noqa: F401,F403 from .alertrule import * # noqa: F401,F403 diff --git a/src/sentry/deletions/defaults/alert_rule_trigger.py b/src/sentry/deletions/defaults/alert_rule_trigger.py index 75da2a765de377..d35a89e9dcec64 100644 --- a/src/sentry/deletions/defaults/alert_rule_trigger.py +++ b/src/sentry/deletions/defaults/alert_rule_trigger.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.incidents.models.alert_rule import AlertRuleTrigger diff --git a/src/sentry/deletions/defaults/alert_rule_trigger_action.py b/src/sentry/deletions/defaults/alert_rule_trigger_action.py index 0154419cb3eea6..8cba682a165202 100644 --- a/src/sentry/deletions/defaults/alert_rule_trigger_action.py +++ b/src/sentry/deletions/defaults/alert_rule_trigger_action.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.incidents.models.alert_rule import AlertRuleTriggerAction diff --git a/src/sentry/deletions/defaults/alertrule.py b/src/sentry/deletions/defaults/alertrule.py index 79f3cc207bbe20..ce5f2d785b97cc 100644 --- a/src/sentry/deletions/defaults/alertrule.py +++ b/src/sentry/deletions/defaults/alertrule.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.incidents.models.alert_rule import AlertRule diff --git a/src/sentry/deletions/defaults/apiapplication.py b/src/sentry/deletions/defaults/apiapplication.py index 5722b79076d8ec..ed5f2333e38f5b 100644 --- a/src/sentry/deletions/defaults/apiapplication.py +++ b/src/sentry/deletions/defaults/apiapplication.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation diff --git a/src/sentry/deletions/defaults/apigrant.py b/src/sentry/deletions/defaults/apigrant.py index ff3ba854debcff..57f2514dea51af 100644 --- a/src/sentry/deletions/defaults/apigrant.py +++ b/src/sentry/deletions/defaults/apigrant.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from django.db import router diff --git a/src/sentry/deletions/defaults/apitoken.py b/src/sentry/deletions/defaults/apitoken.py index 1f2d520c637156..adf2f8773f176d 100644 --- a/src/sentry/deletions/defaults/apitoken.py +++ b/src/sentry/deletions/defaults/apitoken.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from sentry.deletions.base import ModelDeletionTask diff --git a/src/sentry/deletions/defaults/artifactbundle.py b/src/sentry/deletions/defaults/artifactbundle.py index d62d5f58df8956..43187ccb9f84d3 100644 --- a/src/sentry/deletions/defaults/artifactbundle.py +++ b/src/sentry/deletions/defaults/artifactbundle.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.models.artifactbundle import ArtifactBundle diff --git a/src/sentry/deletions/defaults/commit.py b/src/sentry/deletions/defaults/commit.py index 8abad8a97ff0e1..996627717dc5cc 100644 --- a/src/sentry/deletions/defaults/commit.py +++ b/src/sentry/deletions/defaults/commit.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.db.models import Exists, OuterRef, Q diff --git a/src/sentry/deletions/defaults/commitauthor.py b/src/sentry/deletions/defaults/commitauthor.py index 3d2e1935d93219..30770e098df73a 100644 --- a/src/sentry/deletions/defaults/commitauthor.py +++ b/src/sentry/deletions/defaults/commitauthor.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.models.commitauthor import CommitAuthor diff --git a/src/sentry/deletions/defaults/data_source.py b/src/sentry/deletions/defaults/data_source.py index 1e32d66dd44d3e..1fa86f14ac13b0 100644 --- a/src/sentry/deletions/defaults/data_source.py +++ b/src/sentry/deletions/defaults/data_source.py @@ -1,4 +1,4 @@ -from typing import cast +from typing import int, cast from sentry.deletions.base import BaseRelation, ModelDeletionTask from sentry.workflow_engine.models.data_source import DataSource diff --git a/src/sentry/deletions/defaults/detector.py b/src/sentry/deletions/defaults/detector.py index 0808e60b46f6b3..f82aafdebf05f3 100644 --- a/src/sentry/deletions/defaults/detector.py +++ b/src/sentry/deletions/defaults/detector.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.workflow_engine.models.detector import Detector diff --git a/src/sentry/deletions/defaults/discoversavedquery.py b/src/sentry/deletions/defaults/discoversavedquery.py index 44314f99232fa9..77efe9b2952734 100644 --- a/src/sentry/deletions/defaults/discoversavedquery.py +++ b/src/sentry/deletions/defaults/discoversavedquery.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.discover.models import DiscoverSavedQuery diff --git a/src/sentry/deletions/defaults/file.py b/src/sentry/deletions/defaults/file.py index 1bdad1b9928284..429ea1d213d35d 100644 --- a/src/sentry/deletions/defaults/file.py +++ b/src/sentry/deletions/defaults/file.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.db.models import Q diff --git a/src/sentry/deletions/defaults/group.py b/src/sentry/deletions/defaults/group.py index 0d21f1fd1e9bc7..4a46488c845917 100644 --- a/src/sentry/deletions/defaults/group.py +++ b/src/sentry/deletions/defaults/group.py @@ -18,7 +18,7 @@ import os from collections import defaultdict from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from sentry import models, options from sentry.deletions.tasks.nodestore import delete_events_for_groups_from_nodestore_and_eventstore diff --git a/src/sentry/deletions/defaults/grouphash.py b/src/sentry/deletions/defaults/grouphash.py index 8c4d431d85b32e..f6efe723985967 100644 --- a/src/sentry/deletions/defaults/grouphash.py +++ b/src/sentry/deletions/defaults/grouphash.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.models.grouphash import GroupHash diff --git a/src/sentry/deletions/defaults/incident.py b/src/sentry/deletions/defaults/incident.py index a9645d1373232f..525b63f1f7d792 100644 --- a/src/sentry/deletions/defaults/incident.py +++ b/src/sentry/deletions/defaults/incident.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.incidents.models.incident import Incident from sentry.models.groupopenperiod import GroupOpenPeriod diff --git a/src/sentry/deletions/defaults/monitor.py b/src/sentry/deletions/defaults/monitor.py index 2af8a5eccd74a8..3bcc55607cc68d 100644 --- a/src/sentry/deletions/defaults/monitor.py +++ b/src/sentry/deletions/defaults/monitor.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.monitors.models import Monitor diff --git a/src/sentry/deletions/defaults/monitor_environment.py b/src/sentry/deletions/defaults/monitor_environment.py index 632550804f1cef..cff87d2d44f26c 100644 --- a/src/sentry/deletions/defaults/monitor_environment.py +++ b/src/sentry/deletions/defaults/monitor_environment.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.monitors.models import MonitorEnvironment diff --git a/src/sentry/deletions/defaults/organization.py b/src/sentry/deletions/defaults/organization.py index d8e3af5d0ea719..730d7001e0a5f1 100644 --- a/src/sentry/deletions/defaults/organization.py +++ b/src/sentry/deletions/defaults/organization.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from django.db import router, transaction diff --git a/src/sentry/deletions/defaults/organizationintegration.py b/src/sentry/deletions/defaults/organizationintegration.py index 2c629a8ac88150..f802302ec3e3c2 100644 --- a/src/sentry/deletions/defaults/organizationintegration.py +++ b/src/sentry/deletions/defaults/organizationintegration.py @@ -1,3 +1,4 @@ +from typing import int from sentry import features from sentry.constants import ObjectStatus from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation diff --git a/src/sentry/deletions/defaults/organizationmember.py b/src/sentry/deletions/defaults/organizationmember.py index d27b370cdcb658..ba2846a5fe8246 100644 --- a/src/sentry/deletions/defaults/organizationmember.py +++ b/src/sentry/deletions/defaults/organizationmember.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask from sentry.models.organizationmember import OrganizationMember diff --git a/src/sentry/deletions/defaults/platform_external_issue.py b/src/sentry/deletions/defaults/platform_external_issue.py index d17e208dfb2dbc..5a43af96d776a5 100644 --- a/src/sentry/deletions/defaults/platform_external_issue.py +++ b/src/sentry/deletions/defaults/platform_external_issue.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from sentry.deletions.base import ModelDeletionTask diff --git a/src/sentry/deletions/defaults/project.py b/src/sentry/deletions/defaults/project.py index 47473690a7b4ca..dc69076a38bcb7 100644 --- a/src/sentry/deletions/defaults/project.py +++ b/src/sentry/deletions/defaults/project.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.deletions.base import ( BaseRelation, diff --git a/src/sentry/deletions/defaults/pullrequest.py b/src/sentry/deletions/defaults/pullrequest.py index f20b08e618ec26..edcae573749c9b 100644 --- a/src/sentry/deletions/defaults/pullrequest.py +++ b/src/sentry/deletions/defaults/pullrequest.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from django.db.models import Q diff --git a/src/sentry/deletions/defaults/querysubscription.py b/src/sentry/deletions/defaults/querysubscription.py index 8d12a272623952..707a0fb408b010 100644 --- a/src/sentry/deletions/defaults/querysubscription.py +++ b/src/sentry/deletions/defaults/querysubscription.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.snuba.models import QuerySubscription diff --git a/src/sentry/deletions/defaults/release.py b/src/sentry/deletions/defaults/release.py index 3ff5d5f83d60ab..153938e322fd05 100644 --- a/src/sentry/deletions/defaults/release.py +++ b/src/sentry/deletions/defaults/release.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from django.db.models import Q diff --git a/src/sentry/deletions/defaults/repository.py b/src/sentry/deletions/defaults/repository.py index 41d2adedc16009..703d981392c982 100644 --- a/src/sentry/deletions/defaults/repository.py +++ b/src/sentry/deletions/defaults/repository.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import ObjectStatus from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.models.repository import Repository diff --git a/src/sentry/deletions/defaults/repositoryprojectpathconfig.py b/src/sentry/deletions/defaults/repositoryprojectpathconfig.py index ccafd905877a31..6241355ba1ffcf 100644 --- a/src/sentry/deletions/defaults/repositoryprojectpathconfig.py +++ b/src/sentry/deletions/defaults/repositoryprojectpathconfig.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.integrations.models.repository_project_path_config import RepositoryProjectPathConfig diff --git a/src/sentry/deletions/defaults/rule.py b/src/sentry/deletions/defaults/rule.py index d46df4bcf3395e..88d0e46a71034c 100644 --- a/src/sentry/deletions/defaults/rule.py +++ b/src/sentry/deletions/defaults/rule.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Sequence diff --git a/src/sentry/deletions/defaults/rulefirehistory.py b/src/sentry/deletions/defaults/rulefirehistory.py index f71a8964dedd3b..c31ddcbf8a2da9 100644 --- a/src/sentry/deletions/defaults/rulefirehistory.py +++ b/src/sentry/deletions/defaults/rulefirehistory.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.models.rulefirehistory import RuleFireHistory diff --git a/src/sentry/deletions/defaults/sentry_app.py b/src/sentry/deletions/defaults/sentry_app.py index b0e8a618fdb43f..76f14a3c9f75ed 100644 --- a/src/sentry/deletions/defaults/sentry_app.py +++ b/src/sentry/deletions/defaults/sentry_app.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation diff --git a/src/sentry/deletions/defaults/sentry_app_installation.py b/src/sentry/deletions/defaults/sentry_app_installation.py index 8fe7906f714795..084c4fca45007e 100644 --- a/src/sentry/deletions/defaults/sentry_app_installation.py +++ b/src/sentry/deletions/defaults/sentry_app_installation.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation diff --git a/src/sentry/deletions/defaults/sentry_app_installation_token.py b/src/sentry/deletions/defaults/sentry_app_installation_token.py index b4aae9b537d8d2..9ade1958d0c1d1 100644 --- a/src/sentry/deletions/defaults/sentry_app_installation_token.py +++ b/src/sentry/deletions/defaults/sentry_app_installation_token.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation diff --git a/src/sentry/deletions/defaults/service_hook.py b/src/sentry/deletions/defaults/service_hook.py index 039aa60069bffa..07d9107d5e1c74 100644 --- a/src/sentry/deletions/defaults/service_hook.py +++ b/src/sentry/deletions/defaults/service_hook.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import ModelDeletionTask from sentry.sentry_apps.models.servicehook import ServiceHook diff --git a/src/sentry/deletions/defaults/team.py b/src/sentry/deletions/defaults/team.py index c0295f99f0b910..17b5edd63b5685 100644 --- a/src/sentry/deletions/defaults/team.py +++ b/src/sentry/deletions/defaults/team.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation diff --git a/src/sentry/deletions/defaults/uptime_subscription.py b/src/sentry/deletions/defaults/uptime_subscription.py index 2b511a46c8cc70..33b630a60b3d57 100644 --- a/src/sentry/deletions/defaults/uptime_subscription.py +++ b/src/sentry/deletions/defaults/uptime_subscription.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import ModelDeletionTask from sentry.uptime.models import UptimeSubscription, get_detector from sentry.uptime.subscriptions.subscriptions import delete_uptime_subscription, remove_uptime_seat diff --git a/src/sentry/deletions/defaults/workflow.py b/src/sentry/deletions/defaults/workflow.py index 8f0b435551450e..9fd233221fa137 100644 --- a/src/sentry/deletions/defaults/workflow.py +++ b/src/sentry/deletions/defaults/workflow.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.base import BaseRelation, ModelDeletionTask, ModelRelation from sentry.workflow_engine.models import Action, DataConditionGroup, Workflow diff --git a/src/sentry/deletions/manager.py b/src/sentry/deletions/manager.py index c24a9cc98c9019..a55b558ae90310 100644 --- a/src/sentry/deletions/manager.py +++ b/src/sentry/deletions/manager.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import MutableMapping -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int if TYPE_CHECKING: from sentry.db.models.base import Model diff --git a/src/sentry/deletions/models/__init__.py b/src/sentry/deletions/models/__init__.py index 6390b946de4da1..2f470aebef2cb3 100644 --- a/src/sentry/deletions/models/__init__.py +++ b/src/sentry/deletions/models/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.models.scheduleddeletion import RegionScheduledDeletion __all__ = ("RegionScheduledDeletion",) diff --git a/src/sentry/deletions/models/scheduleddeletion.py b/src/sentry/deletions/models/scheduleddeletion.py index 6f2c8d995aba66..3425a12aa913f0 100644 --- a/src/sentry/deletions/models/scheduleddeletion.py +++ b/src/sentry/deletions/models/scheduleddeletion.py @@ -2,7 +2,7 @@ import logging from datetime import datetime, timedelta -from typing import Any, Self +from typing import Any, Self, int from uuid import uuid4 from django.apps import apps diff --git a/src/sentry/deletions/tasks/groups.py b/src/sentry/deletions/tasks/groups.py index 1b6bce9369df6c..e10a04beaa4129 100644 --- a/src/sentry/deletions/tasks/groups.py +++ b/src/sentry/deletions/tasks/groups.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/deletions/tasks/hybrid_cloud.py b/src/sentry/deletions/tasks/hybrid_cloud.py index e464cd7aea7d10..f0212774c28e3f 100644 --- a/src/sentry/deletions/tasks/hybrid_cloud.py +++ b/src/sentry/deletions/tasks/hybrid_cloud.py @@ -15,7 +15,7 @@ from collections import defaultdict from dataclasses import dataclass from hashlib import sha1 -from typing import Any +from typing import int, Any from uuid import uuid4 import sentry_sdk diff --git a/src/sentry/deletions/tasks/nodestore.py b/src/sentry/deletions/tasks/nodestore.py index 2a79be32e7e7c3..e452043dfc92c8 100644 --- a/src/sentry/deletions/tasks/nodestore.py +++ b/src/sentry/deletions/tasks/nodestore.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any import sentry_sdk from snuba_sdk import DeleteQuery, Request diff --git a/src/sentry/deletions/tasks/overwatch.py b/src/sentry/deletions/tasks/overwatch.py index e883722dbcf6ff..123e36d9f5516c 100644 --- a/src/sentry/deletions/tasks/overwatch.py +++ b/src/sentry/deletions/tasks/overwatch.py @@ -1,7 +1,7 @@ import hashlib import hmac import logging -from typing import Any +from typing import int, Any import requests from django.conf import settings diff --git a/src/sentry/deletions/tasks/scheduled.py b/src/sentry/deletions/tasks/scheduled.py index 143af98bae6dba..7d09e58ca95fa3 100644 --- a/src/sentry/deletions/tasks/scheduled.py +++ b/src/sentry/deletions/tasks/scheduled.py @@ -1,6 +1,6 @@ import logging from datetime import timedelta -from typing import Any +from typing import int, Any import sentry_sdk from django.core.exceptions import ObjectDoesNotExist diff --git a/src/sentry/demo_mode/tasks.py b/src/sentry/demo_mode/tasks.py index c45bc77f926c94..28aaaecdce854d 100644 --- a/src/sentry/demo_mode/tasks.py +++ b/src/sentry/demo_mode/tasks.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import datetime, timedelta diff --git a/src/sentry/demo_mode/utils.py b/src/sentry/demo_mode/utils.py index 0b3ee58391dfca..1bc598f83d9b22 100644 --- a/src/sentry/demo_mode/utils.py +++ b/src/sentry/demo_mode/utils.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.auth.models import AnonymousUser from sentry import options diff --git a/src/sentry/digests/__init__.py b/src/sentry/digests/__init__.py index 9de7d3cf53ec62..ec6de3d591129d 100644 --- a/src/sentry/digests/__init__.py +++ b/src/sentry/digests/__init__.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.conf import settings diff --git a/src/sentry/digests/backends/base.py b/src/sentry/digests/backends/base.py index bea0bedcb35b12..940b704b23d613 100644 --- a/src/sentry/digests/backends/base.py +++ b/src/sentry/digests/backends/base.py @@ -2,7 +2,7 @@ import logging from collections.abc import Iterable, Mapping -from typing import TYPE_CHECKING, Any, NamedTuple +from typing import TYPE_CHECKING, Any, NamedTuple, int from sentry.digests.types import Record from sentry.utils.imports import import_string diff --git a/src/sentry/digests/backends/dummy.py b/src/sentry/digests/backends/dummy.py index 7ea836153aba41..43960221e38f74 100644 --- a/src/sentry/digests/backends/dummy.py +++ b/src/sentry/digests/backends/dummy.py @@ -1,6 +1,6 @@ from collections.abc import Iterable from contextlib import contextmanager -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.digests.backends.base import Backend, ScheduleEntry from sentry.digests.types import Record diff --git a/src/sentry/digests/backends/redis.py b/src/sentry/digests/backends/redis.py index 8bae666688ed18..5a6f91907b3b4f 100644 --- a/src/sentry/digests/backends/redis.py +++ b/src/sentry/digests/backends/redis.py @@ -4,7 +4,7 @@ import time from collections.abc import Generator, Iterable from contextlib import contextmanager -from typing import Any +from typing import int, Any from rb.clients import LocalClient from redis.exceptions import ResponseError diff --git a/src/sentry/digests/codecs.py b/src/sentry/digests/codecs.py index 28346fdacf1a2e..755dd3e35628cd 100644 --- a/src/sentry/digests/codecs.py +++ b/src/sentry/digests/codecs.py @@ -1,6 +1,6 @@ import pickle import zlib -from typing import Any +from typing import int, Any class Codec: diff --git a/src/sentry/digests/notifications.py b/src/sentry/digests/notifications.py index d8f2bd2596f26a..3ea8990c3f49fb 100644 --- a/src/sentry/digests/notifications.py +++ b/src/sentry/digests/notifications.py @@ -3,7 +3,7 @@ import logging from collections import defaultdict from collections.abc import Mapping, Sequence -from typing import Any, NamedTuple, TypeAlias +from typing import Any, NamedTuple, TypeAlias, int import sentry_sdk diff --git a/src/sentry/digests/types.py b/src/sentry/digests/types.py index c1c1aa5c0d5617..efe01c4be49b64 100644 --- a/src/sentry/digests/types.py +++ b/src/sentry/digests/types.py @@ -3,7 +3,7 @@ import datetime as datetime_mod from collections.abc import Sequence from enum import StrEnum -from typing import TYPE_CHECKING, NamedTuple +from typing import TYPE_CHECKING, NamedTuple, int from sentry.utils.dates import to_datetime diff --git a/src/sentry/digests/utils.py b/src/sentry/digests/utils.py index b99cc352ed2195..4140b29b7ac2ed 100644 --- a/src/sentry/digests/utils.py +++ b/src/sentry/digests/utils.py @@ -3,7 +3,7 @@ from collections import Counter, defaultdict from collections.abc import Iterable, Mapping, Sequence from datetime import datetime -from typing import TypedDict +from typing import int, TypedDict from django.db.models import Q diff --git a/src/sentry/discover/apps.py b/src/sentry/discover/apps.py index 34ef5972740021..aa9da0289a390c 100644 --- a/src/sentry/discover/apps.py +++ b/src/sentry/discover/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/discover/arithmetic.py b/src/sentry/discover/arithmetic.py index f8d1c554394c14..28476a790a8e17 100644 --- a/src/sentry/discover/arithmetic.py +++ b/src/sentry/discover/arithmetic.py @@ -2,7 +2,7 @@ import re from dataclasses import dataclass -from typing import Literal, Union, overload +from typing import Literal, Union, overload, int from parsimonious.exceptions import ParseError from parsimonious.grammar import Grammar diff --git a/src/sentry/discover/compare_tables.py b/src/sentry/discover/compare_tables.py index 0d7bd01829dfd4..0de47ee7cc7302 100644 --- a/src/sentry/discover/compare_tables.py +++ b/src/sentry/discover/compare_tables.py @@ -1,6 +1,6 @@ import logging from enum import Enum -from typing import TypedDict +from typing import int, TypedDict import sentry_sdk diff --git a/src/sentry/discover/compare_timeseries.py b/src/sentry/discover/compare_timeseries.py index b5489b95c5abe7..b1391202f40091 100644 --- a/src/sentry/discover/compare_timeseries.py +++ b/src/sentry/discover/compare_timeseries.py @@ -2,7 +2,7 @@ from collections import defaultdict from datetime import UTC, datetime, timedelta, timezone from enum import Enum -from typing import Any, TypedDict +from typing import Any, TypedDict, int from urllib.parse import urlencode import sentry_sdk diff --git a/src/sentry/discover/dashboard_widget_split.py b/src/sentry/discover/dashboard_widget_split.py index 6ce1e4e2560f31..9647a3bfb4886a 100644 --- a/src/sentry/discover/dashboard_widget_split.py +++ b/src/sentry/discover/dashboard_widget_split.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import datetime diff --git a/src/sentry/discover/dataset_split.py b/src/sentry/discover/dataset_split.py index 02625f5b5d3cff..50e8acf637e0bd 100644 --- a/src/sentry/discover/dataset_split.py +++ b/src/sentry/discover/dataset_split.py @@ -1,7 +1,7 @@ import logging from datetime import datetime from enum import Enum -from typing import Any +from typing import int, Any import sentry_sdk from snuba_sdk import ( diff --git a/src/sentry/discover/endpoints/bases.py b/src/sentry/discover/endpoints/bases.py index 9d067e9e0ee8dd..3485de75c47172 100644 --- a/src/sentry/discover/endpoints/bases.py +++ b/src/sentry/discover/endpoints/bases.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.bases.organization import OrganizationPermission from sentry.discover.models import DiscoverSavedQuery from sentry.models.organization import Organization diff --git a/src/sentry/discover/endpoints/discover_homepage_query.py b/src/sentry/discover/endpoints/discover_homepage_query.py index 27c21fc7661148..735f109b4ec561 100644 --- a/src/sentry/discover/endpoints/discover_homepage_query.py +++ b/src/sentry/discover/endpoints/discover_homepage_query.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from rest_framework.exceptions import ParseError from rest_framework.request import Request diff --git a/src/sentry/discover/endpoints/discover_key_transactions.py b/src/sentry/discover/endpoints/discover_key_transactions.py index 72a7a68450999d..9c709e43b76921 100644 --- a/src/sentry/discover/endpoints/discover_key_transactions.py +++ b/src/sentry/discover/endpoints/discover_key_transactions.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections import defaultdict -from typing import Any +from typing import int, Any from django.db import IntegrityError, router, transaction from rest_framework.exceptions import ParseError diff --git a/src/sentry/discover/endpoints/discover_saved_queries.py b/src/sentry/discover/endpoints/discover_saved_queries.py index fbdc086fef8651..3a23e42ff968a9 100644 --- a/src/sentry/discover/endpoints/discover_saved_queries.py +++ b/src/sentry/discover/endpoints/discover_saved_queries.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db.models import Case, IntegerField, When from drf_spectacular.utils import extend_schema diff --git a/src/sentry/discover/endpoints/discover_saved_query_detail.py b/src/sentry/discover/endpoints/discover_saved_query_detail.py index 8f18bd1557a9f5..74465be839a6aa 100644 --- a/src/sentry/discover/endpoints/discover_saved_query_detail.py +++ b/src/sentry/discover/endpoints/discover_saved_query_detail.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import F, Q from django.utils import timezone from drf_spectacular.utils import extend_schema diff --git a/src/sentry/discover/endpoints/serializers.py b/src/sentry/discover/endpoints/serializers.py index b497aafc262ee6..e5e0bce0a8b859 100644 --- a/src/sentry/discover/endpoints/serializers.py +++ b/src/sentry/discover/endpoints/serializers.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence import sentry_sdk diff --git a/src/sentry/discover/migrations/0001_move_discover_models.py b/src/sentry/discover/migrations/0001_move_discover_models.py index a95f609c9180e3..0138d438d788ed 100644 --- a/src/sentry/discover/migrations/0001_move_discover_models.py +++ b/src/sentry/discover/migrations/0001_move_discover_models.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-08 14:54 +from typing import int import django.db.models.deletion import django.utils.timezone from django.db import migrations, models diff --git a/src/sentry/discover/migrations/0002_link_migrated_explore_query_in_discover.py b/src/sentry/discover/migrations/0002_link_migrated_explore_query_in_discover.py index 15da6806abd0d4..f102ad03174bdf 100644 --- a/src/sentry/discover/migrations/0002_link_migrated_explore_query_in_discover.py +++ b/src/sentry/discover/migrations/0002_link_migrated_explore_query_in_discover.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-10 15:15 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/discover/migrations/0003_discover_json_field.py b/src/sentry/discover/migrations/0003_discover_json_field.py index a663ef6d724617..7e774d2dcf2a50 100644 --- a/src/sentry/discover/migrations/0003_discover_json_field.py +++ b/src/sentry/discover/migrations/0003_discover_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-04 19:23 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/discover/models.py b/src/sentry/discover/models.py index 89594789353b05..9e0342932aa44f 100644 --- a/src/sentry/discover/models.py +++ b/src/sentry/discover/models.py @@ -1,7 +1,7 @@ from __future__ import annotations from enum import Enum -from typing import ClassVar +from typing import int, ClassVar from django.db import models, router, transaction from django.db.models import Q, UniqueConstraint diff --git a/src/sentry/discover/translation/mep_to_eap.py b/src/sentry/discover/translation/mep_to_eap.py index 452fa881602116..a4046a5b2afb67 100644 --- a/src/sentry/discover/translation/mep_to_eap.py +++ b/src/sentry/discover/translation/mep_to_eap.py @@ -1,5 +1,5 @@ import re -from typing import TypedDict +from typing import int, TypedDict from parsimonious import NodeVisitor diff --git a/src/sentry/dynamic_sampling/__init__.py b/src/sentry/dynamic_sampling/__init__.py index e43f7e7c529f25..fe58c682713ab8 100644 --- a/src/sentry/dynamic_sampling/__init__.py +++ b/src/sentry/dynamic_sampling/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .rules.base import generate_rules from .rules.biases.boost_environments_bias import ENVIRONMENT_GLOBS, BoostEnvironmentsBias from .rules.biases.boost_latest_releases_bias import BoostLatestReleasesBias diff --git a/src/sentry/dynamic_sampling/models/base.py b/src/sentry/dynamic_sampling/models/base.py index c9952979e96b9e..976b8248a9a5dd 100644 --- a/src/sentry/dynamic_sampling/models/base.py +++ b/src/sentry/dynamic_sampling/models/base.py @@ -1,6 +1,6 @@ from abc import ABC, abstractmethod from dataclasses import dataclass -from typing import Generic, TypeVar +from typing import Generic, TypeVar, int @dataclass diff --git a/src/sentry/dynamic_sampling/models/common.py b/src/sentry/dynamic_sampling/models/common.py index d2009064813628..444fbd2f2b57bd 100644 --- a/src/sentry/dynamic_sampling/models/common.py +++ b/src/sentry/dynamic_sampling/models/common.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/dynamic_sampling/models/full_rebalancing.py b/src/sentry/dynamic_sampling/models/full_rebalancing.py index 0fc3a5d48556eb..d7513406322723 100644 --- a/src/sentry/dynamic_sampling/models/full_rebalancing.py +++ b/src/sentry/dynamic_sampling/models/full_rebalancing.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass from sentry.dynamic_sampling.models.base import Model, ModelInput diff --git a/src/sentry/dynamic_sampling/models/projects_rebalancing.py b/src/sentry/dynamic_sampling/models/projects_rebalancing.py index 36543e7b5c42bd..a801788ab07177 100644 --- a/src/sentry/dynamic_sampling/models/projects_rebalancing.py +++ b/src/sentry/dynamic_sampling/models/projects_rebalancing.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass from sentry.dynamic_sampling.models.base import Model, ModelInput diff --git a/src/sentry/dynamic_sampling/models/transactions_rebalancing.py b/src/sentry/dynamic_sampling/models/transactions_rebalancing.py index d9f375105fac0f..464daa96b30953 100644 --- a/src/sentry/dynamic_sampling/models/transactions_rebalancing.py +++ b/src/sentry/dynamic_sampling/models/transactions_rebalancing.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass from sentry.dynamic_sampling.models.base import Model, ModelInput diff --git a/src/sentry/dynamic_sampling/rules/base.py b/src/sentry/dynamic_sampling/rules/base.py index 637fe756c3079b..acfc70b113988d 100644 --- a/src/sentry/dynamic_sampling/rules/base.py +++ b/src/sentry/dynamic_sampling/rules/base.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections import OrderedDict from datetime import datetime, timedelta, timezone diff --git a/src/sentry/dynamic_sampling/rules/biases/base.py b/src/sentry/dynamic_sampling/rules/biases/base.py index 9d2c11873ddda8..de0d5265475f7c 100644 --- a/src/sentry/dynamic_sampling/rules/biases/base.py +++ b/src/sentry/dynamic_sampling/rules/biases/base.py @@ -1,6 +1,6 @@ from abc import ABC, abstractmethod from collections import namedtuple -from typing import Any +from typing import int, Any from sentry.dynamic_sampling.rules.utils import PolymorphicRule from sentry.models.project import Project diff --git a/src/sentry/dynamic_sampling/rules/biases/boost_environments_bias.py b/src/sentry/dynamic_sampling/rules/biases/boost_environments_bias.py index 3bf7e4d6367b41..46601d711fa3db 100644 --- a/src/sentry/dynamic_sampling/rules/biases/boost_environments_bias.py +++ b/src/sentry/dynamic_sampling/rules/biases/boost_environments_bias.py @@ -1,3 +1,4 @@ +from typing import int from sentry.dynamic_sampling.rules.biases.base import Bias from sentry.dynamic_sampling.rules.utils import RESERVED_IDS, PolymorphicRule, RuleType from sentry.models.project import Project diff --git a/src/sentry/dynamic_sampling/rules/biases/boost_latest_releases_bias.py b/src/sentry/dynamic_sampling/rules/biases/boost_latest_releases_bias.py index e3b2acde36b6e6..9fd2206f655234 100644 --- a/src/sentry/dynamic_sampling/rules/biases/boost_latest_releases_bias.py +++ b/src/sentry/dynamic_sampling/rules/biases/boost_latest_releases_bias.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import cast +from typing import int, cast from sentry.dynamic_sampling.rules.biases.base import Bias from sentry.dynamic_sampling.rules.helpers.latest_releases import ProjectBoostedReleases diff --git a/src/sentry/dynamic_sampling/rules/biases/boost_low_volume_projects_bias.py b/src/sentry/dynamic_sampling/rules/biases/boost_low_volume_projects_bias.py index 4479088079004d..4afd05cef90b68 100644 --- a/src/sentry/dynamic_sampling/rules/biases/boost_low_volume_projects_bias.py +++ b/src/sentry/dynamic_sampling/rules/biases/boost_low_volume_projects_bias.py @@ -1,3 +1,4 @@ +from typing import int from sentry.dynamic_sampling.rules.biases.base import Bias from sentry.dynamic_sampling.rules.utils import RESERVED_IDS, PolymorphicRule, RuleType from sentry.models.project import Project diff --git a/src/sentry/dynamic_sampling/rules/biases/boost_low_volume_transactions_bias.py b/src/sentry/dynamic_sampling/rules/biases/boost_low_volume_transactions_bias.py index f7a439fef419bd..c8d9e8383f1903 100644 --- a/src/sentry/dynamic_sampling/rules/biases/boost_low_volume_transactions_bias.py +++ b/src/sentry/dynamic_sampling/rules/biases/boost_low_volume_transactions_bias.py @@ -1,3 +1,4 @@ +from typing import int from sentry.dynamic_sampling.rules.biases.base import Bias from sentry.dynamic_sampling.rules.utils import RESERVED_IDS, PolymorphicRule, Rule, RuleType from sentry.dynamic_sampling.tasks.helpers.boost_low_volume_transactions import ( diff --git a/src/sentry/dynamic_sampling/rules/biases/boost_replay_id_bias.py b/src/sentry/dynamic_sampling/rules/biases/boost_replay_id_bias.py index d262b0c0a0b7a0..dd4aff42c9f53e 100644 --- a/src/sentry/dynamic_sampling/rules/biases/boost_replay_id_bias.py +++ b/src/sentry/dynamic_sampling/rules/biases/boost_replay_id_bias.py @@ -1,3 +1,4 @@ +from typing import int from sentry.dynamic_sampling.rules.biases.base import Bias from sentry.dynamic_sampling.rules.utils import RESERVED_IDS, PolymorphicRule, RuleType from sentry.models.project import Project diff --git a/src/sentry/dynamic_sampling/rules/biases/custom_rule_bias.py b/src/sentry/dynamic_sampling/rules/biases/custom_rule_bias.py index fb6d62c29c0af9..dc7a3dd254f064 100644 --- a/src/sentry/dynamic_sampling/rules/biases/custom_rule_bias.py +++ b/src/sentry/dynamic_sampling/rules/biases/custom_rule_bias.py @@ -1,5 +1,5 @@ import logging -from typing import cast +from typing import int, cast import orjson from sentry_relay.processing import validate_rule_condition diff --git a/src/sentry/dynamic_sampling/rules/biases/ignore_health_checks_bias.py b/src/sentry/dynamic_sampling/rules/biases/ignore_health_checks_bias.py index e3030dd2422241..50df8ca3638a5a 100644 --- a/src/sentry/dynamic_sampling/rules/biases/ignore_health_checks_bias.py +++ b/src/sentry/dynamic_sampling/rules/biases/ignore_health_checks_bias.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import HEALTH_CHECK_GLOBS from sentry.dynamic_sampling.rules.biases.base import Bias from sentry.dynamic_sampling.rules.utils import ( diff --git a/src/sentry/dynamic_sampling/rules/biases/minimum_sample_rate_bias.py b/src/sentry/dynamic_sampling/rules/biases/minimum_sample_rate_bias.py index c6bfc05dc04731..f9b76e8d87a2c4 100644 --- a/src/sentry/dynamic_sampling/rules/biases/minimum_sample_rate_bias.py +++ b/src/sentry/dynamic_sampling/rules/biases/minimum_sample_rate_bias.py @@ -1,3 +1,4 @@ +from typing import int from sentry.dynamic_sampling.rules.biases.base import Bias from sentry.dynamic_sampling.rules.utils import RESERVED_IDS, PolymorphicRule, RuleType from sentry.models.project import Project diff --git a/src/sentry/dynamic_sampling/rules/biases/recalibration_bias.py b/src/sentry/dynamic_sampling/rules/biases/recalibration_bias.py index 1d77009c40612c..97b30cf5371a87 100644 --- a/src/sentry/dynamic_sampling/rules/biases/recalibration_bias.py +++ b/src/sentry/dynamic_sampling/rules/biases/recalibration_bias.py @@ -1,3 +1,4 @@ +from typing import int from sentry.dynamic_sampling.rules.biases.base import Bias from sentry.dynamic_sampling.rules.utils import RESERVED_IDS, PolymorphicRule, RuleType from sentry.dynamic_sampling.tasks.helpers.recalibrate_orgs import ( diff --git a/src/sentry/dynamic_sampling/rules/combinators/base.py b/src/sentry/dynamic_sampling/rules/combinators/base.py index ed9999997c5d6a..a2f7ebc6551e70 100644 --- a/src/sentry/dynamic_sampling/rules/combinators/base.py +++ b/src/sentry/dynamic_sampling/rules/combinators/base.py @@ -1,3 +1,4 @@ +from typing import int from abc import ABC, abstractmethod from collections import OrderedDict from collections.abc import Callable diff --git a/src/sentry/dynamic_sampling/rules/combinators/ordered_combinator.py b/src/sentry/dynamic_sampling/rules/combinators/ordered_combinator.py index 0ef507988390ca..b2b72c21de9231 100644 --- a/src/sentry/dynamic_sampling/rules/combinators/ordered_combinator.py +++ b/src/sentry/dynamic_sampling/rules/combinators/ordered_combinator.py @@ -1,3 +1,4 @@ +from typing import int import collections from collections import OrderedDict diff --git a/src/sentry/dynamic_sampling/rules/combine.py b/src/sentry/dynamic_sampling/rules/combine.py index a60a0ed8386717..a2db356b4e341d 100644 --- a/src/sentry/dynamic_sampling/rules/combine.py +++ b/src/sentry/dynamic_sampling/rules/combine.py @@ -1,3 +1,4 @@ +from typing import int from sentry import features from sentry.dynamic_sampling.rules.biases.boost_environments_bias import BoostEnvironmentsBias from sentry.dynamic_sampling.rules.biases.boost_latest_releases_bias import BoostLatestReleasesBias diff --git a/src/sentry/dynamic_sampling/rules/helpers/latest_releases.py b/src/sentry/dynamic_sampling/rules/helpers/latest_releases.py index b0ad0bea5dfc5f..7615928901deb5 100644 --- a/src/sentry/dynamic_sampling/rules/helpers/latest_releases.py +++ b/src/sentry/dynamic_sampling/rules/helpers/latest_releases.py @@ -1,3 +1,4 @@ +from typing import int import re from collections import namedtuple from collections.abc import Callable diff --git a/src/sentry/dynamic_sampling/rules/helpers/time_to_adoptions.py b/src/sentry/dynamic_sampling/rules/helpers/time_to_adoptions.py index 158946dcb78685..e3250d34d2e0fb 100644 --- a/src/sentry/dynamic_sampling/rules/helpers/time_to_adoptions.py +++ b/src/sentry/dynamic_sampling/rules/helpers/time_to_adoptions.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass # This static list is the first step towards a smarter implementation of the latest release boosting. The idea behind diff --git a/src/sentry/dynamic_sampling/rules/utils.py b/src/sentry/dynamic_sampling/rules/utils.py index 4042da6984aa87..0f7dd206364efe 100644 --- a/src/sentry/dynamic_sampling/rules/utils.py +++ b/src/sentry/dynamic_sampling/rules/utils.py @@ -1,7 +1,7 @@ from __future__ import annotations from enum import Enum -from typing import Literal, NotRequired, TypedDict, Union +from typing import Literal, NotRequired, TypedDict, Union, int import orjson from django.conf import settings diff --git a/src/sentry/dynamic_sampling/tasks/boost_low_volume_projects.py b/src/sentry/dynamic_sampling/tasks/boost_low_volume_projects.py index 613e9be2ce415a..2b8a58c015d90d 100644 --- a/src/sentry/dynamic_sampling/tasks/boost_low_volume_projects.py +++ b/src/sentry/dynamic_sampling/tasks/boost_low_volume_projects.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections import defaultdict diff --git a/src/sentry/dynamic_sampling/tasks/boost_low_volume_transactions.py b/src/sentry/dynamic_sampling/tasks/boost_low_volume_transactions.py index 204e5a44ab19fe..c9f2d71f0d1d53 100644 --- a/src/sentry/dynamic_sampling/tasks/boost_low_volume_transactions.py +++ b/src/sentry/dynamic_sampling/tasks/boost_low_volume_transactions.py @@ -2,7 +2,7 @@ from collections.abc import Callable, Iterator, Sequence from datetime import datetime -from typing import TypedDict +from typing import int, TypedDict import sentry_sdk from snuba_sdk import ( diff --git a/src/sentry/dynamic_sampling/tasks/common.py b/src/sentry/dynamic_sampling/tasks/common.py index 01af52ff78a540..d76833830305d1 100644 --- a/src/sentry/dynamic_sampling/tasks/common.py +++ b/src/sentry/dynamic_sampling/tasks/common.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import math from dataclasses import dataclass diff --git a/src/sentry/dynamic_sampling/tasks/constants.py b/src/sentry/dynamic_sampling/tasks/constants.py index f93c5403c4f12a..d0f0f0e6fc0bf3 100644 --- a/src/sentry/dynamic_sampling/tasks/constants.py +++ b/src/sentry/dynamic_sampling/tasks/constants.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta # TTL in milliseconds for values persisted by the dynamic sampling tasks. diff --git a/src/sentry/dynamic_sampling/tasks/custom_rule_notifications.py b/src/sentry/dynamic_sampling/tasks/custom_rule_notifications.py index 9af43ee47975cb..7b3f2be8ec45b0 100644 --- a/src/sentry/dynamic_sampling/tasks/custom_rule_notifications.py +++ b/src/sentry/dynamic_sampling/tasks/custom_rule_notifications.py @@ -1,3 +1,4 @@ +from typing import int """ Task for sending notifications when custom rules have gathered enough samples. """ diff --git a/src/sentry/dynamic_sampling/tasks/helpers/boost_low_volume_projects.py b/src/sentry/dynamic_sampling/tasks/helpers/boost_low_volume_projects.py index ffd0ae0574e63e..ccf8c59b2516d4 100644 --- a/src/sentry/dynamic_sampling/tasks/helpers/boost_low_volume_projects.py +++ b/src/sentry/dynamic_sampling/tasks/helpers/boost_low_volume_projects.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import overload +from typing import int, overload import sentry_sdk diff --git a/src/sentry/dynamic_sampling/tasks/helpers/boost_low_volume_transactions.py b/src/sentry/dynamic_sampling/tasks/helpers/boost_low_volume_transactions.py index 648551b4517fdf..0be8d54b28de64 100644 --- a/src/sentry/dynamic_sampling/tasks/helpers/boost_low_volume_transactions.py +++ b/src/sentry/dynamic_sampling/tasks/helpers/boost_low_volume_transactions.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping import orjson diff --git a/src/sentry/dynamic_sampling/tasks/helpers/recalibrate_orgs.py b/src/sentry/dynamic_sampling/tasks/helpers/recalibrate_orgs.py index d44d717087e43c..4973873a0f7ad0 100644 --- a/src/sentry/dynamic_sampling/tasks/helpers/recalibrate_orgs.py +++ b/src/sentry/dynamic_sampling/tasks/helpers/recalibrate_orgs.py @@ -1,3 +1,4 @@ +from typing import int from sentry.dynamic_sampling.rules.utils import get_redis_client_for_ds from sentry.dynamic_sampling.tasks.constants import ADJUSTED_FACTOR_REDIS_CACHE_KEY_TTL from sentry.utils import metrics diff --git a/src/sentry/dynamic_sampling/tasks/helpers/sample_rate.py b/src/sentry/dynamic_sampling/tasks/helpers/sample_rate.py index 17205a0a0b71fe..e9be0ccd20d9fa 100644 --- a/src/sentry/dynamic_sampling/tasks/helpers/sample_rate.py +++ b/src/sentry/dynamic_sampling/tasks/helpers/sample_rate.py @@ -1,3 +1,4 @@ +from typing import int from sentry import features from sentry.constants import TARGET_SAMPLE_RATE_DEFAULT from sentry.dynamic_sampling.rules.utils import get_redis_client_for_ds diff --git a/src/sentry/dynamic_sampling/tasks/helpers/sliding_window.py b/src/sentry/dynamic_sampling/tasks/helpers/sliding_window.py index 36756735e7fba4..89556e41dca6db 100644 --- a/src/sentry/dynamic_sampling/tasks/helpers/sliding_window.py +++ b/src/sentry/dynamic_sampling/tasks/helpers/sliding_window.py @@ -1,3 +1,4 @@ +from typing import int from calendar import IllegalMonthError, monthrange from datetime import datetime, timezone diff --git a/src/sentry/dynamic_sampling/tasks/logging.py b/src/sentry/dynamic_sampling/tasks/logging.py index 88406e8fb5312a..73e3a97ee1634a 100644 --- a/src/sentry/dynamic_sampling/tasks/logging.py +++ b/src/sentry/dynamic_sampling/tasks/logging.py @@ -1,3 +1,4 @@ +from typing import int import logging logger = logging.getLogger(__name__) diff --git a/src/sentry/dynamic_sampling/tasks/recalibrate_orgs.py b/src/sentry/dynamic_sampling/tasks/recalibrate_orgs.py index 6d11cb8633c545..abf98e1c31bed4 100644 --- a/src/sentry/dynamic_sampling/tasks/recalibrate_orgs.py +++ b/src/sentry/dynamic_sampling/tasks/recalibrate_orgs.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Sequence diff --git a/src/sentry/dynamic_sampling/tasks/sliding_window_org.py b/src/sentry/dynamic_sampling/tasks/sliding_window_org.py index 5c704e7ba5f680..700dcdb2eb9099 100644 --- a/src/sentry/dynamic_sampling/tasks/sliding_window_org.py +++ b/src/sentry/dynamic_sampling/tasks/sliding_window_org.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import timedelta diff --git a/src/sentry/dynamic_sampling/tasks/utils.py b/src/sentry/dynamic_sampling/tasks/utils.py index 93797c749ad9cd..4d5fa6380f6a3e 100644 --- a/src/sentry/dynamic_sampling/tasks/utils.py +++ b/src/sentry/dynamic_sampling/tasks/utils.py @@ -1,7 +1,7 @@ from collections.abc import Callable from functools import wraps from random import random -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/dynamic_sampling/types.py b/src/sentry/dynamic_sampling/types.py index 29dddeaca20e4b..b11599904a0628 100644 --- a/src/sentry/dynamic_sampling/types.py +++ b/src/sentry/dynamic_sampling/types.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum from django.db import models diff --git a/src/sentry/dynamic_sampling/utils.py b/src/sentry/dynamic_sampling/utils.py index 1dc296e08a37b1..a9d635a1158daf 100644 --- a/src/sentry/dynamic_sampling/utils.py +++ b/src/sentry/dynamic_sampling/utils.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.auth.models import AnonymousUser from sentry import features diff --git a/src/sentry/event_manager.py b/src/sentry/event_manager.py index 404191e9aaec87..5420301e51236e 100644 --- a/src/sentry/event_manager.py +++ b/src/sentry/event_manager.py @@ -6,7 +6,7 @@ from collections.abc import Callable, Mapping, MutableMapping, Sequence from dataclasses import dataclass from datetime import datetime, timedelta, timezone -from typing import TYPE_CHECKING, Any, Literal, TypedDict, overload +from typing import TYPE_CHECKING, Any, Literal, TypedDict, overload, int import orjson import psycopg2.errors diff --git a/src/sentry/eventstore/__init__.py b/src/sentry/eventstore/__init__.py index 02ae21aee5130c..b4c33c4cf70321 100644 --- a/src/sentry/eventstore/__init__.py +++ b/src/sentry/eventstore/__init__.py @@ -1,6 +1,7 @@ # Shim for backward compatibility with getsentry # The eventstore module has been moved to sentry.services.eventstore +from typing import int from sentry.services import eventstore # noqa: F401, F403 from sentry.services.eventstore import backend # noqa: F401 from sentry.services.eventstore.base import Filter # noqa: F401 diff --git a/src/sentry/eventstore/base.py b/src/sentry/eventstore/base.py index 02a73613ee0b2d..c3da13dfdacdeb 100644 --- a/src/sentry/eventstore/base.py +++ b/src/sentry/eventstore/base.py @@ -1,4 +1,5 @@ # Shim for backward compatibility with getsentry # The eventstore module has been moved to sentry.services.eventstore +from typing import int from sentry.services.eventstore.base import * # noqa: F401, F403 diff --git a/src/sentry/eventstore/models.py b/src/sentry/eventstore/models.py index 002f8a0d735842..cea1f78d7cb4ce 100644 --- a/src/sentry/eventstore/models.py +++ b/src/sentry/eventstore/models.py @@ -1,4 +1,5 @@ # Shim for backward compatibility with getsentry # The eventstore module has been moved to sentry.services.eventstore +from typing import int from sentry.services.eventstore.models import * # noqa: F401, F403 diff --git a/src/sentry/eventstore/processing/__init__.py b/src/sentry/eventstore/processing/__init__.py index 6d14e9132aa964..32971525e83c89 100644 --- a/src/sentry/eventstore/processing/__init__.py +++ b/src/sentry/eventstore/processing/__init__.py @@ -1,4 +1,5 @@ # Shim for backward compatibility with getsentry # The eventstore module has been moved to sentry.services.eventstore +from typing import int from sentry.services.eventstore.processing import * # noqa: F401, F403 diff --git a/src/sentry/eventstore/processing/base.py b/src/sentry/eventstore/processing/base.py index d687d7c81c585f..eae72ba4aae3ed 100644 --- a/src/sentry/eventstore/processing/base.py +++ b/src/sentry/eventstore/processing/base.py @@ -1,4 +1,5 @@ # Shim for backward compatibility with getsentry # The eventstore module has been moved to sentry.services.eventstore +from typing import int from sentry.services.eventstore.processing.base import * # noqa: F401, F403 diff --git a/src/sentry/eventstore/processing/bigtable.py b/src/sentry/eventstore/processing/bigtable.py index 257f7612733fb4..d9ecb03ed9eb49 100644 --- a/src/sentry/eventstore/processing/bigtable.py +++ b/src/sentry/eventstore/processing/bigtable.py @@ -1,4 +1,5 @@ # Shim for backward compatibility with getsentry # The eventstore module has been moved to sentry.services.eventstore +from typing import int from sentry.services.eventstore.processing.bigtable import * # noqa: F401, F403 diff --git a/src/sentry/eventstore/processing/redis.py b/src/sentry/eventstore/processing/redis.py index b96dc1028df636..da9cf886c0f812 100644 --- a/src/sentry/eventstore/processing/redis.py +++ b/src/sentry/eventstore/processing/redis.py @@ -1,4 +1,5 @@ # Shim for backward compatibility with getsentry # The eventstore module has been moved to sentry.services.eventstore +from typing import int from sentry.services.eventstore.processing.redis import * # noqa: F401, F403 diff --git a/src/sentry/eventstore/reprocessing/__init__.py b/src/sentry/eventstore/reprocessing/__init__.py index a369386fa84e5f..0d3f87883aeb19 100644 --- a/src/sentry/eventstore/reprocessing/__init__.py +++ b/src/sentry/eventstore/reprocessing/__init__.py @@ -1,4 +1,5 @@ # Shim for backward compatibility with getsentry # The eventstore module has been moved to sentry.services.eventstore +from typing import int from sentry.services.eventstore.reprocessing import * # noqa: F401, F403 diff --git a/src/sentry/eventstore/reprocessing/base.py b/src/sentry/eventstore/reprocessing/base.py index bc4f3ac8478083..2dd8bfe39ee3d4 100644 --- a/src/sentry/eventstore/reprocessing/base.py +++ b/src/sentry/eventstore/reprocessing/base.py @@ -1,4 +1,5 @@ # Shim for backward compatibility with getsentry # The eventstore module has been moved to sentry.services.eventstore +from typing import int from sentry.services.eventstore.reprocessing.base import * # noqa: F401, F403 diff --git a/src/sentry/eventstore/reprocessing/redis.py b/src/sentry/eventstore/reprocessing/redis.py index beedebac18b543..bfa57978531f49 100644 --- a/src/sentry/eventstore/reprocessing/redis.py +++ b/src/sentry/eventstore/reprocessing/redis.py @@ -1,4 +1,5 @@ # Shim for backward compatibility with getsentry # The eventstore module has been moved to sentry.services.eventstore +from typing import int from sentry.services.eventstore.reprocessing.redis import * # noqa: F401, F403 diff --git a/src/sentry/eventstore/snuba/__init__.py b/src/sentry/eventstore/snuba/__init__.py index a8d46c3e03c947..a67939bfa4f184 100644 --- a/src/sentry/eventstore/snuba/__init__.py +++ b/src/sentry/eventstore/snuba/__init__.py @@ -1,4 +1,5 @@ # Shim for backward compatibility with getsentry # The eventstore module has been moved to sentry.services.eventstore +from typing import int from sentry.services.eventstore.snuba import * # noqa: F401, F403 diff --git a/src/sentry/eventstore/snuba/backend.py b/src/sentry/eventstore/snuba/backend.py index a78e899c2cddb1..ec2ec559391f25 100644 --- a/src/sentry/eventstore/snuba/backend.py +++ b/src/sentry/eventstore/snuba/backend.py @@ -1,4 +1,5 @@ # Shim for backward compatibility with getsentry # The eventstore module has been moved to sentry.services.eventstore +from typing import int from sentry.services.eventstore.snuba.backend import * # noqa: F401, F403 diff --git a/src/sentry/eventstream/__init__.py b/src/sentry/eventstream/__init__.py index fc88e9d646c4a0..de10331293e317 100644 --- a/src/sentry/eventstream/__init__.py +++ b/src/sentry/eventstream/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/eventstream/base.py b/src/sentry/eventstream/base.py index 1de02a9a0aecda..daf07c5b9a5161 100644 --- a/src/sentry/eventstream/base.py +++ b/src/sentry/eventstream/base.py @@ -3,7 +3,7 @@ import logging from collections.abc import Collection, Mapping, MutableMapping, Sequence from datetime import datetime -from typing import TYPE_CHECKING, Any, Optional, TypedDict, cast +from typing import TYPE_CHECKING, Any, Optional, TypedDict, cast, int from sentry.issues.issue_occurrence import IssueOccurrence from sentry.tasks.post_process import post_process_group diff --git a/src/sentry/eventstream/eap.py b/src/sentry/eventstream/eap.py index 6fc0b6789c6c90..3bbc38d47d339a 100644 --- a/src/sentry/eventstream/eap.py +++ b/src/sentry/eventstream/eap.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Sequence diff --git a/src/sentry/eventstream/item_helpers.py b/src/sentry/eventstream/item_helpers.py index a5387b7f6f79a9..fdff7735f4236a 100644 --- a/src/sentry/eventstream/item_helpers.py +++ b/src/sentry/eventstream/item_helpers.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from google.protobuf.timestamp_pb2 import Timestamp from sentry_protos.snuba.v1.request_common_pb2 import TRACE_ITEM_TYPE_OCCURRENCE diff --git a/src/sentry/eventstream/kafka/__init__.py b/src/sentry/eventstream/kafka/__init__.py index b0e345444f916e..337194cd7546f3 100644 --- a/src/sentry/eventstream/kafka/__init__.py +++ b/src/sentry/eventstream/kafka/__init__.py @@ -1 +1,2 @@ +from typing import int from .backend import KafkaEventStream # noqa diff --git a/src/sentry/eventstream/kafka/backend.py b/src/sentry/eventstream/kafka/backend.py index d6f163d14b9a9d..64967f912e3b9c 100644 --- a/src/sentry/eventstream/kafka/backend.py +++ b/src/sentry/eventstream/kafka/backend.py @@ -4,7 +4,7 @@ import time from collections.abc import Mapping, MutableMapping, Sequence from datetime import datetime -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from arroyo.backends.kafka import build_kafka_producer_configuration from confluent_kafka import KafkaError diff --git a/src/sentry/eventstream/kafka/dispatch.py b/src/sentry/eventstream/kafka/dispatch.py index 08c32ecee204f0..c658df7f8ad619 100644 --- a/src/sentry/eventstream/kafka/dispatch.py +++ b/src/sentry/eventstream/kafka/dispatch.py @@ -2,7 +2,7 @@ import random from collections.abc import Generator, Mapping from contextlib import contextmanager -from typing import Any +from typing import int, Any from arroyo.backends.kafka.consumer import KafkaPayload from arroyo.types import Message diff --git a/src/sentry/eventstream/kafka/protocol.py b/src/sentry/eventstream/kafka/protocol.py index 72008096b64d7d..e75ccbcd740977 100644 --- a/src/sentry/eventstream/kafka/protocol.py +++ b/src/sentry/eventstream/kafka/protocol.py @@ -2,7 +2,7 @@ import logging from collections.abc import Callable, Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from sentry.utils import json, metrics diff --git a/src/sentry/eventstream/snuba.py b/src/sentry/eventstream/snuba.py index 594ebdcb19e1da..1ce02498aee310 100644 --- a/src/sentry/eventstream/snuba.py +++ b/src/sentry/eventstream/snuba.py @@ -3,7 +3,7 @@ import logging from collections.abc import Collection, Mapping, MutableMapping, Sequence from datetime import datetime, timezone -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from uuid import uuid4 import urllib3 diff --git a/src/sentry/eventstream/types.py b/src/sentry/eventstream/types.py index 239943198d07ff..e16ecd0dafaab7 100644 --- a/src/sentry/eventstream/types.py +++ b/src/sentry/eventstream/types.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum diff --git a/src/sentry/eventtypes/__init__.py b/src/sentry/eventtypes/__init__.py index dac928a6d6e680..080f959f2adf0b 100644 --- a/src/sentry/eventtypes/__init__.py +++ b/src/sentry/eventtypes/__init__.py @@ -1,4 +1,4 @@ -from typing import Union +from typing import int, Union from sentry.eventtypes.base import DefaultEvent from sentry.eventtypes.error import ErrorEvent diff --git a/src/sentry/eventtypes/base.py b/src/sentry/eventtypes/base.py index f1756ea13bebb2..9d7220bb27c6a9 100644 --- a/src/sentry/eventtypes/base.py +++ b/src/sentry/eventtypes/base.py @@ -1,3 +1,4 @@ +from typing import int from warnings import warn from sentry.utils.safe import get_path diff --git a/src/sentry/eventtypes/error.py b/src/sentry/eventtypes/error.py index fcf55edc0e51e6..eb250bea50ee65 100644 --- a/src/sentry/eventtypes/error.py +++ b/src/sentry/eventtypes/error.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import MutableMapping -from typing import Any +from typing import int, Any from sentry.utils.safe import get_path, trim from sentry.utils.strings import truncatechars diff --git a/src/sentry/eventtypes/feedback.py b/src/sentry/eventtypes/feedback.py index 1f1625d9a7ca5f..bd054433c0a71e 100644 --- a/src/sentry/eventtypes/feedback.py +++ b/src/sentry/eventtypes/feedback.py @@ -1,3 +1,4 @@ +from typing import int from sentry.eventtypes.base import BaseEvent from sentry.utils.safe import get_path diff --git a/src/sentry/eventtypes/generic.py b/src/sentry/eventtypes/generic.py index 6ac46cb7c1b0ee..e138aa37cc198c 100644 --- a/src/sentry/eventtypes/generic.py +++ b/src/sentry/eventtypes/generic.py @@ -1,3 +1,4 @@ +from typing import int from sentry.eventtypes.base import BaseEvent diff --git a/src/sentry/eventtypes/manager.py b/src/sentry/eventtypes/manager.py index 09489c0c4d765a..4915464f912f8d 100644 --- a/src/sentry/eventtypes/manager.py +++ b/src/sentry/eventtypes/manager.py @@ -1,3 +1,4 @@ +from typing import int class EventTypeManager: def __init__(self): self.__values = [] diff --git a/src/sentry/eventtypes/nel.py b/src/sentry/eventtypes/nel.py index d275c1157fe283..e1dd2c2c4f5454 100644 --- a/src/sentry/eventtypes/nel.py +++ b/src/sentry/eventtypes/nel.py @@ -1,3 +1,4 @@ +from typing import int from .base import DefaultEvent diff --git a/src/sentry/eventtypes/security.py b/src/sentry/eventtypes/security.py index 05ba893dc5fade..8f59b2efc228b2 100644 --- a/src/sentry/eventtypes/security.py +++ b/src/sentry/eventtypes/security.py @@ -1,3 +1,4 @@ +from typing import int from sentry.security import csp from sentry.utils.safe import get_path from sentry.utils.strings import strip diff --git a/src/sentry/eventtypes/transaction.py b/src/sentry/eventtypes/transaction.py index 56d20133d9df69..64a26bedbcc03f 100644 --- a/src/sentry/eventtypes/transaction.py +++ b/src/sentry/eventtypes/transaction.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.safe import get_path from .base import BaseEvent diff --git a/src/sentry/exceptions.py b/src/sentry/exceptions.py index c47c15ca980bc7..be280829d5c3a0 100644 --- a/src/sentry/exceptions.py +++ b/src/sentry/exceptions.py @@ -1,3 +1,4 @@ +from typing import int from django.core.exceptions import SuspiciousOperation diff --git a/src/sentry/explore/endpoints/bases.py b/src/sentry/explore/endpoints/bases.py index 8512c577eb49dd..26a4b22a14c859 100644 --- a/src/sentry/explore/endpoints/bases.py +++ b/src/sentry/explore/endpoints/bases.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.bases.organization import OrganizationPermission from sentry.explore.models import ExploreSavedQuery from sentry.models.organization import Organization diff --git a/src/sentry/explore/endpoints/explore_saved_queries.py b/src/sentry/explore/endpoints/explore_saved_queries.py index bbcd3191264b67..20c9dcb5844d69 100644 --- a/src/sentry/explore/endpoints/explore_saved_queries.py +++ b/src/sentry/explore/endpoints/explore_saved_queries.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import sentry_sdk from django.db import router, transaction diff --git a/src/sentry/explore/endpoints/explore_saved_query_detail.py b/src/sentry/explore/endpoints/explore_saved_query_detail.py index 8cbe49161975a8..ed02245db92a46 100644 --- a/src/sentry/explore/endpoints/explore_saved_query_detail.py +++ b/src/sentry/explore/endpoints/explore_saved_query_detail.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import F from django.utils import timezone from drf_spectacular.utils import extend_schema diff --git a/src/sentry/explore/endpoints/explore_saved_query_starred.py b/src/sentry/explore/endpoints/explore_saved_query_starred.py index d84aed6bb0755e..1d183bd56cda53 100644 --- a/src/sentry/explore/endpoints/explore_saved_query_starred.py +++ b/src/sentry/explore/endpoints/explore_saved_query_starred.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers, status from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/explore/endpoints/explore_saved_query_starred_order.py b/src/sentry/explore/endpoints/explore_saved_query_starred_order.py index 424cd7eea0507e..c097662b58ecec 100644 --- a/src/sentry/explore/endpoints/explore_saved_query_starred_order.py +++ b/src/sentry/explore/endpoints/explore_saved_query_starred_order.py @@ -1,3 +1,4 @@ +from typing import int from django.db import IntegrityError, router, transaction from rest_framework import serializers, status from rest_framework.exceptions import ParseError diff --git a/src/sentry/explore/endpoints/serializers.py b/src/sentry/explore/endpoints/serializers.py index 0b70f8020f82b4..8d08173eaef04a 100644 --- a/src/sentry/explore/endpoints/serializers.py +++ b/src/sentry/explore/endpoints/serializers.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema_serializer from rest_framework import serializers from rest_framework.exceptions import ParseError, ValidationError diff --git a/src/sentry/explore/migrations/0001_squashed_0004_add_explore_last_visited_table.py b/src/sentry/explore/migrations/0001_squashed_0004_add_explore_last_visited_table.py index 4bf9f4dd7ee49b..95d7194491f384 100644 --- a/src/sentry/explore/migrations/0001_squashed_0004_add_explore_last_visited_table.py +++ b/src/sentry/explore/migrations/0001_squashed_0004_add_explore_last_visited_table.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 16:29 +from typing import int import django.db.models.constraints import django.db.models.deletion import django.utils.timezone diff --git a/src/sentry/explore/migrations/0005_explore_django_json_field.py b/src/sentry/explore/migrations/0005_explore_django_json_field.py index f17c0d7b084781..6f444440df5af0 100644 --- a/src/sentry/explore/migrations/0005_explore_django_json_field.py +++ b/src/sentry/explore/migrations/0005_explore_django_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-27 16:17 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/explore/migrations/0006_add_changed_reason_field_explore.py b/src/sentry/explore/migrations/0006_add_changed_reason_field_explore.py index b5b0f35cc791f9..1bffae23f3ebac 100644 --- a/src/sentry/explore/migrations/0006_add_changed_reason_field_explore.py +++ b/src/sentry/explore/migrations/0006_add_changed_reason_field_explore.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-10 14:27 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/explore/models.py b/src/sentry/explore/models.py index 22a7d4727fa67a..0e2855027a0a58 100644 --- a/src/sentry/explore/models.py +++ b/src/sentry/explore/models.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import ClassVar +from typing import int, ClassVar from django.db import models, router, transaction from django.db.models import UniqueConstraint diff --git a/src/sentry/explore/translation/alerts_translation.py b/src/sentry/explore/translation/alerts_translation.py index 3d5b780ab833ad..41e86ca5f52152 100644 --- a/src/sentry/explore/translation/alerts_translation.py +++ b/src/sentry/explore/translation/alerts_translation.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db import router, transaction diff --git a/src/sentry/explore/translation/dashboards_translation.py b/src/sentry/explore/translation/dashboards_translation.py index 06cb096c9ea84f..c309e70ff46d82 100644 --- a/src/sentry/explore/translation/dashboards_translation.py +++ b/src/sentry/explore/translation/dashboards_translation.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db import router diff --git a/src/sentry/explore/translation/discover_translation.py b/src/sentry/explore/translation/discover_translation.py index 07119692046ba1..ec50d85c1958c0 100644 --- a/src/sentry/explore/translation/discover_translation.py +++ b/src/sentry/explore/translation/discover_translation.py @@ -1,5 +1,5 @@ import re -from typing import Any +from typing import int, Any from sentry.discover.arithmetic import is_equation from sentry.discover.models import DiscoverSavedQuery diff --git a/src/sentry/explore/utils.py b/src/sentry/explore/utils.py index 20b7805fe430d1..5907319ed6e051 100644 --- a/src/sentry/explore/utils.py +++ b/src/sentry/explore/utils.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry import features from sentry.models.organization import Organization diff --git a/src/sentry/features/__init__.py b/src/sentry/features/__init__.py index 3072e0b441e355..e369c3d36ae09b 100644 --- a/src/sentry/features/__init__.py +++ b/src/sentry/features/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.features.permanent import register_permanent_features from sentry.features.temporary import register_temporary_features diff --git a/src/sentry/features/base.py b/src/sentry/features/base.py index d8b42aa0b1a742..a896155e3d739a 100644 --- a/src/sentry/features/base.py +++ b/src/sentry/features/base.py @@ -12,7 +12,7 @@ ] import abc -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int if TYPE_CHECKING: from sentry.models.organization import Organization diff --git a/src/sentry/features/exceptions.py b/src/sentry/features/exceptions.py index 21b9832090537c..622c504d583d84 100644 --- a/src/sentry/features/exceptions.py +++ b/src/sentry/features/exceptions.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["FeatureNotRegistered"] diff --git a/src/sentry/features/flagpole_context.py b/src/sentry/features/flagpole_context.py index 0bfe2d0fc732f2..52a559530a8365 100644 --- a/src/sentry/features/flagpole_context.py +++ b/src/sentry/features/flagpole_context.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/features/handler.py b/src/sentry/features/handler.py index ac30b74141f474..55162c4054fbd6 100644 --- a/src/sentry/features/handler.py +++ b/src/sentry/features/handler.py @@ -2,7 +2,7 @@ import abc from collections.abc import Sequence -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING if TYPE_CHECKING: from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/features/manager.py b/src/sentry/features/manager.py index 58868dbdd8f7a0..e7e207393f42d7 100644 --- a/src/sentry/features/manager.py +++ b/src/sentry/features/manager.py @@ -7,7 +7,7 @@ import abc from collections import defaultdict from collections.abc import Iterable, Sequence -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/features/permanent.py b/src/sentry/features/permanent.py index 76548ce718c99f..5ec06a9adce1a8 100644 --- a/src/sentry/features/permanent.py +++ b/src/sentry/features/permanent.py @@ -1,3 +1,4 @@ +from typing import int from sentry.features.base import ( FeatureHandlerStrategy, OrganizationFeature, diff --git a/src/sentry/features/temporary.py b/src/sentry/features/temporary.py index 18772de11aed94..63432934c379d3 100644 --- a/src/sentry/features/temporary.py +++ b/src/sentry/features/temporary.py @@ -1,3 +1,4 @@ +from typing import int from .base import ( FeatureHandlerStrategy, OrganizationFeature, diff --git a/src/sentry/feedback/apps.py b/src/sentry/feedback/apps.py index e316070d3ec478..28ada2d0295544 100644 --- a/src/sentry/feedback/apps.py +++ b/src/sentry/feedback/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/feedback/endpoints/error_page_embed.py b/src/sentry/feedback/endpoints/error_page_embed.py index c468be956b5fe5..b8933c441ee847 100644 --- a/src/sentry/feedback/endpoints/error_page_embed.py +++ b/src/sentry/feedback/endpoints/error_page_embed.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django import forms from django.db import IntegrityError, router diff --git a/src/sentry/feedback/endpoints/organization_feedback_categories.py b/src/sentry/feedback/endpoints/organization_feedback_categories.py index 314f37d4780038..87c4ef0f4450e4 100644 --- a/src/sentry/feedback/endpoints/organization_feedback_categories.py +++ b/src/sentry/feedback/endpoints/organization_feedback_categories.py @@ -1,6 +1,6 @@ import logging from datetime import timedelta -from typing import TypedDict +from typing import int, TypedDict from rest_framework.exceptions import ParseError from rest_framework.request import Request diff --git a/src/sentry/feedback/endpoints/organization_feedback_summary.py b/src/sentry/feedback/endpoints/organization_feedback_summary.py index 9d1459d746b129..183e4935b8c33d 100644 --- a/src/sentry/feedback/endpoints/organization_feedback_summary.py +++ b/src/sentry/feedback/endpoints/organization_feedback_summary.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import timedelta diff --git a/src/sentry/feedback/endpoints/organization_user_reports.py b/src/sentry/feedback/endpoints/organization_user_reports.py index ad465450662c5a..841ee87f53b177 100644 --- a/src/sentry/feedback/endpoints/organization_user_reports.py +++ b/src/sentry/feedback/endpoints/organization_user_reports.py @@ -1,5 +1,5 @@ from datetime import UTC, datetime, timedelta -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/feedback/endpoints/project_user_reports.py b/src/sentry/feedback/endpoints/project_user_reports.py index 8d0dabb2952e79..2b271187498b5f 100644 --- a/src/sentry/feedback/endpoints/project_user_reports.py +++ b/src/sentry/feedback/endpoints/project_user_reports.py @@ -1,5 +1,5 @@ from datetime import UTC, datetime, timedelta -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int from rest_framework import serializers from rest_framework.request import Request diff --git a/src/sentry/feedback/lib/label_query.py b/src/sentry/feedback/lib/label_query.py index ffff63072f50a6..e7dbc6f6f039b5 100644 --- a/src/sentry/feedback/lib/label_query.py +++ b/src/sentry/feedback/lib/label_query.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from snuba_sdk import ( diff --git a/src/sentry/feedback/lib/seer_api.py b/src/sentry/feedback/lib/seer_api.py index 47a904efc0c8b0..8e170ebcafcbcd 100644 --- a/src/sentry/feedback/lib/seer_api.py +++ b/src/sentry/feedback/lib/seer_api.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.net.http import connection_from_url diff --git a/src/sentry/feedback/lib/types.py b/src/sentry/feedback/lib/types.py index 1f8faeb91f0623..81aeb56a99841a 100644 --- a/src/sentry/feedback/lib/types.py +++ b/src/sentry/feedback/lib/types.py @@ -1,4 +1,4 @@ -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int class UserReportDict(TypedDict): diff --git a/src/sentry/feedback/lib/utils.py b/src/sentry/feedback/lib/utils.py index 8d3ce6258bcf12..feb8cae45ce313 100644 --- a/src/sentry/feedback/lib/utils.py +++ b/src/sentry/feedback/lib/utils.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from enum import Enum diff --git a/src/sentry/feedback/migrations/0001_squashed_0004_index_together.py b/src/sentry/feedback/migrations/0001_squashed_0004_index_together.py index cc2a38f45d877c..9261fcc2e104f2 100644 --- a/src/sentry/feedback/migrations/0001_squashed_0004_index_together.py +++ b/src/sentry/feedback/migrations/0001_squashed_0004_index_together.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 16:29 +from typing import int import django.db.models.deletion import django.utils.timezone from django.db import migrations, models diff --git a/src/sentry/feedback/migrations/0005_feedback_fk_not_db_contstr.py b/src/sentry/feedback/migrations/0005_feedback_fk_not_db_contstr.py index 4bf7005574c607..1dbcdb12294f2b 100644 --- a/src/sentry/feedback/migrations/0005_feedback_fk_not_db_contstr.py +++ b/src/sentry/feedback/migrations/0005_feedback_fk_not_db_contstr.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-12 15:45 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/feedback/migrations/0006_safe_del_feedback_model.py b/src/sentry/feedback/migrations/0006_safe_del_feedback_model.py index 4cd632b6e96b22..75921f8b84dab1 100644 --- a/src/sentry/feedback/migrations/0006_safe_del_feedback_model.py +++ b/src/sentry/feedback/migrations/0006_safe_del_feedback_model.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-12 16:33 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/feedback/tasks/update_user_reports.py b/src/sentry/feedback/tasks/update_user_reports.py index 14cdc382ee7c24..df3f2f79da2294 100644 --- a/src/sentry/feedback/tasks/update_user_reports.py +++ b/src/sentry/feedback/tasks/update_user_reports.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import datetime, timedelta diff --git a/src/sentry/feedback/usecases/ingest/create_feedback.py b/src/sentry/feedback/usecases/ingest/create_feedback.py index e3cee40130f048..b15afd94f6de19 100644 --- a/src/sentry/feedback/usecases/ingest/create_feedback.py +++ b/src/sentry/feedback/usecases/ingest/create_feedback.py @@ -3,7 +3,7 @@ import logging import random from datetime import UTC, datetime -from typing import Any +from typing import int, Any from uuid import UUID, uuid4 import jsonschema diff --git a/src/sentry/feedback/usecases/ingest/save_event_feedback.py b/src/sentry/feedback/usecases/ingest/save_event_feedback.py index 3b61401ba571bd..e9123819be392d 100644 --- a/src/sentry/feedback/usecases/ingest/save_event_feedback.py +++ b/src/sentry/feedback/usecases/ingest/save_event_feedback.py @@ -1,7 +1,7 @@ import logging from collections.abc import Mapping from datetime import UTC, datetime -from typing import Any +from typing import int, Any from sentry.feedback.lib.utils import FeedbackCreationSource from sentry.feedback.usecases.ingest.create_feedback import create_feedback_issue diff --git a/src/sentry/feedback/usecases/ingest/shim_to_feedback.py b/src/sentry/feedback/usecases/ingest/shim_to_feedback.py index f44c288b692e6f..671961eb690275 100644 --- a/src/sentry/feedback/usecases/ingest/shim_to_feedback.py +++ b/src/sentry/feedback/usecases/ingest/shim_to_feedback.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from sentry.feedback.lib.types import UserReportDict from sentry.feedback.lib.utils import FeedbackCreationSource, is_in_feedback_denylist diff --git a/src/sentry/feedback/usecases/ingest/userreport.py b/src/sentry/feedback/usecases/ingest/userreport.py index 745e0755ee6b98..293e75146c2897 100644 --- a/src/sentry/feedback/usecases/ingest/userreport.py +++ b/src/sentry/feedback/usecases/ingest/userreport.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import random diff --git a/src/sentry/feedback/usecases/label_generation.py b/src/sentry/feedback/usecases/label_generation.py index 050106d156b686..4b701455c3a7a6 100644 --- a/src/sentry/feedback/usecases/label_generation.py +++ b/src/sentry/feedback/usecases/label_generation.py @@ -1,5 +1,5 @@ import logging -from typing import TypedDict +from typing import int, TypedDict from sentry.feedback.lib.seer_api import seer_summarization_connection_pool from sentry.seer.signed_seer_api import make_signed_seer_api_request diff --git a/src/sentry/feedback/usecases/spam_detection.py b/src/sentry/feedback/usecases/spam_detection.py index 53adb33131ccae..5e0cef7e797c05 100644 --- a/src/sentry/feedback/usecases/spam_detection.py +++ b/src/sentry/feedback/usecases/spam_detection.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry import features diff --git a/src/sentry/feedback/usecases/title_generation.py b/src/sentry/feedback/usecases/title_generation.py index 9ba0b2cf9d14bd..db92ac40403b15 100644 --- a/src/sentry/feedback/usecases/title_generation.py +++ b/src/sentry/feedback/usecases/title_generation.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import TypedDict +from typing import int, TypedDict from sentry.feedback.lib.seer_api import seer_summarization_connection_pool from sentry.seer.signed_seer_api import make_signed_seer_api_request diff --git a/src/sentry/filestore/__init__.py b/src/sentry/filestore/__init__.py index 9fdf660efd036d..b29b21aa38c87c 100644 --- a/src/sentry/filestore/__init__.py +++ b/src/sentry/filestore/__init__.py @@ -1,3 +1,4 @@ +from typing import int """ Backward compatibility shim for getsentry. diff --git a/src/sentry/filestore/gcs.py b/src/sentry/filestore/gcs.py index a810900f82643f..8334916d5cc94a 100644 --- a/src/sentry/filestore/gcs.py +++ b/src/sentry/filestore/gcs.py @@ -1,3 +1,4 @@ +from typing import int """ Backward compatibility shim for getsentry. diff --git a/src/sentry/filestore/s3.py b/src/sentry/filestore/s3.py index 3547f6a5d980bd..163e336c00a954 100644 --- a/src/sentry/filestore/s3.py +++ b/src/sentry/filestore/s3.py @@ -1,3 +1,4 @@ +from typing import int """ Backward compatibility shim for getsentry. diff --git a/src/sentry/flags/endpoints/hooks.py b/src/sentry/flags/endpoints/hooks.py index 9f00a43ef56567..b0810a412329e7 100644 --- a/src/sentry/flags/endpoints/hooks.py +++ b/src/sentry/flags/endpoints/hooks.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/flags/endpoints/logs.py b/src/sentry/flags/endpoints/logs.py index dc503ce9a8f51b..bd0b712ff101e4 100644 --- a/src/sentry/flags/endpoints/logs.py +++ b/src/sentry/flags/endpoints/logs.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.db.models import Q from rest_framework import serializers as rest_serializers diff --git a/src/sentry/flags/endpoints/secrets.py b/src/sentry/flags/endpoints/secrets.py index 788d1048e6f63d..24e8b613b82941 100644 --- a/src/sentry/flags/endpoints/secrets.py +++ b/src/sentry/flags/endpoints/secrets.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import datetime, timezone -from typing import TypedDict +from typing import int, TypedDict from rest_framework import serializers from rest_framework.request import Request diff --git a/src/sentry/flags/migrations/0001_squashed_0004_add_flag_audit_log_provider_column.py b/src/sentry/flags/migrations/0001_squashed_0004_add_flag_audit_log_provider_column.py index 3a747fbe2227aa..185098b6bee629 100644 --- a/src/sentry/flags/migrations/0001_squashed_0004_add_flag_audit_log_provider_column.py +++ b/src/sentry/flags/migrations/0001_squashed_0004_add_flag_audit_log_provider_column.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 16:29 +from typing import int import django.db.models.deletion import django.utils.timezone from django.db import migrations, models diff --git a/src/sentry/flags/models.py b/src/sentry/flags/models.py index 0c80fcf7214454..c6139a41bc878e 100644 --- a/src/sentry/flags/models.py +++ b/src/sentry/flags/models.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum from django.conf import settings diff --git a/src/sentry/flags/providers.py b/src/sentry/flags/providers.py index 14a0a6731a3af9..0ef03b73eb951e 100644 --- a/src/sentry/flags/providers.py +++ b/src/sentry/flags/providers.py @@ -2,7 +2,7 @@ import hashlib import hmac from collections.abc import Callable, Iterator -from typing import Any, Protocol, TypedDict, TypeVar +from typing import Any, Protocol, TypedDict, TypeVar, int from django.http.request import HttpHeaders from rest_framework import serializers diff --git a/src/sentry/grouping/__init__.py b/src/sentry/grouping/__init__.py index 7711350193a288..107b8b8e5c9e45 100644 --- a/src/sentry/grouping/__init__.py +++ b/src/sentry/grouping/__init__.py @@ -1,3 +1,4 @@ +from typing import int """ sentry.grouping ~~~~~~~~~~~~~~~ diff --git a/src/sentry/grouping/api.py b/src/sentry/grouping/api.py index 4e3ae71f6c5e1a..fc7a50bfb4c5cd 100644 --- a/src/sentry/grouping/api.py +++ b/src/sentry/grouping/api.py @@ -3,7 +3,7 @@ import re from collections.abc import MutableMapping, Sequence from dataclasses import dataclass -from typing import TYPE_CHECKING, Any, NotRequired, TypedDict +from typing import TYPE_CHECKING, Any, NotRequired, TypedDict, int import sentry_sdk diff --git a/src/sentry/grouping/component.py b/src/sentry/grouping/component.py index 7fa91d983092ea..a7157223dfc4bf 100644 --- a/src/sentry/grouping/component.py +++ b/src/sentry/grouping/component.py @@ -4,7 +4,7 @@ from collections import Counter from collections.abc import Generator, Iterator, Sequence from functools import cached_property -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/grouping/enhancer/__init__.py b/src/sentry/grouping/enhancer/__init__.py index fcd863f3f46a97..76d84ae8a2fdb0 100644 --- a/src/sentry/grouping/enhancer/__init__.py +++ b/src/sentry/grouping/enhancer/__init__.py @@ -8,7 +8,7 @@ from collections.abc import Sequence from dataclasses import dataclass from functools import cached_property -from typing import Any, Literal +from typing import Any, Literal, int import msgpack import sentry_sdk diff --git a/src/sentry/grouping/enhancer/actions.py b/src/sentry/grouping/enhancer/actions.py index bd88611263fee6..a24687ac787743 100644 --- a/src/sentry/grouping/enhancer/actions.py +++ b/src/sentry/grouping/enhancer/actions.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Sequence -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.grouping.component import BaseGroupingComponent from sentry.grouping.enhancer.matchers import MatchFrame diff --git a/src/sentry/grouping/enhancer/exceptions.py b/src/sentry/grouping/enhancer/exceptions.py index eed62271669b17..109a16d504338a 100644 --- a/src/sentry/grouping/enhancer/exceptions.py +++ b/src/sentry/grouping/enhancer/exceptions.py @@ -1,2 +1,3 @@ +from typing import int class InvalidEnhancerConfig(Exception): pass diff --git a/src/sentry/grouping/enhancer/matchers.py b/src/sentry/grouping/enhancer/matchers.py index 17927a1d200998..d4ee0bb311e6a2 100644 --- a/src/sentry/grouping/enhancer/matchers.py +++ b/src/sentry/grouping/enhancer/matchers.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable -from typing import Any, Literal, TypedDict +from typing import Any, Literal, TypedDict, int from sentry.grouping.utils import bool_from_string from sentry.stacktraces.functions import get_function_name_for_frame diff --git a/src/sentry/grouping/enhancer/parser.py b/src/sentry/grouping/enhancer/parser.py index 7b0ea2c308fc64..4a9c129744bc16 100644 --- a/src/sentry/grouping/enhancer/parser.py +++ b/src/sentry/grouping/enhancer/parser.py @@ -1,3 +1,4 @@ +from typing import int from parsimonious.exceptions import ParseError from parsimonious.grammar import Grammar from parsimonious.nodes import Node, NodeVisitor, RegexNode diff --git a/src/sentry/grouping/enhancer/rules.py b/src/sentry/grouping/enhancer/rules.py index 04f1a7ba057c37..2dabdba8999a4c 100644 --- a/src/sentry/grouping/enhancer/rules.py +++ b/src/sentry/grouping/enhancer/rules.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, TypedDict +from typing import Any, TypedDict, int from .actions import EnhancementAction from .matchers import EnhancementMatch, ExceptionFieldMatch, MatchFrame, ReturnValueCache diff --git a/src/sentry/grouping/fingerprinting/__init__.py b/src/sentry/grouping/fingerprinting/__init__.py index 35267ec29edcee..ca369ae050fe72 100644 --- a/src/sentry/grouping/fingerprinting/__init__.py +++ b/src/sentry/grouping/fingerprinting/__init__.py @@ -3,7 +3,7 @@ import logging from collections.abc import Generator, Mapping, Sequence from pathlib import Path -from typing import Any, Self +from typing import Any, Self, int from django.conf import settings from parsimonious.exceptions import ParseError diff --git a/src/sentry/grouping/fingerprinting/exceptions.py b/src/sentry/grouping/fingerprinting/exceptions.py index 2a9d59e9cbb639..759125140aa2c0 100644 --- a/src/sentry/grouping/fingerprinting/exceptions.py +++ b/src/sentry/grouping/fingerprinting/exceptions.py @@ -1,2 +1,3 @@ +from typing import int class InvalidFingerprintingConfig(Exception): pass diff --git a/src/sentry/grouping/fingerprinting/matchers.py b/src/sentry/grouping/fingerprinting/matchers.py index 5101f03883bdc6..66cadf404cdb02 100644 --- a/src/sentry/grouping/fingerprinting/matchers.py +++ b/src/sentry/grouping/fingerprinting/matchers.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any, Self +from typing import Any, Self, int from sentry.grouping.fingerprinting.exceptions import InvalidFingerprintingConfig from sentry.grouping.utils import bool_from_string diff --git a/src/sentry/grouping/fingerprinting/parser.py b/src/sentry/grouping/fingerprinting/parser.py index 25a702fc9d6342..4580a828dec8fc 100644 --- a/src/sentry/grouping/fingerprinting/parser.py +++ b/src/sentry/grouping/fingerprinting/parser.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import TypeVar +from typing import int, TypeVar from parsimonious.grammar import Grammar from parsimonious.nodes import Node, NodeVisitor, RegexNode diff --git a/src/sentry/grouping/fingerprinting/rules.py b/src/sentry/grouping/fingerprinting/rules.py index 85353f07a61352..b5d8cd8602cbc2 100644 --- a/src/sentry/grouping/fingerprinting/rules.py +++ b/src/sentry/grouping/fingerprinting/rules.py @@ -2,7 +2,7 @@ import logging from collections.abc import Sequence -from typing import NamedTuple, NotRequired, Self, TypedDict +from typing import NamedTuple, NotRequired, Self, TypedDict, int from sentry.grouping.fingerprinting.matchers import FingerprintMatcher from sentry.grouping.fingerprinting.utils import EventDatastore diff --git a/src/sentry/grouping/fingerprinting/utils.py b/src/sentry/grouping/fingerprinting/utils.py index 28e1e460330c27..902e48cf70161d 100644 --- a/src/sentry/grouping/fingerprinting/utils.py +++ b/src/sentry/grouping/fingerprinting/utils.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int from sentry.stacktraces.functions import get_function_name_for_frame from sentry.stacktraces.platform import get_behavior_family_for_platform diff --git a/src/sentry/grouping/grouping_info.py b/src/sentry/grouping/grouping_info.py index 004bb9e446b49e..ea3bc7c9113e29 100644 --- a/src/sentry/grouping/grouping_info.py +++ b/src/sentry/grouping/grouping_info.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from sentry.grouping.strategies.base import StrategyConfiguration from sentry.grouping.variants import BaseVariant, ComponentVariant, SaltedComponentVariant diff --git a/src/sentry/grouping/grouptype.py b/src/sentry/grouping/grouptype.py index 4a95e537d0393e..7359dd54f6b03e 100644 --- a/src/sentry/grouping/grouptype.py +++ b/src/sentry/grouping/grouptype.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import TypeVar +from typing import int, TypeVar from sentry.issues.grouptype import GroupCategory, GroupType from sentry.models.group import DEFAULT_TYPE_ID diff --git a/src/sentry/grouping/ingest/config.py b/src/sentry/grouping/ingest/config.py index 525ca6cb35d93b..c59ac2e6f34595 100644 --- a/src/sentry/grouping/ingest/config.py +++ b/src/sentry/grouping/ingest/config.py @@ -4,7 +4,7 @@ import time from collections.abc import MutableMapping from random import random -from typing import Any +from typing import int, Any from django.conf import settings from django.core.cache import cache diff --git a/src/sentry/grouping/ingest/grouphash_metadata.py b/src/sentry/grouping/ingest/grouphash_metadata.py index c41c0c8d851b5d..8862d61dc35926 100644 --- a/src/sentry/grouping/ingest/grouphash_metadata.py +++ b/src/sentry/grouping/ingest/grouphash_metadata.py @@ -9,7 +9,7 @@ import logging from datetime import datetime, timedelta -from typing import Any, TypeIs, cast +from typing import Any, TypeIs, cast, int from django.utils import timezone diff --git a/src/sentry/grouping/ingest/hashing.py b/src/sentry/grouping/ingest/hashing.py index 703ea4ecb48b71..5369e340e9ded1 100644 --- a/src/sentry/grouping/ingest/hashing.py +++ b/src/sentry/grouping/ingest/hashing.py @@ -3,7 +3,7 @@ import copy import logging from collections.abc import Iterable, Sequence -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING import sentry_sdk diff --git a/src/sentry/grouping/ingest/metrics.py b/src/sentry/grouping/ingest/metrics.py index 9343bbb6e577a6..2b746b2d7f6582 100644 --- a/src/sentry/grouping/ingest/metrics.py +++ b/src/sentry/grouping/ingest/metrics.py @@ -2,7 +2,7 @@ import logging from collections.abc import MutableMapping -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry import options from sentry.grouping.api import GroupingConfig diff --git a/src/sentry/grouping/ingest/seer.py b/src/sentry/grouping/ingest/seer.py index 3e9ce49611838e..c651dc65761e6f 100644 --- a/src/sentry/grouping/ingest/seer.py +++ b/src/sentry/grouping/ingest/seer.py @@ -1,6 +1,6 @@ import logging from dataclasses import asdict -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/grouping/ingest/utils.py b/src/sentry/grouping/ingest/utils.py index db77b2e09aab54..34d61d7c8b29b8 100644 --- a/src/sentry/grouping/ingest/utils.py +++ b/src/sentry/grouping/ingest/utils.py @@ -2,7 +2,7 @@ import logging from collections.abc import MutableMapping -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.exceptions import HashDiscarded from sentry.issues.grouptype import GroupCategory diff --git a/src/sentry/grouping/parameterization.py b/src/sentry/grouping/parameterization.py index 0098ad5e206c88..635a3dab484f53 100644 --- a/src/sentry/grouping/parameterization.py +++ b/src/sentry/grouping/parameterization.py @@ -1,3 +1,4 @@ +from typing import int import dataclasses import re from collections import defaultdict diff --git a/src/sentry/grouping/strategies/__init__.py b/src/sentry/grouping/strategies/__init__.py index c0080170029bcf..6f257bd2b25f80 100644 --- a/src/sentry/grouping/strategies/__init__.py +++ b/src/sentry/grouping/strategies/__init__.py @@ -1,3 +1,4 @@ +from typing import int def _import_all() -> None: # The import order here is important due to cross dependencies strategy_modules = [ diff --git a/src/sentry/grouping/strategies/base.py b/src/sentry/grouping/strategies/base.py index b75eefb3ecd7c0..7d193d1a4a2b26 100644 --- a/src/sentry/grouping/strategies/base.py +++ b/src/sentry/grouping/strategies/base.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Iterator, Sequence -from typing import TYPE_CHECKING, Any, Generic, Protocol, Self, TypeVar, overload +from typing import TYPE_CHECKING, Any, Generic, Protocol, Self, TypeVar, overload, int from sentry.grouping.component import ( BaseGroupingComponent, diff --git a/src/sentry/grouping/strategies/configurations.py b/src/sentry/grouping/strategies/configurations.py index b0b48c718a5f11..70eb0b5dd86c99 100644 --- a/src/sentry/grouping/strategies/configurations.py +++ b/src/sentry/grouping/strategies/configurations.py @@ -1,3 +1,4 @@ +from typing import int from sentry.conf.server import FALL_2025_GROUPING_CONFIG, WINTER_2023_GROUPING_CONFIG from sentry.grouping.strategies.base import ( StrategyConfiguration, diff --git a/src/sentry/grouping/strategies/message.py b/src/sentry/grouping/strategies/message.py index 2aab218ead217b..def1cf67fb623f 100644 --- a/src/sentry/grouping/strategies/message.py +++ b/src/sentry/grouping/strategies/message.py @@ -1,7 +1,7 @@ from __future__ import annotations from itertools import islice -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.grouping.component import MessageGroupingComponent from sentry.grouping.parameterization import Parameterizer diff --git a/src/sentry/grouping/strategies/newstyle.py b/src/sentry/grouping/strategies/newstyle.py index e273c2883d403b..c7eced9ed818e5 100644 --- a/src/sentry/grouping/strategies/newstyle.py +++ b/src/sentry/grouping/strategies/newstyle.py @@ -5,7 +5,7 @@ import re from collections import Counter from collections.abc import Generator -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.grouping.component import ( ChainedExceptionGroupingComponent, diff --git a/src/sentry/grouping/strategies/security.py b/src/sentry/grouping/strategies/security.py index 0218eaabc40f6f..6377d16732f583 100644 --- a/src/sentry/grouping/strategies/security.py +++ b/src/sentry/grouping/strategies/security.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.grouping.component import ( CSPGroupingComponent, diff --git a/src/sentry/grouping/strategies/template.py b/src/sentry/grouping/strategies/template.py index 0bff1570db41dc..d48a52f3addcd1 100644 --- a/src/sentry/grouping/strategies/template.py +++ b/src/sentry/grouping/strategies/template.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.grouping.component import ( ContextLineGroupingComponent, diff --git a/src/sentry/grouping/strategies/utils.py b/src/sentry/grouping/strategies/utils.py index d83b1622b3fb7f..91bcbb76ecde4e 100644 --- a/src/sentry/grouping/strategies/utils.py +++ b/src/sentry/grouping/strategies/utils.py @@ -1,3 +1,4 @@ +from typing import int from sentry.grouping.strategies.base import ComponentsByVariant diff --git a/src/sentry/grouping/utils.py b/src/sentry/grouping/utils.py index 8783d52bb45705..7427fc9bcc9039 100644 --- a/src/sentry/grouping/utils.py +++ b/src/sentry/grouping/utils.py @@ -4,7 +4,7 @@ from collections.abc import Iterable, Mapping from hashlib import md5 from re import Match -from typing import TYPE_CHECKING, Any, Literal +from typing import TYPE_CHECKING, Any, Literal, int from uuid import UUID from django.utils.encoding import force_bytes diff --git a/src/sentry/grouping/variants.py b/src/sentry/grouping/variants.py index bec0a310cc97af..a915cef289a2fe 100644 --- a/src/sentry/grouping/variants.py +++ b/src/sentry/grouping/variants.py @@ -2,7 +2,7 @@ from abc import ABC, abstractmethod from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, NotRequired, Self, TypedDict +from typing import TYPE_CHECKING, Any, NotRequired, Self, TypedDict, int from sentry.grouping.component import ContributingComponent, RootGroupingComponent from sentry.grouping.fingerprinting.rules import FingerprintRule diff --git a/src/sentry/http.py b/src/sentry/http.py index bb2071dfef10c5..bb17989a8c7681 100644 --- a/src/sentry/http.py +++ b/src/sentry/http.py @@ -5,7 +5,7 @@ import time import warnings from io import BytesIO -from typing import Any, NamedTuple +from typing import Any, NamedTuple, int from urllib.parse import urlparse from django.conf import settings diff --git a/src/sentry/hybridcloud/apigateway/__init__.py b/src/sentry/hybridcloud/apigateway/__init__.py index e4b8561f6bee7d..83e99a21c4e846 100644 --- a/src/sentry/hybridcloud/apigateway/__init__.py +++ b/src/sentry/hybridcloud/apigateway/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .apigateway import proxy_request_if_needed __all__ = ("proxy_request_if_needed",) diff --git a/src/sentry/hybridcloud/apigateway/apigateway.py b/src/sentry/hybridcloud/apigateway/apigateway.py index 3dd82fa74aa2c0..cea6e837653d38 100644 --- a/src/sentry/hybridcloud/apigateway/apigateway.py +++ b/src/sentry/hybridcloud/apigateway/apigateway.py @@ -2,7 +2,7 @@ import logging from collections.abc import Callable -from typing import Any +from typing import int, Any from django.conf import settings from django.http.response import HttpResponseBase diff --git a/src/sentry/hybridcloud/apigateway/middleware.py b/src/sentry/hybridcloud/apigateway/middleware.py index 4c67467aac8302..0518610c8c1996 100644 --- a/src/sentry/hybridcloud/apigateway/middleware.py +++ b/src/sentry/hybridcloud/apigateway/middleware.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable -from typing import Any +from typing import int, Any from django.http.response import HttpResponseBase from rest_framework.request import Request diff --git a/src/sentry/hybridcloud/apigateway/proxy.py b/src/sentry/hybridcloud/apigateway/proxy.py index 69a88919a49ea7..1091a212cf3c14 100644 --- a/src/sentry/hybridcloud/apigateway/proxy.py +++ b/src/sentry/hybridcloud/apigateway/proxy.py @@ -1,3 +1,4 @@ +from typing import int """ Utilities related to proxying a request to a region silo """ diff --git a/src/sentry/hybridcloud/migrations/0001_squashed_0021_django_arrayfield_scope_list.py b/src/sentry/hybridcloud/migrations/0001_squashed_0021_django_arrayfield_scope_list.py index cfc607855ee1e3..379ce2db92ea07 100644 --- a/src/sentry/hybridcloud/migrations/0001_squashed_0021_django_arrayfield_scope_list.py +++ b/src/sentry/hybridcloud/migrations/0001_squashed_0021_django_arrayfield_scope_list.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 16:29 +from typing import int import datetime import django.contrib.postgres.fields diff --git a/src/sentry/hybridcloud/migrations/0022_webhook_payload_update.py b/src/sentry/hybridcloud/migrations/0022_webhook_payload_update.py index 05a99d31a87a95..39a28aba67cb48 100644 --- a/src/sentry/hybridcloud/migrations/0022_webhook_payload_update.py +++ b/src/sentry/hybridcloud/migrations/0022_webhook_payload_update.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-18 20:12 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/hybridcloud/migrations/0023_correct_webhook_payload_constraint.py b/src/sentry/hybridcloud/migrations/0023_correct_webhook_payload_constraint.py index 14ca93a3feb409..cab17d5e028734 100644 --- a/src/sentry/hybridcloud/migrations/0023_correct_webhook_payload_constraint.py +++ b/src/sentry/hybridcloud/migrations/0023_correct_webhook_payload_constraint.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-26 19:37 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/hybridcloud/migrations/0024_add_project_distribution_scope.py b/src/sentry/hybridcloud/migrations/0024_add_project_distribution_scope.py index 92fbe2c0f782bf..37dcd3c49b4986 100644 --- a/src/sentry/hybridcloud/migrations/0024_add_project_distribution_scope.py +++ b/src/sentry/hybridcloud/migrations/0024_add_project_distribution_scope.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-10-27 10:46 +from typing import int from django.db import migrations import bitfield.models diff --git a/src/sentry/hybridcloud/models/__init__.py b/src/sentry/hybridcloud/models/__init__.py index 17e37f30cbf74d..384d116e80c995 100644 --- a/src/sentry/hybridcloud/models/__init__.py +++ b/src/sentry/hybridcloud/models/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "ApiKeyReplica", "ApiTokenReplica", diff --git a/src/sentry/hybridcloud/models/apikeyreplica.py b/src/sentry/hybridcloud/models/apikeyreplica.py index 7538aae8ad5a54..715060d278e5d0 100644 --- a/src/sentry/hybridcloud/models/apikeyreplica.py +++ b/src/sentry/hybridcloud/models/apikeyreplica.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db import models from django.utils import timezone diff --git a/src/sentry/hybridcloud/models/apitokenreplica.py b/src/sentry/hybridcloud/models/apitokenreplica.py index c9f4402379f536..915d807afcca94 100644 --- a/src/sentry/hybridcloud/models/apitokenreplica.py +++ b/src/sentry/hybridcloud/models/apitokenreplica.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db import models from django.utils import timezone diff --git a/src/sentry/hybridcloud/models/cacheversion.py b/src/sentry/hybridcloud/models/cacheversion.py index f41e1e55f2e81a..65b8bcbcb9798d 100644 --- a/src/sentry/hybridcloud/models/cacheversion.py +++ b/src/sentry/hybridcloud/models/cacheversion.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models, router, transaction from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/hybridcloud/models/externalactorreplica.py b/src/sentry/hybridcloud/models/externalactorreplica.py index 2cabe42156ec8f..c081ef33478995 100644 --- a/src/sentry/hybridcloud/models/externalactorreplica.py +++ b/src/sentry/hybridcloud/models/externalactorreplica.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/hybridcloud/models/orgauthtokenreplica.py b/src/sentry/hybridcloud/models/orgauthtokenreplica.py index bc51b806617a2a..55058642e5bea1 100644 --- a/src/sentry/hybridcloud/models/orgauthtokenreplica.py +++ b/src/sentry/hybridcloud/models/orgauthtokenreplica.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.contrib.postgres.fields.array import ArrayField from django.db import models diff --git a/src/sentry/hybridcloud/models/outbox.py b/src/sentry/hybridcloud/models/outbox.py index 498db94a6a3e85..be491b2ea6e81f 100644 --- a/src/sentry/hybridcloud/models/outbox.py +++ b/src/sentry/hybridcloud/models/outbox.py @@ -5,7 +5,7 @@ import datetime import threading from collections.abc import Generator, Iterable, Mapping -from typing import Any, Self +from typing import Any, Self, int import psycopg2.errors import sentry_sdk diff --git a/src/sentry/hybridcloud/models/webhookpayload.py b/src/sentry/hybridcloud/models/webhookpayload.py index c47114f0cede23..9cd2a1e21268da 100644 --- a/src/sentry/hybridcloud/models/webhookpayload.py +++ b/src/sentry/hybridcloud/models/webhookpayload.py @@ -1,7 +1,7 @@ from __future__ import annotations import datetime -from typing import Any, Self +from typing import Any, Self, int from django.db import models from django.db.models import Case, ExpressionWrapper, F, IntegerField, Q, TextChoices, Value, When diff --git a/src/sentry/hybridcloud/options.py b/src/sentry/hybridcloud/options.py index 9f280aac25d822..fdea8c0f7ec989 100644 --- a/src/sentry/hybridcloud/options.py +++ b/src/sentry/hybridcloud/options.py @@ -1,3 +1,4 @@ +from typing import int from sentry.options import FLAG_AUTOMATOR_MODIFIABLE, register from sentry.utils.types import Bool, Int, Sequence diff --git a/src/sentry/hybridcloud/outbox/base.py b/src/sentry/hybridcloud/outbox/base.py index abc4b3144bf9cb..b89d9f232e2efb 100644 --- a/src/sentry/hybridcloud/outbox/base.py +++ b/src/sentry/hybridcloud/outbox/base.py @@ -3,7 +3,7 @@ import contextlib import logging from collections.abc import Collection, Generator, Iterable, Mapping -from typing import TYPE_CHECKING, Any, Protocol, TypeVar +from typing import TYPE_CHECKING, Any, Protocol, TypeVar, int from django.db import connections, router, transaction from django.dispatch import receiver diff --git a/src/sentry/hybridcloud/outbox/category.py b/src/sentry/hybridcloud/outbox/category.py index 469caf0832f777..d55bffff9394aa 100644 --- a/src/sentry/hybridcloud/outbox/category.py +++ b/src/sentry/hybridcloud/outbox/category.py @@ -2,7 +2,7 @@ from collections.abc import Collection, Mapping, Sequence from enum import IntEnum -from typing import TYPE_CHECKING, Any, cast +from typing import TYPE_CHECKING, Any, cast, int from sentry.hybridcloud.outbox.signals import process_control_outbox, process_region_outbox diff --git a/src/sentry/hybridcloud/outbox/signals.py b/src/sentry/hybridcloud/outbox/signals.py index 8c09a582299cb2..a15d6454bcb2b2 100644 --- a/src/sentry/hybridcloud/outbox/signals.py +++ b/src/sentry/hybridcloud/outbox/signals.py @@ -1,3 +1,4 @@ +from typing import int from django.dispatch import Signal process_region_outbox = Signal() # ["payload", "object_identifier"] diff --git a/src/sentry/hybridcloud/rpc/__init__.py b/src/sentry/hybridcloud/rpc/__init__.py index 7a0b1cd2375af2..b2e6ed6e03c0ba 100644 --- a/src/sentry/hybridcloud/rpc/__init__.py +++ b/src/sentry/hybridcloud/rpc/__init__.py @@ -5,7 +5,7 @@ import threading from collections.abc import Callable, Iterable, Mapping from enum import Enum -from typing import Any, Generic, Self, TypeVar, cast +from typing import Any, Generic, Self, TypeVar, cast, int import pydantic from django.db import router, transaction diff --git a/src/sentry/hybridcloud/rpc/caching/__init__.py b/src/sentry/hybridcloud/rpc/caching/__init__.py index 9774c31c977145..5bf52e645e131f 100644 --- a/src/sentry/hybridcloud/rpc/caching/__init__.py +++ b/src/sentry/hybridcloud/rpc/caching/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .service import ( back_with_silo_cache, back_with_silo_cache_list, diff --git a/src/sentry/hybridcloud/rpc/caching/impl.py b/src/sentry/hybridcloud/rpc/caching/impl.py index c6240761d061dc..34f53286ef5f5c 100644 --- a/src/sentry/hybridcloud/rpc/caching/impl.py +++ b/src/sentry/hybridcloud/rpc/caching/impl.py @@ -1,5 +1,5 @@ from collections.abc import Generator, Mapping -from typing import TypeVar +from typing import int, TypeVar from django.core.cache import cache from django.core.cache.backends.base import DEFAULT_TIMEOUT diff --git a/src/sentry/hybridcloud/rpc/caching/service.py b/src/sentry/hybridcloud/rpc/caching/service.py index ab78c2176acb4b..57b6bbc5d7f5bd 100644 --- a/src/sentry/hybridcloud/rpc/caching/service.py +++ b/src/sentry/hybridcloud/rpc/caching/service.py @@ -4,7 +4,7 @@ # defined, because we want to reflect on type annotations and avoid forward references. import abc from collections.abc import Callable, Generator, Mapping -from typing import TYPE_CHECKING, Generic, TypeVar +from typing import TYPE_CHECKING, Generic, TypeVar, int import pydantic diff --git a/src/sentry/hybridcloud/rpc/filter_query.py b/src/sentry/hybridcloud/rpc/filter_query.py index 5ec01fc1a7701c..6758bbdb369663 100644 --- a/src/sentry/hybridcloud/rpc/filter_query.py +++ b/src/sentry/hybridcloud/rpc/filter_query.py @@ -3,7 +3,7 @@ import abc from collections.abc import Callable from enum import Enum -from typing import TYPE_CHECKING, Any, Generic, TypeVar, Union +from typing import TYPE_CHECKING, Any, Generic, TypeVar, Union, int from django.db.models import Model, QuerySet diff --git a/src/sentry/hybridcloud/rpc/pagination.py b/src/sentry/hybridcloud/rpc/pagination.py index 9579b950a7c579..87d527d8e8a907 100644 --- a/src/sentry/hybridcloud/rpc/pagination.py +++ b/src/sentry/hybridcloud/rpc/pagination.py @@ -4,7 +4,7 @@ # defined, because we want to reflect on type annotations and avoid forward references. -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int import sentry_sdk from pydantic.fields import Field diff --git a/src/sentry/hybridcloud/rpc/resolvers.py b/src/sentry/hybridcloud/rpc/resolvers.py index fe518d2dc28182..350f6dd98f6554 100644 --- a/src/sentry/hybridcloud/rpc/resolvers.py +++ b/src/sentry/hybridcloud/rpc/resolvers.py @@ -2,7 +2,7 @@ from abc import ABC, abstractmethod from dataclasses import dataclass -from typing import Any +from typing import int, Any from django.conf import settings diff --git a/src/sentry/hybridcloud/rpc/service.py b/src/sentry/hybridcloud/rpc/service.py index b117ccdebdf84e..260862ad5d1a88 100644 --- a/src/sentry/hybridcloud/rpc/service.py +++ b/src/sentry/hybridcloud/rpc/service.py @@ -19,7 +19,7 @@ ) from contextlib import contextmanager from dataclasses import dataclass -from typing import TYPE_CHECKING, Any, NoReturn, Self, TypeVar, cast +from typing import TYPE_CHECKING, Any, NoReturn, Self, TypeVar, cast, int import django.urls import pydantic diff --git a/src/sentry/hybridcloud/rpc/sig.py b/src/sentry/hybridcloud/rpc/sig.py index 7782d5693cd6f8..7ff2d42372cacd 100644 --- a/src/sentry/hybridcloud/rpc/sig.py +++ b/src/sentry/hybridcloud/rpc/sig.py @@ -3,7 +3,7 @@ import inspect import itertools from collections.abc import Callable, Iterable, Sequence -from typing import Any +from typing import int, Any import pydantic from django.utils.functional import LazyObject diff --git a/src/sentry/hybridcloud/services/control_organization_provisioning/__init__.py b/src/sentry/hybridcloud/services/control_organization_provisioning/__init__.py index f376b91139f211..a638f492f9eb60 100644 --- a/src/sentry/hybridcloud/services/control_organization_provisioning/__init__.py +++ b/src/sentry/hybridcloud/services/control_organization_provisioning/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .model import * # NOQA from .serial import * # NOQA from .service import * # NOQA diff --git a/src/sentry/hybridcloud/services/control_organization_provisioning/impl.py b/src/sentry/hybridcloud/services/control_organization_provisioning/impl.py index 2909a158779944..a2c70da4461603 100644 --- a/src/sentry/hybridcloud/services/control_organization_provisioning/impl.py +++ b/src/sentry/hybridcloud/services/control_organization_provisioning/impl.py @@ -1,3 +1,4 @@ +from typing import int from copy import deepcopy from django.db import router, transaction diff --git a/src/sentry/hybridcloud/services/control_organization_provisioning/model.py b/src/sentry/hybridcloud/services/control_organization_provisioning/model.py index 20e76051f7c38b..33cc52111faa9d 100644 --- a/src/sentry/hybridcloud/services/control_organization_provisioning/model.py +++ b/src/sentry/hybridcloud/services/control_organization_provisioning/model.py @@ -1,3 +1,4 @@ +from typing import int from sentry.hybridcloud.rpc import RpcModel diff --git a/src/sentry/hybridcloud/services/control_organization_provisioning/serial.py b/src/sentry/hybridcloud/services/control_organization_provisioning/serial.py index 949b1d894ffd00..cb6fb30afaa4eb 100644 --- a/src/sentry/hybridcloud/services/control_organization_provisioning/serial.py +++ b/src/sentry/hybridcloud/services/control_organization_provisioning/serial.py @@ -1,3 +1,4 @@ +from typing import int from sentry.hybridcloud.services.control_organization_provisioning import ( RpcOrganizationSlugReservation, ) diff --git a/src/sentry/hybridcloud/services/control_organization_provisioning/service.py b/src/sentry/hybridcloud/services/control_organization_provisioning/service.py index 3b33ea075700a7..ad59b7729248b8 100644 --- a/src/sentry/hybridcloud/services/control_organization_provisioning/service.py +++ b/src/sentry/hybridcloud/services/control_organization_provisioning/service.py @@ -2,6 +2,7 @@ # from __future__ import annotations # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from abc import abstractmethod from sentry.hybridcloud.rpc.service import RpcService, rpc_method diff --git a/src/sentry/hybridcloud/services/organization_mapping/__init__.py b/src/sentry/hybridcloud/services/organization_mapping/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/hybridcloud/services/organization_mapping/__init__.py +++ b/src/sentry/hybridcloud/services/organization_mapping/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/hybridcloud/services/organization_mapping/impl.py b/src/sentry/hybridcloud/services/organization_mapping/impl.py index ca6f3701e337df..11061499ec7adf 100644 --- a/src/sentry/hybridcloud/services/organization_mapping/impl.py +++ b/src/sentry/hybridcloud/services/organization_mapping/impl.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db import router from sentry_sdk import capture_exception diff --git a/src/sentry/hybridcloud/services/organization_mapping/model.py b/src/sentry/hybridcloud/services/organization_mapping/model.py index bdb52e880c5d1d..599ce9e72db233 100644 --- a/src/sentry/hybridcloud/services/organization_mapping/model.py +++ b/src/sentry/hybridcloud/services/organization_mapping/model.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from datetime import datetime from django.utils import timezone diff --git a/src/sentry/hybridcloud/services/organization_mapping/serial.py b/src/sentry/hybridcloud/services/organization_mapping/serial.py index a0f0875471c2bc..7619a01e95bd74 100644 --- a/src/sentry/hybridcloud/services/organization_mapping/serial.py +++ b/src/sentry/hybridcloud/services/organization_mapping/serial.py @@ -1,3 +1,4 @@ +from typing import int from sentry.hybridcloud.services.organization_mapping import ( RpcOrganizationMapping, RpcOrganizationMappingUpdate, diff --git a/src/sentry/hybridcloud/services/organization_mapping/service.py b/src/sentry/hybridcloud/services/organization_mapping/service.py index ae35c6ded66ffb..ca3da9c3c111fc 100644 --- a/src/sentry/hybridcloud/services/organization_mapping/service.py +++ b/src/sentry/hybridcloud/services/organization_mapping/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from abc import abstractmethod from sentry.hybridcloud.rpc.service import RpcService, rpc_method diff --git a/src/sentry/hybridcloud/services/organizationmember_mapping/__init__.py b/src/sentry/hybridcloud/services/organizationmember_mapping/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/hybridcloud/services/organizationmember_mapping/__init__.py +++ b/src/sentry/hybridcloud/services/organizationmember_mapping/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/hybridcloud/services/organizationmember_mapping/impl.py b/src/sentry/hybridcloud/services/organizationmember_mapping/impl.py index fb6b3eac146630..dfdb1cf0a6f84a 100644 --- a/src/sentry/hybridcloud/services/organizationmember_mapping/impl.py +++ b/src/sentry/hybridcloud/services/organizationmember_mapping/impl.py @@ -4,6 +4,7 @@ # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from django.db import IntegrityError, router, transaction from sentry.hybridcloud.models.outbox import outbox_context diff --git a/src/sentry/hybridcloud/services/organizationmember_mapping/model.py b/src/sentry/hybridcloud/services/organizationmember_mapping/model.py index 4c8a266fd99016..5aab12e27d5939 100644 --- a/src/sentry/hybridcloud/services/organizationmember_mapping/model.py +++ b/src/sentry/hybridcloud/services/organizationmember_mapping/model.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from datetime import datetime from django.utils import timezone diff --git a/src/sentry/hybridcloud/services/organizationmember_mapping/serial.py b/src/sentry/hybridcloud/services/organizationmember_mapping/serial.py index 062c139efdb98b..4606dd885efa35 100644 --- a/src/sentry/hybridcloud/services/organizationmember_mapping/serial.py +++ b/src/sentry/hybridcloud/services/organizationmember_mapping/serial.py @@ -1,3 +1,4 @@ +from typing import int from sentry.hybridcloud.services.organizationmember_mapping import RpcOrganizationMemberMapping from sentry.models.organizationmembermapping import OrganizationMemberMapping diff --git a/src/sentry/hybridcloud/services/organizationmember_mapping/service.py b/src/sentry/hybridcloud/services/organizationmember_mapping/service.py index 94bc81179888e3..8664659bd71093 100644 --- a/src/sentry/hybridcloud/services/organizationmember_mapping/service.py +++ b/src/sentry/hybridcloud/services/organizationmember_mapping/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from abc import abstractmethod from sentry.hybridcloud.rpc.service import RpcService, rpc_method diff --git a/src/sentry/hybridcloud/services/region_organization_provisioning/__init__.py b/src/sentry/hybridcloud/services/region_organization_provisioning/__init__.py index 8c386042d89212..fc0d7731fd5d85 100644 --- a/src/sentry/hybridcloud/services/region_organization_provisioning/__init__.py +++ b/src/sentry/hybridcloud/services/region_organization_provisioning/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # NOQA from .service import * # NOQA diff --git a/src/sentry/hybridcloud/services/region_organization_provisioning/impl.py b/src/sentry/hybridcloud/services/region_organization_provisioning/impl.py index f42b7ea63995a6..726ccf1b705f2a 100644 --- a/src/sentry/hybridcloud/services/region_organization_provisioning/impl.py +++ b/src/sentry/hybridcloud/services/region_organization_provisioning/impl.py @@ -1,3 +1,4 @@ +from typing import int from django.db import IntegrityError, router, transaction from django.db.models import Q from sentry_sdk import capture_exception diff --git a/src/sentry/hybridcloud/services/region_organization_provisioning/service.py b/src/sentry/hybridcloud/services/region_organization_provisioning/service.py index 9f1d1ee95022fa..4a3ed47ac53fef 100644 --- a/src/sentry/hybridcloud/services/region_organization_provisioning/service.py +++ b/src/sentry/hybridcloud/services/region_organization_provisioning/service.py @@ -1,3 +1,4 @@ +from typing import int from abc import abstractmethod from sentry.hybridcloud.rpc.resolvers import ByRegionName diff --git a/src/sentry/hybridcloud/services/replica/__init__.py b/src/sentry/hybridcloud/services/replica/__init__.py index 8404f443605b9c..853ba1a02ab19d 100644 --- a/src/sentry/hybridcloud/services/replica/__init__.py +++ b/src/sentry/hybridcloud/services/replica/__init__.py @@ -1 +1,2 @@ +from typing import int from .service import * # noqa diff --git a/src/sentry/hybridcloud/services/replica/impl.py b/src/sentry/hybridcloud/services/replica/impl.py index a5cf2e96e69e1c..9fd4d008bc71d6 100644 --- a/src/sentry/hybridcloud/services/replica/impl.py +++ b/src/sentry/hybridcloud/services/replica/impl.py @@ -1,5 +1,5 @@ from collections.abc import Iterator, Mapping -from typing import Any +from typing import int, Any from django.db import router, transaction from django.db.models import Q diff --git a/src/sentry/hybridcloud/services/replica/service.py b/src/sentry/hybridcloud/services/replica/service.py index c80c2d078a5ee8..998f1ffa0ba4b5 100644 --- a/src/sentry/hybridcloud/services/replica/service.py +++ b/src/sentry/hybridcloud/services/replica/service.py @@ -1,3 +1,4 @@ +from typing import int import abc from sentry.auth.services.auth import RpcApiKey, RpcApiToken, RpcAuthIdentity, RpcAuthProvider diff --git a/src/sentry/hybridcloud/services/tombstone/__init__.py b/src/sentry/hybridcloud/services/tombstone/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/hybridcloud/services/tombstone/__init__.py +++ b/src/sentry/hybridcloud/services/tombstone/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/hybridcloud/services/tombstone/impl.py b/src/sentry/hybridcloud/services/tombstone/impl.py index f946cd55c5f7be..334118c3c555eb 100644 --- a/src/sentry/hybridcloud/services/tombstone/impl.py +++ b/src/sentry/hybridcloud/services/tombstone/impl.py @@ -1,3 +1,4 @@ +from typing import int from sentry.hybridcloud.services.tombstone import ( ControlTombstoneService, RegionTombstoneService, diff --git a/src/sentry/hybridcloud/services/tombstone/model.py b/src/sentry/hybridcloud/services/tombstone/model.py index 1a0b0fe2e74bd0..dee40716bac48a 100644 --- a/src/sentry/hybridcloud/services/tombstone/model.py +++ b/src/sentry/hybridcloud/services/tombstone/model.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from sentry.hybridcloud.rpc import RpcModel diff --git a/src/sentry/hybridcloud/services/tombstone/service.py b/src/sentry/hybridcloud/services/tombstone/service.py index 8b4ffb14a5e525..b801bd45d6acc0 100644 --- a/src/sentry/hybridcloud/services/tombstone/service.py +++ b/src/sentry/hybridcloud/services/tombstone/service.py @@ -2,6 +2,7 @@ # from __future__ import annotations # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from abc import abstractmethod from sentry.hybridcloud.rpc.resolvers import ByRegionName diff --git a/src/sentry/hybridcloud/tasks/__init__.py b/src/sentry/hybridcloud/tasks/__init__.py index 8c33e14f601253..995d2c18434f65 100644 --- a/src/sentry/hybridcloud/tasks/__init__.py +++ b/src/sentry/hybridcloud/tasks/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .backfill_outboxes import * # noqa from .deliver_from_outbox import * # noqa from .deliver_webhooks import * # noqa diff --git a/src/sentry/hybridcloud/tasks/backfill_outboxes.py b/src/sentry/hybridcloud/tasks/backfill_outboxes.py index a929db895deddd..6575709b97dda2 100644 --- a/src/sentry/hybridcloud/tasks/backfill_outboxes.py +++ b/src/sentry/hybridcloud/tasks/backfill_outboxes.py @@ -1,3 +1,4 @@ +from typing import int """ Checks OutboxProducingModel classes and their replication_version. When the replication_version on any class is bumped, callers to process_outbox_backfill_batch diff --git a/src/sentry/hybridcloud/tasks/deliver_from_outbox.py b/src/sentry/hybridcloud/tasks/deliver_from_outbox.py index 073190a5f38796..e5a6cfd0a7ef1f 100644 --- a/src/sentry/hybridcloud/tasks/deliver_from_outbox.py +++ b/src/sentry/hybridcloud/tasks/deliver_from_outbox.py @@ -1,7 +1,7 @@ from __future__ import annotations import math -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/hybridcloud/tasks/deliver_webhooks.py b/src/sentry/hybridcloud/tasks/deliver_webhooks.py index 58622de17993e3..d035c45de40b4d 100644 --- a/src/sentry/hybridcloud/tasks/deliver_webhooks.py +++ b/src/sentry/hybridcloud/tasks/deliver_webhooks.py @@ -1,3 +1,4 @@ +from typing import int import datetime import logging from concurrent.futures import ThreadPoolExecutor, as_completed diff --git a/src/sentry/identity/__init__.py b/src/sentry/identity/__init__.py index 4cf95538cfebf5..de80637b04119b 100644 --- a/src/sentry/identity/__init__.py +++ b/src/sentry/identity/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .manager import IdentityManager default_manager = IdentityManager() diff --git a/src/sentry/identity/base.py b/src/sentry/identity/base.py index 82594c47fa9e59..c1f3ead7c0c493 100644 --- a/src/sentry/identity/base.py +++ b/src/sentry/identity/base.py @@ -2,7 +2,7 @@ import abc import logging -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.identity.services.identity.model import RpcIdentity from sentry.pipeline.provider import PipelineProvider diff --git a/src/sentry/identity/bitbucket/provider.py b/src/sentry/identity/bitbucket/provider.py index 76722feebfb206..e3a0686010f816 100644 --- a/src/sentry/identity/bitbucket/provider.py +++ b/src/sentry/identity/bitbucket/provider.py @@ -1,3 +1,4 @@ +from typing import int from django.http.request import HttpRequest from django.http.response import HttpResponseBase, HttpResponseRedirect diff --git a/src/sentry/identity/discord/provider.py b/src/sentry/identity/discord/provider.py index 44b4f9364461e2..7ff488f1c44113 100644 --- a/src/sentry/identity/discord/provider.py +++ b/src/sentry/identity/discord/provider.py @@ -1,3 +1,4 @@ +from typing import int from sentry.auth.provider import Provider from sentry.integrations.types import IntegrationProviderSlug diff --git a/src/sentry/identity/github/provider.py b/src/sentry/identity/github/provider.py index ab0751f3ded65e..a7ad850e3a8bd4 100644 --- a/src/sentry/identity/github/provider.py +++ b/src/sentry/identity/github/provider.py @@ -1,3 +1,4 @@ +from typing import int from django.core.exceptions import PermissionDenied from sentry import http, options diff --git a/src/sentry/identity/github_enterprise/provider.py b/src/sentry/identity/github_enterprise/provider.py index 37bcd790fb2a67..43890cd56f520d 100644 --- a/src/sentry/identity/github_enterprise/provider.py +++ b/src/sentry/identity/github_enterprise/provider.py @@ -1,4 +1,4 @@ -from typing import NoReturn +from typing import int, NoReturn from sentry.identity.oauth2 import OAuth2Provider from sentry.integrations.types import IntegrationProviderSlug diff --git a/src/sentry/identity/gitlab/provider.py b/src/sentry/identity/gitlab/provider.py index a00366fd921499..a5843bb570484c 100644 --- a/src/sentry/identity/gitlab/provider.py +++ b/src/sentry/identity/gitlab/provider.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any import orjson diff --git a/src/sentry/identity/google/provider.py b/src/sentry/identity/google/provider.py index 13c7b184cdcdbc..1e9104043fc0d4 100644 --- a/src/sentry/identity/google/provider.py +++ b/src/sentry/identity/google/provider.py @@ -1,3 +1,4 @@ +from typing import int import orjson from sentry import options diff --git a/src/sentry/identity/manager.py b/src/sentry/identity/manager.py index 58218e45c05862..4d4ec0f4277927 100644 --- a/src/sentry/identity/manager.py +++ b/src/sentry/identity/manager.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["IdentityManager"] diff --git a/src/sentry/identity/oauth2.py b/src/sentry/identity/oauth2.py index 6c1f6f0815b97a..415b50a3d943fc 100644 --- a/src/sentry/identity/oauth2.py +++ b/src/sentry/identity/oauth2.py @@ -3,7 +3,7 @@ import logging import secrets from time import time -from typing import Any +from typing import int, Any from urllib.parse import parse_qsl, urlencode import orjson diff --git a/src/sentry/identity/pipeline.py b/src/sentry/identity/pipeline.py index e1d89f06b34ef6..52c43f5c88753a 100644 --- a/src/sentry/identity/pipeline.py +++ b/src/sentry/identity/pipeline.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Callable, Sequence from functools import cached_property diff --git a/src/sentry/identity/providers/dummy.py b/src/sentry/identity/providers/dummy.py index a0c46ac2527942..28b593bcedffb7 100644 --- a/src/sentry/identity/providers/dummy.py +++ b/src/sentry/identity/providers/dummy.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.http import HttpResponse from django.http.request import HttpRequest diff --git a/src/sentry/identity/services/identity/__init__.py b/src/sentry/identity/services/identity/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/identity/services/identity/__init__.py +++ b/src/sentry/identity/services/identity/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/identity/services/identity/impl.py b/src/sentry/identity/services/identity/impl.py index 73e4110ea259fd..0966f3f6530438 100644 --- a/src/sentry/identity/services/identity/impl.py +++ b/src/sentry/identity/services/identity/impl.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable -from typing import Any +from typing import int, Any from django.db.models import QuerySet diff --git a/src/sentry/identity/services/identity/model.py b/src/sentry/identity/services/identity/model.py index 8e3375b6931af3..3bf1700639706e 100644 --- a/src/sentry/identity/services/identity/model.py +++ b/src/sentry/identity/services/identity/model.py @@ -2,7 +2,7 @@ # from __future__ import annotations # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. -from typing import TYPE_CHECKING, Any, TypedDict +from typing import TYPE_CHECKING, Any, TypedDict, int from sentry.hybridcloud.rpc import RpcModel diff --git a/src/sentry/identity/services/identity/serial.py b/src/sentry/identity/services/identity/serial.py index e8afbd38c1914e..5caf63af744109 100644 --- a/src/sentry/identity/services/identity/serial.py +++ b/src/sentry/identity/services/identity/serial.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.identity.services.identity import RpcIdentity, RpcIdentityProvider diff --git a/src/sentry/identity/services/identity/service.py b/src/sentry/identity/services/identity/service.py index a7075630bae5eb..c715906df14966 100644 --- a/src/sentry/identity/services/identity/service.py +++ b/src/sentry/identity/services/identity/service.py @@ -4,7 +4,7 @@ # defined, because we want to reflect on type annotations and avoid forward references. from abc import abstractmethod -from typing import Any +from typing import int, Any from sentry.hybridcloud.rpc.service import RpcService, rpc_method from sentry.identity.services.identity import RpcIdentity, RpcIdentityProvider diff --git a/src/sentry/identity/slack/provider.py b/src/sentry/identity/slack/provider.py index d8cd87778ca2ef..a68f673740e1c0 100644 --- a/src/sentry/identity/slack/provider.py +++ b/src/sentry/identity/slack/provider.py @@ -1,3 +1,4 @@ +from typing import int from sentry import options from sentry.identity.oauth2 import OAuth2CallbackView, OAuth2LoginView, OAuth2Provider from sentry.identity.pipeline import IdentityPipeline diff --git a/src/sentry/identity/vercel/provider.py b/src/sentry/identity/vercel/provider.py index 8422b0805d47ec..ef1f24830ea65f 100644 --- a/src/sentry/identity/vercel/provider.py +++ b/src/sentry/identity/vercel/provider.py @@ -1,3 +1,4 @@ +from typing import int from sentry import options from sentry.identity.oauth2 import OAuth2CallbackView, OAuth2Provider from sentry.identity.pipeline import IdentityPipeline diff --git a/src/sentry/identity/vsts/provider.py b/src/sentry/identity/vsts/provider.py index b69ac0594f029a..6f0256fd045b5a 100644 --- a/src/sentry/identity/vsts/provider.py +++ b/src/sentry/identity/vsts/provider.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.core.exceptions import PermissionDenied from requests import Response diff --git a/src/sentry/identity/vsts_extension/provider.py b/src/sentry/identity/vsts_extension/provider.py index cc1f2ed96d346d..93eed8058bc3c4 100644 --- a/src/sentry/identity/vsts_extension/provider.py +++ b/src/sentry/identity/vsts_extension/provider.py @@ -1,3 +1,4 @@ +from typing import int from sentry.identity.vsts.provider import VSTSIdentityProvider diff --git a/src/sentry/incidents/action_handlers.py b/src/sentry/incidents/action_handlers.py index 352e39a82e5565..412d356533ef87 100644 --- a/src/sentry/incidents/action_handlers.py +++ b/src/sentry/incidents/action_handlers.py @@ -3,7 +3,7 @@ import abc import logging from collections.abc import Sequence -from typing import Any +from typing import int, Any from urllib.parse import urlencode import orjson diff --git a/src/sentry/incidents/apps.py b/src/sentry/incidents/apps.py index 5333173f8d03d4..2051b587405028 100644 --- a/src/sentry/incidents/apps.py +++ b/src/sentry/incidents/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/incidents/charts.py b/src/sentry/incidents/charts.py index 3eb15004a2a799..7e5b653f1d11f8 100644 --- a/src/sentry/incidents/charts.py +++ b/src/sentry/incidents/charts.py @@ -1,7 +1,7 @@ from collections.abc import Mapping from datetime import datetime, timedelta from functools import reduce -from typing import Any +from typing import int, Any from django.utils import timezone diff --git a/src/sentry/incidents/endpoints/bases.py b/src/sentry/incidents/endpoints/bases.py index 5aa34185240dfa..dc2e5f06573378 100644 --- a/src/sentry/incidents/endpoints/bases.py +++ b/src/sentry/incidents/endpoints/bases.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from rest_framework.exceptions import PermissionDenied from rest_framework.request import Request diff --git a/src/sentry/incidents/endpoints/organization_alert_rule_available_action_index.py b/src/sentry/incidents/endpoints/organization_alert_rule_available_action_index.py index 0337a6e4cb17ba..5a0cf85793aa1d 100644 --- a/src/sentry/incidents/endpoints/organization_alert_rule_available_action_index.py +++ b/src/sentry/incidents/endpoints/organization_alert_rule_available_action_index.py @@ -2,7 +2,7 @@ from collections import defaultdict from collections.abc import Mapping -from typing import Any, DefaultDict +from typing import Any, DefaultDict, int from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/incidents/endpoints/organization_alert_rule_details.py b/src/sentry/incidents/endpoints/organization_alert_rule_details.py index 27c941d8ee9a13..e07d8e98966c33 100644 --- a/src/sentry/incidents/endpoints/organization_alert_rule_details.py +++ b/src/sentry/incidents/endpoints/organization_alert_rule_details.py @@ -1,3 +1,4 @@ +from typing import int import functools import logging from collections.abc import Callable diff --git a/src/sentry/incidents/endpoints/organization_alert_rule_index.py b/src/sentry/incidents/endpoints/organization_alert_rule_index.py index 78dd443747cb6b..5badccb5b203ea 100644 --- a/src/sentry/incidents/endpoints/organization_alert_rule_index.py +++ b/src/sentry/incidents/endpoints/organization_alert_rule_index.py @@ -1,3 +1,4 @@ +from typing import int import logging from copy import deepcopy from datetime import UTC, datetime diff --git a/src/sentry/incidents/endpoints/organization_incident_details.py b/src/sentry/incidents/endpoints/organization_incident_details.py index cb1495c0d0a6ca..1d65c0664ca572 100644 --- a/src/sentry/incidents/endpoints/organization_incident_details.py +++ b/src/sentry/incidents/endpoints/organization_incident_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/incidents/endpoints/organization_incident_index.py b/src/sentry/incidents/endpoints/organization_incident_index.py index 335c19224c73ed..b6c75727540156 100644 --- a/src/sentry/incidents/endpoints/organization_incident_index.py +++ b/src/sentry/incidents/endpoints/organization_incident_index.py @@ -1,3 +1,4 @@ +from typing import int from dateutil.parser import parse as parse_date from django.db.models import Q from rest_framework import status diff --git a/src/sentry/incidents/endpoints/project_alert_rule_details.py b/src/sentry/incidents/endpoints/project_alert_rule_details.py index f04d50e0320337..f4df394b2c065a 100644 --- a/src/sentry/incidents/endpoints/project_alert_rule_details.py +++ b/src/sentry/incidents/endpoints/project_alert_rule_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/incidents/endpoints/project_alert_rule_index.py b/src/sentry/incidents/endpoints/project_alert_rule_index.py index 30f251c4869f0c..72c53a7437e447 100644 --- a/src/sentry/incidents/endpoints/project_alert_rule_index.py +++ b/src/sentry/incidents/endpoints/project_alert_rule_index.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.http.response import HttpResponseBase from rest_framework.request import Request diff --git a/src/sentry/incidents/endpoints/project_alert_rule_task_details.py b/src/sentry/incidents/endpoints/project_alert_rule_task_details.py index f0e70542d52b29..6c2eac11701f1b 100644 --- a/src/sentry/incidents/endpoints/project_alert_rule_task_details.py +++ b/src/sentry/incidents/endpoints/project_alert_rule_task_details.py @@ -1,3 +1,4 @@ +from typing import int from django.http import Http404 from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/incidents/endpoints/serializers/__init__.py b/src/sentry/incidents/endpoints/serializers/__init__.py index c5b8be09dd2d7e..c3c6246e09670e 100644 --- a/src/sentry/incidents/endpoints/serializers/__init__.py +++ b/src/sentry/incidents/endpoints/serializers/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .alert_rule import * # NOQA from .alert_rule_trigger import * # NOQA from .alert_rule_trigger_action import * # NOQA diff --git a/src/sentry/incidents/endpoints/serializers/alert_rule.py b/src/sentry/incidents/endpoints/serializers/alert_rule.py index d4a604060baeb6..a2e9b7f45857af 100644 --- a/src/sentry/incidents/endpoints/serializers/alert_rule.py +++ b/src/sentry/incidents/endpoints/serializers/alert_rule.py @@ -4,7 +4,7 @@ from collections import defaultdict from collections.abc import Mapping, MutableMapping, Sequence from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser from django.db.models import Max, Q, prefetch_related_objects diff --git a/src/sentry/incidents/endpoints/serializers/alert_rule_trigger.py b/src/sentry/incidents/endpoints/serializers/alert_rule_trigger.py index 5b3c73ad066146..b0dbeac1706d99 100644 --- a/src/sentry/incidents/endpoints/serializers/alert_rule_trigger.py +++ b/src/sentry/incidents/endpoints/serializers/alert_rule_trigger.py @@ -1,5 +1,5 @@ from collections import defaultdict -from typing import DefaultDict +from typing import int, DefaultDict from django.db.models import prefetch_related_objects diff --git a/src/sentry/incidents/endpoints/serializers/alert_rule_trigger_action.py b/src/sentry/incidents/endpoints/serializers/alert_rule_trigger_action.py index e26b2ea8681324..288a36121748c5 100644 --- a/src/sentry/incidents/endpoints/serializers/alert_rule_trigger_action.py +++ b/src/sentry/incidents/endpoints/serializers/alert_rule_trigger_action.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.api.serializers import Serializer, register diff --git a/src/sentry/incidents/endpoints/serializers/incident.py b/src/sentry/incidents/endpoints/serializers/incident.py index b22ae998dac93d..2bf01f8b971eac 100644 --- a/src/sentry/incidents/endpoints/serializers/incident.py +++ b/src/sentry/incidents/endpoints/serializers/incident.py @@ -1,6 +1,6 @@ from collections import defaultdict from datetime import datetime -from typing import TypedDict +from typing import int, TypedDict from django.db.models import prefetch_related_objects diff --git a/src/sentry/incidents/endpoints/serializers/query_subscription.py b/src/sentry/incidents/endpoints/serializers/query_subscription.py index ab449fe50d2a65..9053c31ff968c1 100644 --- a/src/sentry/incidents/endpoints/serializers/query_subscription.py +++ b/src/sentry/incidents/endpoints/serializers/query_subscription.py @@ -1,6 +1,6 @@ from collections import defaultdict from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from django.db.models import prefetch_related_objects diff --git a/src/sentry/incidents/endpoints/serializers/utils.py b/src/sentry/incidents/endpoints/serializers/utils.py index 54c144066bcc92..ecb1ebf5b7136f 100644 --- a/src/sentry/incidents/endpoints/serializers/utils.py +++ b/src/sentry/incidents/endpoints/serializers/utils.py @@ -1,3 +1,4 @@ +from typing import int OFFSET = 10**9 diff --git a/src/sentry/incidents/endpoints/serializers/workflow_engine_action.py b/src/sentry/incidents/endpoints/serializers/workflow_engine_action.py index 79f86ba1828b06..fa6c2d44e4f2ec 100644 --- a/src/sentry/incidents/endpoints/serializers/workflow_engine_action.py +++ b/src/sentry/incidents/endpoints/serializers/workflow_engine_action.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from django.contrib.auth.models import AnonymousUser from django.db.models import Subquery diff --git a/src/sentry/incidents/endpoints/serializers/workflow_engine_data_condition.py b/src/sentry/incidents/endpoints/serializers/workflow_engine_data_condition.py index 86eea392a4193a..6c845ae4a8656b 100644 --- a/src/sentry/incidents/endpoints/serializers/workflow_engine_data_condition.py +++ b/src/sentry/incidents/endpoints/serializers/workflow_engine_data_condition.py @@ -1,6 +1,6 @@ from collections import defaultdict from collections.abc import Mapping, Sequence -from typing import Any, DefaultDict +from typing import Any, DefaultDict, int from django.contrib.auth.models import AnonymousUser from django.db.models import Subquery diff --git a/src/sentry/incidents/endpoints/serializers/workflow_engine_detector.py b/src/sentry/incidents/endpoints/serializers/workflow_engine_detector.py index 1829a34e3fec00..ecc88d37136b62 100644 --- a/src/sentry/incidents/endpoints/serializers/workflow_engine_detector.py +++ b/src/sentry/incidents/endpoints/serializers/workflow_engine_detector.py @@ -1,6 +1,6 @@ from collections import defaultdict from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any, DefaultDict +from typing import Any, DefaultDict, int from django.contrib.auth.models import AnonymousUser from django.db.models import Q, Subquery diff --git a/src/sentry/incidents/endpoints/serializers/workflow_engine_incident.py b/src/sentry/incidents/endpoints/serializers/workflow_engine_incident.py index 8aeb706abcd59b..d9277a556a2907 100644 --- a/src/sentry/incidents/endpoints/serializers/workflow_engine_incident.py +++ b/src/sentry/incidents/endpoints/serializers/workflow_engine_incident.py @@ -1,6 +1,6 @@ from collections import defaultdict from collections.abc import Mapping, Sequence -from typing import Any, DefaultDict +from typing import Any, DefaultDict, int from django.contrib.auth.models import AnonymousUser from django.db.models import Subquery diff --git a/src/sentry/incidents/endpoints/team_alerts_triggered.py b/src/sentry/incidents/endpoints/team_alerts_triggered.py index a45989ac615889..bdb655fa9b98ca 100644 --- a/src/sentry/incidents/endpoints/team_alerts_triggered.py +++ b/src/sentry/incidents/endpoints/team_alerts_triggered.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.db.models import Count, Q diff --git a/src/sentry/incidents/endpoints/utils.py b/src/sentry/incidents/endpoints/utils.py index 9038bb3d3c1012..7fe359655d9fbf 100644 --- a/src/sentry/incidents/endpoints/utils.py +++ b/src/sentry/incidents/endpoints/utils.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.helpers.teams import get_teams from sentry.incidents.models.alert_rule import AlertRule, AlertRuleThresholdType from sentry.workflow_engine.models.data_condition import Condition diff --git a/src/sentry/incidents/events.py b/src/sentry/incidents/events.py index c07a2338867b6d..0cd28e697e61f8 100644 --- a/src/sentry/incidents/events.py +++ b/src/sentry/incidents/events.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/incidents/grouptype.py b/src/sentry/incidents/grouptype.py index ea36e0542008f6..0fde528e215e52 100644 --- a/src/sentry/incidents/grouptype.py +++ b/src/sentry/incidents/grouptype.py @@ -3,7 +3,7 @@ import logging from dataclasses import dataclass from enum import StrEnum -from typing import Any, Literal +from typing import Any, Literal, int from sentry import features from sentry.constants import CRASH_RATE_ALERT_AGGREGATE_ALIAS diff --git a/src/sentry/incidents/handlers/condition/__init__.py b/src/sentry/incidents/handlers/condition/__init__.py index dd58f951741972..1fae3a4880f2d8 100644 --- a/src/sentry/incidents/handlers/condition/__init__.py +++ b/src/sentry/incidents/handlers/condition/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "AnomalyDetectionHandler", ] diff --git a/src/sentry/incidents/handlers/condition/anomaly_detection_handler.py b/src/sentry/incidents/handlers/condition/anomaly_detection_handler.py index dd854861cb78e2..1e03d9832e4ead 100644 --- a/src/sentry/incidents/handlers/condition/anomaly_detection_handler.py +++ b/src/sentry/incidents/handlers/condition/anomaly_detection_handler.py @@ -1,6 +1,6 @@ import logging from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.conf import settings diff --git a/src/sentry/incidents/logic.py b/src/sentry/incidents/logic.py index 93338dc51ff04a..37592f952ab14d 100644 --- a/src/sentry/incidents/logic.py +++ b/src/sentry/incidents/logic.py @@ -6,7 +6,7 @@ from copy import deepcopy from dataclasses import dataclass, replace from datetime import datetime, timedelta, timezone -from typing import Any, TypedDict +from typing import Any, TypedDict, int from uuid import UUID, uuid4 import sentry_sdk diff --git a/src/sentry/incidents/metric_issue_detector.py b/src/sentry/incidents/metric_issue_detector.py index 2fd1b7082469ed..69a7f79f916d55 100644 --- a/src/sentry/incidents/metric_issue_detector.py +++ b/src/sentry/incidents/metric_issue_detector.py @@ -1,5 +1,5 @@ from datetime import timedelta -from typing import Any, cast +from typing import Any, cast, int from rest_framework import serializers diff --git a/src/sentry/incidents/models/__init__.py b/src/sentry/incidents/models/__init__.py index 252025c0dbf701..c1db30dd38de7f 100644 --- a/src/sentry/incidents/models/__init__.py +++ b/src/sentry/incidents/models/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ( "AlertRule", "AlertRuleActivity", diff --git a/src/sentry/incidents/models/alert_rule.py b/src/sentry/incidents/models/alert_rule.py index 67c44ab54b236d..4d894cabee35d1 100644 --- a/src/sentry/incidents/models/alert_rule.py +++ b/src/sentry/incidents/models/alert_rule.py @@ -4,7 +4,7 @@ import logging from collections.abc import Callable, Collection, Iterable from enum import Enum, IntEnum, StrEnum -from typing import TYPE_CHECKING, Any, ClassVar, Self +from typing import TYPE_CHECKING, Any, ClassVar, Self, int from django.conf import settings from django.core.cache import cache diff --git a/src/sentry/incidents/models/incident.py b/src/sentry/incidents/models/incident.py index f1f4da55e0d6c4..dbd4a9cc80cc0e 100644 --- a/src/sentry/incidents/models/incident.py +++ b/src/sentry/incidents/models/incident.py @@ -3,7 +3,7 @@ import logging from datetime import datetime from enum import Enum -from typing import ClassVar +from typing import int, ClassVar from uuid import uuid4 from django.conf import settings diff --git a/src/sentry/incidents/receivers.py b/src/sentry/incidents/receivers.py index b024ed6f436937..e6b9957e94c279 100644 --- a/src/sentry/incidents/receivers.py +++ b/src/sentry/incidents/receivers.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from django.db.models.signals import pre_save diff --git a/src/sentry/incidents/serializers/__init__.py b/src/sentry/incidents/serializers/__init__.py index eba5fb887d0fd5..e8a0320e71f9b5 100644 --- a/src/sentry/incidents/serializers/__init__.py +++ b/src/sentry/incidents/serializers/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.incidents.models.alert_rule import AlertRuleTriggerAction __all__ = ( diff --git a/src/sentry/incidents/serializers/alert_rule.py b/src/sentry/incidents/serializers/alert_rule.py index 2609bacd67a7a7..eacd6275af4cd7 100644 --- a/src/sentry/incidents/serializers/alert_rule.py +++ b/src/sentry/incidents/serializers/alert_rule.py @@ -1,3 +1,4 @@ +from typing import int import logging import operator from datetime import timedelta diff --git a/src/sentry/incidents/serializers/alert_rule_trigger.py b/src/sentry/incidents/serializers/alert_rule_trigger.py index e3252b86057c1c..14a393971dfe2f 100644 --- a/src/sentry/incidents/serializers/alert_rule_trigger.py +++ b/src/sentry/incidents/serializers/alert_rule_trigger.py @@ -1,3 +1,4 @@ +from typing import int from django import forms from django.db import router, transaction from rest_framework import serializers diff --git a/src/sentry/incidents/serializers/alert_rule_trigger_action.py b/src/sentry/incidents/serializers/alert_rule_trigger_action.py index d0d13dc104e99e..90ad0c15dbd11d 100644 --- a/src/sentry/incidents/serializers/alert_rule_trigger_action.py +++ b/src/sentry/incidents/serializers/alert_rule_trigger_action.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from django.forms import ValidationError from django.utils.encoding import force_str diff --git a/src/sentry/incidents/subscription_processor.py b/src/sentry/incidents/subscription_processor.py index 06531c512e0556..800ebba1f9731e 100644 --- a/src/sentry/incidents/subscription_processor.py +++ b/src/sentry/incidents/subscription_processor.py @@ -2,7 +2,7 @@ import logging from datetime import datetime, timedelta -from typing import Literal, TypedDict, TypeVar +from typing import Literal, TypedDict, TypeVar, int from django.conf import settings from sentry_redis_tools.retrying_cluster import RetryingRedisCluster diff --git a/src/sentry/incidents/tasks.py b/src/sentry/incidents/tasks.py index 19e33e4d28c438..4d0b7a6e764995 100644 --- a/src/sentry/incidents/tasks.py +++ b/src/sentry/incidents/tasks.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from django.db import router, transaction diff --git a/src/sentry/incidents/typings/metric_detector.py b/src/sentry/incidents/typings/metric_detector.py index b1d0ddec57bdda..a5e069f4e8591e 100644 --- a/src/sentry/incidents/typings/metric_detector.py +++ b/src/sentry/incidents/typings/metric_detector.py @@ -2,7 +2,7 @@ from dataclasses import dataclass from datetime import datetime -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.incidents.models.alert_rule import ( AlertRule, diff --git a/src/sentry/incidents/utils/constants.py b/src/sentry/incidents/utils/constants.py index 4a5e3e51ebcef7..1316d19697eea9 100644 --- a/src/sentry/incidents/utils/constants.py +++ b/src/sentry/incidents/utils/constants.py @@ -1,2 +1,3 @@ +from typing import int INCIDENTS_SNUBA_SUBSCRIPTION_TYPE = "incidents" INCIDENT_SNAPSHOT_BATCH_SIZE = 50 diff --git a/src/sentry/incidents/utils/format_duration.py b/src/sentry/incidents/utils/format_duration.py index 3a5dcd32bdd4dc..444b69e7d5e459 100644 --- a/src/sentry/incidents/utils/format_duration.py +++ b/src/sentry/incidents/utils/format_duration.py @@ -1,3 +1,4 @@ +from typing import int from django.template.defaultfilters import pluralize diff --git a/src/sentry/incidents/utils/process_update_helpers.py b/src/sentry/incidents/utils/process_update_helpers.py index cea61d2dd170be..2075688be0edd6 100644 --- a/src/sentry/incidents/utils/process_update_helpers.py +++ b/src/sentry/incidents/utils/process_update_helpers.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import datetime, timedelta diff --git a/src/sentry/incidents/utils/sentry_apps.py b/src/sentry/incidents/utils/sentry_apps.py index d7a744b65f7761..7274dcec40ad78 100644 --- a/src/sentry/incidents/utils/sentry_apps.py +++ b/src/sentry/incidents/utils/sentry_apps.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from rest_framework import serializers diff --git a/src/sentry/incidents/utils/types.py b/src/sentry/incidents/utils/types.py index 51829a98dc6d38..f0cd7ec2fb1779 100644 --- a/src/sentry/incidents/utils/types.py +++ b/src/sentry/incidents/utils/types.py @@ -1,7 +1,7 @@ from dataclasses import dataclass from datetime import datetime from enum import Enum -from typing import Any, TypedDict +from typing import Any, TypedDict, int class QuerySubscriptionUpdate(TypedDict): diff --git a/src/sentry/ingest/billing_metrics_consumer.py b/src/sentry/ingest/billing_metrics_consumer.py index 5ca91386e28211..b2841630d47633 100644 --- a/src/sentry/ingest/billing_metrics_consumer.py +++ b/src/sentry/ingest/billing_metrics_consumer.py @@ -1,7 +1,7 @@ import logging from collections.abc import Mapping from datetime import datetime, timezone -from typing import Any, cast +from typing import Any, cast, int import orjson from arroyo.backends.kafka import KafkaPayload diff --git a/src/sentry/ingest/consumer/attachment_event.py b/src/sentry/ingest/consumer/attachment_event.py index 4b52cdb2dc85a9..10daff155d56f6 100644 --- a/src/sentry/ingest/consumer/attachment_event.py +++ b/src/sentry/ingest/consumer/attachment_event.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/ingest/consumer/factory.py b/src/sentry/ingest/consumer/factory.py index 43d6a9eaa2e893..438f33c075f7d0 100644 --- a/src/sentry/ingest/consumer/factory.py +++ b/src/sentry/ingest/consumer/factory.py @@ -2,7 +2,7 @@ from collections.abc import Callable, Mapping from functools import partial -from typing import NamedTuple, TypeVar +from typing import NamedTuple, TypeVar, int from arroyo.backends.kafka.consumer import KafkaPayload from arroyo.processing.strategies import ( diff --git a/src/sentry/ingest/consumer/processors.py b/src/sentry/ingest/consumer/processors.py index 41be3b63621be9..4147b20d30b619 100644 --- a/src/sentry/ingest/consumer/processors.py +++ b/src/sentry/ingest/consumer/processors.py @@ -2,7 +2,7 @@ import logging import os from collections.abc import Mapping, MutableMapping -from typing import Any +from typing import int, Any import orjson import sentry_sdk diff --git a/src/sentry/ingest/consumer/simple_event.py b/src/sentry/ingest/consumer/simple_event.py index a8d8f07a2039b1..a77655654c4de2 100644 --- a/src/sentry/ingest/consumer/simple_event.py +++ b/src/sentry/ingest/consumer/simple_event.py @@ -1,3 +1,4 @@ +from typing import int import logging import msgpack diff --git a/src/sentry/ingest/inbound_filters.py b/src/sentry/ingest/inbound_filters.py index e2308a092f43e6..0e605f0cb08e8d 100644 --- a/src/sentry/ingest/inbound_filters.py +++ b/src/sentry/ingest/inbound_filters.py @@ -1,5 +1,5 @@ from collections.abc import Callable, Sequence -from typing import cast +from typing import int, cast from rest_framework import serializers diff --git a/src/sentry/ingest/slicing.py b/src/sentry/ingest/slicing.py index 32ea847cb15127..9fa794b94c3c19 100644 --- a/src/sentry/ingest/slicing.py +++ b/src/sentry/ingest/slicing.py @@ -6,7 +6,7 @@ from __future__ import annotations -from typing import Literal, TypeGuard +from typing import Literal, TypeGuard, int from django.conf import settings diff --git a/src/sentry/ingest/transaction_clusterer/__init__.py b/src/sentry/ingest/transaction_clusterer/__init__.py index e35d84d9f49446..4142a7e7ee1cf3 100644 --- a/src/sentry/ingest/transaction_clusterer/__init__.py +++ b/src/sentry/ingest/transaction_clusterer/__init__.py @@ -1,3 +1,4 @@ +from typing import int """Strategies for clustering high-cardinality transaction names""" from dataclasses import dataclass diff --git a/src/sentry/ingest/transaction_clusterer/base.py b/src/sentry/ingest/transaction_clusterer/base.py index 648e50f389d703..d1910ad7b6af9f 100644 --- a/src/sentry/ingest/transaction_clusterer/base.py +++ b/src/sentry/ingest/transaction_clusterer/base.py @@ -1,6 +1,6 @@ from abc import abstractmethod from collections.abc import Iterable -from typing import NewType +from typing import int, NewType #: Rule to replace high-cardinality patterns in a transaction name. #: For now, format these rules as simple strings diff --git a/src/sentry/ingest/transaction_clusterer/datasource/__init__.py b/src/sentry/ingest/transaction_clusterer/datasource/__init__.py index 49b42cc49c598c..3df53db985af0a 100644 --- a/src/sentry/ingest/transaction_clusterer/datasource/__init__.py +++ b/src/sentry/ingest/transaction_clusterer/datasource/__init__.py @@ -1,3 +1,4 @@ +from typing import int TRANSACTION_SOURCE_URL = "url" TRANSACTION_SOURCE_SANITIZED = "sanitized" HTTP_404_TAG = ["http.status_code", "404"] diff --git a/src/sentry/ingest/transaction_clusterer/datasource/redis.py b/src/sentry/ingest/transaction_clusterer/datasource/redis.py index 58006a41102afe..910495fc21296d 100644 --- a/src/sentry/ingest/transaction_clusterer/datasource/redis.py +++ b/src/sentry/ingest/transaction_clusterer/datasource/redis.py @@ -2,7 +2,7 @@ import logging from collections.abc import Iterator, Mapping -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/ingest/transaction_clusterer/datasource/snuba.py b/src/sentry/ingest/transaction_clusterer/datasource/snuba.py index aa607a89fa99a8..6a20b7cac8f64f 100644 --- a/src/sentry/ingest/transaction_clusterer/datasource/snuba.py +++ b/src/sentry/ingest/transaction_clusterer/datasource/snuba.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Iterable from datetime import datetime diff --git a/src/sentry/ingest/transaction_clusterer/meta.py b/src/sentry/ingest/transaction_clusterer/meta.py index a4dab078ded252..784b5fe69be49d 100644 --- a/src/sentry/ingest/transaction_clusterer/meta.py +++ b/src/sentry/ingest/transaction_clusterer/meta.py @@ -1,7 +1,7 @@ """Track metadata about clusterer runs""" from datetime import datetime, timezone -from typing import TypedDict +from typing import int, TypedDict from sentry.ingest.transaction_clusterer import ClustererNamespace from sentry.models.project import Project diff --git a/src/sentry/ingest/transaction_clusterer/rule_validator.py b/src/sentry/ingest/transaction_clusterer/rule_validator.py index dc4c61f668768a..15ca042541925e 100644 --- a/src/sentry/ingest/transaction_clusterer/rule_validator.py +++ b/src/sentry/ingest/transaction_clusterer/rule_validator.py @@ -1,3 +1,4 @@ +from typing import int import re from urllib.parse import urlparse diff --git a/src/sentry/ingest/transaction_clusterer/rules.py b/src/sentry/ingest/transaction_clusterer/rules.py index 64da8ea464c6f0..4674d0ca5539f0 100644 --- a/src/sentry/ingest/transaction_clusterer/rules.py +++ b/src/sentry/ingest/transaction_clusterer/rules.py @@ -1,6 +1,6 @@ from collections.abc import Mapping, Sequence from datetime import datetime, timezone -from typing import Protocol +from typing import int, Protocol import sentry_sdk diff --git a/src/sentry/ingest/transaction_clusterer/tasks.py b/src/sentry/ingest/transaction_clusterer/tasks.py index 4a492fba9cb124..773f7567b0d7cb 100644 --- a/src/sentry/ingest/transaction_clusterer/tasks.py +++ b/src/sentry/ingest/transaction_clusterer/tasks.py @@ -1,7 +1,7 @@ import logging from collections.abc import Sequence from itertools import islice -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/ingest/transaction_clusterer/tree.py b/src/sentry/ingest/transaction_clusterer/tree.py index e33e704918187a..fcbae4a3f0fa9a 100644 --- a/src/sentry/ingest/transaction_clusterer/tree.py +++ b/src/sentry/ingest/transaction_clusterer/tree.py @@ -48,7 +48,7 @@ import logging from collections import UserDict, defaultdict from collections.abc import Iterable -from typing import TypeAlias, Union +from typing import TypeAlias, Union, int import sentry_sdk diff --git a/src/sentry/ingest/types.py b/src/sentry/ingest/types.py index 4b0c4596d72796..da815ec3087786 100644 --- a/src/sentry/ingest/types.py +++ b/src/sentry/ingest/types.py @@ -1,3 +1,4 @@ +from typing import int from enum import StrEnum diff --git a/src/sentry/insights/__init__.py b/src/sentry/insights/__init__.py index 7955196455a9f5..6937e5e9c96703 100644 --- a/src/sentry/insights/__init__.py +++ b/src/sentry/insights/__init__.py @@ -1,4 +1,4 @@ -from typing import Any, NamedTuple +from typing import Any, NamedTuple, int from sentry.constants import InsightModules diff --git a/src/sentry/insights/endpoints/starred_segments.py b/src/sentry/insights/endpoints/starred_segments.py index 455fb2cc0033c2..fa0e4a64f13337 100644 --- a/src/sentry/insights/endpoints/starred_segments.py +++ b/src/sentry/insights/endpoints/starred_segments.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router from rest_framework import serializers, status from rest_framework.request import Request diff --git a/src/sentry/insights/migrations/0001_squashed_0001_add_starred_transactions_model.py b/src/sentry/insights/migrations/0001_squashed_0001_add_starred_transactions_model.py index 7ea5078004b610..c2a8fb6e4b41ac 100644 --- a/src/sentry/insights/migrations/0001_squashed_0001_add_starred_transactions_model.py +++ b/src/sentry/insights/migrations/0001_squashed_0001_add_starred_transactions_model.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 16:30 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/insights/migrations/0002_backfill_team_starred.py b/src/sentry/insights/migrations/0002_backfill_team_starred.py index 75dedd940a53d2..95805a9a341779 100644 --- a/src/sentry/insights/migrations/0002_backfill_team_starred.py +++ b/src/sentry/insights/migrations/0002_backfill_team_starred.py @@ -1,4 +1,5 @@ # Generated by Django 5.2.1 on 2025-06-10 16:25 +from typing import int import logging from django.db import IntegrityError, migrations, router, transaction diff --git a/src/sentry/insights/models.py b/src/sentry/insights/models.py index eb73a0ec26f27d..851d6ce7b833a4 100644 --- a/src/sentry/insights/models.py +++ b/src/sentry/insights/models.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import models diff --git a/src/sentry/integrations/__init__.py b/src/sentry/integrations/__init__.py index 28ca513e6caa88..5843684f721fbd 100644 --- a/src/sentry/integrations/__init__.py +++ b/src/sentry/integrations/__init__.py @@ -1,3 +1,4 @@ +from typing import int """ The Integrations Module contains the infrastructure to send API calls to and receive webhook requests from third-party services. It contains the business diff --git a/src/sentry/integrations/analytics.py b/src/sentry/integrations/analytics.py index 22c2d6806cdf16..7d8cf448b45299 100644 --- a/src/sentry/integrations/analytics.py +++ b/src/sentry/integrations/analytics.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/integrations/api/bases/doc_integrations.py b/src/sentry/integrations/api/bases/doc_integrations.py index 38d02c80ccf122..857010e90bbc38 100644 --- a/src/sentry/integrations/api/bases/doc_integrations.py +++ b/src/sentry/integrations/api/bases/doc_integrations.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import sentry_sdk from django.http import Http404 diff --git a/src/sentry/integrations/api/bases/external_actor.py b/src/sentry/integrations/api/bases/external_actor.py index 2db4778b8c4874..13ca15eede0733 100644 --- a/src/sentry/integrations/api/bases/external_actor.py +++ b/src/sentry/integrations/api/bases/external_actor.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, MutableMapping -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.db import IntegrityError from django.http import Http404 diff --git a/src/sentry/integrations/api/bases/integration.py b/src/sentry/integrations/api/bases/integration.py index db35ffec89d120..d9932fdc320988 100644 --- a/src/sentry/integrations/api/bases/integration.py +++ b/src/sentry/integrations/api/bases/integration.py @@ -2,7 +2,7 @@ import sys import traceback -from typing import Any +from typing import int, Any from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/integrations/api/bases/organization_integrations.py b/src/sentry/integrations/api/bases/organization_integrations.py index 7123e2d586952f..f678029a28a1b0 100644 --- a/src/sentry/integrations/api/bases/organization_integrations.py +++ b/src/sentry/integrations/api/bases/organization_integrations.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.http import Http404 from rest_framework.request import Request diff --git a/src/sentry/integrations/api/endpoints/data_forwarding_details.py b/src/sentry/integrations/api/endpoints/data_forwarding_details.py index 1afec9fc9aadf9..e71baf248e9dec 100644 --- a/src/sentry/integrations/api/endpoints/data_forwarding_details.py +++ b/src/sentry/integrations/api/endpoints/data_forwarding_details.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db import router, transaction from django.utils.decorators import method_decorator diff --git a/src/sentry/integrations/api/endpoints/data_forwarding_index.py b/src/sentry/integrations/api/endpoints/data_forwarding_index.py index 44538b9d5e54eb..fc0339a70397f0 100644 --- a/src/sentry/integrations/api/endpoints/data_forwarding_index.py +++ b/src/sentry/integrations/api/endpoints/data_forwarding_index.py @@ -1,3 +1,4 @@ +from typing import int from django.utils.decorators import method_decorator from django.views.decorators.cache import never_cache from drf_spectacular.utils import extend_schema diff --git a/src/sentry/integrations/api/endpoints/doc_integration_avatar.py b/src/sentry/integrations/api/endpoints/doc_integration_avatar.py index 271b6981b241db..604285d726db94 100644 --- a/src/sentry/integrations/api/endpoints/doc_integration_avatar.py +++ b/src/sentry/integrations/api/endpoints/doc_integration_avatar.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.api_owners import ApiOwner from sentry.api.api_publish_status import ApiPublishStatus from sentry.api.base import control_silo_endpoint diff --git a/src/sentry/integrations/api/endpoints/doc_integration_details.py b/src/sentry/integrations/api/endpoints/doc_integration_details.py index 6d93dbde58634f..8af1ad51d3cd72 100644 --- a/src/sentry/integrations/api/endpoints/doc_integration_details.py +++ b/src/sentry/integrations/api/endpoints/doc_integration_details.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework import status diff --git a/src/sentry/integrations/api/endpoints/doc_integrations_index.py b/src/sentry/integrations/api/endpoints/doc_integrations_index.py index e392a8eba0f7c8..593feb4923c75e 100644 --- a/src/sentry/integrations/api/endpoints/doc_integrations_index.py +++ b/src/sentry/integrations/api/endpoints/doc_integrations_index.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework import status diff --git a/src/sentry/integrations/api/endpoints/external_team_details.py b/src/sentry/integrations/api/endpoints/external_team_details.py index 2376bd16bc33cf..9f42857cbe3c9b 100644 --- a/src/sentry/integrations/api/endpoints/external_team_details.py +++ b/src/sentry/integrations/api/endpoints/external_team_details.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from drf_spectacular.utils import extend_schema from rest_framework import status diff --git a/src/sentry/integrations/api/endpoints/external_team_index.py b/src/sentry/integrations/api/endpoints/external_team_index.py index f8d35a156b8d95..daf6d0cd43ef8c 100644 --- a/src/sentry/integrations/api/endpoints/external_team_index.py +++ b/src/sentry/integrations/api/endpoints/external_team_index.py @@ -1,3 +1,4 @@ +from typing import int import logging from drf_spectacular.utils import extend_schema diff --git a/src/sentry/integrations/api/endpoints/external_user_details.py b/src/sentry/integrations/api/endpoints/external_user_details.py index 4ae032700042ef..eecb1a86340846 100644 --- a/src/sentry/integrations/api/endpoints/external_user_details.py +++ b/src/sentry/integrations/api/endpoints/external_user_details.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from drf_spectacular.utils import extend_schema from rest_framework import status diff --git a/src/sentry/integrations/api/endpoints/external_user_index.py b/src/sentry/integrations/api/endpoints/external_user_index.py index 3450ebd314eda9..a203a3e5fbca12 100644 --- a/src/sentry/integrations/api/endpoints/external_user_index.py +++ b/src/sentry/integrations/api/endpoints/external_user_index.py @@ -1,3 +1,4 @@ +from typing import int import logging from drf_spectacular.utils import extend_schema diff --git a/src/sentry/integrations/api/endpoints/integration_features.py b/src/sentry/integrations/api/endpoints/integration_features.py index 1b8ef73eb8273b..3d5b6d8bfcbded 100644 --- a/src/sentry/integrations/api/endpoints/integration_features.py +++ b/src/sentry/integrations/api/endpoints/integration_features.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/integrations/api/endpoints/integration_proxy.py b/src/sentry/integrations/api/endpoints/integration_proxy.py index 0aa5f5371b27d6..6ce07d000a19f4 100644 --- a/src/sentry/integrations/api/endpoints/integration_proxy.py +++ b/src/sentry/integrations/api/endpoints/integration_proxy.py @@ -4,7 +4,7 @@ from collections import defaultdict from collections.abc import Mapping from enum import StrEnum -from typing import Any +from typing import int, Any from urllib.parse import urljoin import sentry_sdk diff --git a/src/sentry/integrations/api/endpoints/organization_code_mapping_codeowners.py b/src/sentry/integrations/api/endpoints/organization_code_mapping_codeowners.py index 0b0e960c505a58..0b3fc70ec48932 100644 --- a/src/sentry/integrations/api/endpoints/organization_code_mapping_codeowners.py +++ b/src/sentry/integrations/api/endpoints/organization_code_mapping_codeowners.py @@ -1,3 +1,4 @@ +from typing import int from django.http import Http404 from rest_framework import status from rest_framework.exceptions import NotFound diff --git a/src/sentry/integrations/api/endpoints/organization_code_mapping_details.py b/src/sentry/integrations/api/endpoints/organization_code_mapping_details.py index 9d0a7f83deafc0..5bc8115ee42f42 100644 --- a/src/sentry/integrations/api/endpoints/organization_code_mapping_details.py +++ b/src/sentry/integrations/api/endpoints/organization_code_mapping_details.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models.deletion import ProtectedError from django.http import Http404 from rest_framework import status diff --git a/src/sentry/integrations/api/endpoints/organization_code_mappings.py b/src/sentry/integrations/api/endpoints/organization_code_mappings.py index 9bcb1dd8aef8da..f0bba033a90c45 100644 --- a/src/sentry/integrations/api/endpoints/organization_code_mappings.py +++ b/src/sentry/integrations/api/endpoints/organization_code_mappings.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.http import Http404 from django.utils.translation import gettext_lazy as _ diff --git a/src/sentry/integrations/api/endpoints/organization_coding_agents.py b/src/sentry/integrations/api/endpoints/organization_coding_agents.py index 16bbbb28d94ced..ff131184d6104c 100644 --- a/src/sentry/integrations/api/endpoints/organization_coding_agents.py +++ b/src/sentry/integrations/api/endpoints/organization_coding_agents.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import TypedDict +from typing import int, TypedDict from rest_framework import serializers from rest_framework.exceptions import ValidationError diff --git a/src/sentry/integrations/api/endpoints/organization_config_integrations.py b/src/sentry/integrations/api/endpoints/organization_config_integrations.py index aa79bf82206582..e2957d931f4586 100644 --- a/src/sentry/integrations/api/endpoints/organization_config_integrations.py +++ b/src/sentry/integrations/api/endpoints/organization_config_integrations.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/integrations/api/endpoints/organization_integration_channel_validate.py b/src/sentry/integrations/api/endpoints/organization_integration_channel_validate.py index cffcb9ba902716..970fee08276e1e 100644 --- a/src/sentry/integrations/api/endpoints/organization_integration_channel_validate.py +++ b/src/sentry/integrations/api/endpoints/organization_integration_channel_validate.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import sentry_sdk from django.core.exceptions import ValidationError diff --git a/src/sentry/integrations/api/endpoints/organization_integration_channels.py b/src/sentry/integrations/api/endpoints/organization_integration_channels.py index 616b9b5caf952e..121ba3e47970e1 100644 --- a/src/sentry/integrations/api/endpoints/organization_integration_channels.py +++ b/src/sentry/integrations/api/endpoints/organization_integration_channels.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/integrations/api/endpoints/organization_integration_details.py b/src/sentry/integrations/api/endpoints/organization_integration_details.py index 5ad861a2e65ba2..54cc54edf7eceb 100644 --- a/src/sentry/integrations/api/endpoints/organization_integration_details.py +++ b/src/sentry/integrations/api/endpoints/organization_integration_details.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import sentry_sdk from django.db import router, transaction diff --git a/src/sentry/integrations/api/endpoints/organization_integration_issues.py b/src/sentry/integrations/api/endpoints/organization_integration_issues.py index f7066c2fbdbdd8..8b754e6b970a0b 100644 --- a/src/sentry/integrations/api/endpoints/organization_integration_issues.py +++ b/src/sentry/integrations/api/endpoints/organization_integration_issues.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/integrations/api/endpoints/organization_integration_migrate_opsgenie.py b/src/sentry/integrations/api/endpoints/organization_integration_migrate_opsgenie.py index a9ee554de42169..e1e81d9ac4e3f5 100644 --- a/src/sentry/integrations/api/endpoints/organization_integration_migrate_opsgenie.py +++ b/src/sentry/integrations/api/endpoints/organization_integration_migrate_opsgenie.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/integrations/api/endpoints/organization_integration_repos.py b/src/sentry/integrations/api/endpoints/organization_integration_repos.py index 9160a1f9982fd1..d8fb990ecaa252 100644 --- a/src/sentry/integrations/api/endpoints/organization_integration_repos.py +++ b/src/sentry/integrations/api/endpoints/organization_integration_repos.py @@ -1,4 +1,4 @@ -from typing import Any, TypedDict +from typing import Any, TypedDict, int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/integrations/api/endpoints/organization_integration_request.py b/src/sentry/integrations/api/endpoints/organization_integration_request.py index 53f7a3a5a628e2..6bc28963f64789 100644 --- a/src/sentry/integrations/api/endpoints/organization_integration_request.py +++ b/src/sentry/integrations/api/endpoints/organization_integration_request.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/integrations/api/endpoints/organization_integration_serverless_functions.py b/src/sentry/integrations/api/endpoints/organization_integration_serverless_functions.py index 578cbed45a4414..d3406e1389d327 100644 --- a/src/sentry/integrations/api/endpoints/organization_integration_serverless_functions.py +++ b/src/sentry/integrations/api/endpoints/organization_integration_serverless_functions.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from rest_framework import serializers from rest_framework.request import Request diff --git a/src/sentry/integrations/api/endpoints/organization_integrations_index.py b/src/sentry/integrations/api/endpoints/organization_integrations_index.py index 588994d2045d39..0ea2879c5bafb9 100644 --- a/src/sentry/integrations/api/endpoints/organization_integrations_index.py +++ b/src/sentry/integrations/api/endpoints/organization_integrations_index.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/integrations/api/endpoints/organization_repositories.py b/src/sentry/integrations/api/endpoints/organization_repositories.py index 09172cbe4e24ef..f7d94602c7cecb 100644 --- a/src/sentry/integrations/api/endpoints/organization_repositories.py +++ b/src/sentry/integrations/api/endpoints/organization_repositories.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Q from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/integrations/api/endpoints/organization_repository_commits.py b/src/sentry/integrations/api/endpoints/organization_repository_commits.py index 328c6822aaa1dc..742ffc19530da8 100644 --- a/src/sentry/integrations/api/endpoints/organization_repository_commits.py +++ b/src/sentry/integrations/api/endpoints/organization_repository_commits.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import OpenApiExample, OpenApiParameter, extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/integrations/api/endpoints/organization_repository_details.py b/src/sentry/integrations/api/endpoints/organization_repository_details.py index ac6c52eb8155e2..8bb0528834163e 100644 --- a/src/sentry/integrations/api/endpoints/organization_repository_details.py +++ b/src/sentry/integrations/api/endpoints/organization_repository_details.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.db import router, transaction from rest_framework import serializers diff --git a/src/sentry/integrations/api/parsers/doc_integration.py b/src/sentry/integrations/api/parsers/doc_integration.py index 1afd6ee47dc05c..1542ad3402f714 100644 --- a/src/sentry/integrations/api/parsers/doc_integration.py +++ b/src/sentry/integrations/api/parsers/doc_integration.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from jsonschema import Draft7Validator from jsonschema.exceptions import best_match diff --git a/src/sentry/integrations/api/parsers/external_actor.py b/src/sentry/integrations/api/parsers/external_actor.py index 86dec1fd849246..7b5213dcfe7955 100644 --- a/src/sentry/integrations/api/parsers/external_actor.py +++ b/src/sentry/integrations/api/parsers/external_actor.py @@ -1,3 +1,4 @@ +from typing import int import re from rest_framework import serializers diff --git a/src/sentry/integrations/api/parsers/integrations.py b/src/sentry/integrations/api/parsers/integrations.py index 911d0ec51af59e..a7b6e2999b7413 100644 --- a/src/sentry/integrations/api/parsers/integrations.py +++ b/src/sentry/integrations/api/parsers/integrations.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.exceptions import ParameterValidationError from sentry.integrations.types import ExternalProviders from sentry.integrations.utils.providers import get_provider_enum diff --git a/src/sentry/integrations/api/serializers/models/__init__.py b/src/sentry/integrations/api/serializers/models/__init__.py index db18d9a010dff7..e33f073953cf51 100644 --- a/src/sentry/integrations/api/serializers/models/__init__.py +++ b/src/sentry/integrations/api/serializers/models/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.api.serializers.models.data_forwarder import * # noqa: F401,F403 from sentry.integrations.api.serializers.models.doc_integration import * # noqa: F401,F403 from sentry.integrations.api.serializers.models.doc_integration_avatar import * # noqa: F401,F403 diff --git a/src/sentry/integrations/api/serializers/models/data_forwarder.py b/src/sentry/integrations/api/serializers/models/data_forwarder.py index ac7727af55db9f..4396b73fd7f742 100644 --- a/src/sentry/integrations/api/serializers/models/data_forwarder.py +++ b/src/sentry/integrations/api/serializers/models/data_forwarder.py @@ -1,6 +1,6 @@ from collections import defaultdict from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/integrations/api/serializers/models/doc_integration.py b/src/sentry/integrations/api/serializers/models/doc_integration.py index 78ddacd2de4240..5c3fb15e575672 100644 --- a/src/sentry/integrations/api/serializers/models/doc_integration.py +++ b/src/sentry/integrations/api/serializers/models/doc_integration.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/integrations/api/serializers/models/doc_integration_avatar.py b/src/sentry/integrations/api/serializers/models/doc_integration_avatar.py index ba7892ffe62acc..44c0dc6a6f9917 100644 --- a/src/sentry/integrations/api/serializers/models/doc_integration_avatar.py +++ b/src/sentry/integrations/api/serializers/models/doc_integration_avatar.py @@ -1,5 +1,5 @@ from collections.abc import MutableMapping -from typing import Any +from typing import int, Any from sentry.api.serializers import Serializer, register from sentry.integrations.models.doc_integration_avatar import DocIntegrationAvatar diff --git a/src/sentry/integrations/api/serializers/models/external_actor.py b/src/sentry/integrations/api/serializers/models/external_actor.py index be53368f5757f5..fa92703b99b9b4 100644 --- a/src/sentry/integrations/api/serializers/models/external_actor.py +++ b/src/sentry/integrations/api/serializers/models/external_actor.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/integrations/api/serializers/models/external_issue.py b/src/sentry/integrations/api/serializers/models/external_issue.py index 41829d54338a48..305765eebe1b32 100644 --- a/src/sentry/integrations/api/serializers/models/external_issue.py +++ b/src/sentry/integrations/api/serializers/models/external_issue.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Sequence -from typing import Any +from typing import int, Any from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/integrations/api/serializers/models/integration.py b/src/sentry/integrations/api/serializers/models/integration.py index 58bc24fddeb579..c666959f7dc571 100644 --- a/src/sentry/integrations/api/serializers/models/integration.py +++ b/src/sentry/integrations/api/serializers/models/integration.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/integrations/api/serializers/models/integration_feature.py b/src/sentry/integrations/api/serializers/models/integration_feature.py index 96cf91c8c7cf18..f0a1c955705968 100644 --- a/src/sentry/integrations/api/serializers/models/integration_feature.py +++ b/src/sentry/integrations/api/serializers/models/integration_feature.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/integrations/api/serializers/models/repository_project_path_config.py b/src/sentry/integrations/api/serializers/models/repository_project_path_config.py index bcd198b00d9dea..7801d091ff7b6d 100644 --- a/src/sentry/integrations/api/serializers/models/repository_project_path_config.py +++ b/src/sentry/integrations/api/serializers/models/repository_project_path_config.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.integrations.api.serializers.models.integration import serialize_provider from sentry.integrations.models.repository_project_path_config import RepositoryProjectPathConfig diff --git a/src/sentry/integrations/api/serializers/rest_framework/data_forwarder.py b/src/sentry/integrations/api/serializers/rest_framework/data_forwarder.py index 0105b9cd9011fb..4ec383f96644d8 100644 --- a/src/sentry/integrations/api/serializers/rest_framework/data_forwarder.py +++ b/src/sentry/integrations/api/serializers/rest_framework/data_forwarder.py @@ -1,6 +1,6 @@ import re from collections.abc import Mapping, MutableMapping -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.db import router, transaction from rest_framework import serializers diff --git a/src/sentry/integrations/api/serializers/rest_framework/doc_integration.py b/src/sentry/integrations/api/serializers/rest_framework/doc_integration.py index b6914baa98c21b..2fdcac3674bf5a 100644 --- a/src/sentry/integrations/api/serializers/rest_framework/doc_integration.py +++ b/src/sentry/integrations/api/serializers/rest_framework/doc_integration.py @@ -1,5 +1,5 @@ from collections.abc import MutableMapping -from typing import Any +from typing import int, Any from django.db import router, transaction from jsonschema.exceptions import ValidationError as SchemaValidationError diff --git a/src/sentry/integrations/aws_lambda/__init__.py b/src/sentry/integrations/aws_lambda/__init__.py index 56f8172378724b..f267da2500fe4a 100644 --- a/src/sentry/integrations/aws_lambda/__init__.py +++ b/src/sentry/integrations/aws_lambda/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .client import * # noqa: F401,F403 from .integration import * # noqa: F401,F403 from .utils import * # noqa: F401,F403 diff --git a/src/sentry/integrations/aws_lambda/client.py b/src/sentry/integrations/aws_lambda/client.py index c03187b182740d..fb951e9b20a9a0 100644 --- a/src/sentry/integrations/aws_lambda/client.py +++ b/src/sentry/integrations/aws_lambda/client.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/integrations/aws_lambda/integration.py b/src/sentry/integrations/aws_lambda/integration.py index 93a60560a4ac55..539effac6e3ff7 100644 --- a/src/sentry/integrations/aws_lambda/integration.py +++ b/src/sentry/integrations/aws_lambda/integration.py @@ -3,7 +3,7 @@ import logging from collections.abc import Mapping from concurrent.futures import ThreadPoolExecutor -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from botocore.exceptions import ClientError from django.http.request import HttpRequest diff --git a/src/sentry/integrations/aws_lambda/utils.py b/src/sentry/integrations/aws_lambda/utils.py index 51c0121d56bcb6..f02862226e26ba 100644 --- a/src/sentry/integrations/aws_lambda/utils.py +++ b/src/sentry/integrations/aws_lambda/utils.py @@ -1,3 +1,4 @@ +from typing import int import re from functools import wraps diff --git a/src/sentry/integrations/base.py b/src/sentry/integrations/base.py index 3d3cf7ca35c1f6..a65ca2f5bb08e3 100644 --- a/src/sentry/integrations/base.py +++ b/src/sentry/integrations/base.py @@ -6,7 +6,7 @@ from collections.abc import Callable, Mapping, MutableMapping, Sequence from enum import StrEnum from functools import cached_property -from typing import TYPE_CHECKING, Any, NamedTuple, NoReturn, NotRequired, TypedDict +from typing import TYPE_CHECKING, Any, NamedTuple, NoReturn, NotRequired, TypedDict, int import sentry_sdk from django.http.request import HttpRequest diff --git a/src/sentry/integrations/bitbucket/client.py b/src/sentry/integrations/bitbucket/client.py index aa4a274251f8da..3a18a42dabe553 100644 --- a/src/sentry/integrations/bitbucket/client.py +++ b/src/sentry/integrations/bitbucket/client.py @@ -2,7 +2,7 @@ import datetime import logging -from typing import Any +from typing import int, Any from urllib.parse import parse_qs, urlparse, urlsplit from requests import PreparedRequest diff --git a/src/sentry/integrations/bitbucket/constants.py b/src/sentry/integrations/bitbucket/constants.py index 12722baff6f825..be22f03ac9cefc 100644 --- a/src/sentry/integrations/bitbucket/constants.py +++ b/src/sentry/integrations/bitbucket/constants.py @@ -1,3 +1,4 @@ +from typing import int import ipaddress # Bitbucket Cloud IP range: diff --git a/src/sentry/integrations/bitbucket/descriptor.py b/src/sentry/integrations/bitbucket/descriptor.py index 015c1de5b0d6d3..9b3ce34e891044 100644 --- a/src/sentry/integrations/bitbucket/descriptor.py +++ b/src/sentry/integrations/bitbucket/descriptor.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/integrations/bitbucket/installed.py b/src/sentry/integrations/bitbucket/installed.py index 4be5cda97459d8..09abc7abd32fc8 100644 --- a/src/sentry/integrations/bitbucket/installed.py +++ b/src/sentry/integrations/bitbucket/installed.py @@ -1,3 +1,4 @@ +from typing import int from django.http.request import HttpRequest from django.http.response import HttpResponseBase from django.views.decorators.csrf import csrf_exempt diff --git a/src/sentry/integrations/bitbucket/integration.py b/src/sentry/integrations/bitbucket/integration.py index 3588eb225f09cb..a6f21c4f52b8fa 100644 --- a/src/sentry/integrations/bitbucket/integration.py +++ b/src/sentry/integrations/bitbucket/integration.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from django.http.request import HttpRequest from django.http.response import HttpResponseBase diff --git a/src/sentry/integrations/bitbucket/issues.py b/src/sentry/integrations/bitbucket/issues.py index 8fbe81d9268c3a..2aa8198583fbe0 100644 --- a/src/sentry/integrations/bitbucket/issues.py +++ b/src/sentry/integrations/bitbucket/issues.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Sequence -from typing import Any, NoReturn +from typing import Any, NoReturn, int from django.urls import reverse diff --git a/src/sentry/integrations/bitbucket/repository.py b/src/sentry/integrations/bitbucket/repository.py index 78aa2a539075db..ced1fdd70384c9 100644 --- a/src/sentry/integrations/bitbucket/repository.py +++ b/src/sentry/integrations/bitbucket/repository.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.integrations.types import IntegrationProviderSlug from sentry.locks import locks diff --git a/src/sentry/integrations/bitbucket/search.py b/src/sentry/integrations/bitbucket/search.py index 49420c9bb6dfa4..e6e4f45daf56bd 100644 --- a/src/sentry/integrations/bitbucket/search.py +++ b/src/sentry/integrations/bitbucket/search.py @@ -1,5 +1,5 @@ import logging -from typing import TypeVar +from typing import int, TypeVar from rest_framework.response import Response diff --git a/src/sentry/integrations/bitbucket/uninstalled.py b/src/sentry/integrations/bitbucket/uninstalled.py index e4376b6ce5a265..303448e9fa8c49 100644 --- a/src/sentry/integrations/bitbucket/uninstalled.py +++ b/src/sentry/integrations/bitbucket/uninstalled.py @@ -1,3 +1,4 @@ +from typing import int from django.http.request import HttpRequest from django.http.response import HttpResponseBase from django.views.decorators.csrf import csrf_exempt diff --git a/src/sentry/integrations/bitbucket/urls.py b/src/sentry/integrations/bitbucket/urls.py index da67a4d85ce1eb..eb747269017d6d 100644 --- a/src/sentry/integrations/bitbucket/urls.py +++ b/src/sentry/integrations/bitbucket/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from .descriptor import BitbucketDescriptorEndpoint diff --git a/src/sentry/integrations/bitbucket/webhook.py b/src/sentry/integrations/bitbucket/webhook.py index c63326f0056885..145d48b8972661 100644 --- a/src/sentry/integrations/bitbucket/webhook.py +++ b/src/sentry/integrations/bitbucket/webhook.py @@ -5,7 +5,7 @@ from abc import ABC from collections.abc import Mapping from datetime import timezone -from typing import Any +from typing import int, Any import orjson from dateutil.parser import parse as parse_date diff --git a/src/sentry/integrations/bitbucket_server/client.py b/src/sentry/integrations/bitbucket_server/client.py index 1189bde5d7f45b..8cdbb3db62bf0f 100644 --- a/src/sentry/integrations/bitbucket_server/client.py +++ b/src/sentry/integrations/bitbucket_server/client.py @@ -1,3 +1,4 @@ +from typing import int import logging from urllib.parse import parse_qsl diff --git a/src/sentry/integrations/bitbucket_server/integration.py b/src/sentry/integrations/bitbucket_server/integration.py index 683b4f8fd9728b..d7eb5af5393026 100644 --- a/src/sentry/integrations/bitbucket_server/integration.py +++ b/src/sentry/integrations/bitbucket_server/integration.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from urllib.parse import parse_qs, quote, urlencode, urlparse from cryptography.hazmat.backends import default_backend diff --git a/src/sentry/integrations/bitbucket_server/repository.py b/src/sentry/integrations/bitbucket_server/repository.py index 6b3bab8c6c463d..9261044058b8cb 100644 --- a/src/sentry/integrations/bitbucket_server/repository.py +++ b/src/sentry/integrations/bitbucket_server/repository.py @@ -1,5 +1,5 @@ from datetime import datetime, timezone -from typing import Any +from typing import int, Any from django.core.cache import cache from django.urls import reverse diff --git a/src/sentry/integrations/bitbucket_server/urls.py b/src/sentry/integrations/bitbucket_server/urls.py index 242e3381092119..469350e6bc7dba 100644 --- a/src/sentry/integrations/bitbucket_server/urls.py +++ b/src/sentry/integrations/bitbucket_server/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from .webhook import BitbucketServerWebhookEndpoint diff --git a/src/sentry/integrations/bitbucket_server/utils.py b/src/sentry/integrations/bitbucket_server/utils.py index 0dd422ebb7f8b2..9bba4962ed7c04 100644 --- a/src/sentry/integrations/bitbucket_server/utils.py +++ b/src/sentry/integrations/bitbucket_server/utils.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import quote, urlencode diff --git a/src/sentry/integrations/bitbucket_server/webhook.py b/src/sentry/integrations/bitbucket_server/webhook.py index 66401557d9eaae..11f70bbd5406a4 100644 --- a/src/sentry/integrations/bitbucket_server/webhook.py +++ b/src/sentry/integrations/bitbucket_server/webhook.py @@ -2,7 +2,7 @@ from abc import ABC from collections.abc import Mapping from datetime import datetime, timezone -from typing import Any +from typing import int, Any import orjson import sentry_sdk diff --git a/src/sentry/integrations/client.py b/src/sentry/integrations/client.py index 79d031019e6ea9..f7f9a4270c0bf8 100644 --- a/src/sentry/integrations/client.py +++ b/src/sentry/integrations/client.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.shared_integrations.client import BaseApiClient diff --git a/src/sentry/integrations/coding_agent/client.py b/src/sentry/integrations/coding_agent/client.py index 9d3126de4620dd..9b292d18c0eef5 100644 --- a/src/sentry/integrations/coding_agent/client.py +++ b/src/sentry/integrations/coding_agent/client.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import abc import logging diff --git a/src/sentry/integrations/coding_agent/integration.py b/src/sentry/integrations/coding_agent/integration.py index 820c65f42d525d..779d2fa2b9ae76 100644 --- a/src/sentry/integrations/coding_agent/integration.py +++ b/src/sentry/integrations/coding_agent/integration.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import abc diff --git a/src/sentry/integrations/coding_agent/models.py b/src/sentry/integrations/coding_agent/models.py index 3965d6d7eb455f..1a6096be2ace83 100644 --- a/src/sentry/integrations/coding_agent/models.py +++ b/src/sentry/integrations/coding_agent/models.py @@ -1,3 +1,4 @@ +from typing import int from pydantic import BaseModel from sentry.seer.models import SeerRepoDefinition diff --git a/src/sentry/integrations/coding_agent/utils.py b/src/sentry/integrations/coding_agent/utils.py index a244c7f7a59861..631ed809e4fc24 100644 --- a/src/sentry/integrations/coding_agent/utils.py +++ b/src/sentry/integrations/coding_agent/utils.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.integrations.coding_agent.integration import CodingAgentIntegrationProvider diff --git a/src/sentry/integrations/cursor/client.py b/src/sentry/integrations/cursor/client.py index 7c650eda37e51c..ff4d47368b1e58 100644 --- a/src/sentry/integrations/cursor/client.py +++ b/src/sentry/integrations/cursor/client.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/integrations/cursor/integration.py b/src/sentry/integrations/cursor/integration.py index 053e134c3fafad..739c812ff4a3a6 100644 --- a/src/sentry/integrations/cursor/integration.py +++ b/src/sentry/integrations/cursor/integration.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, MutableMapping -from typing import Any +from typing import int, Any from django import forms from django.http.request import HttpRequest diff --git a/src/sentry/integrations/cursor/models.py b/src/sentry/integrations/cursor/models.py index b2f8e39739a208..e40704086179ef 100644 --- a/src/sentry/integrations/cursor/models.py +++ b/src/sentry/integrations/cursor/models.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from pydantic import BaseModel diff --git a/src/sentry/integrations/cursor/urls.py b/src/sentry/integrations/cursor/urls.py index 179839b8c40850..be14ce8ec2fee3 100644 --- a/src/sentry/integrations/cursor/urls.py +++ b/src/sentry/integrations/cursor/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from .webhooks.handler import CursorWebhookEndpoint diff --git a/src/sentry/integrations/cursor/webhooks/handler.py b/src/sentry/integrations/cursor/webhooks/handler.py index c2661a3ff4d565..2e0eda58d3c5da 100644 --- a/src/sentry/integrations/cursor/webhooks/handler.py +++ b/src/sentry/integrations/cursor/webhooks/handler.py @@ -4,7 +4,7 @@ import hmac import logging import re -from typing import Any +from typing import int, Any from urllib.parse import urlparse import orjson diff --git a/src/sentry/integrations/data_forwarding/__init__.py b/src/sentry/integrations/data_forwarding/__init__.py index 3f70f337f83e04..d9ab21a7da0134 100644 --- a/src/sentry/integrations/data_forwarding/__init__.py +++ b/src/sentry/integrations/data_forwarding/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.data_forwarding.amazon_sqs.forwarder import AmazonSQSForwarder from sentry.integrations.data_forwarding.segment.forwarder import SegmentForwarder from sentry.integrations.data_forwarding.splunk.forwarder import SplunkForwarder diff --git a/src/sentry/integrations/data_forwarding/amazon_sqs/forwarder.py b/src/sentry/integrations/data_forwarding/amazon_sqs/forwarder.py index 7aa017a4645e70..ca31b1d2efe16e 100644 --- a/src/sentry/integrations/data_forwarding/amazon_sqs/forwarder.py +++ b/src/sentry/integrations/data_forwarding/amazon_sqs/forwarder.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from uuid import uuid4 import boto3 diff --git a/src/sentry/integrations/data_forwarding/base.py b/src/sentry/integrations/data_forwarding/base.py index 06c9a75b18c5ed..39eebe6e69abd7 100644 --- a/src/sentry/integrations/data_forwarding/base.py +++ b/src/sentry/integrations/data_forwarding/base.py @@ -1,7 +1,7 @@ from __future__ import annotations from abc import ABC, abstractmethod -from typing import ClassVar +from typing import int, ClassVar from sentry.integrations.models.data_forwarder_project import DataForwarderProject from sentry.integrations.types import DataForwarderProviderSlug diff --git a/src/sentry/integrations/data_forwarding/segment/forwarder.py b/src/sentry/integrations/data_forwarding/segment/forwarder.py index b6d3a9036bdf92..7157bd77697e71 100644 --- a/src/sentry/integrations/data_forwarding/segment/forwarder.py +++ b/src/sentry/integrations/data_forwarding/segment/forwarder.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any, ClassVar +from typing import Any, ClassVar, int from sentry import VERSION, http from sentry.integrations.data_forwarding.base import BaseDataForwarder diff --git a/src/sentry/integrations/data_forwarding/splunk/forwarder.py b/src/sentry/integrations/data_forwarding/splunk/forwarder.py index 519fd446c37996..4c7363b72e8b3f 100644 --- a/src/sentry/integrations/data_forwarding/splunk/forwarder.py +++ b/src/sentry/integrations/data_forwarding/splunk/forwarder.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from sentry import http, tagstore from sentry.integrations.data_forwarding.base import BaseDataForwarder diff --git a/src/sentry/integrations/discord/__init__.py b/src/sentry/integrations/discord/__init__.py index 96d13d828cc0c6..c089f7c9e8e4b0 100644 --- a/src/sentry/integrations/discord/__init__.py +++ b/src/sentry/integrations/discord/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.discord.spec import DiscordMessagingSpec from .actions import * # noqa: F401,F403 diff --git a/src/sentry/integrations/discord/actions/__init__.py b/src/sentry/integrations/discord/actions/__init__.py index 0028056bde18f5..c7848eed7ed554 100644 --- a/src/sentry/integrations/discord/actions/__init__.py +++ b/src/sentry/integrations/discord/actions/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .issue_alert.form import * # noqa: F401, F403 from .issue_alert.notification import * # noqa: F401, F403 from .metric_alert import * # noqa: F401, F403 diff --git a/src/sentry/integrations/discord/actions/issue_alert/form.py b/src/sentry/integrations/discord/actions/issue_alert/form.py index 62aafe5d877f36..a26bbc231211ea 100644 --- a/src/sentry/integrations/discord/actions/issue_alert/form.py +++ b/src/sentry/integrations/discord/actions/issue_alert/form.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django import forms from django.core.exceptions import ValidationError diff --git a/src/sentry/integrations/discord/actions/issue_alert/notification.py b/src/sentry/integrations/discord/actions/issue_alert/notification.py index 3baa974bb10b8e..a9c4342b7dd670 100644 --- a/src/sentry/integrations/discord/actions/issue_alert/notification.py +++ b/src/sentry/integrations/discord/actions/issue_alert/notification.py @@ -1,5 +1,5 @@ from collections.abc import Generator, Sequence -from typing import Any +from typing import int, Any from sentry.integrations.discord.actions.issue_alert.form import DiscordNotifyServiceForm from sentry.integrations.discord.client import DiscordClient diff --git a/src/sentry/integrations/discord/actions/metric_alert.py b/src/sentry/integrations/discord/actions/metric_alert.py index 4d66e89eda94b0..f4255a4fde78fe 100644 --- a/src/sentry/integrations/discord/actions/metric_alert.py +++ b/src/sentry/integrations/discord/actions/metric_alert.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import sentry_sdk diff --git a/src/sentry/integrations/discord/analytics.py b/src/sentry/integrations/discord/analytics.py index 11052b7c0f79e8..9f92dc0ff866f5 100644 --- a/src/sentry/integrations/discord/analytics.py +++ b/src/sentry/integrations/discord/analytics.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics from sentry.analytics.events.base_notification_sent import BaseNotificationSent diff --git a/src/sentry/integrations/discord/client.py b/src/sentry/integrations/discord/client.py index d9bb64d3c2c7e6..ff90c39c709a43 100644 --- a/src/sentry/integrations/discord/client.py +++ b/src/sentry/integrations/discord/client.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any from urllib.parse import urlencode import orjson diff --git a/src/sentry/integrations/discord/handlers/__init__.py b/src/sentry/integrations/discord/handlers/__init__.py index ebbf4ec05294a0..8d09096d453de2 100644 --- a/src/sentry/integrations/discord/handlers/__init__.py +++ b/src/sentry/integrations/discord/handlers/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["DiscordActionHandler"] from .discord_handler import DiscordActionHandler diff --git a/src/sentry/integrations/discord/handlers/discord_handler.py b/src/sentry/integrations/discord/handlers/discord_handler.py index 11c1398e69e590..ab067ff5a95751 100644 --- a/src/sentry/integrations/discord/handlers/discord_handler.py +++ b/src/sentry/integrations/discord/handlers/discord_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.types import IntegrationProviderSlug from sentry.notifications.models.notificationaction import ActionTarget from sentry.notifications.notification_action.action_handler_registry.base import ( diff --git a/src/sentry/integrations/discord/integration.py b/src/sentry/integrations/discord/integration.py index 43ac6639cf00b1..467b765dc7e4e4 100644 --- a/src/sentry/integrations/discord/integration.py +++ b/src/sentry/integrations/discord/integration.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from urllib.parse import urlencode from django.http import HttpResponseRedirect diff --git a/src/sentry/integrations/discord/message_builder/__init__.py b/src/sentry/integrations/discord/message_builder/__init__.py index 019dfa3ffed4db..1b5aa2378d824d 100644 --- a/src/sentry/integrations/discord/message_builder/__init__.py +++ b/src/sentry/integrations/discord/message_builder/__init__.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int # Discord likes colors as decimal integers LEVEL_TO_COLOR = { diff --git a/src/sentry/integrations/discord/message_builder/base/base.py b/src/sentry/integrations/discord/message_builder/base/base.py index fb2597e58b8753..311d0bc341ba44 100644 --- a/src/sentry/integrations/discord/message_builder/base/base.py +++ b/src/sentry/integrations/discord/message_builder/base/base.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int from sentry.integrations.discord.message_builder.base.component.base import ( DiscordMessageComponent, diff --git a/src/sentry/integrations/discord/message_builder/base/component/__init__.py b/src/sentry/integrations/discord/message_builder/base/component/__init__.py index 03a5e6bab6816f..861334801658a0 100644 --- a/src/sentry/integrations/discord/message_builder/base/component/__init__.py +++ b/src/sentry/integrations/discord/message_builder/base/component/__init__.py @@ -1,3 +1,4 @@ +from typing import int class DiscordComponentCustomIds: """ Constant to track these ids across modules diff --git a/src/sentry/integrations/discord/message_builder/base/component/action_row.py b/src/sentry/integrations/discord/message_builder/base/component/action_row.py index 38b9012597e7da..121f9f96935a6a 100644 --- a/src/sentry/integrations/discord/message_builder/base/component/action_row.py +++ b/src/sentry/integrations/discord/message_builder/base/component/action_row.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Iterable -from typing import TypedDict +from typing import int, TypedDict from .base import DiscordMessageComponent, DiscordMessageComponentDict diff --git a/src/sentry/integrations/discord/message_builder/base/component/base.py b/src/sentry/integrations/discord/message_builder/base/component/base.py index 50a707b550f9d7..7fc873d843a710 100644 --- a/src/sentry/integrations/discord/message_builder/base/component/base.py +++ b/src/sentry/integrations/discord/message_builder/base/component/base.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TypedDict +from typing import int, TypedDict class DiscordMessageComponentDict(TypedDict): diff --git a/src/sentry/integrations/discord/message_builder/base/component/button.py b/src/sentry/integrations/discord/message_builder/base/component/button.py index 0a4e4648abe650..4944e7abacb601 100644 --- a/src/sentry/integrations/discord/message_builder/base/component/button.py +++ b/src/sentry/integrations/discord/message_builder/base/component/button.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import NotRequired +from typing import int, NotRequired from .base import DiscordMessageComponent, DiscordMessageComponentDict diff --git a/src/sentry/integrations/discord/message_builder/base/component/select_menu.py b/src/sentry/integrations/discord/message_builder/base/component/select_menu.py index 75fa94641506df..24eb61cc74e6f8 100644 --- a/src/sentry/integrations/discord/message_builder/base/component/select_menu.py +++ b/src/sentry/integrations/discord/message_builder/base/component/select_menu.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Iterable -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int from sentry.integrations.discord.message_builder.base.component.base import ( DiscordMessageComponent, diff --git a/src/sentry/integrations/discord/message_builder/base/embed/base.py b/src/sentry/integrations/discord/message_builder/base/embed/base.py index cf01e04e44759d..026ff985348fbb 100644 --- a/src/sentry/integrations/discord/message_builder/base/embed/base.py +++ b/src/sentry/integrations/discord/message_builder/base/embed/base.py @@ -2,7 +2,7 @@ from collections.abc import Iterable from datetime import datetime -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int from sentry.integrations.discord.message_builder.base.embed.field import ( DiscordMessageEmbedField, diff --git a/src/sentry/integrations/discord/message_builder/base/embed/field.py b/src/sentry/integrations/discord/message_builder/base/embed/field.py index 7f3232b423108a..13162be7df22eb 100644 --- a/src/sentry/integrations/discord/message_builder/base/embed/field.py +++ b/src/sentry/integrations/discord/message_builder/base/embed/field.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TypedDict +from typing import int, TypedDict class DiscordMessageEmbedFieldDict(TypedDict): diff --git a/src/sentry/integrations/discord/message_builder/base/embed/footer.py b/src/sentry/integrations/discord/message_builder/base/embed/footer.py index c69c3f8e44ced5..463580de932274 100644 --- a/src/sentry/integrations/discord/message_builder/base/embed/footer.py +++ b/src/sentry/integrations/discord/message_builder/base/embed/footer.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int class DiscordMessageEmbedFooterDict(TypedDict): diff --git a/src/sentry/integrations/discord/message_builder/base/embed/image.py b/src/sentry/integrations/discord/message_builder/base/embed/image.py index e45404e0a442ed..01e680991735d2 100644 --- a/src/sentry/integrations/discord/message_builder/base/embed/image.py +++ b/src/sentry/integrations/discord/message_builder/base/embed/image.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int class DiscordMessageEmbedImageDict(TypedDict): diff --git a/src/sentry/integrations/discord/message_builder/base/flags.py b/src/sentry/integrations/discord/message_builder/base/flags.py index 38cc6ff6ca11df..d1a300a6bfb47b 100644 --- a/src/sentry/integrations/discord/message_builder/base/flags.py +++ b/src/sentry/integrations/discord/message_builder/base/flags.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int # Discord message flags. # See: https://discord.com/developers/docs/resources/channel#message-object-message-flags diff --git a/src/sentry/integrations/discord/message_builder/issues.py b/src/sentry/integrations/discord/message_builder/issues.py index 10f8601fae07fc..9a3aac4ad5b909 100644 --- a/src/sentry/integrations/discord/message_builder/issues.py +++ b/src/sentry/integrations/discord/message_builder/issues.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry import features, tagstore from sentry.integrations.discord.message_builder import LEVEL_TO_COLOR diff --git a/src/sentry/integrations/discord/message_builder/metric_alerts.py b/src/sentry/integrations/discord/message_builder/metric_alerts.py index f271028bbfcc6c..649ced0949d2a6 100644 --- a/src/sentry/integrations/discord/message_builder/metric_alerts.py +++ b/src/sentry/integrations/discord/message_builder/metric_alerts.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import time from datetime import datetime diff --git a/src/sentry/integrations/discord/requests/base.py b/src/sentry/integrations/discord/requests/base.py index e267a00a3364e4..5b8bff070d99f8 100644 --- a/src/sentry/integrations/discord/requests/base.py +++ b/src/sentry/integrations/discord/requests/base.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import dataclasses from collections.abc import Mapping diff --git a/src/sentry/integrations/discord/spec.py b/src/sentry/integrations/discord/spec.py index 82a88c15194b53..ccc08e66355fd2 100644 --- a/src/sentry/integrations/discord/spec.py +++ b/src/sentry/integrations/discord/spec.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics from sentry.incidents.endpoints.serializers.alert_rule import AlertRuleSerializerResponse from sentry.incidents.endpoints.serializers.incident import DetailedIncidentSerializerResponse diff --git a/src/sentry/integrations/discord/types.py b/src/sentry/integrations/discord/types.py index 5cffc7e93e4cf4..cd4257d2c7f095 100644 --- a/src/sentry/integrations/discord/types.py +++ b/src/sentry/integrations/discord/types.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum diff --git a/src/sentry/integrations/discord/urls.py b/src/sentry/integrations/discord/urls.py index 2e6657bc57758c..5cb26590495209 100644 --- a/src/sentry/integrations/discord/urls.py +++ b/src/sentry/integrations/discord/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from sentry.integrations.discord.spec import DiscordMessagingSpec diff --git a/src/sentry/integrations/discord/utils/__init__.py b/src/sentry/integrations/discord/utils/__init__.py index 5ada2cc6f9f37c..b77356e3922800 100644 --- a/src/sentry/integrations/discord/utils/__init__.py +++ b/src/sentry/integrations/discord/utils/__init__.py @@ -1,3 +1,4 @@ +from typing import int import logging logger = logging.getLogger("sentry.integrations.discord") diff --git a/src/sentry/integrations/discord/utils/auth.py b/src/sentry/integrations/discord/utils/auth.py index 1fd87898954413..97d9e50ca49905 100644 --- a/src/sentry/integrations/discord/utils/auth.py +++ b/src/sentry/integrations/discord/utils/auth.py @@ -1,3 +1,4 @@ +from typing import int from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey diff --git a/src/sentry/integrations/discord/utils/channel.py b/src/sentry/integrations/discord/utils/channel.py index b80e67d9f4a295..1a24b64264842e 100644 --- a/src/sentry/integrations/discord/utils/channel.py +++ b/src/sentry/integrations/discord/utils/channel.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from enum import Enum diff --git a/src/sentry/integrations/discord/utils/channel_from_url.py b/src/sentry/integrations/discord/utils/channel_from_url.py index dfcc41d079107e..ad0f1d8ed4c626 100644 --- a/src/sentry/integrations/discord/utils/channel_from_url.py +++ b/src/sentry/integrations/discord/utils/channel_from_url.py @@ -1,3 +1,4 @@ +from typing import int from venv import logger from django.core.exceptions import ValidationError diff --git a/src/sentry/integrations/discord/utils/consts.py b/src/sentry/integrations/discord/utils/consts.py index 3059158f35f55c..30eab15d66d1af 100644 --- a/src/sentry/integrations/discord/utils/consts.py +++ b/src/sentry/integrations/discord/utils/consts.py @@ -1,6 +1,7 @@ # Complete list of discord error codes: # https://discord.com/developers/docs/topics/opcodes-and-status-codes#http +from typing import int DISCORD_ERROR_CODES = { "0": "General error (such as a malformed request body, amongst other things)", "10001": "Unknown account", diff --git a/src/sentry/integrations/discord/utils/metrics.py b/src/sentry/integrations/discord/utils/metrics.py index 45a53316daaa89..105ef308df9173 100644 --- a/src/sentry/integrations/discord/utils/metrics.py +++ b/src/sentry/integrations/discord/utils/metrics.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.utils.metrics import EventLifecycle from sentry.shared_integrations.exceptions import ApiError, ApiRateLimitedError diff --git a/src/sentry/integrations/discord/views/constants.py b/src/sentry/integrations/discord/views/constants.py index 9fa375b8799367..bcf430b914c87d 100644 --- a/src/sentry/integrations/discord/views/constants.py +++ b/src/sentry/integrations/discord/views/constants.py @@ -1 +1,2 @@ +from typing import int SALT = "sentry-discord-integration" diff --git a/src/sentry/integrations/discord/views/link_identity.py b/src/sentry/integrations/discord/views/link_identity.py index f0b68438b98f95..03ff0e23fbdba7 100644 --- a/src/sentry/integrations/discord/views/link_identity.py +++ b/src/sentry/integrations/discord/views/link_identity.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from django.urls import reverse diff --git a/src/sentry/integrations/discord/views/linkage.py b/src/sentry/integrations/discord/views/linkage.py index cb4afec7d0fa55..08919bad1399b3 100644 --- a/src/sentry/integrations/discord/views/linkage.py +++ b/src/sentry/integrations/discord/views/linkage.py @@ -1,3 +1,4 @@ +from typing import int from abc import ABC from sentry.integrations.messaging.linkage import IdentityLinkageView diff --git a/src/sentry/integrations/discord/views/unlink_identity.py b/src/sentry/integrations/discord/views/unlink_identity.py index 50caf2017c4bbd..36f9b5394d57fe 100644 --- a/src/sentry/integrations/discord/views/unlink_identity.py +++ b/src/sentry/integrations/discord/views/unlink_identity.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from django.urls import reverse diff --git a/src/sentry/integrations/discord/webhooks/__init__.py b/src/sentry/integrations/discord/webhooks/__init__.py index 66f93df248690c..569765a1116729 100644 --- a/src/sentry/integrations/discord/webhooks/__init__.py +++ b/src/sentry/integrations/discord/webhooks/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .base import * # noqa: F401,F403 from .command import * # noqa: F401,F403 from .handler import * # noqa: F401,F403 diff --git a/src/sentry/integrations/discord/webhooks/base.py b/src/sentry/integrations/discord/webhooks/base.py index 6a9e93a7651119..2ae0c69b35dfe3 100644 --- a/src/sentry/integrations/discord/webhooks/base.py +++ b/src/sentry/integrations/discord/webhooks/base.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/integrations/discord/webhooks/command.py b/src/sentry/integrations/discord/webhooks/command.py index 3736d7ff9e55e9..2f36b01f9a0f97 100644 --- a/src/sentry/integrations/discord/webhooks/command.py +++ b/src/sentry/integrations/discord/webhooks/command.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Iterable from dataclasses import dataclass diff --git a/src/sentry/integrations/discord/webhooks/handler.py b/src/sentry/integrations/discord/webhooks/handler.py index 4387a4b178f23f..b8b10547dff2ca 100644 --- a/src/sentry/integrations/discord/webhooks/handler.py +++ b/src/sentry/integrations/discord/webhooks/handler.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from rest_framework.response import Response diff --git a/src/sentry/integrations/discord/webhooks/message_component.py b/src/sentry/integrations/discord/webhooks/message_component.py index 432dea3150a93a..fcfffef8ed7fa8 100644 --- a/src/sentry/integrations/discord/webhooks/message_component.py +++ b/src/sentry/integrations/discord/webhooks/message_component.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Mapping from functools import cached_property diff --git a/src/sentry/integrations/discord/webhooks/types.py b/src/sentry/integrations/discord/webhooks/types.py index bd75d87ec97ee4..9d394d74041cd5 100644 --- a/src/sentry/integrations/discord/webhooks/types.py +++ b/src/sentry/integrations/discord/webhooks/types.py @@ -1,3 +1,4 @@ +from typing import int class DiscordResponseTypes: """ For more description of these types see diff --git a/src/sentry/integrations/errors.py b/src/sentry/integrations/errors.py index 7bfd5e025c861f..871e39bc9eef4e 100644 --- a/src/sentry/integrations/errors.py +++ b/src/sentry/integrations/errors.py @@ -1,3 +1,4 @@ +from typing import int class InvalidProviderException(Exception): """ Provider that is passed does not exist. diff --git a/src/sentry/integrations/example/__init__.py b/src/sentry/integrations/example/__init__.py index b2f6b8239d9a54..feeea29249956d 100644 --- a/src/sentry/integrations/example/__init__.py +++ b/src/sentry/integrations/example/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .integration import * # noqa: F401,F403 from .repository import * # noqa: F401,F403 diff --git a/src/sentry/integrations/example/integration.py b/src/sentry/integrations/example/integration.py index cbe2e508b42848..663b43c533806b 100644 --- a/src/sentry/integrations/example/integration.py +++ b/src/sentry/integrations/example/integration.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from django.http import HttpResponse from django.http.request import HttpRequest diff --git a/src/sentry/integrations/example/repository.py b/src/sentry/integrations/example/repository.py index 27bb09a1a78054..42765a83787d22 100644 --- a/src/sentry/integrations/example/repository.py +++ b/src/sentry/integrations/example/repository.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.services.integration import integration_service from sentry.plugins.providers import IntegrationRepositoryProvider from sentry.shared_integrations.exceptions import IntegrationError diff --git a/src/sentry/integrations/github/__init__.py b/src/sentry/integrations/github/__init__.py index f343febc9c1d73..387cd44dfb2ba3 100644 --- a/src/sentry/integrations/github/__init__.py +++ b/src/sentry/integrations/github/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules import rules from .actions.create_ticket import GitHubCreateTicketAction diff --git a/src/sentry/integrations/github/actions/__init__.py b/src/sentry/integrations/github/actions/__init__.py index 4079a8bef9ec76..c842954c13a23e 100644 --- a/src/sentry/integrations/github/actions/__init__.py +++ b/src/sentry/integrations/github/actions/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .create_ticket import GitHubCreateTicketAction __all__ = ("GitHubCreateTicketAction",) diff --git a/src/sentry/integrations/github/actions/create_ticket.py b/src/sentry/integrations/github/actions/create_ticket.py index f058156467833e..df313f31d142ee 100644 --- a/src/sentry/integrations/github/actions/create_ticket.py +++ b/src/sentry/integrations/github/actions/create_ticket.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.integrations.types import IntegrationProviderSlug from sentry.rules.actions import TicketEventAction diff --git a/src/sentry/integrations/github/blame.py b/src/sentry/integrations/github/blame.py index 978303b63d9342..e121fa2ae98f74 100644 --- a/src/sentry/integrations/github/blame.py +++ b/src/sentry/integrations/github/blame.py @@ -4,7 +4,7 @@ from collections.abc import Mapping, Sequence from dataclasses import asdict from datetime import datetime, timezone -from typing import Any, TypedDict, TypeIs +from typing import Any, TypedDict, TypeIs, int from django.utils.datastructures import OrderedSet diff --git a/src/sentry/integrations/github/client.py b/src/sentry/integrations/github/client.py index 4cd9ca12f27d55..5f0d8eef313074 100644 --- a/src/sentry/integrations/github/client.py +++ b/src/sentry/integrations/github/client.py @@ -3,7 +3,7 @@ import logging from collections.abc import Mapping, Sequence from datetime import datetime, timedelta -from typing import Any, TypedDict +from typing import Any, TypedDict, int import orjson import sentry_sdk diff --git a/src/sentry/integrations/github/constants.py b/src/sentry/integrations/github/constants.py index 8f74429935c797..c56deb849b0976 100644 --- a/src/sentry/integrations/github/constants.py +++ b/src/sentry/integrations/github/constants.py @@ -1,3 +1,4 @@ +from typing import int ISSUE_LOCKED_ERROR_MESSAGE = "Unable to create comment because issue is locked." RATE_LIMITED_MESSAGE = "API rate limit exceeded" diff --git a/src/sentry/integrations/github/handlers/__init__.py b/src/sentry/integrations/github/handlers/__init__.py index e4276710ab2835..c40271108a5680 100644 --- a/src/sentry/integrations/github/handlers/__init__.py +++ b/src/sentry/integrations/github/handlers/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["GithubActionHandler"] from .github_handler import GithubActionHandler diff --git a/src/sentry/integrations/github/handlers/github_handler.py b/src/sentry/integrations/github/handlers/github_handler.py index 41d865f1c1b8b3..2980c43c767399 100644 --- a/src/sentry/integrations/github/handlers/github_handler.py +++ b/src/sentry/integrations/github/handlers/github_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.types import IntegrationProviderSlug from sentry.notifications.notification_action.action_handler_registry.base import ( TicketingActionHandler, diff --git a/src/sentry/integrations/github/installation.py b/src/sentry/integrations/github/installation.py index db02e6839ed718..5993c3be6d9101 100644 --- a/src/sentry/integrations/github/installation.py +++ b/src/sentry/integrations/github/installation.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import time diff --git a/src/sentry/integrations/github/integration.py b/src/sentry/integrations/github/integration.py index cfb4dfa1ea5582..a3ba6e1ada842a 100644 --- a/src/sentry/integrations/github/integration.py +++ b/src/sentry/integrations/github/integration.py @@ -4,7 +4,7 @@ import re from collections.abc import Callable, Mapping, MutableMapping, Sequence from enum import StrEnum -from typing import Any, TypedDict +from typing import Any, TypedDict, int from urllib.parse import parse_qsl from django.http import HttpResponse diff --git a/src/sentry/integrations/github/issues.py b/src/sentry/integrations/github/issues.py index e6b27bea23dd2c..bb2bd6a8b98680 100644 --- a/src/sentry/integrations/github/issues.py +++ b/src/sentry/integrations/github/issues.py @@ -3,7 +3,7 @@ import re from collections.abc import Mapping, Sequence from operator import attrgetter -from typing import Any, NoReturn +from typing import Any, NoReturn, int from django.urls import reverse diff --git a/src/sentry/integrations/github/repository.py b/src/sentry/integrations/github/repository.py index c490512d7f3dc4..9883441fdb77d8 100644 --- a/src/sentry/integrations/github/repository.py +++ b/src/sentry/integrations/github/repository.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from sentry.constants import ObjectStatus from sentry.integrations.base import IntegrationInstallation diff --git a/src/sentry/integrations/github/search.py b/src/sentry/integrations/github/search.py index 3752e6e1093c87..cc618893064acb 100644 --- a/src/sentry/integrations/github/search.py +++ b/src/sentry/integrations/github/search.py @@ -1,4 +1,4 @@ -from typing import TypeVar +from typing import int, TypeVar from rest_framework.response import Response diff --git a/src/sentry/integrations/github/status_check.py b/src/sentry/integrations/github/status_check.py index 45401fe79de7dd..9791616424b2b3 100644 --- a/src/sentry/integrations/github/status_check.py +++ b/src/sentry/integrations/github/status_check.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import enum diff --git a/src/sentry/integrations/github/tasks/__init__.py b/src/sentry/integrations/github/tasks/__init__.py index a635eebb4b9af1..cdbf692f2f320f 100644 --- a/src/sentry/integrations/github/tasks/__init__.py +++ b/src/sentry/integrations/github/tasks/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .codecov_account_link import codecov_account_link from .codecov_account_unlink import codecov_account_unlink from .link_all_repos import link_all_repos diff --git a/src/sentry/integrations/github/tasks/codecov_account_link.py b/src/sentry/integrations/github/tasks/codecov_account_link.py index 2801b20dff84c9..33f8cef1eeff8d 100644 --- a/src/sentry/integrations/github/tasks/codecov_account_link.py +++ b/src/sentry/integrations/github/tasks/codecov_account_link.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.codecov.client import CodecovApiClient, ConfigurationError, GitProvider diff --git a/src/sentry/integrations/github/tasks/codecov_account_unlink.py b/src/sentry/integrations/github/tasks/codecov_account_unlink.py index 6d04b7815bdaf3..b009e67faed884 100644 --- a/src/sentry/integrations/github/tasks/codecov_account_unlink.py +++ b/src/sentry/integrations/github/tasks/codecov_account_unlink.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.codecov.client import CodecovApiClient, ConfigurationError, GitProvider diff --git a/src/sentry/integrations/github/tasks/link_all_repos.py b/src/sentry/integrations/github/tasks/link_all_repos.py index 960d7cbb1ff987..eeae5a0e2f6afc 100644 --- a/src/sentry/integrations/github/tasks/link_all_repos.py +++ b/src/sentry/integrations/github/tasks/link_all_repos.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from sentry.constants import ObjectStatus from sentry.integrations.services.integration import integration_service diff --git a/src/sentry/integrations/github/tasks/pr_comment.py b/src/sentry/integrations/github/tasks/pr_comment.py index f776d7975c217e..0c15fc9c1865b5 100644 --- a/src/sentry/integrations/github/tasks/pr_comment.py +++ b/src/sentry/integrations/github/tasks/pr_comment.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/integrations/github/tasks/utils.py b/src/sentry/integrations/github/tasks/utils.py index bbd766a3787b97..47661b213477ea 100644 --- a/src/sentry/integrations/github/tasks/utils.py +++ b/src/sentry/integrations/github/tasks/utils.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum diff --git a/src/sentry/integrations/github/types.py b/src/sentry/integrations/github/types.py index 519a9a35a5b126..096e97d10e645c 100644 --- a/src/sentry/integrations/github/types.py +++ b/src/sentry/integrations/github/types.py @@ -1,3 +1,4 @@ +from typing import int from enum import StrEnum diff --git a/src/sentry/integrations/github/urls.py b/src/sentry/integrations/github/urls.py index 8ec234f1b54027..8995d6b2022b4e 100644 --- a/src/sentry/integrations/github/urls.py +++ b/src/sentry/integrations/github/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from .installation import GitHubIntegrationsInstallationEndpoint diff --git a/src/sentry/integrations/github/utils.py b/src/sentry/integrations/github/utils.py index 7dba5d87db8a9c..e88e6c4d99a25e 100644 --- a/src/sentry/integrations/github/utils.py +++ b/src/sentry/integrations/github/utils.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import calendar import datetime diff --git a/src/sentry/integrations/github/webhook.py b/src/sentry/integrations/github/webhook.py index ee9b9ccfd84474..ba054b70fdec59 100644 --- a/src/sentry/integrations/github/webhook.py +++ b/src/sentry/integrations/github/webhook.py @@ -6,7 +6,7 @@ from abc import ABC, abstractmethod from collections.abc import Mapping, MutableMapping from datetime import timezone -from typing import Any +from typing import int, Any import orjson from dateutil.parser import parse as parse_date diff --git a/src/sentry/integrations/github/webhook_types.py b/src/sentry/integrations/github/webhook_types.py index 06a1575eca1d1b..9a20ef09913260 100644 --- a/src/sentry/integrations/github/webhook_types.py +++ b/src/sentry/integrations/github/webhook_types.py @@ -1,3 +1,4 @@ +from typing import int from enum import StrEnum GITHUB_WEBHOOK_TYPE_HEADER = "HTTP_X_GITHUB_EVENT" diff --git a/src/sentry/integrations/github_enterprise/__init__.py b/src/sentry/integrations/github_enterprise/__init__.py index 69798e00dc2da3..2261345e5cb665 100644 --- a/src/sentry/integrations/github_enterprise/__init__.py +++ b/src/sentry/integrations/github_enterprise/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules import rules from .actions.create_ticket import GitHubEnterpriseCreateTicketAction diff --git a/src/sentry/integrations/github_enterprise/actions/__init__.py b/src/sentry/integrations/github_enterprise/actions/__init__.py index a506b74180a0d0..bc54a70c82901f 100644 --- a/src/sentry/integrations/github_enterprise/actions/__init__.py +++ b/src/sentry/integrations/github_enterprise/actions/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .create_ticket import GitHubEnterpriseCreateTicketAction __all__ = ("GitHubEnterpriseCreateTicketAction",) diff --git a/src/sentry/integrations/github_enterprise/actions/create_ticket.py b/src/sentry/integrations/github_enterprise/actions/create_ticket.py index c54e9397cd9e90..8ae1d5ddbfbedd 100644 --- a/src/sentry/integrations/github_enterprise/actions/create_ticket.py +++ b/src/sentry/integrations/github_enterprise/actions/create_ticket.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.integrations.types import IntegrationProviderSlug from sentry.rules.actions import TicketEventAction diff --git a/src/sentry/integrations/github_enterprise/client.py b/src/sentry/integrations/github_enterprise/client.py index 9d027bf1e9423d..62b7549925a4c0 100644 --- a/src/sentry/integrations/github_enterprise/client.py +++ b/src/sentry/integrations/github_enterprise/client.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.github.client import GitHubBaseClient from sentry.integrations.github.utils import get_jwt from sentry.integrations.types import IntegrationProviderSlug diff --git a/src/sentry/integrations/github_enterprise/handlers/__init__.py b/src/sentry/integrations/github_enterprise/handlers/__init__.py index 57c6b69e55edb6..3e5ebce6ee6895 100644 --- a/src/sentry/integrations/github_enterprise/handlers/__init__.py +++ b/src/sentry/integrations/github_enterprise/handlers/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["GithubEnterpriseActionHandler"] from .github_enterprise_handler import GithubEnterpriseActionHandler diff --git a/src/sentry/integrations/github_enterprise/handlers/github_enterprise_handler.py b/src/sentry/integrations/github_enterprise/handlers/github_enterprise_handler.py index 23c19aab8f9e4b..17875057408947 100644 --- a/src/sentry/integrations/github_enterprise/handlers/github_enterprise_handler.py +++ b/src/sentry/integrations/github_enterprise/handlers/github_enterprise_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.types import IntegrationProviderSlug from sentry.notifications.notification_action.action_handler_registry.base import ( TicketingActionHandler, diff --git a/src/sentry/integrations/github_enterprise/integration.py b/src/sentry/integrations/github_enterprise/integration.py index 624ea0c0d11d09..38c4b77472319a 100644 --- a/src/sentry/integrations/github_enterprise/integration.py +++ b/src/sentry/integrations/github_enterprise/integration.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Mapping, Sequence -from typing import Any +from typing import int, Any from urllib.parse import urlparse from django import forms diff --git a/src/sentry/integrations/github_enterprise/repository.py b/src/sentry/integrations/github_enterprise/repository.py index 5f256206ffd418..748c6c54adb76e 100644 --- a/src/sentry/integrations/github_enterprise/repository.py +++ b/src/sentry/integrations/github_enterprise/repository.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.integrations.github.repository import GitHubRepositoryProvider from sentry.integrations.services.integration import integration_service diff --git a/src/sentry/integrations/github_enterprise/urls.py b/src/sentry/integrations/github_enterprise/urls.py index 1266209237cd92..c768284e7f8e8a 100644 --- a/src/sentry/integrations/github_enterprise/urls.py +++ b/src/sentry/integrations/github_enterprise/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from .webhook import GitHubEnterpriseWebhookEndpoint diff --git a/src/sentry/integrations/github_enterprise/webhook.py b/src/sentry/integrations/github_enterprise/webhook.py index 25dd0010ea2f3b..6dae9a6e66d696 100644 --- a/src/sentry/integrations/github_enterprise/webhook.py +++ b/src/sentry/integrations/github_enterprise/webhook.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import hashlib import hmac diff --git a/src/sentry/integrations/gitlab/blame.py b/src/sentry/integrations/gitlab/blame.py index 3a3a3b81032880..689f57a3d483f9 100644 --- a/src/sentry/integrations/gitlab/blame.py +++ b/src/sentry/integrations/gitlab/blame.py @@ -4,7 +4,7 @@ from collections.abc import Mapping, Sequence from dataclasses import asdict from datetime import datetime, timezone -from typing import TYPE_CHECKING, Any, TypedDict +from typing import TYPE_CHECKING, Any, TypedDict, int from urllib.parse import quote import orjson diff --git a/src/sentry/integrations/gitlab/client.py b/src/sentry/integrations/gitlab/client.py index e4a359124dc117..3dcfc3d7b9ce7e 100644 --- a/src/sentry/integrations/gitlab/client.py +++ b/src/sentry/integrations/gitlab/client.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping, Sequence -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from urllib.parse import quote from django.urls import reverse diff --git a/src/sentry/integrations/gitlab/constants.py b/src/sentry/integrations/gitlab/constants.py index 81595083734d90..dad638524eb8b7 100644 --- a/src/sentry/integrations/gitlab/constants.py +++ b/src/sentry/integrations/gitlab/constants.py @@ -1 +1,2 @@ +from typing import int GITLAB_CLOUD_BASE_URL = "https://gitlab.com" diff --git a/src/sentry/integrations/gitlab/integration.py b/src/sentry/integrations/gitlab/integration.py index 61e846d4729480..f208dedca31a90 100644 --- a/src/sentry/integrations/gitlab/integration.py +++ b/src/sentry/integrations/gitlab/integration.py @@ -2,7 +2,7 @@ import logging from collections.abc import Callable, Mapping, Sequence -from typing import Any +from typing import int, Any from urllib.parse import urlparse from django import forms diff --git a/src/sentry/integrations/gitlab/issues.py b/src/sentry/integrations/gitlab/issues.py index 419cdc420a7fab..64abf95d34243e 100644 --- a/src/sentry/integrations/gitlab/issues.py +++ b/src/sentry/integrations/gitlab/issues.py @@ -2,7 +2,7 @@ import re from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from django.urls import reverse diff --git a/src/sentry/integrations/gitlab/repository.py b/src/sentry/integrations/gitlab/repository.py index e50ce76eeabbee..5184fdf1c9b0da 100644 --- a/src/sentry/integrations/gitlab/repository.py +++ b/src/sentry/integrations/gitlab/repository.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.integrations.types import IntegrationProviderSlug from sentry.organizations.services.organization.model import RpcOrganization diff --git a/src/sentry/integrations/gitlab/search.py b/src/sentry/integrations/gitlab/search.py index 01cffd4ca7e56d..acb659c3155a14 100644 --- a/src/sentry/integrations/gitlab/search.py +++ b/src/sentry/integrations/gitlab/search.py @@ -1,4 +1,4 @@ -from typing import TypeVar +from typing import int, TypeVar from rest_framework.response import Response diff --git a/src/sentry/integrations/gitlab/urls.py b/src/sentry/integrations/gitlab/urls.py index 4cca02f4fe82d7..dea14b3514a0b0 100644 --- a/src/sentry/integrations/gitlab/urls.py +++ b/src/sentry/integrations/gitlab/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from .search import GitlabIssueSearchEndpoint diff --git a/src/sentry/integrations/gitlab/utils.py b/src/sentry/integrations/gitlab/utils.py index 90c6a226634d63..ad89d073cddf36 100644 --- a/src/sentry/integrations/gitlab/utils.py +++ b/src/sentry/integrations/gitlab/utils.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping from datetime import datetime from urllib.parse import urlencode diff --git a/src/sentry/integrations/gitlab/webhooks.py b/src/sentry/integrations/gitlab/webhooks.py index 3bb7f8662af2f9..d3239d82cbdf00 100644 --- a/src/sentry/integrations/gitlab/webhooks.py +++ b/src/sentry/integrations/gitlab/webhooks.py @@ -4,7 +4,7 @@ from abc import ABC from collections.abc import Mapping from datetime import timezone -from typing import Any +from typing import int, Any import orjson from dateutil.parser import parse as parse_date diff --git a/src/sentry/integrations/issue_alert_image_builder.py b/src/sentry/integrations/issue_alert_image_builder.py index ad1ad49cb52ba6..bc997f17795f37 100644 --- a/src/sentry/integrations/issue_alert_image_builder.py +++ b/src/sentry/integrations/issue_alert_image_builder.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Callable diff --git a/src/sentry/integrations/jira/__init__.py b/src/sentry/integrations/jira/__init__.py index 9c1b12de2af847..ca491254703e91 100644 --- a/src/sentry/integrations/jira/__init__.py +++ b/src/sentry/integrations/jira/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules import rules from .actions import JiraCreateTicketAction diff --git a/src/sentry/integrations/jira/actions/__init__.py b/src/sentry/integrations/jira/actions/__init__.py index 42b8187a46b7ce..2d5f1cc50f59ea 100644 --- a/src/sentry/integrations/jira/actions/__init__.py +++ b/src/sentry/integrations/jira/actions/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .create_ticket import JiraCreateTicketAction from .form import JiraNotifyServiceForm diff --git a/src/sentry/integrations/jira/actions/create_ticket.py b/src/sentry/integrations/jira/actions/create_ticket.py index e1d7c5ddbd2c25..ba9b7aae033ad3 100644 --- a/src/sentry/integrations/jira/actions/create_ticket.py +++ b/src/sentry/integrations/jira/actions/create_ticket.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.integrations.jira.actions.form import JiraNotifyServiceForm from sentry.integrations.services.integration import RpcIntegration diff --git a/src/sentry/integrations/jira/actions/form.py b/src/sentry/integrations/jira/actions/form.py index 74f49b6ee17b1f..d4ef553f3313ed 100644 --- a/src/sentry/integrations/jira/actions/form.py +++ b/src/sentry/integrations/jira/actions/form.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django import forms from django.utils.translation import gettext_lazy as _ diff --git a/src/sentry/integrations/jira/client.py b/src/sentry/integrations/jira/client.py index 9445fe46bfbeca..038e73470731f2 100644 --- a/src/sentry/integrations/jira/client.py +++ b/src/sentry/integrations/jira/client.py @@ -1,7 +1,7 @@ import datetime import logging import re -from typing import Any +from typing import int, Any from urllib.parse import parse_qs, urlparse, urlsplit from requests import PreparedRequest diff --git a/src/sentry/integrations/jira/endpoints/__init__.py b/src/sentry/integrations/jira/endpoints/__init__.py index 0954c8e0f89795..9446ad9ee77d2c 100644 --- a/src/sentry/integrations/jira/endpoints/__init__.py +++ b/src/sentry/integrations/jira/endpoints/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .descriptor import JiraDescriptorEndpoint from .search import JiraSearchEndpoint diff --git a/src/sentry/integrations/jira/endpoints/descriptor.py b/src/sentry/integrations/jira/endpoints/descriptor.py index 01b384985695d1..5e2ed02919f414 100644 --- a/src/sentry/integrations/jira/endpoints/descriptor.py +++ b/src/sentry/integrations/jira/endpoints/descriptor.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.urls import reverse from rest_framework.request import Request diff --git a/src/sentry/integrations/jira/endpoints/search.py b/src/sentry/integrations/jira/endpoints/search.py index 2f2e3e2b65161f..23ed05818b41bb 100644 --- a/src/sentry/integrations/jira/endpoints/search.py +++ b/src/sentry/integrations/jira/endpoints/search.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from bs4 import BeautifulSoup from rest_framework.exceptions import NotFound diff --git a/src/sentry/integrations/jira/handlers/__init__.py b/src/sentry/integrations/jira/handlers/__init__.py index ec524743788953..3b03ee52c78482 100644 --- a/src/sentry/integrations/jira/handlers/__init__.py +++ b/src/sentry/integrations/jira/handlers/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["JiraActionHandler"] from .jira_handler import JiraActionHandler diff --git a/src/sentry/integrations/jira/handlers/jira_handler.py b/src/sentry/integrations/jira/handlers/jira_handler.py index dd5a7c7be10086..db3e0ee968a675 100644 --- a/src/sentry/integrations/jira/handlers/jira_handler.py +++ b/src/sentry/integrations/jira/handlers/jira_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.types import IntegrationProviderSlug from sentry.notifications.notification_action.action_handler_registry.base import ( TicketingActionHandler, diff --git a/src/sentry/integrations/jira/integration.py b/src/sentry/integrations/jira/integration.py index aa509dac251707..75bf9cd0763edd 100644 --- a/src/sentry/integrations/jira/integration.py +++ b/src/sentry/integrations/jira/integration.py @@ -5,7 +5,7 @@ import sys from collections.abc import Mapping, Sequence from operator import attrgetter -from typing import Any, NoReturn, TypedDict +from typing import Any, NoReturn, TypedDict, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/integrations/jira/models/create_issue_metadata.py b/src/sentry/integrations/jira/models/create_issue_metadata.py index feb5d529da8428..c0e98d9d468a3d 100644 --- a/src/sentry/integrations/jira/models/create_issue_metadata.py +++ b/src/sentry/integrations/jira/models/create_issue_metadata.py @@ -2,7 +2,7 @@ from dataclasses import dataclass from enum import Enum -from typing import Any +from typing import int, Any # A list of common builtin custom field types for Jira for easy reference. JIRA_CUSTOM_FIELD_TYPES = { diff --git a/src/sentry/integrations/jira/tasks.py b/src/sentry/integrations/jira/tasks.py index 76acec03a9d413..c37140596d590a 100644 --- a/src/sentry/integrations/jira/tasks.py +++ b/src/sentry/integrations/jira/tasks.py @@ -1,3 +1,4 @@ +from typing import int from django.db import IntegrityError, router, transaction from sentry.integrations.models.external_issue import ExternalIssue diff --git a/src/sentry/integrations/jira/urls.py b/src/sentry/integrations/jira/urls.py index 5b01197038bf21..6eb2ccb765817c 100644 --- a/src/sentry/integrations/jira/urls.py +++ b/src/sentry/integrations/jira/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from .endpoints import JiraDescriptorEndpoint, JiraSearchEndpoint diff --git a/src/sentry/integrations/jira/utils/__init__.py b/src/sentry/integrations/jira/utils/__init__.py index 44aacac21d1413..14d890bb161119 100644 --- a/src/sentry/integrations/jira/utils/__init__.py +++ b/src/sentry/integrations/jira/utils/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .api import ( get_assignee_email, handle_assignee_change, diff --git a/src/sentry/integrations/jira/utils/api.py b/src/sentry/integrations/jira/utils/api.py index a3701ad2d7c5a9..2c5a634d9968f4 100644 --- a/src/sentry/integrations/jira/utils/api.py +++ b/src/sentry/integrations/jira/utils/api.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any from rest_framework import status from rest_framework.response import Response diff --git a/src/sentry/integrations/jira/utils/choice.py b/src/sentry/integrations/jira/utils/choice.py index 1efbcafae0742c..8672411a12858e 100644 --- a/src/sentry/integrations/jira/utils/choice.py +++ b/src/sentry/integrations/jira/utils/choice.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any def build_user_choice(user_response: dict[str, Any], user_id_field: str) -> tuple[str, str] | None: diff --git a/src/sentry/integrations/jira/utils/create_issue_schema_transformers.py b/src/sentry/integrations/jira/utils/create_issue_schema_transformers.py index 64f90bfbf834e3..a1fccf97c542aa 100644 --- a/src/sentry/integrations/jira/utils/create_issue_schema_transformers.py +++ b/src/sentry/integrations/jira/utils/create_issue_schema_transformers.py @@ -1,5 +1,5 @@ from collections.abc import Callable, Iterable, Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, int from sentry.integrations.jira.models.create_issue_metadata import ( JIRA_CUSTOM_FIELD_TYPES, diff --git a/src/sentry/integrations/jira/views/__init__.py b/src/sentry/integrations/jira/views/__init__.py index 3ccedf152520fc..0779ec523ca6c8 100644 --- a/src/sentry/integrations/jira/views/__init__.py +++ b/src/sentry/integrations/jira/views/__init__.py @@ -1,3 +1,4 @@ +from typing import int SALT = "sentry-jira-integration" UNABLE_TO_VERIFY_INSTALLATION = "Unable to verify installation" diff --git a/src/sentry/integrations/jira/views/base.py b/src/sentry/integrations/jira/views/base.py index f60fc36411450a..e6657aab081b84 100644 --- a/src/sentry/integrations/jira/views/base.py +++ b/src/sentry/integrations/jira/views/base.py @@ -1,3 +1,4 @@ +from typing import int from csp.middleware import CSPMiddleware from django.conf import settings from django.views.generic import View diff --git a/src/sentry/integrations/jira/views/extension_configuration.py b/src/sentry/integrations/jira/views/extension_configuration.py index bbf00107caf249..c51390ffcc87d7 100644 --- a/src/sentry/integrations/jira/views/extension_configuration.py +++ b/src/sentry/integrations/jira/views/extension_configuration.py @@ -1,3 +1,4 @@ +from typing import int import orjson from sentry.integrations.types import IntegrationProviderSlug diff --git a/src/sentry/integrations/jira/views/sentry_installation.py b/src/sentry/integrations/jira/views/sentry_installation.py index 48b4e7abaef57b..95181964cee96f 100644 --- a/src/sentry/integrations/jira/views/sentry_installation.py +++ b/src/sentry/integrations/jira/views/sentry_installation.py @@ -1,3 +1,4 @@ +from typing import int import orjson from jwt import ExpiredSignatureError from rest_framework.request import Request diff --git a/src/sentry/integrations/jira/views/sentry_issue_details.py b/src/sentry/integrations/jira/views/sentry_issue_details.py index f1e04fb0109381..2763cda4a38f8d 100644 --- a/src/sentry/integrations/jira/views/sentry_issue_details.py +++ b/src/sentry/integrations/jira/views/sentry_issue_details.py @@ -3,7 +3,7 @@ import logging from collections.abc import Mapping from functools import reduce -from typing import Any +from typing import int, Any from urllib.parse import quote import sentry_sdk diff --git a/src/sentry/integrations/jira/webhooks/__init__.py b/src/sentry/integrations/jira/webhooks/__init__.py index 192c2c1c73e0f9..e3ef41c262b5af 100644 --- a/src/sentry/integrations/jira/webhooks/__init__.py +++ b/src/sentry/integrations/jira/webhooks/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .installed import JiraSentryInstalledWebhook from .issue_updated import JiraIssueUpdatedWebhook from .uninstalled import JiraSentryUninstalledWebhook diff --git a/src/sentry/integrations/jira/webhooks/base.py b/src/sentry/integrations/jira/webhooks/base.py index e6ba69366a8190..8e09cf6115901e 100644 --- a/src/sentry/integrations/jira/webhooks/base.py +++ b/src/sentry/integrations/jira/webhooks/base.py @@ -3,7 +3,7 @@ import abc import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any from django.http.request import HttpRequest from django.http.response import HttpResponseBase diff --git a/src/sentry/integrations/jira/webhooks/installed.py b/src/sentry/integrations/jira/webhooks/installed.py index 168381b3595aac..f00b7eddb33c13 100644 --- a/src/sentry/integrations/jira/webhooks/installed.py +++ b/src/sentry/integrations/jira/webhooks/installed.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from django.db import router, transaction from rest_framework import status diff --git a/src/sentry/integrations/jira/webhooks/issue_updated.py b/src/sentry/integrations/jira/webhooks/issue_updated.py index a838334f02dadc..feca5ad64b8fdd 100644 --- a/src/sentry/integrations/jira/webhooks/issue_updated.py +++ b/src/sentry/integrations/jira/webhooks/issue_updated.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/integrations/jira/webhooks/uninstalled.py b/src/sentry/integrations/jira/webhooks/uninstalled.py index f8ac4fd41c406d..eb675cf442b212 100644 --- a/src/sentry/integrations/jira/webhooks/uninstalled.py +++ b/src/sentry/integrations/jira/webhooks/uninstalled.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/integrations/jira_server/__init__.py b/src/sentry/integrations/jira_server/__init__.py index d6b7530a16e2de..4f204ffcb39f0e 100644 --- a/src/sentry/integrations/jira_server/__init__.py +++ b/src/sentry/integrations/jira_server/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules import rules from .actions.create_ticket import * # noqa: F401,F403 diff --git a/src/sentry/integrations/jira_server/actions/__init__.py b/src/sentry/integrations/jira_server/actions/__init__.py index 0f586dfa3d6086..40fcd6bae23206 100644 --- a/src/sentry/integrations/jira_server/actions/__init__.py +++ b/src/sentry/integrations/jira_server/actions/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .create_ticket import JiraServerCreateTicketAction from .form import JiraServerNotifyServiceForm diff --git a/src/sentry/integrations/jira_server/actions/create_ticket.py b/src/sentry/integrations/jira_server/actions/create_ticket.py index 5cd90eb4f36ad4..83fd2ecbd2ffd3 100644 --- a/src/sentry/integrations/jira_server/actions/create_ticket.py +++ b/src/sentry/integrations/jira_server/actions/create_ticket.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.integrations.jira_server.actions.form import JiraServerNotifyServiceForm from sentry.integrations.services.integration import RpcIntegration diff --git a/src/sentry/integrations/jira_server/actions/form.py b/src/sentry/integrations/jira_server/actions/form.py index 60696d235f28fe..7f1e28425a4164 100644 --- a/src/sentry/integrations/jira_server/actions/form.py +++ b/src/sentry/integrations/jira_server/actions/form.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django import forms from django.utils.translation import gettext_lazy as _ diff --git a/src/sentry/integrations/jira_server/client.py b/src/sentry/integrations/jira_server/client.py index 8c93078e7b393b..f546a8f533183b 100644 --- a/src/sentry/integrations/jira_server/client.py +++ b/src/sentry/integrations/jira_server/client.py @@ -2,7 +2,7 @@ import logging import re -from typing import Any +from typing import int, Any from urllib.parse import parse_qsl, urlparse from django.urls import reverse diff --git a/src/sentry/integrations/jira_server/handlers/__init__.py b/src/sentry/integrations/jira_server/handlers/__init__.py index af00604fd3ad61..92340401100546 100644 --- a/src/sentry/integrations/jira_server/handlers/__init__.py +++ b/src/sentry/integrations/jira_server/handlers/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["JiraServerActionHandler"] from .jira_server_handler import JiraServerActionHandler diff --git a/src/sentry/integrations/jira_server/handlers/jira_server_handler.py b/src/sentry/integrations/jira_server/handlers/jira_server_handler.py index b948c7813b999c..7e174733bf5152 100644 --- a/src/sentry/integrations/jira_server/handlers/jira_server_handler.py +++ b/src/sentry/integrations/jira_server/handlers/jira_server_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.types import IntegrationProviderSlug from sentry.notifications.notification_action.action_handler_registry.base import ( TicketingActionHandler, diff --git a/src/sentry/integrations/jira_server/integration.py b/src/sentry/integrations/jira_server/integration.py index 1b82915159eb97..6254133f4dbc20 100644 --- a/src/sentry/integrations/jira_server/integration.py +++ b/src/sentry/integrations/jira_server/integration.py @@ -3,7 +3,7 @@ import logging import re from collections.abc import Mapping, Sequence -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int from urllib.parse import urlparse from cryptography.hazmat.backends import default_backend diff --git a/src/sentry/integrations/jira_server/search.py b/src/sentry/integrations/jira_server/search.py index bf219eef5a6d4d..3c04cc9e89e5f0 100644 --- a/src/sentry/integrations/jira_server/search.py +++ b/src/sentry/integrations/jira_server/search.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from bs4 import BeautifulSoup from rest_framework.request import Request diff --git a/src/sentry/integrations/jira_server/urls.py b/src/sentry/integrations/jira_server/urls.py index 2c03d3680e6ba6..2ab3392201f8cc 100644 --- a/src/sentry/integrations/jira_server/urls.py +++ b/src/sentry/integrations/jira_server/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from .search import JiraServerSearchEndpoint diff --git a/src/sentry/integrations/jira_server/utils/__init__.py b/src/sentry/integrations/jira_server/utils/__init__.py index d5e0e3d3680784..021257206ab6b3 100644 --- a/src/sentry/integrations/jira_server/utils/__init__.py +++ b/src/sentry/integrations/jira_server/utils/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .api import get_assignee_email, handle_assignee_change, handle_status_change from .choice import build_user_choice diff --git a/src/sentry/integrations/jira_server/utils/api.py b/src/sentry/integrations/jira_server/utils/api.py index c7c6870f1f16a2..b4e25228aa07bd 100644 --- a/src/sentry/integrations/jira_server/utils/api.py +++ b/src/sentry/integrations/jira_server/utils/api.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.integrations.services.integration.model import RpcIntegration from sentry.integrations.services.integration.service import integration_service diff --git a/src/sentry/integrations/jira_server/utils/choice.py b/src/sentry/integrations/jira_server/utils/choice.py index 1efbcafae0742c..8672411a12858e 100644 --- a/src/sentry/integrations/jira_server/utils/choice.py +++ b/src/sentry/integrations/jira_server/utils/choice.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any def build_user_choice(user_response: dict[str, Any], user_id_field: str) -> tuple[str, str] | None: diff --git a/src/sentry/integrations/jira_server/webhooks.py b/src/sentry/integrations/jira_server/webhooks.py index b920040e4a2b7e..c7fa83f1b4787b 100644 --- a/src/sentry/integrations/jira_server/webhooks.py +++ b/src/sentry/integrations/jira_server/webhooks.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/integrations/manager.py b/src/sentry/integrations/manager.py index 2ddf305277c395..e52c9ba6d38f4b 100644 --- a/src/sentry/integrations/manager.py +++ b/src/sentry/integrations/manager.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Iterable, Iterator -from typing import Any +from typing import int, Any from sentry.exceptions import NotRegistered from sentry.integrations.base import IntegrationProvider diff --git a/src/sentry/integrations/messaging/__init__.py b/src/sentry/integrations/messaging/__init__.py index 520c0ec5af7454..51b7381e54fa4b 100644 --- a/src/sentry/integrations/messaging/__init__.py +++ b/src/sentry/integrations/messaging/__init__.py @@ -1,3 +1,4 @@ +from typing import int """Support for messaging integrations. The current messaging integrations are Discord, MSTeams, and Slack. diff --git a/src/sentry/integrations/messaging/commands.py b/src/sentry/integrations/messaging/commands.py index ac3e58630c30e1..20e1230f24779b 100644 --- a/src/sentry/integrations/messaging/commands.py +++ b/src/sentry/integrations/messaging/commands.py @@ -2,7 +2,7 @@ from abc import ABC, abstractmethod from collections.abc import Callable, Iterable from dataclasses import dataclass -from typing import Generic, TypeVar +from typing import Generic, TypeVar, int from sentry.integrations.messaging.metrics import ( MessagingInteractionEvent, diff --git a/src/sentry/integrations/messaging/linkage.py b/src/sentry/integrations/messaging/linkage.py index 858d9baf745b98..8c639a446b07b4 100644 --- a/src/sentry/integrations/messaging/linkage.py +++ b/src/sentry/integrations/messaging/linkage.py @@ -1,7 +1,7 @@ import logging from abc import ABC, abstractmethod from collections.abc import Iterable, Mapping -from typing import Any +from typing import int, Any import sentry_sdk from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/integrations/messaging/message_builder.py b/src/sentry/integrations/messaging/message_builder.py index 540137c483520c..539275845216cd 100644 --- a/src/sentry/integrations/messaging/message_builder.py +++ b/src/sentry/integrations/messaging/message_builder.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Iterable, Sequence -from typing import Any, Literal, TypedDict +from typing import Any, Literal, TypedDict, int from sentry import features from sentry.integrations.messaging.types import LEVEL_TO_COLOR diff --git a/src/sentry/integrations/messaging/metrics.py b/src/sentry/integrations/messaging/metrics.py index b1f1bf8c5c773e..cd8bc2856b82ad 100644 --- a/src/sentry/integrations/messaging/metrics.py +++ b/src/sentry/integrations/messaging/metrics.py @@ -1,7 +1,7 @@ from collections.abc import Mapping from dataclasses import dataclass from enum import StrEnum -from typing import Any +from typing import int, Any from sentry.integrations.base import IntegrationDomain from sentry.integrations.messaging.spec import MessagingIntegrationSpec diff --git a/src/sentry/integrations/messaging/spec.py b/src/sentry/integrations/messaging/spec.py index 25848b097f6a05..4d8bd529f41bb1 100644 --- a/src/sentry/integrations/messaging/spec.py +++ b/src/sentry/integrations/messaging/spec.py @@ -1,3 +1,4 @@ +from typing import int import logging from abc import ABC, abstractmethod from dataclasses import dataclass diff --git a/src/sentry/integrations/messaging/types.py b/src/sentry/integrations/messaging/types.py index 90c21a968c2dd3..8d1e1b4efe31ee 100644 --- a/src/sentry/integrations/messaging/types.py +++ b/src/sentry/integrations/messaging/types.py @@ -1,5 +1,6 @@ # Attachment colors used for issues with no actions take. +from typing import int LEVEL_TO_COLOR = { "_actioned_issue": "#EDEEEF", "_incident_resolved": "#4DC771", diff --git a/src/sentry/integrations/metric_alerts.py b/src/sentry/integrations/metric_alerts.py index 8bf70227cef85e..74bea60963d003 100644 --- a/src/sentry/integrations/metric_alerts.py +++ b/src/sentry/integrations/metric_alerts.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import datetime, timedelta -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int from urllib import parse import sentry_sdk diff --git a/src/sentry/integrations/middleware/hybrid_cloud/parser.py b/src/sentry/integrations/middleware/hybrid_cloud/parser.py index a3295360cc1817..d25b32df31e7c6 100644 --- a/src/sentry/integrations/middleware/hybrid_cloud/parser.py +++ b/src/sentry/integrations/middleware/hybrid_cloud/parser.py @@ -3,7 +3,7 @@ import logging from abc import ABC from concurrent.futures import ThreadPoolExecutor, as_completed -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django.conf import settings from django.core.cache import cache diff --git a/src/sentry/integrations/middleware/metrics.py b/src/sentry/integrations/middleware/metrics.py index b1e9e1bc1f8bc6..dd3d29c67240a7 100644 --- a/src/sentry/integrations/middleware/metrics.py +++ b/src/sentry/integrations/middleware/metrics.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping from dataclasses import dataclass from enum import StrEnum diff --git a/src/sentry/integrations/mixins/__init__.py b/src/sentry/integrations/mixins/__init__.py index 48204035c93fb1..7b46546e1db6d2 100644 --- a/src/sentry/integrations/mixins/__init__.py +++ b/src/sentry/integrations/mixins/__init__.py @@ -1,3 +1,4 @@ +from typing import int """ Many of our integration providers offer competing products with the same features. For example, both Slack and MS Teams are "communication platforms". diff --git a/src/sentry/integrations/mixins/issues.py b/src/sentry/integrations/mixins/issues.py index 552d5af155f07b..2da17f0706a00a 100644 --- a/src/sentry/integrations/mixins/issues.py +++ b/src/sentry/integrations/mixins/issues.py @@ -7,7 +7,7 @@ from collections.abc import Mapping, Sequence from copy import deepcopy from operator import attrgetter -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from sentry import features from sentry.integrations.base import IntegrationInstallation diff --git a/src/sentry/integrations/mixins/notifications.py b/src/sentry/integrations/mixins/notifications.py index 80c94602facae1..ed108a48f7b402 100644 --- a/src/sentry/integrations/mixins/notifications.py +++ b/src/sentry/integrations/mixins/notifications.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry_sdk import capture_message diff --git a/src/sentry/integrations/mixins/serverless.py b/src/sentry/integrations/mixins/serverless.py index 607537ae4c2210..68bc55407d5e71 100644 --- a/src/sentry/integrations/mixins/serverless.py +++ b/src/sentry/integrations/mixins/serverless.py @@ -1,3 +1,4 @@ +from typing import int class ServerlessMixin: def get_serverless_functions(self): """ diff --git a/src/sentry/integrations/models/__init__.py b/src/sentry/integrations/models/__init__.py index 314e938e65eb9a..cc7cd762067467 100644 --- a/src/sentry/integrations/models/__init__.py +++ b/src/sentry/integrations/models/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ( "DataForwarder", "DataForwarderProject", diff --git a/src/sentry/integrations/models/data_forwarder.py b/src/sentry/integrations/models/data_forwarder.py index 7d339b824bddcd..af592cc303a5f3 100644 --- a/src/sentry/integrations/models/data_forwarder.py +++ b/src/sentry/integrations/models/data_forwarder.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/integrations/models/data_forwarder_project.py b/src/sentry/integrations/models/data_forwarder_project.py index 3c04f2cc260125..9a2ed2d25e3d14 100644 --- a/src/sentry/integrations/models/data_forwarder_project.py +++ b/src/sentry/integrations/models/data_forwarder_project.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import models diff --git a/src/sentry/integrations/models/doc_integration.py b/src/sentry/integrations/models/doc_integration.py index a74d6d7fa2c3df..e46745c5d7575c 100644 --- a/src/sentry/integrations/models/doc_integration.py +++ b/src/sentry/integrations/models/doc_integration.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/integrations/models/doc_integration_avatar.py b/src/sentry/integrations/models/doc_integration_avatar.py index 80c2e147852339..4ae7d4adcd95f9 100644 --- a/src/sentry/integrations/models/doc_integration_avatar.py +++ b/src/sentry/integrations/models/doc_integration_avatar.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/integrations/models/external_actor.py b/src/sentry/integrations/models/external_actor.py index d4fbb9f07c85f1..074cbebb492874 100644 --- a/src/sentry/integrations/models/external_actor.py +++ b/src/sentry/integrations/models/external_actor.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db import models, router, transaction diff --git a/src/sentry/integrations/models/external_issue.py b/src/sentry/integrations/models/external_issue.py index 641cf4a25afa40..bbfa810bf0d956 100644 --- a/src/sentry/integrations/models/external_issue.py +++ b/src/sentry/integrations/models/external_issue.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django.db import models from django.db.models import QuerySet diff --git a/src/sentry/integrations/models/integration.py b/src/sentry/integrations/models/integration.py index 80187dc3010341..f250c4dcb7da6a 100644 --- a/src/sentry/integrations/models/integration.py +++ b/src/sentry/integrations/models/integration.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.db import IntegrityError, models, router, transaction diff --git a/src/sentry/integrations/models/integration_external_project.py b/src/sentry/integrations/models/integration_external_project.py index 9b2e9de15d998d..abad35940e0607 100644 --- a/src/sentry/integrations/models/integration_external_project.py +++ b/src/sentry/integrations/models/integration_external_project.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/integrations/models/integration_feature.py b/src/sentry/integrations/models/integration_feature.py index de19d6af31210b..88b33d778efaf7 100644 --- a/src/sentry/integrations/models/integration_feature.py +++ b/src/sentry/integrations/models/integration_feature.py @@ -3,7 +3,7 @@ from collections import defaultdict from collections.abc import Sequence from enum import Enum -from typing import ClassVar +from typing import int, ClassVar from django.db import models from django.utils import timezone diff --git a/src/sentry/integrations/models/organization_integration.py b/src/sentry/integrations/models/organization_integration.py index 4290eba93e761d..7a064f53da3803 100644 --- a/src/sentry/integrations/models/organization_integration.py +++ b/src/sentry/integrations/models/organization_integration.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, ClassVar, Self +from typing import Any, ClassVar, Self, int from django.db import models from django.utils import timezone diff --git a/src/sentry/integrations/models/repository_project_path_config.py b/src/sentry/integrations/models/repository_project_path_config.py index 83ea9d92ebae72..1f0082fde7b902 100644 --- a/src/sentry/integrations/models/repository_project_path_config.py +++ b/src/sentry/integrations/models/repository_project_path_config.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models, router, transaction from django.db.models.signals import post_save diff --git a/src/sentry/integrations/models/utils.py b/src/sentry/integrations/models/utils.py index f81a2faaff9e67..917760ec319efe 100644 --- a/src/sentry/integrations/models/utils.py +++ b/src/sentry/integrations/models/utils.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int if TYPE_CHECKING: from sentry.integrations.base import ( diff --git a/src/sentry/integrations/msteams/__init__.py b/src/sentry/integrations/msteams/__init__.py index 1a03c043b5ca16..94e9d25fb00bb1 100644 --- a/src/sentry/integrations/msteams/__init__.py +++ b/src/sentry/integrations/msteams/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.msteams.spec import MsTeamsMessagingSpec from .handlers import MSTeamsActionHandler # noqa: F401,F403 diff --git a/src/sentry/integrations/msteams/actions/__init__.py b/src/sentry/integrations/msteams/actions/__init__.py index 4aebd4ba61d77a..9cb56ef2d9d6f2 100644 --- a/src/sentry/integrations/msteams/actions/__init__.py +++ b/src/sentry/integrations/msteams/actions/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .form import MsTeamsNotifyServiceForm from .notification import MsTeamsNotifyServiceAction diff --git a/src/sentry/integrations/msteams/actions/form.py b/src/sentry/integrations/msteams/actions/form.py index 02b46f4a425e50..12f0c4266cc9e5 100644 --- a/src/sentry/integrations/msteams/actions/form.py +++ b/src/sentry/integrations/msteams/actions/form.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django import forms from django.utils.translation import gettext_lazy as _ diff --git a/src/sentry/integrations/msteams/actions/notification.py b/src/sentry/integrations/msteams/actions/notification.py index 4bc97da2c3466c..1d0d50326fa811 100644 --- a/src/sentry/integrations/msteams/actions/notification.py +++ b/src/sentry/integrations/msteams/actions/notification.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.integrations.messaging.metrics import ( MessagingInteractionEvent, diff --git a/src/sentry/integrations/msteams/analytics.py b/src/sentry/integrations/msteams/analytics.py index 8b71b41a315a61..6dcd6d32acba87 100644 --- a/src/sentry/integrations/msteams/analytics.py +++ b/src/sentry/integrations/msteams/analytics.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics from sentry.analytics.events.base_notification_sent import BaseNotificationSent diff --git a/src/sentry/integrations/msteams/card_builder/__init__.py b/src/sentry/integrations/msteams/card_builder/__init__.py index 33916a3c7db074..060f43c5a7e862 100644 --- a/src/sentry/integrations/msteams/card_builder/__init__.py +++ b/src/sentry/integrations/msteams/card_builder/__init__.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int ME = "ME" MSTEAMS_URL_FORMAT = "[{text}]({url})" diff --git a/src/sentry/integrations/msteams/card_builder/base.py b/src/sentry/integrations/msteams/card_builder/base.py index ca81fa7973b0a5..4dd9a92f4f280f 100644 --- a/src/sentry/integrations/msteams/card_builder/base.py +++ b/src/sentry/integrations/msteams/card_builder/base.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Sequence -from typing import Any +from typing import int, Any from sentry.integrations.msteams.card_builder.block import ( Action, diff --git a/src/sentry/integrations/msteams/card_builder/block.py b/src/sentry/integrations/msteams/card_builder/block.py index 6b1715e44cbf30..bde2cb2e650886 100644 --- a/src/sentry/integrations/msteams/card_builder/block.py +++ b/src/sentry/integrations/msteams/card_builder/block.py @@ -2,7 +2,7 @@ from collections.abc import Sequence from enum import Enum -from typing import Literal, NotRequired, TypeAlias, TypedDict, Unpack +from typing import Literal, NotRequired, TypeAlias, TypedDict, Unpack, int from sentry.integrations.msteams.card_builder.utils import escape_markdown_special_chars from sentry.utils.assets import get_asset_url diff --git a/src/sentry/integrations/msteams/card_builder/help.py b/src/sentry/integrations/msteams/card_builder/help.py index da747d8813bfe7..a7f88b7a56a97c 100644 --- a/src/sentry/integrations/msteams/card_builder/help.py +++ b/src/sentry/integrations/msteams/card_builder/help.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.msteams.card_builder.base import MSTeamsMessageBuilder from sentry.integrations.msteams.card_builder.block import ActionType, AdaptiveCard, OpenUrlAction diff --git a/src/sentry/integrations/msteams/card_builder/identity.py b/src/sentry/integrations/msteams/card_builder/identity.py index 7e9a6816654b06..712b26473236fa 100644 --- a/src/sentry/integrations/msteams/card_builder/identity.py +++ b/src/sentry/integrations/msteams/card_builder/identity.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.msteams.card_builder.base import MSTeamsMessageBuilder from .block import ( diff --git a/src/sentry/integrations/msteams/card_builder/incident_attachment.py b/src/sentry/integrations/msteams/card_builder/incident_attachment.py index dba07540c28051..19704cb91e0a80 100644 --- a/src/sentry/integrations/msteams/card_builder/incident_attachment.py +++ b/src/sentry/integrations/msteams/card_builder/incident_attachment.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import datetime -from typing import Literal +from typing import int, Literal from sentry.incidents.typings.metric_detector import AlertContext, MetricIssueContext from sentry.integrations.metric_alerts import incident_attachment_info diff --git a/src/sentry/integrations/msteams/card_builder/installation.py b/src/sentry/integrations/msteams/card_builder/installation.py index 9a1ebd590caf10..488246c7e75209 100644 --- a/src/sentry/integrations/msteams/card_builder/installation.py +++ b/src/sentry/integrations/msteams/card_builder/installation.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.models.organization import Organization from sentry.organizations.services.organization import RpcOrganizationSummary diff --git a/src/sentry/integrations/msteams/card_builder/issues.py b/src/sentry/integrations/msteams/card_builder/issues.py index 8f4b18963945b4..a6d1fc6b707ee2 100644 --- a/src/sentry/integrations/msteams/card_builder/issues.py +++ b/src/sentry/integrations/msteams/card_builder/issues.py @@ -3,7 +3,7 @@ import logging from collections.abc import Sequence from datetime import datetime -from typing import Any +from typing import int, Any from sentry.integrations.messaging.message_builder import ( build_attachment_text, diff --git a/src/sentry/integrations/msteams/card_builder/notifications.py b/src/sentry/integrations/msteams/card_builder/notifications.py index ec4faf22e8f510..a3c0ef25b49aed 100644 --- a/src/sentry/integrations/msteams/card_builder/notifications.py +++ b/src/sentry/integrations/msteams/card_builder/notifications.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from sentry.integrations.messaging.message_builder import ( build_attachment_text, diff --git a/src/sentry/integrations/msteams/card_builder/utils.py b/src/sentry/integrations/msteams/card_builder/utils.py index e9dc7277944890..2fa39af662b652 100644 --- a/src/sentry/integrations/msteams/card_builder/utils.py +++ b/src/sentry/integrations/msteams/card_builder/utils.py @@ -1,3 +1,4 @@ +from typing import int class HelpMessages: HELP_TITLE = "Please use one of the following commands for Sentry:" HELP_MESSAGE = ( diff --git a/src/sentry/integrations/msteams/client.py b/src/sentry/integrations/msteams/client.py index 9d7ac7722ade0b..fc62023cd6a4ad 100644 --- a/src/sentry/integrations/msteams/client.py +++ b/src/sentry/integrations/msteams/client.py @@ -2,7 +2,7 @@ import time from abc import ABC -from typing import TypedDict +from typing import int, TypedDict from urllib.parse import urlencode from requests import PreparedRequest diff --git a/src/sentry/integrations/msteams/constants.py b/src/sentry/integrations/msteams/constants.py index cf231bbc3069ff..5ab31d27d81ff7 100644 --- a/src/sentry/integrations/msteams/constants.py +++ b/src/sentry/integrations/msteams/constants.py @@ -1 +1,2 @@ +from typing import int SALT = "sentry-msteams-integration" diff --git a/src/sentry/integrations/msteams/handlers/__init__.py b/src/sentry/integrations/msteams/handlers/__init__.py index bd5508a3ee6148..92700334b394ed 100644 --- a/src/sentry/integrations/msteams/handlers/__init__.py +++ b/src/sentry/integrations/msteams/handlers/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["MSTeamsActionHandler"] from .msteams_handler import MSTeamsActionHandler diff --git a/src/sentry/integrations/msteams/handlers/msteams_handler.py b/src/sentry/integrations/msteams/handlers/msteams_handler.py index 90fd5a861c9a2d..e52cc504a5ddc2 100644 --- a/src/sentry/integrations/msteams/handlers/msteams_handler.py +++ b/src/sentry/integrations/msteams/handlers/msteams_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.types import IntegrationProviderSlug from sentry.notifications.notification_action.action_handler_registry.base import ( IntegrationActionHandler, diff --git a/src/sentry/integrations/msteams/integration.py b/src/sentry/integrations/msteams/integration.py index eb93b5a9fddfad..81657f8e7ad07e 100644 --- a/src/sentry/integrations/msteams/integration.py +++ b/src/sentry/integrations/msteams/integration.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from django.http.request import HttpRequest from django.http.response import HttpResponseBase diff --git a/src/sentry/integrations/msteams/link_identity.py b/src/sentry/integrations/msteams/link_identity.py index 771c40a67df0f7..326ac8735775f6 100644 --- a/src/sentry/integrations/msteams/link_identity.py +++ b/src/sentry/integrations/msteams/link_identity.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from django.urls import reverse diff --git a/src/sentry/integrations/msteams/linkage.py b/src/sentry/integrations/msteams/linkage.py index 3d9614a723f4bc..e116a22f93ecf3 100644 --- a/src/sentry/integrations/msteams/linkage.py +++ b/src/sentry/integrations/msteams/linkage.py @@ -1,3 +1,4 @@ +from typing import int from abc import ABC from sentry.integrations.messaging.linkage import IdentityLinkageView diff --git a/src/sentry/integrations/msteams/metrics.py b/src/sentry/integrations/msteams/metrics.py index 2a2bb3b9d037eb..624df796523381 100644 --- a/src/sentry/integrations/msteams/metrics.py +++ b/src/sentry/integrations/msteams/metrics.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.utils.metrics import EventLifecycle from sentry.shared_integrations.exceptions import ApiError, ApiRateLimitedError diff --git a/src/sentry/integrations/msteams/notifications.py b/src/sentry/integrations/msteams/notifications.py index 71e412d5cf1434..bf696933358630 100644 --- a/src/sentry/integrations/msteams/notifications.py +++ b/src/sentry/integrations/msteams/notifications.py @@ -2,7 +2,7 @@ import logging from collections.abc import Iterable, Mapping -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/integrations/msteams/parsing.py b/src/sentry/integrations/msteams/parsing.py index c4b12556aad551..0f58d77cd66a0b 100644 --- a/src/sentry/integrations/msteams/parsing.py +++ b/src/sentry/integrations/msteams/parsing.py @@ -1,6 +1,6 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.constants import ObjectStatus from sentry.integrations.services.integration import integration_service diff --git a/src/sentry/integrations/msteams/spec.py b/src/sentry/integrations/msteams/spec.py index f416c8d942321b..0206a312909871 100644 --- a/src/sentry/integrations/msteams/spec.py +++ b/src/sentry/integrations/msteams/spec.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics from sentry.incidents.endpoints.serializers.alert_rule import AlertRuleSerializerResponse from sentry.incidents.endpoints.serializers.incident import DetailedIncidentSerializerResponse diff --git a/src/sentry/integrations/msteams/unlink_identity.py b/src/sentry/integrations/msteams/unlink_identity.py index 77de0b4d79a6a8..0090a712ad59b9 100644 --- a/src/sentry/integrations/msteams/unlink_identity.py +++ b/src/sentry/integrations/msteams/unlink_identity.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from django.urls import reverse diff --git a/src/sentry/integrations/msteams/urls.py b/src/sentry/integrations/msteams/urls.py index 3b19cbadc6ae90..4911542f2e34d6 100644 --- a/src/sentry/integrations/msteams/urls.py +++ b/src/sentry/integrations/msteams/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from sentry.integrations.msteams.spec import MsTeamsMessagingSpec diff --git a/src/sentry/integrations/msteams/utils.py b/src/sentry/integrations/msteams/utils.py index efeacb9861b838..c363559f585531 100644 --- a/src/sentry/integrations/msteams/utils.py +++ b/src/sentry/integrations/msteams/utils.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import enum import logging diff --git a/src/sentry/integrations/msteams/webhook.py b/src/sentry/integrations/msteams/webhook.py index cb14743604e94e..18f50b2620e1f7 100644 --- a/src/sentry/integrations/msteams/webhook.py +++ b/src/sentry/integrations/msteams/webhook.py @@ -5,7 +5,7 @@ from collections.abc import Callable, Iterable, Mapping from dataclasses import dataclass from enum import Enum -from typing import Any, cast +from typing import Any, cast, int import orjson import sentry_sdk diff --git a/src/sentry/integrations/notifications.py b/src/sentry/integrations/notifications.py index 3882564f3b6adf..df36d4517e0faf 100644 --- a/src/sentry/integrations/notifications.py +++ b/src/sentry/integrations/notifications.py @@ -2,7 +2,7 @@ from collections import defaultdict from collections.abc import Iterable, Mapping, MutableMapping -from typing import Any +from typing import int, Any from sentry.constants import ObjectStatus from sentry.identity.services.identity import identity_service diff --git a/src/sentry/integrations/on_call/metrics.py b/src/sentry/integrations/on_call/metrics.py index a6599cf69b430f..821bd480e4e265 100644 --- a/src/sentry/integrations/on_call/metrics.py +++ b/src/sentry/integrations/on_call/metrics.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum, StrEnum from attr import dataclass diff --git a/src/sentry/integrations/on_call/spec.py b/src/sentry/integrations/on_call/spec.py index a56fce8710ca92..599f9e0f607105 100644 --- a/src/sentry/integrations/on_call/spec.py +++ b/src/sentry/integrations/on_call/spec.py @@ -1,3 +1,4 @@ +from typing import int from abc import ABC, abstractmethod from sentry.integrations.types import IntegrationProviderSlug diff --git a/src/sentry/integrations/opsgenie/__init__.py b/src/sentry/integrations/opsgenie/__init__.py index d0867e3c2fd7a9..65b8227f953118 100644 --- a/src/sentry/integrations/opsgenie/__init__.py +++ b/src/sentry/integrations/opsgenie/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules import rules from .actions import OpsgenieNotifyTeamAction diff --git a/src/sentry/integrations/opsgenie/actions/__init__.py b/src/sentry/integrations/opsgenie/actions/__init__.py index 57ac8717e33495..eb0a8f69743f5c 100644 --- a/src/sentry/integrations/opsgenie/actions/__init__.py +++ b/src/sentry/integrations/opsgenie/actions/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .form import OpsgenieNotifyTeamForm from .notification import OpsgenieNotifyTeamAction diff --git a/src/sentry/integrations/opsgenie/actions/form.py b/src/sentry/integrations/opsgenie/actions/form.py index a750ac4968bebc..80c5eba48793bf 100644 --- a/src/sentry/integrations/opsgenie/actions/form.py +++ b/src/sentry/integrations/opsgenie/actions/form.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from django import forms from django.utils.translation import gettext_lazy as _ diff --git a/src/sentry/integrations/opsgenie/actions/notification.py b/src/sentry/integrations/opsgenie/actions/notification.py index 472dc9c82eb46e..16bd6da921f0f0 100644 --- a/src/sentry/integrations/opsgenie/actions/notification.py +++ b/src/sentry/integrations/opsgenie/actions/notification.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import cast +from typing import int, cast import sentry_sdk diff --git a/src/sentry/integrations/opsgenie/analytics.py b/src/sentry/integrations/opsgenie/analytics.py index dd79ccda4353d4..275e4c59910bde 100644 --- a/src/sentry/integrations/opsgenie/analytics.py +++ b/src/sentry/integrations/opsgenie/analytics.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics from sentry.analytics.events.base_notification_sent import BaseNotificationSent diff --git a/src/sentry/integrations/opsgenie/client.py b/src/sentry/integrations/opsgenie/client.py index bb2c16c462ff62..4a7a55e31ae34b 100644 --- a/src/sentry/integrations/opsgenie/client.py +++ b/src/sentry/integrations/opsgenie/client.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing import int, Literal from sentry import features from sentry.integrations.client import ApiClient diff --git a/src/sentry/integrations/opsgenie/handlers/__init__.py b/src/sentry/integrations/opsgenie/handlers/__init__.py index 2134dbd80e2b6b..dd4cfbe096dde7 100644 --- a/src/sentry/integrations/opsgenie/handlers/__init__.py +++ b/src/sentry/integrations/opsgenie/handlers/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["OpsgenieActionHandler"] from .opsgenie_handler import OpsgenieActionHandler diff --git a/src/sentry/integrations/opsgenie/handlers/opsgenie_handler.py b/src/sentry/integrations/opsgenie/handlers/opsgenie_handler.py index 9205ecf311d0e5..51c08d0622864f 100644 --- a/src/sentry/integrations/opsgenie/handlers/opsgenie_handler.py +++ b/src/sentry/integrations/opsgenie/handlers/opsgenie_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.opsgenie.utils import OPSGENIE_CUSTOM_PRIORITIES from sentry.integrations.types import IntegrationProviderSlug from sentry.notifications.notification_action.action_handler_registry.base import ( diff --git a/src/sentry/integrations/opsgenie/integration.py b/src/sentry/integrations/opsgenie/integration.py index 50e9a654ab778b..54aaaeeb218e1e 100644 --- a/src/sentry/integrations/opsgenie/integration.py +++ b/src/sentry/integrations/opsgenie/integration.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from django import forms from django.http.request import HttpRequest diff --git a/src/sentry/integrations/opsgenie/metrics.py b/src/sentry/integrations/opsgenie/metrics.py index 3f28c47cc56f24..c1528abb506ffb 100644 --- a/src/sentry/integrations/opsgenie/metrics.py +++ b/src/sentry/integrations/opsgenie/metrics.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.on_call.metrics import OnCallInteractionEvent, OnCallInteractionType from sentry.integrations.on_call.spec import OpsgenieOnCallSpec from sentry.integrations.utils.metrics import EventLifecycle diff --git a/src/sentry/integrations/opsgenie/tasks.py b/src/sentry/integrations/opsgenie/tasks.py index afee96214901bf..507a015cf76354 100644 --- a/src/sentry/integrations/opsgenie/tasks.py +++ b/src/sentry/integrations/opsgenie/tasks.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db import router, transaction diff --git a/src/sentry/integrations/opsgenie/utils.py b/src/sentry/integrations/opsgenie/utils.py index 0b47bb7fb3c4de..696ad7140fdbe5 100644 --- a/src/sentry/integrations/opsgenie/utils.py +++ b/src/sentry/integrations/opsgenie/utils.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any, cast +from typing import Any, cast, int from sentry.constants import ObjectStatus from sentry.incidents.models.incident import IncidentStatus diff --git a/src/sentry/integrations/pagerduty/__init__.py b/src/sentry/integrations/pagerduty/__init__.py index 476d3c72fe4cee..fc157830f2bb34 100644 --- a/src/sentry/integrations/pagerduty/__init__.py +++ b/src/sentry/integrations/pagerduty/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules import rules from .actions import PagerDutyNotifyServiceAction diff --git a/src/sentry/integrations/pagerduty/actions/__init__.py b/src/sentry/integrations/pagerduty/actions/__init__.py index d8ac56d5a776f9..8fb8f1997bc33c 100644 --- a/src/sentry/integrations/pagerduty/actions/__init__.py +++ b/src/sentry/integrations/pagerduty/actions/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .form import PagerDutyNotifyServiceForm from .notification import PagerDutyNotifyServiceAction diff --git a/src/sentry/integrations/pagerduty/actions/form.py b/src/sentry/integrations/pagerduty/actions/form.py index ee7d6b25cf1499..000f457cac7f6c 100644 --- a/src/sentry/integrations/pagerduty/actions/form.py +++ b/src/sentry/integrations/pagerduty/actions/form.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from django import forms from django.utils.translation import gettext_lazy as _ diff --git a/src/sentry/integrations/pagerduty/actions/notification.py b/src/sentry/integrations/pagerduty/actions/notification.py index 9f19533a7505e7..3ad52b0e05b99f 100644 --- a/src/sentry/integrations/pagerduty/actions/notification.py +++ b/src/sentry/integrations/pagerduty/actions/notification.py @@ -2,7 +2,7 @@ import logging from collections.abc import Generator, Sequence -from typing import Any, TypedDict, cast +from typing import Any, TypedDict, cast, int import sentry_sdk diff --git a/src/sentry/integrations/pagerduty/analytics.py b/src/sentry/integrations/pagerduty/analytics.py index c1547eb227b0d3..09f1497bc631da 100644 --- a/src/sentry/integrations/pagerduty/analytics.py +++ b/src/sentry/integrations/pagerduty/analytics.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics from sentry.analytics.events.base_notification_sent import BaseNotificationSent diff --git a/src/sentry/integrations/pagerduty/client.py b/src/sentry/integrations/pagerduty/client.py index 39debaca24e444..b245b4b4d60cde 100644 --- a/src/sentry/integrations/pagerduty/client.py +++ b/src/sentry/integrations/pagerduty/client.py @@ -1,7 +1,7 @@ from __future__ import annotations from enum import StrEnum -from typing import Any +from typing import int, Any from requests import Response diff --git a/src/sentry/integrations/pagerduty/handlers/__init__.py b/src/sentry/integrations/pagerduty/handlers/__init__.py index 7a3c291e5d3168..95e886906e0aea 100644 --- a/src/sentry/integrations/pagerduty/handlers/__init__.py +++ b/src/sentry/integrations/pagerduty/handlers/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["PagerdutyActionHandler"] from .pagerduty_handler import PagerdutyActionHandler diff --git a/src/sentry/integrations/pagerduty/handlers/pagerduty_handler.py b/src/sentry/integrations/pagerduty/handlers/pagerduty_handler.py index c87e4e81f36ce1..e06bb481e2cd21 100644 --- a/src/sentry/integrations/pagerduty/handlers/pagerduty_handler.py +++ b/src/sentry/integrations/pagerduty/handlers/pagerduty_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.pagerduty.client import PagerdutySeverity from sentry.integrations.types import IntegrationProviderSlug from sentry.notifications.notification_action.action_handler_registry.base import ( diff --git a/src/sentry/integrations/pagerduty/integration.py b/src/sentry/integrations/pagerduty/integration.py index 783c7972f53d5b..1430bf4e316829 100644 --- a/src/sentry/integrations/pagerduty/integration.py +++ b/src/sentry/integrations/pagerduty/integration.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any, TypedDict +from typing import Any, TypedDict, int import orjson from django.db import router, transaction diff --git a/src/sentry/integrations/pagerduty/metrics.py b/src/sentry/integrations/pagerduty/metrics.py index ed92756f4bb461..de21c30f2d6a4b 100644 --- a/src/sentry/integrations/pagerduty/metrics.py +++ b/src/sentry/integrations/pagerduty/metrics.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.on_call.metrics import OnCallInteractionEvent, OnCallInteractionType from sentry.integrations.on_call.spec import PagerDutyOnCallSpec diff --git a/src/sentry/integrations/pagerduty/utils.py b/src/sentry/integrations/pagerduty/utils.py index 4f4c955c7f18df..937f3a397d4225 100644 --- a/src/sentry/integrations/pagerduty/utils.py +++ b/src/sentry/integrations/pagerduty/utils.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.db import router, transaction diff --git a/src/sentry/integrations/pipeline.py b/src/sentry/integrations/pipeline.py index 1e9dd02c4d8395..0597f8d1700bde 100644 --- a/src/sentry/integrations/pipeline.py +++ b/src/sentry/integrations/pipeline.py @@ -2,7 +2,7 @@ import logging from collections.abc import Callable, Sequence -from typing import Any, Never, TypedDict +from typing import Any, Never, TypedDict, int from django.db import IntegrityError from django.http.response import HttpResponseBase, HttpResponseRedirect diff --git a/src/sentry/integrations/project_management/metrics.py b/src/sentry/integrations/project_management/metrics.py index 30eb0d5de1a19b..e866ebfd376b22 100644 --- a/src/sentry/integrations/project_management/metrics.py +++ b/src/sentry/integrations/project_management/metrics.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass from enum import StrEnum diff --git a/src/sentry/integrations/referrer_ids.py b/src/sentry/integrations/referrer_ids.py index a21de5a78a4743..1effb350492d1b 100644 --- a/src/sentry/integrations/referrer_ids.py +++ b/src/sentry/integrations/referrer_ids.py @@ -1,5 +1,6 @@ # "referrer" url query param values # example: sentry.io/?referrer=github-pr-bot +from typing import int GITHUB_PR_BOT_REFERRER = "github-pr-bot" GITLAB_PR_BOT_REFERRER = "gitlab-pr-bot" diff --git a/src/sentry/integrations/repository/__init__.py b/src/sentry/integrations/repository/__init__.py index 29c2013df6c908..c4cfe911108825 100644 --- a/src/sentry/integrations/repository/__init__.py +++ b/src/sentry/integrations/repository/__init__.py @@ -1,3 +1,4 @@ +from typing import int """ The repository classes are responsible for the interactions with the data store for the NotificationMessage data model. The classes help separate the query interface with the actual data store for the NotificationMessage data model. diff --git a/src/sentry/integrations/repository/base.py b/src/sentry/integrations/repository/base.py index fe1d465d920bc4..3d52a9b4e772d9 100644 --- a/src/sentry/integrations/repository/base.py +++ b/src/sentry/integrations/repository/base.py @@ -1,6 +1,6 @@ from dataclasses import dataclass from datetime import datetime -from typing import Any +from typing import int, Any class NotificationMessageValidationError(Exception): diff --git a/src/sentry/integrations/repository/issue_alert.py b/src/sentry/integrations/repository/issue_alert.py index 2b50e2f3526d42..dab813e9c63f16 100644 --- a/src/sentry/integrations/repository/issue_alert.py +++ b/src/sentry/integrations/repository/issue_alert.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Generator from dataclasses import dataclass diff --git a/src/sentry/integrations/repository/metric_alert.py b/src/sentry/integrations/repository/metric_alert.py index 2213b3d07755b9..6a7d4340d73bce 100644 --- a/src/sentry/integrations/repository/metric_alert.py +++ b/src/sentry/integrations/repository/metric_alert.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from dataclasses import dataclass from logging import Logger, getLogger diff --git a/src/sentry/integrations/repository/notification_action.py b/src/sentry/integrations/repository/notification_action.py index 6afac2d74b5061..1a0bfb5cd98039 100644 --- a/src/sentry/integrations/repository/notification_action.py +++ b/src/sentry/integrations/repository/notification_action.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Generator from dataclasses import dataclass diff --git a/src/sentry/integrations/services/assignment_source.py b/src/sentry/integrations/services/assignment_source.py index f94806dceaeb7a..b9c2ca04614a51 100644 --- a/src/sentry/integrations/services/assignment_source.py +++ b/src/sentry/integrations/services/assignment_source.py @@ -2,7 +2,7 @@ from dataclasses import asdict, dataclass from datetime import datetime -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.utils import timezone diff --git a/src/sentry/integrations/services/integration/__init__.py b/src/sentry/integrations/services/integration/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/integrations/services/integration/__init__.py +++ b/src/sentry/integrations/services/integration/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/integrations/services/integration/impl.py b/src/sentry/integrations/services/integration/impl.py index a7dc242d6e353d..6bec6c09946880 100644 --- a/src/sentry/integrations/services/integration/impl.py +++ b/src/sentry/integrations/services/integration/impl.py @@ -4,7 +4,7 @@ from collections import defaultdict from collections.abc import Iterable from datetime import timedelta -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int import sentry_sdk from django.utils import timezone diff --git a/src/sentry/integrations/services/integration/model.py b/src/sentry/integrations/services/integration/model.py index 2705ce563a5ebd..28240a348a7e96 100644 --- a/src/sentry/integrations/services/integration/model.py +++ b/src/sentry/integrations/services/integration/model.py @@ -4,7 +4,7 @@ # defined, because we want to reflect on type annotations and avoid forward references. from datetime import datetime -from typing import Any +from typing import int, Any from pydantic import Field diff --git a/src/sentry/integrations/services/integration/serial.py b/src/sentry/integrations/services/integration/serial.py index 9a91ceb7d00432..02267721dfea2e 100644 --- a/src/sentry/integrations/services/integration/serial.py +++ b/src/sentry/integrations/services/integration/serial.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.models.integration import Integration from sentry.integrations.models.integration_external_project import IntegrationExternalProject from sentry.integrations.models.organization_integration import OrganizationIntegration diff --git a/src/sentry/integrations/services/integration/service.py b/src/sentry/integrations/services/integration/service.py index 196641a64fcc94..6219a3378c74ca 100644 --- a/src/sentry/integrations/services/integration/service.py +++ b/src/sentry/integrations/services/integration/service.py @@ -5,7 +5,7 @@ from abc import abstractmethod from datetime import datetime -from typing import Any +from typing import int, Any from sentry.constants import ObjectStatus from sentry.hybridcloud.rpc.pagination import RpcPaginationArgs, RpcPaginationResult diff --git a/src/sentry/integrations/services/repository/__init__.py b/src/sentry/integrations/services/repository/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/integrations/services/repository/__init__.py +++ b/src/sentry/integrations/services/repository/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/integrations/services/repository/impl.py b/src/sentry/integrations/services/repository/impl.py index ea8ecbe6223882..624a3f23065be5 100644 --- a/src/sentry/integrations/services/repository/impl.py +++ b/src/sentry/integrations/services/repository/impl.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.db import IntegrityError, router, transaction diff --git a/src/sentry/integrations/services/repository/model.py b/src/sentry/integrations/services/repository/model.py index 6d5a36bc2ced45..ca62acd928d48c 100644 --- a/src/sentry/integrations/services/repository/model.py +++ b/src/sentry/integrations/services/repository/model.py @@ -3,7 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. -from typing import Any +from typing import int, Any from sentry.hybridcloud.rpc import RpcModel diff --git a/src/sentry/integrations/services/repository/serial.py b/src/sentry/integrations/services/repository/serial.py index 76d9927c3a50e9..b28aa9334b559d 100644 --- a/src/sentry/integrations/services/repository/serial.py +++ b/src/sentry/integrations/services/repository/serial.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.integrations.services.repository import RpcRepository from sentry.models.repository import Repository diff --git a/src/sentry/integrations/services/repository/service.py b/src/sentry/integrations/services/repository/service.py index 15d3cc0368a75e..85b432209a526c 100644 --- a/src/sentry/integrations/services/repository/service.py +++ b/src/sentry/integrations/services/repository/service.py @@ -4,7 +4,7 @@ # defined, because we want to reflect on type annotations and avoid forward references. from abc import abstractmethod -from typing import Any +from typing import int, Any from sentry.hybridcloud.rpc.resolvers import ByOrganizationId from sentry.hybridcloud.rpc.service import RpcService, regional_rpc_method diff --git a/src/sentry/integrations/slack/__init__.py b/src/sentry/integrations/slack/__init__.py index 3ce06d897a578c..9b3cffc6511201 100644 --- a/src/sentry/integrations/slack/__init__.py +++ b/src/sentry/integrations/slack/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.slack.spec import SlackMessagingSpec from .actions.form import * # noqa: F401,F403 diff --git a/src/sentry/integrations/slack/actions/__init__.py b/src/sentry/integrations/slack/actions/__init__.py index 4dc7108cc7de7b..b6d3106adfc0c1 100644 --- a/src/sentry/integrations/slack/actions/__init__.py +++ b/src/sentry/integrations/slack/actions/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .form import SlackNotifyServiceForm from .notification import SlackNotifyServiceAction diff --git a/src/sentry/integrations/slack/actions/form.py b/src/sentry/integrations/slack/actions/form.py index 863d1f48641618..a02592a8546f98 100644 --- a/src/sentry/integrations/slack/actions/form.py +++ b/src/sentry/integrations/slack/actions/form.py @@ -2,7 +2,7 @@ import logging from dataclasses import asdict -from typing import Any +from typing import int, Any from django import forms from django.core.exceptions import ValidationError diff --git a/src/sentry/integrations/slack/actions/notification.py b/src/sentry/integrations/slack/actions/notification.py index b506e9474517aa..78a6e495ba4577 100644 --- a/src/sentry/integrations/slack/actions/notification.py +++ b/src/sentry/integrations/slack/actions/notification.py @@ -3,7 +3,7 @@ from collections.abc import Callable, Generator, Sequence from datetime import datetime from logging import Logger, getLogger -from typing import Any +from typing import int, Any import orjson import sentry_sdk diff --git a/src/sentry/integrations/slack/analytics.py b/src/sentry/integrations/slack/analytics.py index 12cd9c06ba23a9..9850657cb04628 100644 --- a/src/sentry/integrations/slack/analytics.py +++ b/src/sentry/integrations/slack/analytics.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics from sentry.analytics.events.base_notification_sent import BaseNotificationSent diff --git a/src/sentry/integrations/slack/handlers/__init__.py b/src/sentry/integrations/slack/handlers/__init__.py index a227b3a7680869..308707455d40c3 100644 --- a/src/sentry/integrations/slack/handlers/__init__.py +++ b/src/sentry/integrations/slack/handlers/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["SlackActionHandler"] from .slack_action_handler import SlackActionHandler diff --git a/src/sentry/integrations/slack/handlers/slack_action_handler.py b/src/sentry/integrations/slack/handlers/slack_action_handler.py index cfa9016271ae89..2058fe6587528b 100644 --- a/src/sentry/integrations/slack/handlers/slack_action_handler.py +++ b/src/sentry/integrations/slack/handlers/slack_action_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.types import IntegrationProviderSlug from sentry.notifications.notification_action.action_handler_registry.base import ( IntegrationActionHandler, diff --git a/src/sentry/integrations/slack/integration.py b/src/sentry/integrations/slack/integration.py index 8f8455c20b8fc2..24aca963dd4834 100644 --- a/src/sentry/integrations/slack/integration.py +++ b/src/sentry/integrations/slack/integration.py @@ -3,7 +3,7 @@ import logging from collections import namedtuple from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from django.utils.translation import gettext_lazy as _ from slack_sdk import WebClient diff --git a/src/sentry/integrations/slack/message_builder/base/base.py b/src/sentry/integrations/slack/message_builder/base/base.py index 81d887ae0236a5..de56a6c23e80b3 100644 --- a/src/sentry/integrations/slack/message_builder/base/base.py +++ b/src/sentry/integrations/slack/message_builder/base/base.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from abc import ABC diff --git a/src/sentry/integrations/slack/message_builder/base/block.py b/src/sentry/integrations/slack/message_builder/base/block.py index af471bcc1417f9..30d9a5b76b46ac 100644 --- a/src/sentry/integrations/slack/message_builder/base/block.py +++ b/src/sentry/integrations/slack/message_builder/base/block.py @@ -3,7 +3,7 @@ from abc import ABC from collections.abc import Mapping, Sequence from datetime import datetime -from typing import Any +from typing import int, Any import orjson diff --git a/src/sentry/integrations/slack/message_builder/disconnected.py b/src/sentry/integrations/slack/message_builder/disconnected.py index 2a0a887bf20d5a..bc70456792e7d0 100644 --- a/src/sentry/integrations/slack/message_builder/disconnected.py +++ b/src/sentry/integrations/slack/message_builder/disconnected.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.slack.message_builder.base.block import BlockSlackMessageBuilder from sentry.integrations.slack.message_builder.types import SlackBlock diff --git a/src/sentry/integrations/slack/message_builder/discover.py b/src/sentry/integrations/slack/message_builder/discover.py index 37db0c93eb715a..5113c67d518d21 100644 --- a/src/sentry/integrations/slack/message_builder/discover.py +++ b/src/sentry/integrations/slack/message_builder/discover.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.slack.message_builder.base.block import BlockSlackMessageBuilder from sentry.integrations.slack.message_builder.types import SlackBody diff --git a/src/sentry/integrations/slack/message_builder/help.py b/src/sentry/integrations/slack/message_builder/help.py index eee1385b2af1cd..143b915d3ea561 100644 --- a/src/sentry/integrations/slack/message_builder/help.py +++ b/src/sentry/integrations/slack/message_builder/help.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Mapping, Sequence diff --git a/src/sentry/integrations/slack/message_builder/image_block_builder.py b/src/sentry/integrations/slack/message_builder/image_block_builder.py index ff78aa23156b4e..49dcd25351d8c8 100644 --- a/src/sentry/integrations/slack/message_builder/image_block_builder.py +++ b/src/sentry/integrations/slack/message_builder/image_block_builder.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.issue_alert_image_builder import IssueAlertImageBuilder from sentry.integrations.slack.message_builder.base.block import BlockSlackMessageBuilder from sentry.integrations.slack.message_builder.types import SlackBlock diff --git a/src/sentry/integrations/slack/message_builder/incidents.py b/src/sentry/integrations/slack/message_builder/incidents.py index a2f2c71078f7fa..f015d18ef92550 100644 --- a/src/sentry/integrations/slack/message_builder/incidents.py +++ b/src/sentry/integrations/slack/message_builder/incidents.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from sentry.incidents.typings.metric_detector import AlertContext, MetricIssueContext diff --git a/src/sentry/integrations/slack/message_builder/issues.py b/src/sentry/integrations/slack/message_builder/issues.py index b4df09b3ed839f..6945e515d51000 100644 --- a/src/sentry/integrations/slack/message_builder/issues.py +++ b/src/sentry/integrations/slack/message_builder/issues.py @@ -4,7 +4,7 @@ import re from collections.abc import Callable, Mapping, Sequence from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int import orjson from django.core.exceptions import ObjectDoesNotExist diff --git a/src/sentry/integrations/slack/message_builder/metric_alerts.py b/src/sentry/integrations/slack/message_builder/metric_alerts.py index e229d006cd1154..9740fd7597a2a9 100644 --- a/src/sentry/integrations/slack/message_builder/metric_alerts.py +++ b/src/sentry/integrations/slack/message_builder/metric_alerts.py @@ -1,3 +1,4 @@ +from typing import int from sentry.incidents.models.alert_rule import AlertRule from sentry.incidents.models.incident import Incident, IncidentStatus from sentry.integrations.messaging.types import LEVEL_TO_COLOR diff --git a/src/sentry/integrations/slack/message_builder/notifications/__init__.py b/src/sentry/integrations/slack/message_builder/notifications/__init__.py index c0e4abb77ad1ae..cfcdd611963940 100644 --- a/src/sentry/integrations/slack/message_builder/notifications/__init__.py +++ b/src/sentry/integrations/slack/message_builder/notifications/__init__.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from .base import SlackNotificationsMessageBuilder from .daily_summary import SlackDailySummaryMessageBuilder diff --git a/src/sentry/integrations/slack/message_builder/notifications/base.py b/src/sentry/integrations/slack/message_builder/notifications/base.py index 973cea5d3a504e..b2924b84ed9818 100644 --- a/src/sentry/integrations/slack/message_builder/notifications/base.py +++ b/src/sentry/integrations/slack/message_builder/notifications/base.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any import orjson diff --git a/src/sentry/integrations/slack/message_builder/notifications/daily_summary.py b/src/sentry/integrations/slack/message_builder/notifications/daily_summary.py index bbb04047a05c5a..45f6bf7091f638 100644 --- a/src/sentry/integrations/slack/message_builder/notifications/daily_summary.py +++ b/src/sentry/integrations/slack/message_builder/notifications/daily_summary.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from urllib.parse import urlencode import orjson diff --git a/src/sentry/integrations/slack/message_builder/notifications/digest.py b/src/sentry/integrations/slack/message_builder/notifications/digest.py index 253cedfb08ff74..68570cbb27d968 100644 --- a/src/sentry/integrations/slack/message_builder/notifications/digest.py +++ b/src/sentry/integrations/slack/message_builder/notifications/digest.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.digests.notifications import Digest from sentry.digests.utils import get_groups diff --git a/src/sentry/integrations/slack/message_builder/notifications/issues.py b/src/sentry/integrations/slack/message_builder/notifications/issues.py index 5434a78a75c341..0002ffe6a51188 100644 --- a/src/sentry/integrations/slack/message_builder/notifications/issues.py +++ b/src/sentry/integrations/slack/message_builder/notifications/issues.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.integrations.slack.message_builder.issues import SlackIssuesMessageBuilder from sentry.integrations.slack.message_builder.types import SlackBlock diff --git a/src/sentry/integrations/slack/message_builder/prompt.py b/src/sentry/integrations/slack/message_builder/prompt.py index d7436dc21373ca..ee3ed086f8711b 100644 --- a/src/sentry/integrations/slack/message_builder/prompt.py +++ b/src/sentry/integrations/slack/message_builder/prompt.py @@ -1,3 +1,4 @@ +from typing import int import orjson from sentry.integrations.slack.message_builder.types import SlackBody diff --git a/src/sentry/integrations/slack/message_builder/routing.py b/src/sentry/integrations/slack/message_builder/routing.py index b8afed3a371af5..4b712d9ec7428d 100644 --- a/src/sentry/integrations/slack/message_builder/routing.py +++ b/src/sentry/integrations/slack/message_builder/routing.py @@ -1,3 +1,4 @@ +from typing import int import logging from dataclasses import dataclass diff --git a/src/sentry/integrations/slack/message_builder/types.py b/src/sentry/integrations/slack/message_builder/types.py index fe6867cd891c84..33264a005ba477 100644 --- a/src/sentry/integrations/slack/message_builder/types.py +++ b/src/sentry/integrations/slack/message_builder/types.py @@ -1,5 +1,5 @@ from enum import StrEnum -from typing import Any, Union +from typing import Any, Union, int from sentry.issues.grouptype import GroupCategory diff --git a/src/sentry/integrations/slack/message_builder/util.py b/src/sentry/integrations/slack/message_builder/util.py index 5e8c313568d8f1..428e2991ce5d84 100644 --- a/src/sentry/integrations/slack/message_builder/util.py +++ b/src/sentry/integrations/slack/message_builder/util.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from sentry import features diff --git a/src/sentry/integrations/slack/metrics.py b/src/sentry/integrations/slack/metrics.py index 6e45ab807a8aa5..b1ac48ae7b0fe6 100644 --- a/src/sentry/integrations/slack/metrics.py +++ b/src/sentry/integrations/slack/metrics.py @@ -1,5 +1,6 @@ # metrics constants +from typing import int from slack_sdk.errors import SlackApiError from sentry.integrations.slack.utils.errors import ( diff --git a/src/sentry/integrations/slack/notifications.py b/src/sentry/integrations/slack/notifications.py index bb5397ecf859a2..a434ec334ec27b 100644 --- a/src/sentry/integrations/slack/notifications.py +++ b/src/sentry/integrations/slack/notifications.py @@ -2,7 +2,7 @@ import logging from collections.abc import Iterable, Mapping -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/integrations/slack/requests/__init__.py b/src/sentry/integrations/slack/requests/__init__.py index 382ef48001f062..317a270e06a07e 100644 --- a/src/sentry/integrations/slack/requests/__init__.py +++ b/src/sentry/integrations/slack/requests/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ("SlackRequest", "SlackRequestError") from .base import SlackRequest, SlackRequestError diff --git a/src/sentry/integrations/slack/requests/action.py b/src/sentry/integrations/slack/requests/action.py index 73d6e095e310ee..efa3be0bb9b91e 100644 --- a/src/sentry/integrations/slack/requests/action.py +++ b/src/sentry/integrations/slack/requests/action.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any import orjson from django.utils.functional import cached_property diff --git a/src/sentry/integrations/slack/requests/base.py b/src/sentry/integrations/slack/requests/base.py index e8e41624f48411..6ab0698e4f0eed 100644 --- a/src/sentry/integrations/slack/requests/base.py +++ b/src/sentry/integrations/slack/requests/base.py @@ -3,7 +3,7 @@ import dataclasses import logging from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from rest_framework import status as status_ from rest_framework.request import Request diff --git a/src/sentry/integrations/slack/requests/command.py b/src/sentry/integrations/slack/requests/command.py index f0c752dace6c04..f4d0a3950aefe8 100644 --- a/src/sentry/integrations/slack/requests/command.py +++ b/src/sentry/integrations/slack/requests/command.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from urllib.parse import parse_qs from rest_framework import status diff --git a/src/sentry/integrations/slack/requests/event.py b/src/sentry/integrations/slack/requests/event.py index ba6c235df86864..b1f15769ce9f6d 100644 --- a/src/sentry/integrations/slack/requests/event.py +++ b/src/sentry/integrations/slack/requests/event.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.integrations.slack.requests.base import SlackDMRequest, SlackRequestError from sentry.integrations.slack.unfurl.handlers import match_link diff --git a/src/sentry/integrations/slack/requests/options_load.py b/src/sentry/integrations/slack/requests/options_load.py index 3e029987997a6b..3620c6d9cfaa6a 100644 --- a/src/sentry/integrations/slack/requests/options_load.py +++ b/src/sentry/integrations/slack/requests/options_load.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import orjson from rest_framework import status diff --git a/src/sentry/integrations/slack/sdk_client.py b/src/sentry/integrations/slack/sdk_client.py index 813c9dab27a685..e2ec13584ac13a 100644 --- a/src/sentry/integrations/slack/sdk_client.py +++ b/src/sentry/integrations/slack/sdk_client.py @@ -1,3 +1,4 @@ +from typing import int import logging from functools import wraps from types import FunctionType diff --git a/src/sentry/integrations/slack/service.py b/src/sentry/integrations/slack/service.py index ba2d1465ddab33..877d61d27cb9a2 100644 --- a/src/sentry/integrations/slack/service.py +++ b/src/sentry/integrations/slack/service.py @@ -3,7 +3,7 @@ from collections.abc import Generator, Mapping from copy import copy from logging import Logger, getLogger -from typing import Any +from typing import int, Any import orjson import sentry_sdk diff --git a/src/sentry/integrations/slack/spec.py b/src/sentry/integrations/slack/spec.py index 4ba44dfc233c39..8430c584c30d75 100644 --- a/src/sentry/integrations/slack/spec.py +++ b/src/sentry/integrations/slack/spec.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics from sentry.incidents.endpoints.serializers.alert_rule import AlertRuleSerializerResponse from sentry.incidents.endpoints.serializers.incident import DetailedIncidentSerializerResponse diff --git a/src/sentry/integrations/slack/tasks/__init__.py b/src/sentry/integrations/slack/tasks/__init__.py index 528e3e12bce24b..d4e67b29c604a9 100644 --- a/src/sentry/integrations/slack/tasks/__init__.py +++ b/src/sentry/integrations/slack/tasks/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .find_channel_id_for_alert_rule import find_channel_id_for_alert_rule from .find_channel_id_for_rule import find_channel_id_for_rule from .link_slack_user_identities import link_slack_user_identities diff --git a/src/sentry/integrations/slack/tasks/find_channel_id_for_alert_rule.py b/src/sentry/integrations/slack/tasks/find_channel_id_for_alert_rule.py index 9a3dbfb3462158..8ceff941d83e60 100644 --- a/src/sentry/integrations/slack/tasks/find_channel_id_for_alert_rule.py +++ b/src/sentry/integrations/slack/tasks/find_channel_id_for_alert_rule.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any, cast +from typing import Any, cast, int from rest_framework import serializers diff --git a/src/sentry/integrations/slack/tasks/find_channel_id_for_rule.py b/src/sentry/integrations/slack/tasks/find_channel_id_for_rule.py index 6a677c4b28f974..4a3bf36324cccb 100644 --- a/src/sentry/integrations/slack/tasks/find_channel_id_for_rule.py +++ b/src/sentry/integrations/slack/tasks/find_channel_id_for_rule.py @@ -1,6 +1,6 @@ import logging from collections.abc import Sequence -from typing import Any +from typing import int, Any from sentry.integrations.services.integration import integration_service from sentry.integrations.slack.utils.channel import ( diff --git a/src/sentry/integrations/slack/tasks/link_slack_user_identities.py b/src/sentry/integrations/slack/tasks/link_slack_user_identities.py index e58dcc4a9df8e6..7658a62c821632 100644 --- a/src/sentry/integrations/slack/tasks/link_slack_user_identities.py +++ b/src/sentry/integrations/slack/tasks/link_slack_user_identities.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Mapping diff --git a/src/sentry/integrations/slack/tasks/post_message.py b/src/sentry/integrations/slack/tasks/post_message.py index 01ad022a9aedf5..bb954356ab7e32 100644 --- a/src/sentry/integrations/slack/tasks/post_message.py +++ b/src/sentry/integrations/slack/tasks/post_message.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.integrations.slack.service import SlackService from sentry.silo.base import SiloMode diff --git a/src/sentry/integrations/slack/tasks/send_notifications_on_activity.py b/src/sentry/integrations/slack/tasks/send_notifications_on_activity.py index b058b62aba2cab..0bb785d46aea47 100644 --- a/src/sentry/integrations/slack/tasks/send_notifications_on_activity.py +++ b/src/sentry/integrations/slack/tasks/send_notifications_on_activity.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db import router, transaction diff --git a/src/sentry/integrations/slack/threads/activity_notifications.py b/src/sentry/integrations/slack/threads/activity_notifications.py index 10c1a04ec9ceb1..0322dbbb452559 100644 --- a/src/sentry/integrations/slack/threads/activity_notifications.py +++ b/src/sentry/integrations/slack/threads/activity_notifications.py @@ -1,6 +1,6 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.models.activity import Activity from sentry.notifications.notifications.activity.base import GroupActivityNotification diff --git a/src/sentry/integrations/slack/unfurl/discover.py b/src/sentry/integrations/slack/unfurl/discover.py index 8bb80b70983434..d885248e0cfb67 100644 --- a/src/sentry/integrations/slack/unfurl/discover.py +++ b/src/sentry/integrations/slack/unfurl/discover.py @@ -5,7 +5,7 @@ import re from collections.abc import Mapping from datetime import timedelta -from typing import Any +from typing import int, Any from urllib.parse import urlparse from django.http.request import QueryDict diff --git a/src/sentry/integrations/slack/unfurl/handlers.py b/src/sentry/integrations/slack/unfurl/handlers.py index 763fa78e6c471e..cc5ae536f3a249 100644 --- a/src/sentry/integrations/slack/unfurl/handlers.py +++ b/src/sentry/integrations/slack/unfurl/handlers.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.integrations.slack.unfurl.discover import discover_handler from sentry.integrations.slack.unfurl.issues import issues_handler diff --git a/src/sentry/integrations/slack/unfurl/issues.py b/src/sentry/integrations/slack/unfurl/issues.py index 092f9ce49120be..dc72d0d73ae5f0 100644 --- a/src/sentry/integrations/slack/unfurl/issues.py +++ b/src/sentry/integrations/slack/unfurl/issues.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import re diff --git a/src/sentry/integrations/slack/unfurl/metric_alerts.py b/src/sentry/integrations/slack/unfurl/metric_alerts.py index 7b9ac79e7c3a04..629a9fc54cad2e 100644 --- a/src/sentry/integrations/slack/unfurl/metric_alerts.py +++ b/src/sentry/integrations/slack/unfurl/metric_alerts.py @@ -3,7 +3,7 @@ import html import re from collections.abc import Mapping -from typing import Any +from typing import int, Any from urllib.parse import urlparse import sentry_sdk diff --git a/src/sentry/integrations/slack/unfurl/types.py b/src/sentry/integrations/slack/unfurl/types.py index 05944ea08acb2a..87918619246efe 100644 --- a/src/sentry/integrations/slack/unfurl/types.py +++ b/src/sentry/integrations/slack/unfurl/types.py @@ -3,7 +3,7 @@ import enum from collections.abc import Callable, Mapping from re import Pattern -from typing import Any, NamedTuple, Optional, Protocol +from typing import Any, NamedTuple, Optional, Protocol, int from sentry.integrations.models.integration import Integration from sentry.integrations.services.integration import RpcIntegration diff --git a/src/sentry/integrations/slack/urls.py b/src/sentry/integrations/slack/urls.py index 62807760de6b99..0db24f2a45e4f3 100644 --- a/src/sentry/integrations/slack/urls.py +++ b/src/sentry/integrations/slack/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from .spec import SlackMessagingSpec diff --git a/src/sentry/integrations/slack/utils/auth.py b/src/sentry/integrations/slack/utils/auth.py index 99f83f129b758c..ab91ee6998b09e 100644 --- a/src/sentry/integrations/slack/utils/auth.py +++ b/src/sentry/integrations/slack/utils/auth.py @@ -2,7 +2,7 @@ import time from datetime import datetime from hashlib import sha256 -from typing import TYPE_CHECKING, TypedDict +from typing import TYPE_CHECKING, TypedDict, int if TYPE_CHECKING: from sentry.models.organizationmember import OrganizationMember diff --git a/src/sentry/integrations/slack/utils/channel.py b/src/sentry/integrations/slack/utils/channel.py index 1393d2c2ce6f70..d0db778315c17d 100644 --- a/src/sentry/integrations/slack/utils/channel.py +++ b/src/sentry/integrations/slack/utils/channel.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import time diff --git a/src/sentry/integrations/slack/utils/constants.py b/src/sentry/integrations/slack/utils/constants.py index 4caecd8c9271b5..f088ddb32de08b 100644 --- a/src/sentry/integrations/slack/utils/constants.py +++ b/src/sentry/integrations/slack/utils/constants.py @@ -1 +1,2 @@ +from typing import int SLACK_RATE_LIMITED_MESSAGE = "Requests to Slack exceeded the rate limit. Please try again later." diff --git a/src/sentry/integrations/slack/utils/errors.py b/src/sentry/integrations/slack/utils/errors.py index 880407247f15e5..1bef8d28eb798d 100644 --- a/src/sentry/integrations/slack/utils/errors.py +++ b/src/sentry/integrations/slack/utils/errors.py @@ -1,3 +1,4 @@ +from typing import int import logging from dataclasses import dataclass diff --git a/src/sentry/integrations/slack/utils/escape.py b/src/sentry/integrations/slack/utils/escape.py index 6f3381829617b4..a78d3decc57e47 100644 --- a/src/sentry/integrations/slack/utils/escape.py +++ b/src/sentry/integrations/slack/utils/escape.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import re diff --git a/src/sentry/integrations/slack/utils/notifications.py b/src/sentry/integrations/slack/utils/notifications.py index 1e5a8952264e15..e9825b71166243 100644 --- a/src/sentry/integrations/slack/utils/notifications.py +++ b/src/sentry/integrations/slack/utils/notifications.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Callable diff --git a/src/sentry/integrations/slack/utils/rule_status.py b/src/sentry/integrations/slack/utils/rule_status.py index 0d1117892eb6eb..b2eb6a4ec71293 100644 --- a/src/sentry/integrations/slack/utils/rule_status.py +++ b/src/sentry/integrations/slack/utils/rule_status.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, Union, cast +from typing import Any, Union, cast, int from uuid import uuid4 import orjson diff --git a/src/sentry/integrations/slack/utils/threads.py b/src/sentry/integrations/slack/utils/threads.py index 0f91b63f22a7c1..ced78bd509d437 100644 --- a/src/sentry/integrations/slack/utils/threads.py +++ b/src/sentry/integrations/slack/utils/threads.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import datetime diff --git a/src/sentry/integrations/slack/utils/users.py b/src/sentry/integrations/slack/utils/users.py index 48bb8f91228ace..7bda289dacb252 100644 --- a/src/sentry/integrations/slack/utils/users.py +++ b/src/sentry/integrations/slack/utils/users.py @@ -3,7 +3,7 @@ import logging from collections.abc import Generator, Iterable, Mapping, MutableMapping from dataclasses import dataclass -from typing import Any +from typing import int, Any from slack_sdk.errors import SlackApiError diff --git a/src/sentry/integrations/slack/views/__init__.py b/src/sentry/integrations/slack/views/__init__.py index c1f991152b0e1c..61c91038109746 100644 --- a/src/sentry/integrations/slack/views/__init__.py +++ b/src/sentry/integrations/slack/views/__init__.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.http import HttpRequest, HttpResponse from django.urls import reverse diff --git a/src/sentry/integrations/slack/views/link_identity.py b/src/sentry/integrations/slack/views/link_identity.py index 429dfb66d65119..93fb88d1ecad0e 100644 --- a/src/sentry/integrations/slack/views/link_identity.py +++ b/src/sentry/integrations/slack/views/link_identity.py @@ -1,6 +1,6 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.integrations.messaging.linkage import LinkIdentityView from sentry.integrations.models.integration import Integration diff --git a/src/sentry/integrations/slack/views/link_team.py b/src/sentry/integrations/slack/views/link_team.py index 0b3d32658a28f9..044ab942cc118f 100644 --- a/src/sentry/integrations/slack/views/link_team.py +++ b/src/sentry/integrations/slack/views/link_team.py @@ -2,7 +2,7 @@ import logging from collections.abc import Sequence -from typing import Any +from typing import int, Any from django import forms from django.http import HttpRequest, HttpResponse diff --git a/src/sentry/integrations/slack/views/linkage.py b/src/sentry/integrations/slack/views/linkage.py index 810072127a811d..3dd90457b6eb48 100644 --- a/src/sentry/integrations/slack/views/linkage.py +++ b/src/sentry/integrations/slack/views/linkage.py @@ -1,6 +1,6 @@ from abc import ABC, abstractmethod from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.integrations.messaging.linkage import IdentityLinkageView, LinkageView from sentry.integrations.messaging.spec import MessagingIntegrationSpec diff --git a/src/sentry/integrations/slack/views/unlink_identity.py b/src/sentry/integrations/slack/views/unlink_identity.py index 3af8501fc4ac39..15547adaed3902 100644 --- a/src/sentry/integrations/slack/views/unlink_identity.py +++ b/src/sentry/integrations/slack/views/unlink_identity.py @@ -1,6 +1,6 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.integrations.messaging.linkage import UnlinkIdentityView from sentry.integrations.models.integration import Integration diff --git a/src/sentry/integrations/slack/views/unlink_team.py b/src/sentry/integrations/slack/views/unlink_team.py index a250d999f88cc7..5d55d86bbfd6fd 100644 --- a/src/sentry/integrations/slack/views/unlink_team.py +++ b/src/sentry/integrations/slack/views/unlink_team.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.api.utils import generate_region_url diff --git a/src/sentry/integrations/slack/webhooks/action.py b/src/sentry/integrations/slack/webhooks/action.py index 18c124bb973f4f..e66005cacc9824 100644 --- a/src/sentry/integrations/slack/webhooks/action.py +++ b/src/sentry/integrations/slack/webhooks/action.py @@ -3,7 +3,7 @@ import logging from abc import ABC, abstractmethod from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any import orjson import requests as requests_ diff --git a/src/sentry/integrations/slack/webhooks/base.py b/src/sentry/integrations/slack/webhooks/base.py index 32b616c3eac6ae..aa7b4eb2ee148b 100644 --- a/src/sentry/integrations/slack/webhooks/base.py +++ b/src/sentry/integrations/slack/webhooks/base.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import abc import logging diff --git a/src/sentry/integrations/slack/webhooks/command.py b/src/sentry/integrations/slack/webhooks/command.py index 548ecbed99263a..3a690234a932b5 100644 --- a/src/sentry/integrations/slack/webhooks/command.py +++ b/src/sentry/integrations/slack/webhooks/command.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/integrations/slack/webhooks/event.py b/src/sentry/integrations/slack/webhooks/event.py index 65fac6eaa09801..b455112e516a7e 100644 --- a/src/sentry/integrations/slack/webhooks/event.py +++ b/src/sentry/integrations/slack/webhooks/event.py @@ -3,7 +3,7 @@ import logging from collections import defaultdict from collections.abc import Mapping -from typing import Any +from typing import int, Any import orjson import sentry_sdk diff --git a/src/sentry/integrations/slack/webhooks/options_load.py b/src/sentry/integrations/slack/webhooks/options_load.py index 402df201337131..ad507dda944d40 100644 --- a/src/sentry/integrations/slack/webhooks/options_load.py +++ b/src/sentry/integrations/slack/webhooks/options_load.py @@ -3,7 +3,7 @@ import logging import re from collections.abc import Mapping, Sequence -from typing import Any, TypedDict +from typing import Any, TypedDict, int import orjson from rest_framework import status diff --git a/src/sentry/integrations/source_code_management/commit_context.py b/src/sentry/integrations/source_code_management/commit_context.py index 7d17c5313813e7..46ded1e43a222a 100644 --- a/src/sentry/integrations/source_code_management/commit_context.py +++ b/src/sentry/integrations/source_code_management/commit_context.py @@ -5,7 +5,7 @@ from collections.abc import Sequence from dataclasses import dataclass from datetime import datetime, timedelta, timezone -from typing import Any +from typing import int, Any import sentry_sdk from django.db import connection diff --git a/src/sentry/integrations/source_code_management/constants.py b/src/sentry/integrations/source_code_management/constants.py index c5611dccd57f88..ee60b6b65875a0 100644 --- a/src/sentry/integrations/source_code_management/constants.py +++ b/src/sentry/integrations/source_code_management/constants.py @@ -1,2 +1,3 @@ # Number of stackframes to check for filename + function combo, starting from the top +from typing import int STACKFRAME_COUNT = 4 diff --git a/src/sentry/integrations/source_code_management/issues.py b/src/sentry/integrations/source_code_management/issues.py index da4690b3c8f2e3..9a45191c395b92 100644 --- a/src/sentry/integrations/source_code_management/issues.py +++ b/src/sentry/integrations/source_code_management/issues.py @@ -2,7 +2,7 @@ from abc import ABC from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.integrations.mixins.issues import IssueBasicIntegration from sentry.integrations.source_code_management.metrics import ( diff --git a/src/sentry/integrations/source_code_management/metrics.py b/src/sentry/integrations/source_code_management/metrics.py index aafe9948c09d5d..63b70288c4abed 100644 --- a/src/sentry/integrations/source_code_management/metrics.py +++ b/src/sentry/integrations/source_code_management/metrics.py @@ -1,6 +1,6 @@ from collections.abc import Mapping from enum import StrEnum -from typing import Any +from typing import int, Any from attr import dataclass diff --git a/src/sentry/integrations/source_code_management/repo_trees.py b/src/sentry/integrations/source_code_management/repo_trees.py index 5f80ad293cdbbb..441409f6f39acf 100644 --- a/src/sentry/integrations/source_code_management/repo_trees.py +++ b/src/sentry/integrations/source_code_management/repo_trees.py @@ -3,7 +3,7 @@ import logging from abc import ABC, abstractmethod from collections.abc import Sequence -from typing import Any, NamedTuple +from typing import Any, NamedTuple, int from sentry.integrations.services.integration import RpcOrganizationIntegration from sentry.issues.auto_source_code_config.utils.platform import get_supported_extensions diff --git a/src/sentry/integrations/source_code_management/repository.py b/src/sentry/integrations/source_code_management/repository.py index edcaccf3d22304..542584510006af 100644 --- a/src/sentry/integrations/source_code_management/repository.py +++ b/src/sentry/integrations/source_code_management/repository.py @@ -2,7 +2,7 @@ from abc import ABC, abstractmethod from collections.abc import Mapping -from typing import Any +from typing import int, Any from urllib.parse import quote as urlquote from urllib.parse import unquote, urlparse, urlunparse diff --git a/src/sentry/integrations/source_code_management/search.py b/src/sentry/integrations/source_code_management/search.py index d89a3114a6555f..2b1eb500ac8076 100644 --- a/src/sentry/integrations/source_code_management/search.py +++ b/src/sentry/integrations/source_code_management/search.py @@ -1,5 +1,5 @@ from abc import ABC, abstractmethod -from typing import Any, Generic, TypeVar +from typing import Any, Generic, TypeVar, int from django.db.models import Q from rest_framework import serializers diff --git a/src/sentry/integrations/source_code_management/status_check.py b/src/sentry/integrations/source_code_management/status_check.py index 633122bf06a6ea..791abc6846767c 100644 --- a/src/sentry/integrations/source_code_management/status_check.py +++ b/src/sentry/integrations/source_code_management/status_check.py @@ -1,6 +1,6 @@ import enum from abc import ABC, abstractmethod -from typing import Any +from typing import int, Any class StatusCheckStatus(str, enum.Enum): diff --git a/src/sentry/integrations/source_code_management/tasks.py b/src/sentry/integrations/source_code_management/tasks.py index 118ceee1df93b0..9baf7d57e6789e 100644 --- a/src/sentry/integrations/source_code_management/tasks.py +++ b/src/sentry/integrations/source_code_management/tasks.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.constants import ObjectStatus diff --git a/src/sentry/integrations/source_code_management/webhook.py b/src/sentry/integrations/source_code_management/webhook.py index 4bd7eae35bdc12..99829c9b14f84e 100644 --- a/src/sentry/integrations/source_code_management/webhook.py +++ b/src/sentry/integrations/source_code_management/webhook.py @@ -1,6 +1,6 @@ from abc import ABC, abstractmethod from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.integrations.utils.metrics import IntegrationWebhookEventType from sentry.models.repository import Repository diff --git a/src/sentry/integrations/tasks/__init__.py b/src/sentry/integrations/tasks/__init__.py index aeb20a23e60beb..54b1ff14819df3 100644 --- a/src/sentry/integrations/tasks/__init__.py +++ b/src/sentry/integrations/tasks/__init__.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry import features diff --git a/src/sentry/integrations/tasks/create_comment.py b/src/sentry/integrations/tasks/create_comment.py index 545d8d9b31a0f0..88ebceb9df5708 100644 --- a/src/sentry/integrations/tasks/create_comment.py +++ b/src/sentry/integrations/tasks/create_comment.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics from sentry.integrations.analytics import IntegrationIssueCommentsSyncedEvent from sentry.integrations.models.external_issue import ExternalIssue diff --git a/src/sentry/integrations/tasks/kick_off_status_syncs.py b/src/sentry/integrations/tasks/kick_off_status_syncs.py index c84fb5b9f7b65f..8268d501112ccd 100644 --- a/src/sentry/integrations/tasks/kick_off_status_syncs.py +++ b/src/sentry/integrations/tasks/kick_off_status_syncs.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.grouplink import GroupLink from sentry.silo.base import SiloMode from sentry.tasks.base import instrumented_task, retry, track_group_async_operation diff --git a/src/sentry/integrations/tasks/migrate_repo.py b/src/sentry/integrations/tasks/migrate_repo.py index fa5771faf6b520..2d1aa4ee4a4b76 100644 --- a/src/sentry/integrations/tasks/migrate_repo.py +++ b/src/sentry/integrations/tasks/migrate_repo.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import ObjectStatus from sentry.integrations.models.integration import Integration from sentry.integrations.services.integration import integration_service diff --git a/src/sentry/integrations/tasks/sync_assignee_outbound.py b/src/sentry/integrations/tasks/sync_assignee_outbound.py index 97f57775ca7b27..fbee321ad5c6af 100644 --- a/src/sentry/integrations/tasks/sync_assignee_outbound.py +++ b/src/sentry/integrations/tasks/sync_assignee_outbound.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry import analytics, features from sentry.constants import ObjectStatus diff --git a/src/sentry/integrations/tasks/sync_status_inbound.py b/src/sentry/integrations/tasks/sync_status_inbound.py index 7b117b74a6ab31..e79265791826a3 100644 --- a/src/sentry/integrations/tasks/sync_status_inbound.py +++ b/src/sentry/integrations/tasks/sync_status_inbound.py @@ -1,7 +1,7 @@ import logging from collections.abc import Iterable, Mapping from datetime import timedelta -from typing import Any +from typing import int, Any import sentry_sdk from django.db.models import Q diff --git a/src/sentry/integrations/tasks/sync_status_outbound.py b/src/sentry/integrations/tasks/sync_status_outbound.py index e29bb474d64bca..d788dd3b13e683 100644 --- a/src/sentry/integrations/tasks/sync_status_outbound.py +++ b/src/sentry/integrations/tasks/sync_status_outbound.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics, features from sentry.constants import ObjectStatus from sentry.exceptions import InvalidIdentity diff --git a/src/sentry/integrations/tasks/update_comment.py b/src/sentry/integrations/tasks/update_comment.py index b25ba8836855b3..b3563f8b683185 100644 --- a/src/sentry/integrations/tasks/update_comment.py +++ b/src/sentry/integrations/tasks/update_comment.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics from sentry.integrations.analytics import IntegrationIssueCommentsSyncedEvent from sentry.integrations.models.external_issue import ExternalIssue diff --git a/src/sentry/integrations/time_utils.py b/src/sentry/integrations/time_utils.py index 410817c85c987a..649889828a27b3 100644 --- a/src/sentry/integrations/time_utils.py +++ b/src/sentry/integrations/time_utils.py @@ -1,3 +1,4 @@ +from typing import int import time from collections.abc import Mapping from datetime import date, datetime, timedelta diff --git a/src/sentry/integrations/types.py b/src/sentry/integrations/types.py index 90b5a249bf1bf2..25e0e185e80e83 100644 --- a/src/sentry/integrations/types.py +++ b/src/sentry/integrations/types.py @@ -1,6 +1,6 @@ from dataclasses import dataclass from enum import Enum, StrEnum -from typing import Generic, TypeVar +from typing import Generic, TypeVar, int from sentry.hybridcloud.rpc import ValueEqualityEnum diff --git a/src/sentry/integrations/utils/atlassian_connect.py b/src/sentry/integrations/utils/atlassian_connect.py index 509191f1e22856..0847034f9c42d8 100644 --- a/src/sentry/integrations/utils/atlassian_connect.py +++ b/src/sentry/integrations/utils/atlassian_connect.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import hashlib from collections.abc import Mapping, Sequence diff --git a/src/sentry/integrations/utils/codecov.py b/src/sentry/integrations/utils/codecov.py index 597423b1385ece..c99112358d57a4 100644 --- a/src/sentry/integrations/utils/codecov.py +++ b/src/sentry/integrations/utils/codecov.py @@ -3,7 +3,7 @@ import logging from collections.abc import Sequence from enum import Enum -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int import requests from rest_framework import status diff --git a/src/sentry/integrations/utils/commit_context.py b/src/sentry/integrations/utils/commit_context.py index c1366cce36fe2f..c1d2c635d4a08f 100644 --- a/src/sentry/integrations/utils/commit_context.py +++ b/src/sentry/integrations/utils/commit_context.py @@ -4,7 +4,7 @@ from collections.abc import Mapping, Sequence from dataclasses import asdict from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from django.utils.datastructures import OrderedSet diff --git a/src/sentry/integrations/utils/common.py b/src/sentry/integrations/utils/common.py index c80f6dcf977397..0e00ffc9ab75ec 100644 --- a/src/sentry/integrations/utils/common.py +++ b/src/sentry/integrations/utils/common.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.constants import ObjectStatus diff --git a/src/sentry/integrations/utils/identities.py b/src/sentry/integrations/utils/identities.py index e42eb8e09434c7..2e0a7f11a0a54f 100644 --- a/src/sentry/integrations/utils/identities.py +++ b/src/sentry/integrations/utils/identities.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Iterable, Mapping diff --git a/src/sentry/integrations/utils/issue_summary_for_alerts.py b/src/sentry/integrations/utils/issue_summary_for_alerts.py index 36623b8a9d860e..182c22edf4c53b 100644 --- a/src/sentry/integrations/utils/issue_summary_for_alerts.py +++ b/src/sentry/integrations/utils/issue_summary_for_alerts.py @@ -1,6 +1,6 @@ import concurrent.futures import logging -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/integrations/utils/metrics.py b/src/sentry/integrations/utils/metrics.py index a760405737c786..65e2ce931a88a5 100644 --- a/src/sentry/integrations/utils/metrics.py +++ b/src/sentry/integrations/utils/metrics.py @@ -5,7 +5,7 @@ from dataclasses import dataclass from enum import StrEnum from types import TracebackType -from typing import Any, Self +from typing import Any, Self, int import sentry_sdk diff --git a/src/sentry/integrations/utils/providers.py b/src/sentry/integrations/utils/providers.py index 682d4e6c59ec69..cad586f2f136b9 100644 --- a/src/sentry/integrations/utils/providers.py +++ b/src/sentry/integrations/utils/providers.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from sentry.integrations.errors import InvalidProviderException diff --git a/src/sentry/integrations/utils/scope.py b/src/sentry/integrations/utils/scope.py index efccbe0f2fb44d..4ea5764c9827f7 100644 --- a/src/sentry/integrations/utils/scope.py +++ b/src/sentry/integrations/utils/scope.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/integrations/utils/stacktrace_link.py b/src/sentry/integrations/utils/stacktrace_link.py index b31d3e0870dd42..909b5f9a1f0e43 100644 --- a/src/sentry/integrations/utils/stacktrace_link.py +++ b/src/sentry/integrations/utils/stacktrace_link.py @@ -2,7 +2,7 @@ import logging from collections.abc import Sequence -from typing import TYPE_CHECKING, NotRequired, TypedDict +from typing import TYPE_CHECKING, NotRequired, TypedDict, int from sentry.constants import ObjectStatus from sentry.integrations.models.repository_project_path_config import RepositoryProjectPathConfig diff --git a/src/sentry/integrations/utils/sync.py b/src/sentry/integrations/utils/sync.py index 0a44d1559c64c0..d597f5867eb6fe 100644 --- a/src/sentry/integrations/utils/sync.py +++ b/src/sentry/integrations/utils/sync.py @@ -2,7 +2,7 @@ import logging from enum import StrEnum -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from django.db.models.query import QuerySet diff --git a/src/sentry/integrations/vercel/__init__.py b/src/sentry/integrations/vercel/__init__.py index 0b30d278b0af87..de26d24dcd6e2a 100644 --- a/src/sentry/integrations/vercel/__init__.py +++ b/src/sentry/integrations/vercel/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .client import * # noqa: F401,F403 from .integration import * # noqa: F401,F403 from .urls import * # noqa: F401,F403 diff --git a/src/sentry/integrations/vercel/client.py b/src/sentry/integrations/vercel/client.py index e9d1b6137a7e72..3d2156ba1f7d3e 100644 --- a/src/sentry/integrations/vercel/client.py +++ b/src/sentry/integrations/vercel/client.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int from sentry.integrations.client import ApiClient from sentry.shared_integrations.exceptions import ApiError diff --git a/src/sentry/integrations/vercel/integration.py b/src/sentry/integrations/vercel/integration.py index 7a7a5a99c2077a..15acda4ac710e5 100644 --- a/src/sentry/integrations/vercel/integration.py +++ b/src/sentry/integrations/vercel/integration.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping, Sequence -from typing import Any, TypedDict +from typing import Any, TypedDict, int from urllib.parse import urlencode import sentry_sdk diff --git a/src/sentry/integrations/vercel/urls.py b/src/sentry/integrations/vercel/urls.py index d15cd0d95342b4..9ddd2c61368e7a 100644 --- a/src/sentry/integrations/vercel/urls.py +++ b/src/sentry/integrations/vercel/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from sentry.integrations.web.vercel_extension_configuration import VercelExtensionConfigurationView diff --git a/src/sentry/integrations/vercel/webhook.py b/src/sentry/integrations/vercel/webhook.py index f2ff40ce465499..ddf1f33be5cc46 100644 --- a/src/sentry/integrations/vercel/webhook.py +++ b/src/sentry/integrations/vercel/webhook.py @@ -4,7 +4,7 @@ import hmac import logging from collections.abc import Mapping -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.http.request import HttpRequest from django.http.response import HttpResponseBase diff --git a/src/sentry/integrations/vsts/__init__.py b/src/sentry/integrations/vsts/__init__.py index c7ff63aa1b8ea6..6086eb9c6baa87 100644 --- a/src/sentry/integrations/vsts/__init__.py +++ b/src/sentry/integrations/vsts/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules import rules from .actions.create_ticket import * # noqa: F401,F403 diff --git a/src/sentry/integrations/vsts/actions/__init__.py b/src/sentry/integrations/vsts/actions/__init__.py index 7a69ca2d825ad1..917d9aa2e8d630 100644 --- a/src/sentry/integrations/vsts/actions/__init__.py +++ b/src/sentry/integrations/vsts/actions/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .create_ticket import AzureDevopsCreateTicketAction __all__ = ("AzureDevopsCreateTicketAction",) diff --git a/src/sentry/integrations/vsts/actions/create_ticket.py b/src/sentry/integrations/vsts/actions/create_ticket.py index 0e889b47971220..b85c262a18678d 100644 --- a/src/sentry/integrations/vsts/actions/create_ticket.py +++ b/src/sentry/integrations/vsts/actions/create_ticket.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.integrations.types import IntegrationProviderSlug diff --git a/src/sentry/integrations/vsts/client.py b/src/sentry/integrations/vsts/client.py index 0ae9719614d1c0..df0fce5582bfb1 100644 --- a/src/sentry/integrations/vsts/client.py +++ b/src/sentry/integrations/vsts/client.py @@ -2,7 +2,7 @@ from collections.abc import Mapping, Sequence from time import time -from typing import TYPE_CHECKING, Any, Union +from typing import TYPE_CHECKING, Any, Union, int from urllib.parse import quote from requests import PreparedRequest diff --git a/src/sentry/integrations/vsts/handlers/__init__.py b/src/sentry/integrations/vsts/handlers/__init__.py index d567a050d2c64f..5100fd2dfdb4db 100644 --- a/src/sentry/integrations/vsts/handlers/__init__.py +++ b/src/sentry/integrations/vsts/handlers/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["AzureDevopsActionHandler"] from .azure_devops_handler import AzureDevopsActionHandler diff --git a/src/sentry/integrations/vsts/handlers/azure_devops_handler.py b/src/sentry/integrations/vsts/handlers/azure_devops_handler.py index 1da0f2052459e9..3dff8771181f3f 100644 --- a/src/sentry/integrations/vsts/handlers/azure_devops_handler.py +++ b/src/sentry/integrations/vsts/handlers/azure_devops_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.types import IntegrationProviderSlug from sentry.notifications.notification_action.action_handler_registry.base import ( TicketingActionHandler, diff --git a/src/sentry/integrations/vsts/integration.py b/src/sentry/integrations/vsts/integration.py index 91b8d9012bbe4c..2f5038618256fc 100644 --- a/src/sentry/integrations/vsts/integration.py +++ b/src/sentry/integrations/vsts/integration.py @@ -4,7 +4,7 @@ import re from collections.abc import Mapping, MutableMapping, Sequence from time import time -from typing import Any +from typing import int, Any from urllib.parse import parse_qs, quote, unquote, urlencode, urlparse from django import forms diff --git a/src/sentry/integrations/vsts/issues.py b/src/sentry/integrations/vsts/issues.py index 4cd52b90c33706..1af1492c1f41b4 100644 --- a/src/sentry/integrations/vsts/issues.py +++ b/src/sentry/integrations/vsts/issues.py @@ -2,7 +2,7 @@ from abc import ABC from collections.abc import Mapping, MutableMapping, Sequence -from typing import TYPE_CHECKING, Any, NoReturn +from typing import TYPE_CHECKING, Any, NoReturn, int from django.urls import reverse from django.utils.translation import gettext as _ diff --git a/src/sentry/integrations/vsts/repository.py b/src/sentry/integrations/vsts/repository.py index f9a9b74007acfa..1f22f790f95023 100644 --- a/src/sentry/integrations/vsts/repository.py +++ b/src/sentry/integrations/vsts/repository.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from sentry.integrations.types import IntegrationProviderSlug from sentry.models.organization import Organization diff --git a/src/sentry/integrations/vsts/search.py b/src/sentry/integrations/vsts/search.py index 1677fdc5538b6b..03069319274597 100644 --- a/src/sentry/integrations/vsts/search.py +++ b/src/sentry/integrations/vsts/search.py @@ -1,4 +1,4 @@ -from typing import TypeVar +from typing import int, TypeVar from rest_framework.response import Response diff --git a/src/sentry/integrations/vsts/tasks/__init__.py b/src/sentry/integrations/vsts/tasks/__init__.py index b7ab784133214a..d3e16a9423c3c0 100644 --- a/src/sentry/integrations/vsts/tasks/__init__.py +++ b/src/sentry/integrations/vsts/tasks/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .kickoff_subscription_check import kickoff_vsts_subscription_check from .subscription_check import vsts_subscription_check diff --git a/src/sentry/integrations/vsts/tasks/kickoff_subscription_check.py b/src/sentry/integrations/vsts/tasks/kickoff_subscription_check.py index 8f1532dd402b11..6c04062a58b657 100644 --- a/src/sentry/integrations/vsts/tasks/kickoff_subscription_check.py +++ b/src/sentry/integrations/vsts/tasks/kickoff_subscription_check.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from time import time diff --git a/src/sentry/integrations/vsts/tasks/subscription_check.py b/src/sentry/integrations/vsts/tasks/subscription_check.py index 8be4eb9de8e6cd..cb5cfb70707a20 100644 --- a/src/sentry/integrations/vsts/tasks/subscription_check.py +++ b/src/sentry/integrations/vsts/tasks/subscription_check.py @@ -1,3 +1,4 @@ +from typing import int from time import time from django.core.exceptions import ObjectDoesNotExist diff --git a/src/sentry/integrations/vsts/urls.py b/src/sentry/integrations/vsts/urls.py index 23d31aa9e5dddd..3e7ec351de22ac 100644 --- a/src/sentry/integrations/vsts/urls.py +++ b/src/sentry/integrations/vsts/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from sentry.integrations.web.vsts_extension_configuration import VstsExtensionConfigurationView diff --git a/src/sentry/integrations/vsts/webhooks.py b/src/sentry/integrations/vsts/webhooks.py index 9b5d3bce95f325..bd0e908c1f6ac4 100644 --- a/src/sentry/integrations/vsts/webhooks.py +++ b/src/sentry/integrations/vsts/webhooks.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.utils.crypto import constant_time_compare from rest_framework import status diff --git a/src/sentry/integrations/vsts_extension/__init__.py b/src/sentry/integrations/vsts_extension/__init__.py index a61de25dc883c1..22e9e227b589cd 100644 --- a/src/sentry/integrations/vsts_extension/__init__.py +++ b/src/sentry/integrations/vsts_extension/__init__.py @@ -1 +1,2 @@ +from typing import int from .integration import * # noqa: F401,F403 diff --git a/src/sentry/integrations/vsts_extension/integration.py b/src/sentry/integrations/vsts_extension/integration.py index a87ca3320b79de..48c793f6c94ab1 100644 --- a/src/sentry/integrations/vsts_extension/integration.py +++ b/src/sentry/integrations/vsts_extension/integration.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from django.contrib import messages from django.http import HttpResponseRedirect diff --git a/src/sentry/integrations/web/discord_extension_configuration.py b/src/sentry/integrations/web/discord_extension_configuration.py index 73a4a8ec64ba3a..ab9be05179321f 100644 --- a/src/sentry/integrations/web/discord_extension_configuration.py +++ b/src/sentry/integrations/web/discord_extension_configuration.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.types import IntegrationProviderSlug from .integration_extension_configuration import IntegrationExtensionConfigurationView diff --git a/src/sentry/integrations/web/doc_integration_avatar.py b/src/sentry/integrations/web/doc_integration_avatar.py index bf8126fe2653b0..af0411f1252b02 100644 --- a/src/sentry/integrations/web/doc_integration_avatar.py +++ b/src/sentry/integrations/web/doc_integration_avatar.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.models.doc_integration_avatar import DocIntegrationAvatar from sentry.web.frontend.base import AvatarPhotoView, control_silo_view diff --git a/src/sentry/integrations/web/integration_extension_configuration.py b/src/sentry/integrations/web/integration_extension_configuration.py index ed4a73d7a6d892..cf528caf6a16e6 100644 --- a/src/sentry/integrations/web/integration_extension_configuration.py +++ b/src/sentry/integrations/web/integration_extension_configuration.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.conf import settings diff --git a/src/sentry/integrations/web/msteams_extension_configuration.py b/src/sentry/integrations/web/msteams_extension_configuration.py index e288af6d2abb3f..38a65e4a6b7eee 100644 --- a/src/sentry/integrations/web/msteams_extension_configuration.py +++ b/src/sentry/integrations/web/msteams_extension_configuration.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.msteams.constants import SALT from sentry.integrations.types import IntegrationProviderSlug from sentry.integrations.web.integration_extension_configuration import ( diff --git a/src/sentry/integrations/web/organization_integration_setup.py b/src/sentry/integrations/web/organization_integration_setup.py index 2b583a22ae2b2e..1359e5765c8ca0 100644 --- a/src/sentry/integrations/web/organization_integration_setup.py +++ b/src/sentry/integrations/web/organization_integration_setup.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/integrations/web/vercel_extension_configuration.py b/src/sentry/integrations/web/vercel_extension_configuration.py index 3c2be960fdb759..28a73adeeae5cd 100644 --- a/src/sentry/integrations/web/vercel_extension_configuration.py +++ b/src/sentry/integrations/web/vercel_extension_configuration.py @@ -1,3 +1,4 @@ +from typing import int from .integration_extension_configuration import IntegrationExtensionConfigurationView diff --git a/src/sentry/integrations/web/vsts_extension_configuration.py b/src/sentry/integrations/web/vsts_extension_configuration.py index 2a0592ffe7c0cc..f79144e9dbd653 100644 --- a/src/sentry/integrations/web/vsts_extension_configuration.py +++ b/src/sentry/integrations/web/vsts_extension_configuration.py @@ -1,3 +1,4 @@ +from typing import int import re from sentry.integrations.types import IntegrationProviderSlug diff --git a/src/sentry/interfaces/base.py b/src/sentry/interfaces/base.py index 4ef7db9de1539c..e4cdfa623ce832 100644 --- a/src/sentry/interfaces/base.py +++ b/src/sentry/interfaces/base.py @@ -3,7 +3,7 @@ import logging from collections.abc import Mapping from html import escape -from typing import Any, ClassVar, Self +from typing import Any, ClassVar, Self, int from django.conf import settings from django.utils.functional import classproperty diff --git a/src/sentry/interfaces/breadcrumbs.py b/src/sentry/interfaces/breadcrumbs.py index 5691dbc5da9db3..a167fca9603495 100644 --- a/src/sentry/interfaces/breadcrumbs.py +++ b/src/sentry/interfaces/breadcrumbs.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ("Breadcrumbs",) from sentry.interfaces.base import Interface diff --git a/src/sentry/interfaces/contexts.py b/src/sentry/interfaces/contexts.py index 5993f43fef755a..e66fadd90dd382 100644 --- a/src/sentry/interfaces/contexts.py +++ b/src/sentry/interfaces/contexts.py @@ -1,7 +1,7 @@ from __future__ import annotations import string -from typing import Any, ClassVar, TypeVar +from typing import Any, ClassVar, TypeVar, int import sentry_sdk from django.utils.encoding import force_str diff --git a/src/sentry/interfaces/debug_meta.py b/src/sentry/interfaces/debug_meta.py index 75af28ef9bb1f3..f0e64e72883027 100644 --- a/src/sentry/interfaces/debug_meta.py +++ b/src/sentry/interfaces/debug_meta.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ("DebugMeta",) from sentry.interfaces.base import Interface diff --git a/src/sentry/interfaces/exception.py b/src/sentry/interfaces/exception.py index ecca0aa6b098ba..b003ce488450ba 100644 --- a/src/sentry/interfaces/exception.py +++ b/src/sentry/interfaces/exception.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.interfaces.base import Interface from sentry.interfaces.stacktrace import Stacktrace diff --git a/src/sentry/interfaces/geo.py b/src/sentry/interfaces/geo.py index 3eda2edbf1ba82..5c70a694dcec50 100644 --- a/src/sentry/interfaces/geo.py +++ b/src/sentry/interfaces/geo.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ("Geo",) from sentry.interfaces.base import Interface diff --git a/src/sentry/interfaces/http.py b/src/sentry/interfaces/http.py index cbbc73fb2d14c6..65ed0c8bfcfbe0 100644 --- a/src/sentry/interfaces/http.py +++ b/src/sentry/interfaces/http.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ("Http",) from urllib.parse import parse_qsl diff --git a/src/sentry/interfaces/message.py b/src/sentry/interfaces/message.py index 2a838149eb620e..6a6b2b57387293 100644 --- a/src/sentry/interfaces/message.py +++ b/src/sentry/interfaces/message.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ("Message",) import orjson diff --git a/src/sentry/interfaces/nel.py b/src/sentry/interfaces/nel.py index 6a386b93727567..b316de0721af12 100644 --- a/src/sentry/interfaces/nel.py +++ b/src/sentry/interfaces/nel.py @@ -1,3 +1,4 @@ +from typing import int __all__ = "Nel" from sentry.interfaces.base import Interface diff --git a/src/sentry/interfaces/sdk.py b/src/sentry/interfaces/sdk.py index d806541a0c9255..41e7fdd2c2cac6 100644 --- a/src/sentry/interfaces/sdk.py +++ b/src/sentry/interfaces/sdk.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ("Sdk",) from sentry.interfaces.base import Interface diff --git a/src/sentry/interfaces/security.py b/src/sentry/interfaces/security.py index a5fb8b7017500c..60ca08ebe6ec57 100644 --- a/src/sentry/interfaces/security.py +++ b/src/sentry/interfaces/security.py @@ -1,3 +1,4 @@ +from typing import int import orjson from django.utils.functional import cached_property diff --git a/src/sentry/interfaces/spans.py b/src/sentry/interfaces/spans.py index e290efceebba10..8f3c81d9e6ba53 100644 --- a/src/sentry/interfaces/spans.py +++ b/src/sentry/interfaces/spans.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ("Spans", "Span") from sentry.interfaces.base import Interface diff --git a/src/sentry/interfaces/stacktrace.py b/src/sentry/interfaces/stacktrace.py index 955e2076e3ad7a..0d38bf21be742e 100644 --- a/src/sentry/interfaces/stacktrace.py +++ b/src/sentry/interfaces/stacktrace.py @@ -1,3 +1,4 @@ +from typing import int import math from enum import Enum diff --git a/src/sentry/interfaces/template.py b/src/sentry/interfaces/template.py index ab2a5ca6a36680..f1eb2df98176cf 100644 --- a/src/sentry/interfaces/template.py +++ b/src/sentry/interfaces/template.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ("Template",) from sentry.interfaces.base import Interface diff --git a/src/sentry/interfaces/threads.py b/src/sentry/interfaces/threads.py index 873a005ed2db73..4105bb0bb62517 100644 --- a/src/sentry/interfaces/threads.py +++ b/src/sentry/interfaces/threads.py @@ -1,3 +1,4 @@ +from typing import int from sentry.interfaces.base import Interface from sentry.interfaces.stacktrace import Stacktrace from sentry.utils.json import prune_empty_keys diff --git a/src/sentry/interfaces/user.py b/src/sentry/interfaces/user.py index e48ae9361e494b..6794385bfb0a94 100644 --- a/src/sentry/interfaces/user.py +++ b/src/sentry/interfaces/user.py @@ -1,7 +1,7 @@ __all__ = ("User",) -from typing import Any, TypedDict +from typing import Any, TypedDict, int from sentry.interfaces.base import Interface from sentry.interfaces.geo import Geo diff --git a/src/sentry/issue_detection/base.py b/src/sentry/issue_detection/base.py index c66bc19933fc53..f65c9f82f8889a 100644 --- a/src/sentry/issue_detection/base.py +++ b/src/sentry/issue_detection/base.py @@ -4,7 +4,7 @@ from abc import ABC, abstractmethod from datetime import timedelta from enum import Enum -from typing import Any, ClassVar +from typing import Any, ClassVar, int from sentry import options from sentry.issue_detection.detectors.utils import get_span_duration diff --git a/src/sentry/issue_detection/detectors/consecutive_db_detector.py b/src/sentry/issue_detection/detectors/consecutive_db_detector.py index 45b100198ccfb4..9f8bf1ebf66b57 100644 --- a/src/sentry/issue_detection/detectors/consecutive_db_detector.py +++ b/src/sentry/issue_detection/detectors/consecutive_db_detector.py @@ -3,7 +3,7 @@ import re from collections.abc import Mapping, Sequence from datetime import timedelta -from typing import Any +from typing import int, Any from django.utils.translation import gettext_lazy as _ diff --git a/src/sentry/issue_detection/detectors/consecutive_http_detector.py b/src/sentry/issue_detection/detectors/consecutive_http_detector.py index 5709d0d724c683..f49588403b60aa 100644 --- a/src/sentry/issue_detection/detectors/consecutive_http_detector.py +++ b/src/sentry/issue_detection/detectors/consecutive_http_detector.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from urllib.parse import urlparse from sentry.issue_detection.base import DetectorType, PerformanceDetector diff --git a/src/sentry/issue_detection/detectors/disable_detectors.py b/src/sentry/issue_detection/detectors/disable_detectors.py index f7bbcfedde9b88..e602b5fbacdb5d 100644 --- a/src/sentry/issue_detection/detectors/disable_detectors.py +++ b/src/sentry/issue_detection/detectors/disable_detectors.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from sentry import projectoptions from sentry.models.project import Project diff --git a/src/sentry/issue_detection/detectors/experiments/mn_plus_one_db_span_detector.py b/src/sentry/issue_detection/detectors/experiments/mn_plus_one_db_span_detector.py index 24458f26dd076b..1e89774fc801c7 100644 --- a/src/sentry/issue_detection/detectors/experiments/mn_plus_one_db_span_detector.py +++ b/src/sentry/issue_detection/detectors/experiments/mn_plus_one_db_span_detector.py @@ -4,7 +4,7 @@ from abc import ABC, abstractmethod from collections import deque from collections.abc import Sequence -from typing import Any +from typing import int, Any from sentry import features from sentry.issue_detection.base import DetectorType, PerformanceDetector diff --git a/src/sentry/issue_detection/detectors/experiments/n_plus_one_api_calls_detector.py b/src/sentry/issue_detection/detectors/experiments/n_plus_one_api_calls_detector.py index 3b736d850a7972..4a682142dffe4b 100644 --- a/src/sentry/issue_detection/detectors/experiments/n_plus_one_api_calls_detector.py +++ b/src/sentry/issue_detection/detectors/experiments/n_plus_one_api_calls_detector.py @@ -4,7 +4,7 @@ import os from collections import defaultdict from datetime import timedelta -from typing import Any +from typing import int, Any from urllib.parse import urlparse from sentry import features diff --git a/src/sentry/issue_detection/detectors/experiments/n_plus_one_db_span_detector.py b/src/sentry/issue_detection/detectors/experiments/n_plus_one_db_span_detector.py index 408d4742ccc1ae..6db1e65925bd07 100644 --- a/src/sentry/issue_detection/detectors/experiments/n_plus_one_db_span_detector.py +++ b/src/sentry/issue_detection/detectors/experiments/n_plus_one_db_span_detector.py @@ -1,7 +1,7 @@ from __future__ import annotations import hashlib -from typing import Any +from typing import int, Any from sentry import features from sentry.issue_detection.base import DetectorType, PerformanceDetector diff --git a/src/sentry/issue_detection/detectors/http_overhead_detector.py b/src/sentry/issue_detection/detectors/http_overhead_detector.py index 070d9f6f0b9a51..df3f58febbed5c 100644 --- a/src/sentry/issue_detection/detectors/http_overhead_detector.py +++ b/src/sentry/issue_detection/detectors/http_overhead_detector.py @@ -3,7 +3,7 @@ import urllib.parse from collections import defaultdict from dataclasses import dataclass -from typing import Any +from typing import int, Any from sentry.issue_detection.base import DetectorType, PerformanceDetector from sentry.issue_detection.detectors.utils import ( diff --git a/src/sentry/issue_detection/detectors/io_main_thread_detector.py b/src/sentry/issue_detection/detectors/io_main_thread_detector.py index b0cb54ea1addcc..17c0d97eaf2c43 100644 --- a/src/sentry/issue_detection/detectors/io_main_thread_detector.py +++ b/src/sentry/issue_detection/detectors/io_main_thread_detector.py @@ -2,7 +2,7 @@ import hashlib from collections import defaultdict -from typing import Any +from typing import int, Any import sentry_sdk from symbolic.proguard import ProguardMapper diff --git a/src/sentry/issue_detection/detectors/large_http_payload_detector.py b/src/sentry/issue_detection/detectors/large_http_payload_detector.py index 330b15606d4ee6..50af901f2dddd0 100644 --- a/src/sentry/issue_detection/detectors/large_http_payload_detector.py +++ b/src/sentry/issue_detection/detectors/large_http_payload_detector.py @@ -2,7 +2,7 @@ import re from datetime import timedelta -from typing import Any +from typing import int, Any from sentry import features from sentry.issues.grouptype import PerformanceLargeHTTPPayloadGroupType diff --git a/src/sentry/issue_detection/detectors/mn_plus_one_db_span_detector.py b/src/sentry/issue_detection/detectors/mn_plus_one_db_span_detector.py index 00c9c613685c94..9783381143bd99 100644 --- a/src/sentry/issue_detection/detectors/mn_plus_one_db_span_detector.py +++ b/src/sentry/issue_detection/detectors/mn_plus_one_db_span_detector.py @@ -4,7 +4,7 @@ from abc import ABC, abstractmethod from collections import deque from collections.abc import Sequence -from typing import Any +from typing import int, Any from sentry import features from sentry.issues.grouptype import ( diff --git a/src/sentry/issue_detection/detectors/n_plus_one_api_calls_detector.py b/src/sentry/issue_detection/detectors/n_plus_one_api_calls_detector.py index 6020342a054db5..616ee5edf3d234 100644 --- a/src/sentry/issue_detection/detectors/n_plus_one_api_calls_detector.py +++ b/src/sentry/issue_detection/detectors/n_plus_one_api_calls_detector.py @@ -6,7 +6,7 @@ from collections import defaultdict from collections.abc import Mapping, Sequence from datetime import timedelta -from typing import Any +from typing import int, Any from urllib.parse import parse_qs, urlparse from django.utils.encoding import force_bytes diff --git a/src/sentry/issue_detection/detectors/n_plus_one_db_span_detector.py b/src/sentry/issue_detection/detectors/n_plus_one_db_span_detector.py index bf33d4200c0519..dc47c9d7de2a5d 100644 --- a/src/sentry/issue_detection/detectors/n_plus_one_db_span_detector.py +++ b/src/sentry/issue_detection/detectors/n_plus_one_db_span_detector.py @@ -1,7 +1,7 @@ from __future__ import annotations import hashlib -from typing import Any +from typing import int, Any from sentry import features from sentry.issues.grouptype import PerformanceNPlusOneGroupType diff --git a/src/sentry/issue_detection/detectors/query_injection_detector.py b/src/sentry/issue_detection/detectors/query_injection_detector.py index 51fdb58f75ab73..99d56734aa5b30 100644 --- a/src/sentry/issue_detection/detectors/query_injection_detector.py +++ b/src/sentry/issue_detection/detectors/query_injection_detector.py @@ -1,7 +1,7 @@ from __future__ import annotations import hashlib -from typing import Any +from typing import int, Any from sentry.issue_detection.base import DetectorType, PerformanceDetector from sentry.issue_detection.detectors.utils import get_notification_attachment_body diff --git a/src/sentry/issue_detection/detectors/render_blocking_asset_span_detector.py b/src/sentry/issue_detection/detectors/render_blocking_asset_span_detector.py index 8666289eca04b4..a8f7af3c95da38 100644 --- a/src/sentry/issue_detection/detectors/render_blocking_asset_span_detector.py +++ b/src/sentry/issue_detection/detectors/render_blocking_asset_span_detector.py @@ -2,7 +2,7 @@ from collections.abc import Mapping from datetime import timedelta -from typing import Any +from typing import int, Any from sentry.issues.grouptype import PerformanceRenderBlockingAssetSpanGroupType from sentry.issues.issue_occurrence import IssueEvidence diff --git a/src/sentry/issue_detection/detectors/slow_db_query_detector.py b/src/sentry/issue_detection/detectors/slow_db_query_detector.py index 9ea8e7a5297e37..f6d76821420638 100644 --- a/src/sentry/issue_detection/detectors/slow_db_query_detector.py +++ b/src/sentry/issue_detection/detectors/slow_db_query_detector.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import hashlib import logging diff --git a/src/sentry/issue_detection/detectors/sql_injection_detector.py b/src/sentry/issue_detection/detectors/sql_injection_detector.py index 49408444c3f30f..40aed4340db0ee 100644 --- a/src/sentry/issue_detection/detectors/sql_injection_detector.py +++ b/src/sentry/issue_detection/detectors/sql_injection_detector.py @@ -3,7 +3,7 @@ import hashlib import re from collections.abc import Sequence -from typing import Any +from typing import int, Any from sentry.issue_detection.base import DetectorType, PerformanceDetector from sentry.issue_detection.detectors.utils import get_notification_attachment_body diff --git a/src/sentry/issue_detection/detectors/uncompressed_asset_detector.py b/src/sentry/issue_detection/detectors/uncompressed_asset_detector.py index 1a0dd458eccf9a..10677908881151 100644 --- a/src/sentry/issue_detection/detectors/uncompressed_asset_detector.py +++ b/src/sentry/issue_detection/detectors/uncompressed_asset_detector.py @@ -2,7 +2,7 @@ import logging import re -from typing import Any +from typing import int, Any from sentry.issues.grouptype import PerformanceUncompressedAssetsGroupType from sentry.issues.issue_occurrence import IssueEvidence diff --git a/src/sentry/issue_detection/detectors/utils.py b/src/sentry/issue_detection/detectors/utils.py index fde353fd9a643d..4cd62dbacfa838 100644 --- a/src/sentry/issue_detection/detectors/utils.py +++ b/src/sentry/issue_detection/detectors/utils.py @@ -1,7 +1,7 @@ import hashlib import re from datetime import timedelta -from typing import TypedDict +from typing import int, TypedDict from urllib.parse import parse_qs, urlparse from ..types import Span diff --git a/src/sentry/issue_detection/performance_detection.py b/src/sentry/issue_detection/performance_detection.py index a1c337d14aadf4..6cacf603ca0e50 100644 --- a/src/sentry/issue_detection/performance_detection.py +++ b/src/sentry/issue_detection/performance_detection.py @@ -4,7 +4,7 @@ import logging import random from collections.abc import Sequence -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/issue_detection/performance_problem.py b/src/sentry/issue_detection/performance_problem.py index abfd297a321d04..294f358a4697ed 100644 --- a/src/sentry/issue_detection/performance_problem.py +++ b/src/sentry/issue_detection/performance_problem.py @@ -1,6 +1,6 @@ from collections.abc import Mapping, Sequence from dataclasses import dataclass -from typing import Any, Self +from typing import Any, Self, int from sentry.issues.grouptype import GroupType, get_group_type_by_type_id from sentry.issues.issue_occurrence import IssueEvidence diff --git a/src/sentry/issue_detection/types.py b/src/sentry/issue_detection/types.py index af4ad6c5a87b43..ecbc06e14f0a49 100644 --- a/src/sentry/issue_detection/types.py +++ b/src/sentry/issue_detection/types.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, Required, TypedDict +from typing import Any, Required, TypedDict, int # Ideally this would be fully aligned with sentry_kafka_schemas, but many mutations # happen in the ingestion pipeline (adding new attributes and removing required diff --git a/src/sentry/issues/analytics.py b/src/sentry/issues/analytics.py index 61d280142333e2..5cb77db1d33790 100644 --- a/src/sentry/issues/analytics.py +++ b/src/sentry/issues/analytics.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/issues/apps.py b/src/sentry/issues/apps.py index 5648d19c871c88..ad99f5d70bce04 100644 --- a/src/sentry/issues/apps.py +++ b/src/sentry/issues/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/issues/attributes.py b/src/sentry/issues/attributes.py index db01371f4ed1b1..28f0bf05d28dc0 100644 --- a/src/sentry/issues/attributes.py +++ b/src/sentry/issues/attributes.py @@ -1,3 +1,4 @@ +from typing import int import dataclasses import logging from collections.abc import Iterable diff --git a/src/sentry/issues/auto_source_code_config/code_mapping.py b/src/sentry/issues/auto_source_code_config/code_mapping.py index 36fd81a5c9d815..f0e4cec6f24c3f 100644 --- a/src/sentry/issues/auto_source_code_config/code_mapping.py +++ b/src/sentry/issues/auto_source_code_config/code_mapping.py @@ -3,7 +3,7 @@ import logging from collections import defaultdict from collections.abc import Mapping, Sequence -from typing import Any, NamedTuple +from typing import Any, NamedTuple, int from sentry.integrations.models.repository_project_path_config import RepositoryProjectPathConfig from sentry.integrations.source_code_management.repo_trees import ( diff --git a/src/sentry/issues/auto_source_code_config/constants.py b/src/sentry/issues/auto_source_code_config/constants.py index 60cd2fe77c21b3..2288c72d0e96ba 100644 --- a/src/sentry/issues/auto_source_code_config/constants.py +++ b/src/sentry/issues/auto_source_code_config/constants.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.integrations.types import IntegrationProviderSlug diff --git a/src/sentry/issues/auto_source_code_config/derived_code_mappings_endpoint.py b/src/sentry/issues/auto_source_code_config/derived_code_mappings_endpoint.py index c8fae4088cc823..2a2a92a1256939 100644 --- a/src/sentry/issues/auto_source_code_config/derived_code_mappings_endpoint.py +++ b/src/sentry/issues/auto_source_code_config/derived_code_mappings_endpoint.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework.request import Request diff --git a/src/sentry/issues/auto_source_code_config/errors.py b/src/sentry/issues/auto_source_code_config/errors.py index 45c6a25e4bbcae..2abec638acf695 100644 --- a/src/sentry/issues/auto_source_code_config/errors.py +++ b/src/sentry/issues/auto_source_code_config/errors.py @@ -1,3 +1,4 @@ +from typing import int class UnexpectedPathException(Exception): pass diff --git a/src/sentry/issues/auto_source_code_config/frame_info.py b/src/sentry/issues/auto_source_code_config/frame_info.py index cf24072252dbf4..d208a1bb34913e 100644 --- a/src/sentry/issues/auto_source_code_config/frame_info.py +++ b/src/sentry/issues/auto_source_code_config/frame_info.py @@ -3,7 +3,7 @@ import re from abc import ABC, abstractmethod from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from sentry.integrations.source_code_management.repo_trees import get_extension diff --git a/src/sentry/issues/auto_source_code_config/in_app_stack_trace_rules.py b/src/sentry/issues/auto_source_code_config/in_app_stack_trace_rules.py index bf86ace827fe97..f8332f67032c84 100644 --- a/src/sentry/issues/auto_source_code_config/in_app_stack_trace_rules.py +++ b/src/sentry/issues/auto_source_code_config/in_app_stack_trace_rules.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Sequence diff --git a/src/sentry/issues/auto_source_code_config/integration_utils.py b/src/sentry/issues/auto_source_code_config/integration_utils.py index bc3e72598cb2b9..a351735d812cc0 100644 --- a/src/sentry/issues/auto_source_code_config/integration_utils.py +++ b/src/sentry/issues/auto_source_code_config/integration_utils.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import ObjectStatus from sentry.integrations.base import IntegrationInstallation from sentry.integrations.services.integration import integration_service diff --git a/src/sentry/issues/auto_source_code_config/stacktraces.py b/src/sentry/issues/auto_source_code_config/stacktraces.py index 27d3cefe4c04df..3b030db7e8e04a 100644 --- a/src/sentry/issues/auto_source_code_config/stacktraces.py +++ b/src/sentry/issues/auto_source_code_config/stacktraces.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from sentry.db.models.fields.node import NodeData from sentry.utils.safe import get_path diff --git a/src/sentry/issues/auto_source_code_config/task.py b/src/sentry/issues/auto_source_code_config/task.py index 23f241e94a6f6c..7d22410b1e13d5 100644 --- a/src/sentry/issues/auto_source_code_config/task.py +++ b/src/sentry/issues/auto_source_code_config/task.py @@ -3,7 +3,7 @@ import logging from collections.abc import Mapping from enum import StrEnum -from typing import Any +from typing import int, Any from google.api_core.exceptions import DeadlineExceeded from sentry_sdk import set_tag, set_user diff --git a/src/sentry/issues/auto_source_code_config/utils/misc.py b/src/sentry/issues/auto_source_code_config/utils/misc.py index 2beb8c51a08737..258a704daeebe7 100644 --- a/src/sentry/issues/auto_source_code_config/utils/misc.py +++ b/src/sentry/issues/auto_source_code_config/utils/misc.py @@ -1,4 +1,5 @@ # List of file paths prefixes that should become stack trace roots +from typing import int FILE_PATH_PREFIX_LENGTH = { "app:///": 7, "../": 3, diff --git a/src/sentry/issues/auto_source_code_config/utils/platform.py b/src/sentry/issues/auto_source_code_config/utils/platform.py index 82936827206301..f779987f2de372 100644 --- a/src/sentry/issues/auto_source_code_config/utils/platform.py +++ b/src/sentry/issues/auto_source_code_config/utils/platform.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.models.organization import Organization diff --git a/src/sentry/issues/auto_source_code_config/utils/repository.py b/src/sentry/issues/auto_source_code_config/utils/repository.py index b3f8a2f514e0b2..b1dd49feff12fb 100644 --- a/src/sentry/issues/auto_source_code_config/utils/repository.py +++ b/src/sentry/issues/auto_source_code_config/utils/repository.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping from sentry.integrations.services.integration.model import RpcOrganizationIntegration diff --git a/src/sentry/issues/constants.py b/src/sentry/issues/constants.py index 95cb4fa39f5ab9..758a7f3c2d753f 100644 --- a/src/sentry/issues/constants.py +++ b/src/sentry/issues/constants.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.issues.grouptype import GroupCategory from sentry.snuba.dataset import Dataset diff --git a/src/sentry/issues/endpoints/__init__.py b/src/sentry/issues/endpoints/__init__.py index a2ebb4670c4eaf..b013a188791b5b 100644 --- a/src/sentry/issues/endpoints/__init__.py +++ b/src/sentry/issues/endpoints/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .actionable_items import ActionableItemsEndpoint from .group_activities import GroupActivitiesEndpoint from .group_details import GroupDetailsEndpoint diff --git a/src/sentry/issues/endpoints/actionable_items.py b/src/sentry/issues/endpoints/actionable_items.py index 5bb0c69b469e9f..f132dc48930e08 100644 --- a/src/sentry/issues/endpoints/actionable_items.py +++ b/src/sentry/issues/endpoints/actionable_items.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.exceptions import NotFound from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/bases/codeowners.py b/src/sentry/issues/endpoints/bases/codeowners.py index 7caa45086ea0ae..d0003d3f482f17 100644 --- a/src/sentry/issues/endpoints/bases/codeowners.py +++ b/src/sentry/issues/endpoints/bases/codeowners.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from sentry import features diff --git a/src/sentry/issues/endpoints/bases/group.py b/src/sentry/issues/endpoints/bases/group.py index b3efea5ae6f785..0d91dad6e8f616 100644 --- a/src/sentry/issues/endpoints/bases/group.py +++ b/src/sentry/issues/endpoints/bases/group.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any import sentry_sdk from django.db.models import QuerySet diff --git a/src/sentry/issues/endpoints/bases/group_search_view.py b/src/sentry/issues/endpoints/bases/group_search_view.py index 26c91ceb772412..a927ebf6cbddf7 100644 --- a/src/sentry/issues/endpoints/bases/group_search_view.py +++ b/src/sentry/issues/endpoints/bases/group_search_view.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.views import APIView diff --git a/src/sentry/issues/endpoints/browser_reporting_collector.py b/src/sentry/issues/endpoints/browser_reporting_collector.py index b9750410b1e789..52bb39b393f5fc 100644 --- a/src/sentry/issues/endpoints/browser_reporting_collector.py +++ b/src/sentry/issues/endpoints/browser_reporting_collector.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from django.core.validators import URLValidator from django.views.decorators.csrf import csrf_exempt diff --git a/src/sentry/issues/endpoints/event_grouping_info.py b/src/sentry/issues/endpoints/event_grouping_info.py index 47128c4771d2c8..480487169d7dec 100644 --- a/src/sentry/issues/endpoints/event_grouping_info.py +++ b/src/sentry/issues/endpoints/event_grouping_info.py @@ -1,3 +1,4 @@ +from typing import int import orjson from django.http import HttpRequest, HttpResponse diff --git a/src/sentry/issues/endpoints/event_owners.py b/src/sentry/issues/endpoints/event_owners.py index 496bdc53443599..c098c73cae701a 100644 --- a/src/sentry/issues/endpoints/event_owners.py +++ b/src/sentry/issues/endpoints/event_owners.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/event_reprocessable.py b/src/sentry/issues/endpoints/event_reprocessable.py index 013c05a8da15e0..1b4f092ba6483f 100644 --- a/src/sentry/issues/endpoints/event_reprocessable.py +++ b/src/sentry/issues/endpoints/event_reprocessable.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/group_activities.py b/src/sentry/issues/endpoints/group_activities.py index 62ef99131fb39b..2a804c705573b0 100644 --- a/src/sentry/issues/endpoints/group_activities.py +++ b/src/sentry/issues/endpoints/group_activities.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/group_attachments.py b/src/sentry/issues/endpoints/group_attachments.py index 2ccfb372574f88..919b3777f383ee 100644 --- a/src/sentry/issues/endpoints/group_attachments.py +++ b/src/sentry/issues/endpoints/group_attachments.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from django.utils import timezone diff --git a/src/sentry/issues/endpoints/group_current_release.py b/src/sentry/issues/endpoints/group_current_release.py index a558b1d11e703c..c5786f39bc055e 100644 --- a/src/sentry/issues/endpoints/group_current_release.py +++ b/src/sentry/issues/endpoints/group_current_release.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/group_details.py b/src/sentry/issues/endpoints/group_details.py index 700f226b27b2e6..90cbfd16f4848e 100644 --- a/src/sentry/issues/endpoints/group_details.py +++ b/src/sentry/issues/endpoints/group_details.py @@ -2,7 +2,7 @@ import logging from collections.abc import Sequence from datetime import timedelta -from typing import Any +from typing import int, Any from django.utils import timezone from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/group_event_details.py b/src/sentry/issues/endpoints/group_event_details.py index cffdd9cc3846e3..e680161559da0f 100644 --- a/src/sentry/issues/endpoints/group_event_details.py +++ b/src/sentry/issues/endpoints/group_event_details.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Sequence diff --git a/src/sentry/issues/endpoints/group_events.py b/src/sentry/issues/endpoints/group_events.py index 9c4531f9b326a1..173a48bb0edd33 100644 --- a/src/sentry/issues/endpoints/group_events.py +++ b/src/sentry/issues/endpoints/group_events.py @@ -2,7 +2,7 @@ from collections.abc import Sequence from datetime import datetime, timedelta -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.utils import timezone from drf_spectacular.utils import extend_schema diff --git a/src/sentry/issues/endpoints/group_first_last_release.py b/src/sentry/issues/endpoints/group_first_last_release.py index 4dc250eb94c324..ceaf0f7d1e4c3c 100644 --- a/src/sentry/issues/endpoints/group_first_last_release.py +++ b/src/sentry/issues/endpoints/group_first_last_release.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/group_hashes.py b/src/sentry/issues/endpoints/group_hashes.py index 050d0741472c3a..99c00ef4df8143 100644 --- a/src/sentry/issues/endpoints/group_hashes.py +++ b/src/sentry/issues/endpoints/group_hashes.py @@ -1,6 +1,6 @@ from collections.abc import Sequence from functools import partial -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/group_integration_details.py b/src/sentry/issues/endpoints/group_integration_details.py index 570eb9aa1366d9..d0ad1965f74953 100644 --- a/src/sentry/issues/endpoints/group_integration_details.py +++ b/src/sentry/issues/endpoints/group_integration_details.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, MutableMapping -from typing import Any +from typing import int, Any from django.contrib.auth.models import AnonymousUser from django.db import IntegrityError, router, transaction diff --git a/src/sentry/issues/endpoints/group_integrations.py b/src/sentry/issues/endpoints/group_integrations.py index 241c09dc706b7c..488d2062eae225 100644 --- a/src/sentry/issues/endpoints/group_integrations.py +++ b/src/sentry/issues/endpoints/group_integrations.py @@ -2,7 +2,7 @@ from collections import defaultdict from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from django.contrib.auth.models import AnonymousUser from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/group_notes.py b/src/sentry/issues/endpoints/group_notes.py index c48afdf5a74e63..76cafeb7b18ca2 100644 --- a/src/sentry/issues/endpoints/group_notes.py +++ b/src/sentry/issues/endpoints/group_notes.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/src/sentry/issues/endpoints/group_notes_details.py b/src/sentry/issues/endpoints/group_notes_details.py index a189cbff9d9c83..049d8b31e421c1 100644 --- a/src/sentry/issues/endpoints/group_notes_details.py +++ b/src/sentry/issues/endpoints/group_notes_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from rest_framework.exceptions import PermissionDenied from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/group_reprocessing.py b/src/sentry/issues/endpoints/group_reprocessing.py index b313e0ada76072..6b8f0b79435d57 100644 --- a/src/sentry/issues/endpoints/group_reprocessing.py +++ b/src/sentry/issues/endpoints/group_reprocessing.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/group_similar_issues.py b/src/sentry/issues/endpoints/group_similar_issues.py index 2e16a6e6d3a1dd..2b7554e2775f98 100644 --- a/src/sentry/issues/endpoints/group_similar_issues.py +++ b/src/sentry/issues/endpoints/group_similar_issues.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/group_similar_issues_embeddings.py b/src/sentry/issues/endpoints/group_similar_issues_embeddings.py index 84fca754d1a252..c9b4a35d8e6909 100644 --- a/src/sentry/issues/endpoints/group_similar_issues_embeddings.py +++ b/src/sentry/issues/endpoints/group_similar_issues_embeddings.py @@ -1,6 +1,6 @@ import logging from collections.abc import Mapping, Sequence -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/group_stats.py b/src/sentry/issues/endpoints/group_stats.py index b0b0e9ed3ce9b2..6ea0110a34c167 100644 --- a/src/sentry/issues/endpoints/group_stats.py +++ b/src/sentry/issues/endpoints/group_stats.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/group_tagkey_details.py b/src/sentry/issues/endpoints/group_tagkey_details.py index 091789f608a026..09dcd8a562d36b 100644 --- a/src/sentry/issues/endpoints/group_tagkey_details.py +++ b/src/sentry/issues/endpoints/group_tagkey_details.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/group_tagkey_values.py b/src/sentry/issues/endpoints/group_tagkey_values.py index 4a7a15d93c5166..3b24c8b9ff5b97 100644 --- a/src/sentry/issues/endpoints/group_tagkey_values.py +++ b/src/sentry/issues/endpoints/group_tagkey_values.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/group_tags.py b/src/sentry/issues/endpoints/group_tags.py index 03919970416655..bb427a202e30ae 100644 --- a/src/sentry/issues/endpoints/group_tags.py +++ b/src/sentry/issues/endpoints/group_tags.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/group_tombstone.py b/src/sentry/issues/endpoints/group_tombstone.py index cf9ad9e38148d3..ca1d317c9dd5be 100644 --- a/src/sentry/issues/endpoints/group_tombstone.py +++ b/src/sentry/issues/endpoints/group_tombstone.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/group_tombstone_details.py b/src/sentry/issues/endpoints/group_tombstone_details.py index f2aa03517e6698..2892278ed6e18d 100644 --- a/src/sentry/issues/endpoints/group_tombstone_details.py +++ b/src/sentry/issues/endpoints/group_tombstone_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/group_user_reports.py b/src/sentry/issues/endpoints/group_user_reports.py index 6bf1e8a592c76c..c5e4fa702272a8 100644 --- a/src/sentry/issues/endpoints/group_user_reports.py +++ b/src/sentry/issues/endpoints/group_user_reports.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/grouping_configs.py b/src/sentry/issues/endpoints/grouping_configs.py index 73f712b6c70aaa..7003f42a128463 100644 --- a/src/sentry/issues/endpoints/grouping_configs.py +++ b/src/sentry/issues/endpoints/grouping_configs.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/organization_codeowners_associations.py b/src/sentry/issues/endpoints/organization_codeowners_associations.py index 4f13bf469b4582..86d1cc48d87d14 100644 --- a/src/sentry/issues/endpoints/organization_codeowners_associations.py +++ b/src/sentry/issues/endpoints/organization_codeowners_associations.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/organization_derive_code_mappings.py b/src/sentry/issues/endpoints/organization_derive_code_mappings.py index a1178b1ca69bd4..2ab4830f38e554 100644 --- a/src/sentry/issues/endpoints/organization_derive_code_mappings.py +++ b/src/sentry/issues/endpoints/organization_derive_code_mappings.py @@ -1,5 +1,5 @@ import logging -from typing import Literal +from typing import int, Literal from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/organization_event_details.py b/src/sentry/issues/endpoints/organization_event_details.py index f8c259a9a50ff4..1b78c696257435 100644 --- a/src/sentry/issues/endpoints/organization_event_details.py +++ b/src/sentry/issues/endpoints/organization_event_details.py @@ -1,6 +1,6 @@ from collections import defaultdict from datetime import datetime, timedelta -from typing import Any +from typing import int, Any import sentry_sdk from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/organization_eventid.py b/src/sentry/issues/endpoints/organization_eventid.py index f568870b326935..9a6ad3313010cc 100644 --- a/src/sentry/issues/endpoints/organization_eventid.py +++ b/src/sentry/issues/endpoints/organization_eventid.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/organization_group_index.py b/src/sentry/issues/endpoints/organization_group_index.py index 4d9c17eafeb2af..b56818f1d309c4 100644 --- a/src/sentry/issues/endpoints/organization_group_index.py +++ b/src/sentry/issues/endpoints/organization_group_index.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping, Sequence from datetime import datetime, timedelta -from typing import Any +from typing import int, Any import sentry_sdk from django.utils import timezone diff --git a/src/sentry/issues/endpoints/organization_group_index_stats.py b/src/sentry/issues/endpoints/organization_group_index_stats.py index 89adcbd1a57bdb..9345ec5b3c5d31 100644 --- a/src/sentry/issues/endpoints/organization_group_index_stats.py +++ b/src/sentry/issues/endpoints/organization_group_index_stats.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.exceptions import ParseError, PermissionDenied from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/organization_group_search_view_details.py b/src/sentry/issues/endpoints/organization_group_search_view_details.py index 3a832c39ac81e6..e93220adca7183 100644 --- a/src/sentry/issues/endpoints/organization_group_search_view_details.py +++ b/src/sentry/issues/endpoints/organization_group_search_view_details.py @@ -1,4 +1,4 @@ -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/organization_group_search_view_details_starred.py b/src/sentry/issues/endpoints/organization_group_search_view_details_starred.py index 89e15c9aa809c3..195972eea196ec 100644 --- a/src/sentry/issues/endpoints/organization_group_search_view_details_starred.py +++ b/src/sentry/issues/endpoints/organization_group_search_view_details_starred.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers, status from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/organization_group_search_view_starred_order.py b/src/sentry/issues/endpoints/organization_group_search_view_starred_order.py index 764171201ff392..8e3f507687ac33 100644 --- a/src/sentry/issues/endpoints/organization_group_search_view_starred_order.py +++ b/src/sentry/issues/endpoints/organization_group_search_view_starred_order.py @@ -1,3 +1,4 @@ +from typing import int from django.db import IntegrityError, router, transaction from rest_framework import serializers, status from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/organization_group_search_view_visit.py b/src/sentry/issues/endpoints/organization_group_search_view_visit.py index ece1516e988f66..a26c8d2f3c6657 100644 --- a/src/sentry/issues/endpoints/organization_group_search_view_visit.py +++ b/src/sentry/issues/endpoints/organization_group_search_view_visit.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/organization_group_search_views.py b/src/sentry/issues/endpoints/organization_group_search_views.py index c4c055bd213c0b..5bc23838665123 100644 --- a/src/sentry/issues/endpoints/organization_group_search_views.py +++ b/src/sentry/issues/endpoints/organization_group_search_views.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db.models import Count, F, OuterRef, Q, Subquery from django.db.models.expressions import Combinable diff --git a/src/sentry/issues/endpoints/organization_group_search_views_starred.py b/src/sentry/issues/endpoints/organization_group_search_views_starred.py index 3ee4d5f9b032d5..82f9f564df9fc9 100644 --- a/src/sentry/issues/endpoints/organization_group_search_views_starred.py +++ b/src/sentry/issues/endpoints/organization_group_search_views_starred.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/organization_group_suspect_flags.py b/src/sentry/issues/endpoints/organization_group_suspect_flags.py index 0378dc4b8cffbc..0bd88c61814c0a 100644 --- a/src/sentry/issues/endpoints/organization_group_suspect_flags.py +++ b/src/sentry/issues/endpoints/organization_group_suspect_flags.py @@ -1,6 +1,6 @@ import logging from datetime import timedelta -from typing import TypedDict +from typing import int, TypedDict from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/organization_group_suspect_tags.py b/src/sentry/issues/endpoints/organization_group_suspect_tags.py index ffb10dae663286..66348184107f67 100644 --- a/src/sentry/issues/endpoints/organization_group_suspect_tags.py +++ b/src/sentry/issues/endpoints/organization_group_suspect_tags.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/organization_issue_metrics.py b/src/sentry/issues/endpoints/organization_issue_metrics.py index 74d1a7be84f7cc..342a0287001b0a 100644 --- a/src/sentry/issues/endpoints/organization_issue_metrics.py +++ b/src/sentry/issues/endpoints/organization_issue_metrics.py @@ -3,7 +3,7 @@ from datetime import datetime, timedelta from heapq import nlargest from itertools import chain -from typing import TypedDict +from typing import int, TypedDict from django.db.models import Count, DateTimeField, F, Func, Q from django.db.models.functions import Extract diff --git a/src/sentry/issues/endpoints/organization_issue_timeseries.py b/src/sentry/issues/endpoints/organization_issue_timeseries.py index d72522842b7472..aa2344728c0076 100644 --- a/src/sentry/issues/endpoints/organization_issue_timeseries.py +++ b/src/sentry/issues/endpoints/organization_issue_timeseries.py @@ -2,7 +2,7 @@ from collections.abc import Iterator from datetime import datetime, timedelta from heapq import nlargest -from typing import Any +from typing import int, Any from django.db.models import Count, DateTimeField, F, Func, Q from django.db.models.functions import Extract diff --git a/src/sentry/issues/endpoints/organization_issues_count.py b/src/sentry/issues/endpoints/organization_issues_count.py index 69255e26bb28aa..4bd4f7b8a334c9 100644 --- a/src/sentry/issues/endpoints/organization_issues_count.py +++ b/src/sentry/issues/endpoints/organization_issues_count.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.exceptions import ParseError from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/organization_issues_resolved_in_release.py b/src/sentry/issues/endpoints/organization_issues_resolved_in_release.py index 60807b9fa870be..6f60ef14ef887c 100644 --- a/src/sentry/issues/endpoints/organization_issues_resolved_in_release.py +++ b/src/sentry/issues/endpoints/organization_issues_resolved_in_release.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/organization_release_previous_commits.py b/src/sentry/issues/endpoints/organization_release_previous_commits.py index 74ed2a118fb5a4..1115a98c638db0 100644 --- a/src/sentry/issues/endpoints/organization_release_previous_commits.py +++ b/src/sentry/issues/endpoints/organization_release_previous_commits.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/organization_searches.py b/src/sentry/issues/endpoints/organization_searches.py index 4b74e65766b88d..2276fcb883c6a2 100644 --- a/src/sentry/issues/endpoints/organization_searches.py +++ b/src/sentry/issues/endpoints/organization_searches.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Q from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/organization_shortid.py b/src/sentry/issues/endpoints/organization_shortid.py index dacdf880ed095f..52773cfff5ee24 100644 --- a/src/sentry/issues/endpoints/organization_shortid.py +++ b/src/sentry/issues/endpoints/organization_shortid.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from drf_spectacular.utils import OpenApiExample, OpenApiParameter, extend_schema from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/project_codeowners_details.py b/src/sentry/issues/endpoints/project_codeowners_details.py index 7b84c434b363d6..11d689a32595d2 100644 --- a/src/sentry/issues/endpoints/project_codeowners_details.py +++ b/src/sentry/issues/endpoints/project_codeowners_details.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from rest_framework import status from rest_framework.exceptions import PermissionDenied diff --git a/src/sentry/issues/endpoints/project_codeowners_index.py b/src/sentry/issues/endpoints/project_codeowners_index.py index b900efb88f7319..4ee397fb99c67f 100644 --- a/src/sentry/issues/endpoints/project_codeowners_index.py +++ b/src/sentry/issues/endpoints/project_codeowners_index.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework import status from rest_framework.exceptions import PermissionDenied diff --git a/src/sentry/issues/endpoints/project_event_details.py b/src/sentry/issues/endpoints/project_event_details.py index 5542a3236f36d4..0b9f64338d0bc0 100644 --- a/src/sentry/issues/endpoints/project_event_details.py +++ b/src/sentry/issues/endpoints/project_event_details.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import Any +from typing import int, Any import sentry_sdk from rest_framework.exceptions import ParseError diff --git a/src/sentry/issues/endpoints/project_events.py b/src/sentry/issues/endpoints/project_events.py index dfd7da7d9f7322..2139d1b7b46954 100644 --- a/src/sentry/issues/endpoints/project_events.py +++ b/src/sentry/issues/endpoints/project_events.py @@ -1,3 +1,4 @@ +from typing import int from functools import partial from drf_spectacular.utils import extend_schema diff --git a/src/sentry/issues/endpoints/project_group_index.py b/src/sentry/issues/endpoints/project_group_index.py index ae2ac2efe3cc73..b326590d0b0b10 100644 --- a/src/sentry/issues/endpoints/project_group_index.py +++ b/src/sentry/issues/endpoints/project_group_index.py @@ -1,3 +1,4 @@ +from typing import int import functools import logging diff --git a/src/sentry/issues/endpoints/project_group_stats.py b/src/sentry/issues/endpoints/project_group_stats.py index 7c21d78d451b97..0ed034a5653836 100644 --- a/src/sentry/issues/endpoints/project_group_stats.py +++ b/src/sentry/issues/endpoints/project_group_stats.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/project_grouping_configs.py b/src/sentry/issues/endpoints/project_grouping_configs.py index df23692cc003ee..c9783831a29951 100644 --- a/src/sentry/issues/endpoints/project_grouping_configs.py +++ b/src/sentry/issues/endpoints/project_grouping_configs.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/project_issues_resolved_in_release.py b/src/sentry/issues/endpoints/project_issues_resolved_in_release.py index 35d7b84d5aaa96..aa3905cec043c8 100644 --- a/src/sentry/issues/endpoints/project_issues_resolved_in_release.py +++ b/src/sentry/issues/endpoints/project_issues_resolved_in_release.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/project_ownership.py b/src/sentry/issues/endpoints/project_ownership.py index 3a5674939c9396..af732acaf78cc9 100644 --- a/src/sentry/issues/endpoints/project_ownership.py +++ b/src/sentry/issues/endpoints/project_ownership.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.utils import timezone from drf_spectacular.utils import extend_schema diff --git a/src/sentry/issues/endpoints/project_performance_issue_settings.py b/src/sentry/issues/endpoints/project_performance_issue_settings.py index 34b4c8bd977f30..62366f8b5e82c8 100644 --- a/src/sentry/issues/endpoints/project_performance_issue_settings.py +++ b/src/sentry/issues/endpoints/project_performance_issue_settings.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum from rest_framework import serializers, status diff --git a/src/sentry/issues/endpoints/project_stacktrace_link.py b/src/sentry/issues/endpoints/project_stacktrace_link.py index 5d4dae85abc107..97523f3381f0ef 100644 --- a/src/sentry/issues/endpoints/project_stacktrace_link.py +++ b/src/sentry/issues/endpoints/project_stacktrace_link.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import TypedDict +from typing import int, TypedDict from django.http import QueryDict from rest_framework.request import Request diff --git a/src/sentry/issues/endpoints/project_user_issue.py b/src/sentry/issues/endpoints/project_user_issue.py index 9e3a07513124de..8db5741bf110e7 100644 --- a/src/sentry/issues/endpoints/project_user_issue.py +++ b/src/sentry/issues/endpoints/project_user_issue.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime from uuid import uuid4 diff --git a/src/sentry/issues/endpoints/related_issues.py b/src/sentry/issues/endpoints/related_issues.py index 01dbfcd000f78c..bf7c750b87721b 100644 --- a/src/sentry/issues/endpoints/related_issues.py +++ b/src/sentry/issues/endpoints/related_issues.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/serializers.py b/src/sentry/issues/endpoints/serializers.py index ff3ff697510377..9b092b5e5b0c77 100644 --- a/src/sentry/issues/endpoints/serializers.py +++ b/src/sentry/issues/endpoints/serializers.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, MutableMapping -from typing import Any +from typing import int, Any import sentry_sdk from rest_framework import serializers diff --git a/src/sentry/issues/endpoints/shared_group_details.py b/src/sentry/issues/endpoints/shared_group_details.py index 4cfdf4fb5ad416..7e883e7d44cc51 100644 --- a/src/sentry/issues/endpoints/shared_group_details.py +++ b/src/sentry/issues/endpoints/shared_group_details.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/issues/endpoints/source_map_debug.py b/src/sentry/issues/endpoints/source_map_debug.py index 28a3181d2410be..0df0dc8d174bc6 100644 --- a/src/sentry/issues/endpoints/source_map_debug.py +++ b/src/sentry/issues/endpoints/source_map_debug.py @@ -1,4 +1,4 @@ -from typing import Any, TypedDict +from typing import Any, TypedDict, int from drf_spectacular.utils import extend_schema from rest_framework.exceptions import ParseError diff --git a/src/sentry/issues/endpoints/team_all_unresolved_issues.py b/src/sentry/issues/endpoints/team_all_unresolved_issues.py index bc9a805e8e972a..5f6db9fce47353 100644 --- a/src/sentry/issues/endpoints/team_all_unresolved_issues.py +++ b/src/sentry/issues/endpoints/team_all_unresolved_issues.py @@ -3,7 +3,7 @@ from collections import defaultdict from datetime import timedelta from itertools import chain -from typing import TypedDict +from typing import int, TypedDict from django.db.models import Case, Count, F, Q, QuerySet, Value, When from django.db.models.functions import TruncDay diff --git a/src/sentry/issues/endpoints/team_groups_old.py b/src/sentry/issues/endpoints/team_groups_old.py index df79491653a72a..9b4ff9ebd1a534 100644 --- a/src/sentry/issues/endpoints/team_groups_old.py +++ b/src/sentry/issues/endpoints/team_groups_old.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from django.db.models import Q diff --git a/src/sentry/issues/endpoints/team_issue_breakdown.py b/src/sentry/issues/endpoints/team_issue_breakdown.py index ac41216da78850..f35ace9610e790 100644 --- a/src/sentry/issues/endpoints/team_issue_breakdown.py +++ b/src/sentry/issues/endpoints/team_issue_breakdown.py @@ -1,3 +1,4 @@ +from typing import int import copy from datetime import timedelta from itertools import chain diff --git a/src/sentry/issues/escalating/escalating.py b/src/sentry/issues/escalating/escalating.py index 54888707405c4b..1491b364f002d4 100644 --- a/src/sentry/issues/escalating/escalating.py +++ b/src/sentry/issues/escalating/escalating.py @@ -7,7 +7,7 @@ from collections import defaultdict from collections.abc import Iterable, Mapping, Sequence from datetime import datetime, timedelta -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.db.models.signals import post_save from snuba_sdk import ( diff --git a/src/sentry/issues/escalating/escalating_group_forecast.py b/src/sentry/issues/escalating/escalating_group_forecast.py index 9a5fa5b9087068..081ec513f140c7 100644 --- a/src/sentry/issues/escalating/escalating_group_forecast.py +++ b/src/sentry/issues/escalating/escalating_group_forecast.py @@ -9,7 +9,7 @@ import logging from dataclasses import dataclass from datetime import datetime, timedelta -from typing import TypedDict +from typing import int, TypedDict from sentry import nodestore from sentry.models.group import Group diff --git a/src/sentry/issues/escalating/escalating_issues_alg.py b/src/sentry/issues/escalating/escalating_issues_alg.py index 225683381ce073..dfc01af978dac3 100644 --- a/src/sentry/issues/escalating/escalating_issues_alg.py +++ b/src/sentry/issues/escalating/escalating_issues_alg.py @@ -2,7 +2,7 @@ import statistics from dataclasses import dataclass from datetime import datetime, timedelta -from typing import TypedDict +from typing import int, TypedDict class IssueForecast(TypedDict): diff --git a/src/sentry/issues/escalating/forecasts.py b/src/sentry/issues/escalating/forecasts.py index 1f9dd16d5976d9..a07f5f3f216389 100644 --- a/src/sentry/issues/escalating/forecasts.py +++ b/src/sentry/issues/escalating/forecasts.py @@ -1,3 +1,4 @@ +from typing import int """ This module is for helper functions for escalating issues forecasts. """ diff --git a/src/sentry/issues/escalating/issue_velocity.py b/src/sentry/issues/escalating/issue_velocity.py index 2d5e9462b0d261..d27c822ed60c41 100644 --- a/src/sentry/issues/escalating/issue_velocity.py +++ b/src/sentry/issues/escalating/issue_velocity.py @@ -7,7 +7,7 @@ import logging import math from datetime import datetime, timedelta -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from django.conf import settings from sentry_redis_tools.clients import RedisCluster, StrictRedis diff --git a/src/sentry/issues/group.py b/src/sentry/issues/group.py index 801561bb2fcb0e..183b11f2deac7a 100644 --- a/src/sentry/issues/group.py +++ b/src/sentry/issues/group.py @@ -1,3 +1,4 @@ +from typing import int from sentry.issues.ingest import hash_fingerprint from sentry.models.group import Group diff --git a/src/sentry/issues/grouptype.py b/src/sentry/issues/grouptype.py index a42588fe4fb11a..1540beef126f01 100644 --- a/src/sentry/issues/grouptype.py +++ b/src/sentry/issues/grouptype.py @@ -6,7 +6,7 @@ from dataclasses import dataclass, field from datetime import timedelta from enum import IntEnum, StrEnum -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int import sentry_sdk from django.apps import apps diff --git a/src/sentry/issues/highlights.py b/src/sentry/issues/highlights.py index 8f3703a3cdca11..4c3c35f578ff51 100644 --- a/src/sentry/issues/highlights.py +++ b/src/sentry/issues/highlights.py @@ -1,5 +1,5 @@ import re -from typing import TypedDict +from typing import int, TypedDict from drf_spectacular.types import OpenApiTypes from drf_spectacular.utils import extend_schema_field diff --git a/src/sentry/issues/ignored.py b/src/sentry/issues/ignored.py index 16596624de75a3..d28f2dea876780 100644 --- a/src/sentry/issues/ignored.py +++ b/src/sentry/issues/ignored.py @@ -4,7 +4,7 @@ from collections import defaultdict from collections.abc import Sequence from datetime import datetime, timedelta -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.utils import timezone diff --git a/src/sentry/issues/ingest.py b/src/sentry/issues/ingest.py index b909a827f21cee..f666a7298ef763 100644 --- a/src/sentry/issues/ingest.py +++ b/src/sentry/issues/ingest.py @@ -4,7 +4,7 @@ from collections.abc import Mapping from datetime import datetime from hashlib import md5 -from typing import Any, TypedDict +from typing import Any, TypedDict, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/issues/issue_occurrence.py b/src/sentry/issues/issue_occurrence.py index 3fa9ecf5aa72a2..df4a041f612723 100644 --- a/src/sentry/issues/issue_occurrence.py +++ b/src/sentry/issues/issue_occurrence.py @@ -5,7 +5,7 @@ from collections.abc import Mapping, Sequence from dataclasses import dataclass from datetime import datetime -from typing import Any, NotRequired, TypedDict, cast +from typing import Any, NotRequired, TypedDict, cast, int from django.utils.timezone import is_aware diff --git a/src/sentry/issues/issue_search.py b/src/sentry/issues/issue_search.py index 858c8aa8985b42..b1f6e60b276764 100644 --- a/src/sentry/issues/issue_search.py +++ b/src/sentry/issues/issue_search.py @@ -2,7 +2,7 @@ from collections.abc import Callable, Iterable, Mapping, Sequence from functools import partial -from typing import overload +from typing import int, overload from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/issues/json_schemas.py b/src/sentry/issues/json_schemas.py index 8bf3c8f96b7267..31a816c0fb3b08 100644 --- a/src/sentry/issues/json_schemas.py +++ b/src/sentry/issues/json_schemas.py @@ -1,7 +1,7 @@ import logging import pathlib from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.utils import json diff --git a/src/sentry/issues/merge.py b/src/sentry/issues/merge.py index fad6af02a1adb5..d1a25bef1e79f0 100644 --- a/src/sentry/issues/merge.py +++ b/src/sentry/issues/merge.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, Sequence -from typing import TypedDict +from typing import int, TypedDict from uuid import uuid4 import rest_framework diff --git a/src/sentry/issues/occurrence_consumer.py b/src/sentry/issues/occurrence_consumer.py index a39c22c67eb2dc..3f24a75c303f57 100644 --- a/src/sentry/issues/occurrence_consumer.py +++ b/src/sentry/issues/occurrence_consumer.py @@ -4,7 +4,7 @@ from collections import defaultdict from collections.abc import Mapping from concurrent.futures import ThreadPoolExecutor, wait -from typing import Any +from typing import int, Any from uuid import UUID import jsonschema diff --git a/src/sentry/issues/ongoing.py b/src/sentry/issues/ongoing.py index 71318a2b09231d..f1a356907153f5 100644 --- a/src/sentry/issues/ongoing.py +++ b/src/sentry/issues/ongoing.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any import sentry_sdk from django.db.models.signals import post_save diff --git a/src/sentry/issues/ownership/grammar.py b/src/sentry/issues/ownership/grammar.py index a5143d6975b66d..630595bb92fcc9 100644 --- a/src/sentry/issues/ownership/grammar.py +++ b/src/sentry/issues/ownership/grammar.py @@ -3,7 +3,7 @@ import re from collections import namedtuple from collections.abc import Callable, Iterable, Mapping, Sequence -from typing import TYPE_CHECKING, Any, NamedTuple +from typing import TYPE_CHECKING, Any, NamedTuple, int from parsimonious.exceptions import ParseError from parsimonious.grammar import Grammar diff --git a/src/sentry/issues/priority.py b/src/sentry/issues/priority.py index 2895a81df7af37..6b5cd835d6fc22 100644 --- a/src/sentry/issues/priority.py +++ b/src/sentry/issues/priority.py @@ -2,7 +2,7 @@ import logging from enum import StrEnum -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.models.activity import Activity from sentry.models.grouphistory import GroupHistoryStatus, record_group_history diff --git a/src/sentry/issues/producer.py b/src/sentry/issues/producer.py index 905667e28de1ec..a34e230b93ef4f 100644 --- a/src/sentry/issues/producer.py +++ b/src/sentry/issues/producer.py @@ -2,7 +2,7 @@ import logging from collections.abc import MutableMapping -from typing import Any, cast +from typing import Any, cast, int from arroyo import Topic as ArroyoTopic from arroyo.backends.kafka import KafkaPayload, KafkaProducer diff --git a/src/sentry/issues/query.py b/src/sentry/issues/query.py index 1fa61c84a7c46d..a3199b124e21e2 100644 --- a/src/sentry/issues/query.py +++ b/src/sentry/issues/query.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from snuba_sdk import Column, Function from snuba_sdk.query import SelectableExpression diff --git a/src/sentry/issues/receivers.py b/src/sentry/issues/receivers.py index d3b37a9e3bf772..7581749faf75ba 100644 --- a/src/sentry/issues/receivers.py +++ b/src/sentry/issues/receivers.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.models.group import Group from sentry.models.groupsnooze import GroupSnooze diff --git a/src/sentry/issues/related/same_root_cause.py b/src/sentry/issues/related/same_root_cause.py index aa822488bc80b3..f6373796c511ca 100644 --- a/src/sentry/issues/related/same_root_cause.py +++ b/src/sentry/issues/related/same_root_cause.py @@ -3,6 +3,7 @@ # The first case this module handles is environmental failures. # # Refer to README in module for more details. +from typing import int from sentry.models.group import Group from sentry.utils.query import RangeQuerySetWrapper diff --git a/src/sentry/issues/related/trace_connected.py b/src/sentry/issues/related/trace_connected.py index 51cf0de2c28083..49ab29bf17b936 100644 --- a/src/sentry/issues/related/trace_connected.py +++ b/src/sentry/issues/related/trace_connected.py @@ -1,6 +1,7 @@ # Module to evaluate if other errors happened in the same trace. # # Refer to README in module for more details. +from typing import int from sentry.api.utils import default_start_end_dates from sentry.models.group import Group from sentry.models.project import Project diff --git a/src/sentry/issues/run.py b/src/sentry/issues/run.py index 057a7023436c39..12f2e3cc16fd7c 100644 --- a/src/sentry/issues/run.py +++ b/src/sentry/issues/run.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping from concurrent.futures import ThreadPoolExecutor -from typing import Literal +from typing import int, Literal import orjson from arroyo.backends.kafka import KafkaPayload diff --git a/src/sentry/issues/search.py b/src/sentry/issues/search.py index 49ad95ad89e364..6c2276e6be4a68 100644 --- a/src/sentry/issues/search.py +++ b/src/sentry/issues/search.py @@ -4,7 +4,7 @@ import logging from collections.abc import Callable, Mapping, Sequence from copy import deepcopy -from typing import Any, Optional, Protocol, TypedDict, TypeGuard +from typing import Any, Optional, Protocol, TypedDict, TypeGuard, int from sentry.api.event_search import SearchFilter, SearchKey, SearchValue from sentry.issues import grouptype diff --git a/src/sentry/issues/services/issue/__init__.py b/src/sentry/issues/services/issue/__init__.py index e3e98aa77da95b..163f2e0040e848 100644 --- a/src/sentry/issues/services/issue/__init__.py +++ b/src/sentry/issues/services/issue/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .service import issue_service # noqa __all__ = ("issue_service",) diff --git a/src/sentry/issues/services/issue/impl.py b/src/sentry/issues/services/issue/impl.py index 4bc64b263d34f8..469314c42dc0c1 100644 --- a/src/sentry/issues/services/issue/impl.py +++ b/src/sentry/issues/services/issue/impl.py @@ -4,6 +4,7 @@ # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from django.db.models import Max from sentry.integrations.models.external_issue import ExternalIssue diff --git a/src/sentry/issues/services/issue/model.py b/src/sentry/issues/services/issue/model.py index 5be1dbebf7b15d..f3e9d0034aa3ac 100644 --- a/src/sentry/issues/services/issue/model.py +++ b/src/sentry/issues/services/issue/model.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from sentry.hybridcloud.rpc import RpcModel diff --git a/src/sentry/issues/services/issue/service.py b/src/sentry/issues/services/issue/service.py index 48dcd5956a6c79..cc021ef1a884b6 100644 --- a/src/sentry/issues/services/issue/service.py +++ b/src/sentry/issues/services/issue/service.py @@ -4,6 +4,7 @@ # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from abc import abstractmethod from sentry.hybridcloud.rpc.resolvers import ByOrganizationId, ByOrganizationSlug, ByRegionName diff --git a/src/sentry/issues/status_change.py b/src/sentry/issues/status_change.py index 39103830060413..199610835f6c54 100644 --- a/src/sentry/issues/status_change.py +++ b/src/sentry/issues/status_change.py @@ -4,7 +4,7 @@ from collections import defaultdict from collections.abc import Mapping, Sequence from datetime import datetime, timedelta, timezone -from typing import Any +from typing import int, Any from django.db.models.signals import post_save diff --git a/src/sentry/issues/status_change_consumer.py b/src/sentry/issues/status_change_consumer.py index fb6a6f9214443f..08957accbbf0bb 100644 --- a/src/sentry/issues/status_change_consumer.py +++ b/src/sentry/issues/status_change_consumer.py @@ -3,7 +3,7 @@ import logging from collections import defaultdict from collections.abc import Callable, Iterable, Mapping, Sequence -from typing import Any +from typing import int, Any import sentry_sdk from sentry_sdk.tracing import NoOpSpan, Span, Transaction diff --git a/src/sentry/issues/status_change_message.py b/src/sentry/issues/status_change_message.py index 253efbe1fe6522..800a7196fdca35 100644 --- a/src/sentry/issues/status_change_message.py +++ b/src/sentry/issues/status_change_message.py @@ -3,7 +3,7 @@ from collections.abc import Sequence from dataclasses import dataclass, field from datetime import datetime -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int from uuid import uuid4 diff --git a/src/sentry/issues/suspect_flags.py b/src/sentry/issues/suspect_flags.py index 76c3267c05bbe7..343f154518a56a 100644 --- a/src/sentry/issues/suspect_flags.py +++ b/src/sentry/issues/suspect_flags.py @@ -1,6 +1,6 @@ from collections import defaultdict from datetime import datetime -from typing import TypedDict +from typing import int, TypedDict import sentry_sdk from snuba_sdk import Column, Condition, Entity, Function, Limit, Op, Query, Request diff --git a/src/sentry/issues/suspect_tags.py b/src/sentry/issues/suspect_tags.py index 2ef0129cd88701..8df081e590e5a3 100644 --- a/src/sentry/issues/suspect_tags.py +++ b/src/sentry/issues/suspect_tags.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import NamedTuple +from typing import int, NamedTuple import sentry_sdk from snuba_sdk import Column, Condition, Entity, Function, Limit, Op, Query, Request diff --git a/src/sentry/issues/update_inbox.py b/src/sentry/issues/update_inbox.py index 73ff6e5b11b85c..3023f30df702b3 100644 --- a/src/sentry/issues/update_inbox.py +++ b/src/sentry/issues/update_inbox.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from sentry.issues.ongoing import bulk_transition_group_to_ongoing from sentry.models.group import Group, GroupStatus diff --git a/src/sentry/killswitches.py b/src/sentry/killswitches.py index 6cad0657d4ded5..8034edd4985f8e 100644 --- a/src/sentry/killswitches.py +++ b/src/sentry/killswitches.py @@ -9,7 +9,7 @@ from collections.abc import Callable, Mapping, Sequence from dataclasses import dataclass -from typing import Any, Optional, Union +from typing import Any, Optional, Union, int import click diff --git a/src/sentry/lang/dart/apps.py b/src/sentry/lang/dart/apps.py index 8edbcf042b9306..341a4e87262d4d 100644 --- a/src/sentry/lang/dart/apps.py +++ b/src/sentry/lang/dart/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/lang/dart/plugin.py b/src/sentry/lang/dart/plugin.py index 665177da30d475..16930055abfabb 100644 --- a/src/sentry/lang/dart/plugin.py +++ b/src/sentry/lang/dart/plugin.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from sentry.lang.dart.utils import deobfuscate_exception_type, get_debug_meta_image_ids from sentry.plugins.base.v2 import EventPreprocessor, Plugin2 diff --git a/src/sentry/lang/dart/utils.py b/src/sentry/lang/dart/utils.py index 8673697394ee64..8252908bd67d1b 100644 --- a/src/sentry/lang/dart/utils.py +++ b/src/sentry/lang/dart/utils.py @@ -3,7 +3,7 @@ import os import re from collections.abc import MutableMapping -from typing import Any +from typing import int, Any import orjson import sentry_sdk diff --git a/src/sentry/lang/java/apps.py b/src/sentry/lang/java/apps.py index c426036e4c7e6a..ad0dedc4c1c48a 100644 --- a/src/sentry/lang/java/apps.py +++ b/src/sentry/lang/java/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/lang/java/exceptions.py b/src/sentry/lang/java/exceptions.py index b221c9ef727289..adbf506b9673c2 100644 --- a/src/sentry/lang/java/exceptions.py +++ b/src/sentry/lang/java/exceptions.py @@ -1,5 +1,5 @@ import re -from typing import Any +from typing import int, Any from sentry.utils.safe import get_path diff --git a/src/sentry/lang/java/plugin.py b/src/sentry/lang/java/plugin.py index 3d9ad938e8126f..a1b07ce7d0150a 100644 --- a/src/sentry/lang/java/plugin.py +++ b/src/sentry/lang/java/plugin.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from sentry.lang.java.processing import deobfuscate_exception_value from sentry.lang.java.utils import has_proguard_file diff --git a/src/sentry/lang/java/processing.py b/src/sentry/lang/java/processing.py index c00aaae63256ff..464c510be5a688 100644 --- a/src/sentry/lang/java/processing.py +++ b/src/sentry/lang/java/processing.py @@ -1,6 +1,6 @@ import logging import re -from typing import Any +from typing import int, Any from sentry.lang.java.exceptions import Exceptions from sentry.lang.java.utils import JAVA_PLATFORMS, get_jvm_images, get_proguard_images diff --git a/src/sentry/lang/java/proguard.py b/src/sentry/lang/java/proguard.py index 2a33b92bcf2b6e..b65c4435d2ce9d 100644 --- a/src/sentry/lang/java/proguard.py +++ b/src/sentry/lang/java/proguard.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from symbolic.proguard import ProguardMapper diff --git a/src/sentry/lang/java/utils.py b/src/sentry/lang/java/utils.py index 7fd54091924eac..1fa7a2fb7fbcc4 100644 --- a/src/sentry/lang/java/utils.py +++ b/src/sentry/lang/java/utils.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.stacktraces.processing import StacktraceInfo from sentry.utils.safe import get_path diff --git a/src/sentry/lang/java/view_hierarchies.py b/src/sentry/lang/java/view_hierarchies.py index 3a42736710338a..18983e4b66d3af 100644 --- a/src/sentry/lang/java/view_hierarchies.py +++ b/src/sentry/lang/java/view_hierarchies.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import orjson diff --git a/src/sentry/lang/javascript/apps.py b/src/sentry/lang/javascript/apps.py index 39b6916ab76436..fbf2ce3c33528c 100644 --- a/src/sentry/lang/javascript/apps.py +++ b/src/sentry/lang/javascript/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/lang/javascript/cache.py b/src/sentry/lang/javascript/cache.py index 827215c2f80670..e145c431bd0199 100644 --- a/src/sentry/lang/javascript/cache.py +++ b/src/sentry/lang/javascript/cache.py @@ -1,3 +1,4 @@ +from typing import int from symbolic.sourcemap import SourceView from sentry.utils.strings import codec_lookup diff --git a/src/sentry/lang/javascript/errorlocale.py b/src/sentry/lang/javascript/errorlocale.py index a8f39fd2288279..61a238d8dde7f9 100644 --- a/src/sentry/lang/javascript/errorlocale.py +++ b/src/sentry/lang/javascript/errorlocale.py @@ -1,3 +1,4 @@ +from typing import int import functools import os import re diff --git a/src/sentry/lang/javascript/errormapping.py b/src/sentry/lang/javascript/errormapping.py index 434fde263d198b..de7f252585096e 100644 --- a/src/sentry/lang/javascript/errormapping.py +++ b/src/sentry/lang/javascript/errormapping.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import random diff --git a/src/sentry/lang/javascript/plugin.py b/src/sentry/lang/javascript/plugin.py index be1627aedce756..db2e5e4f9e1046 100644 --- a/src/sentry/lang/javascript/plugin.py +++ b/src/sentry/lang/javascript/plugin.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from sentry.plugins.base.v2 import EventPreprocessor, Plugin2 from sentry.stacktraces.processing import find_stacktraces_in_data diff --git a/src/sentry/lang/javascript/processing.py b/src/sentry/lang/javascript/processing.py index 1a2337ccd7309f..7a7403633ea7bb 100644 --- a/src/sentry/lang/javascript/processing.py +++ b/src/sentry/lang/javascript/processing.py @@ -1,6 +1,6 @@ import logging import re -from typing import Any +from typing import int, Any from sentry.debug_files.artifact_bundles import maybe_renew_artifact_bundles_from_processing from sentry.lang.javascript.utils import JAVASCRIPT_PLATFORMS diff --git a/src/sentry/lang/javascript/utils.py b/src/sentry/lang/javascript/utils.py index a17f6f30007cd7..1c778d87f04a36 100644 --- a/src/sentry/lang/javascript/utils.py +++ b/src/sentry/lang/javascript/utils.py @@ -2,7 +2,7 @@ import re from os.path import splitext -from typing import Any +from typing import int, Any from urllib.parse import urlsplit from sentry.stacktraces.processing import StacktraceInfo diff --git a/src/sentry/lang/native/applecrashreport.py b/src/sentry/lang/native/applecrashreport.py index f44397d5ca0576..cb5f99587d9254 100644 --- a/src/sentry/lang/native/applecrashreport.py +++ b/src/sentry/lang/native/applecrashreport.py @@ -1,3 +1,4 @@ +from typing import int import posixpath from collections.abc import Mapping diff --git a/src/sentry/lang/native/error.py b/src/sentry/lang/native/error.py index fe6bc5e63fbb3c..2f427c9e08a9ad 100644 --- a/src/sentry/lang/native/error.py +++ b/src/sentry/lang/native/error.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/lang/native/processing.py b/src/sentry/lang/native/processing.py index 2b09d5d281a627..a86ce57515ce51 100644 --- a/src/sentry/lang/native/processing.py +++ b/src/sentry/lang/native/processing.py @@ -3,7 +3,7 @@ import logging import posixpath from collections.abc import Callable, Mapping -from typing import Any +from typing import int, Any import sentry_sdk from symbolic.debuginfo import normalize_debug_id diff --git a/src/sentry/lang/native/registers.py b/src/sentry/lang/native/registers.py index ae687b69290552..1e836faa7e04b0 100644 --- a/src/sentry/lang/native/registers.py +++ b/src/sentry/lang/native/registers.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping # Architecture "x86" (alias "i386", "i686") diff --git a/src/sentry/lang/native/sources.py b/src/sentry/lang/native/sources.py index b97eee02cf5dcb..6aeecfb0b1c2df 100644 --- a/src/sentry/lang/native/sources.py +++ b/src/sentry/lang/native/sources.py @@ -5,7 +5,7 @@ import os from copy import deepcopy from datetime import datetime -from typing import Any +from typing import int, Any import google.auth import jsonschema diff --git a/src/sentry/lang/native/symbolicator.py b/src/sentry/lang/native/symbolicator.py index 78be8cc3ccc0be..1f5c60f0ca7696 100644 --- a/src/sentry/lang/native/symbolicator.py +++ b/src/sentry/lang/native/symbolicator.py @@ -7,7 +7,7 @@ from collections.abc import Callable from dataclasses import dataclass from enum import Enum -from typing import Any +from typing import int, Any from urllib.parse import urljoin import orjson diff --git a/src/sentry/lang/native/utils.py b/src/sentry/lang/native/utils.py index b5363929fde3c8..4e32ad797bc8e3 100644 --- a/src/sentry/lang/native/utils.py +++ b/src/sentry/lang/native/utils.py @@ -2,7 +2,7 @@ import re import time from collections.abc import Mapping -from typing import Any, overload +from typing import Any, overload, int from sentry.attachments import CachedAttachment, get_attachments_for_event from sentry.stacktraces.processing import StacktraceInfo diff --git a/src/sentry/loader/browsersdkversion.py b/src/sentry/loader/browsersdkversion.py index ffb758deea7e0e..c0cdddc50c06b5 100644 --- a/src/sentry/loader/browsersdkversion.py +++ b/src/sentry/loader/browsersdkversion.py @@ -1,3 +1,4 @@ +from typing import int import functools import logging import os diff --git a/src/sentry/loader/dynamic_sdk_options.py b/src/sentry/loader/dynamic_sdk_options.py index eeb67331bce581..8ac8556e60739f 100644 --- a/src/sentry/loader/dynamic_sdk_options.py +++ b/src/sentry/loader/dynamic_sdk_options.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum diff --git a/src/sentry/locks.py b/src/sentry/locks.py index d41b38392f60f0..40cef7a977435d 100644 --- a/src/sentry/locks.py +++ b/src/sentry/locks.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.locking.backends import LockBackend diff --git a/src/sentry/logging/__init__.py b/src/sentry/logging/__init__.py index cc34ea1dcffc6c..16877142143d6f 100644 --- a/src/sentry/logging/__init__.py +++ b/src/sentry/logging/__init__.py @@ -1,3 +1,4 @@ +from typing import int class LoggingFormat: HUMAN = "human" MACHINE = "machine" diff --git a/src/sentry/logging/handlers.py b/src/sentry/logging/handlers.py index 60b8408ec7a88e..a02ce2a3e4cf5a 100644 --- a/src/sentry/logging/handlers.py +++ b/src/sentry/logging/handlers.py @@ -3,7 +3,7 @@ import logging import random import re -from typing import Any +from typing import int, Any from django.utils.timezone import now from structlog import get_logger diff --git a/src/sentry/mail/__init__.py b/src/sentry/mail/__init__.py index a60cd72f43e4e6..0c85fb059ffe5f 100644 --- a/src/sentry/mail/__init__.py +++ b/src/sentry/mail/__init__.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.conf import settings diff --git a/src/sentry/mail/actions.py b/src/sentry/mail/actions.py index 490ba247e3227f..7dbfdad7a2d299 100644 --- a/src/sentry/mail/actions.py +++ b/src/sentry/mail/actions.py @@ -1,6 +1,6 @@ import logging from collections.abc import Generator -from typing import Any +from typing import int, Any from sentry.mail import mail_adapter from sentry.mail.forms.notify_email import NotifyEmailForm diff --git a/src/sentry/mail/adapter.py b/src/sentry/mail/adapter.py index a0be69e1521cb7..3afb70d3ff0c71 100644 --- a/src/sentry/mail/adapter.py +++ b/src/sentry/mail/adapter.py @@ -1,7 +1,7 @@ import logging from collections import namedtuple from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from sentry import digests from sentry.digests import get_option_key as get_digest_option_key diff --git a/src/sentry/mail/analytics.py b/src/sentry/mail/analytics.py index ca1bcdb7e9baee..41481a48063e6f 100644 --- a/src/sentry/mail/analytics.py +++ b/src/sentry/mail/analytics.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics from sentry.analytics.events.base_notification_sent import BaseNotificationSent diff --git a/src/sentry/mail/forms/__init__.py b/src/sentry/mail/forms/__init__.py index db61d61857d416..212482551d3084 100644 --- a/src/sentry/mail/forms/__init__.py +++ b/src/sentry/mail/forms/__init__.py @@ -1,3 +1,4 @@ +from typing import int from . import assigned_to # NOQA from . import member_team # NOQA from . import notify_email # NOQA diff --git a/src/sentry/mail/forms/assigned_to.py b/src/sentry/mail/forms/assigned_to.py index 602fa852beb710..c24ac815c37a5c 100644 --- a/src/sentry/mail/forms/assigned_to.py +++ b/src/sentry/mail/forms/assigned_to.py @@ -1,3 +1,4 @@ +from typing import int from django import forms from sentry.mail.forms.member_team import MemberTeamForm diff --git a/src/sentry/mail/forms/member_team.py b/src/sentry/mail/forms/member_team.py index cb7eea70ae9f6b..2bb2d4c4b8af8b 100644 --- a/src/sentry/mail/forms/member_team.py +++ b/src/sentry/mail/forms/member_team.py @@ -1,7 +1,7 @@ from __future__ import annotations import enum -from typing import Any, Generic, TypeVar +from typing import Any, Generic, TypeVar, int from django import forms diff --git a/src/sentry/mail/forms/notify_email.py b/src/sentry/mail/forms/notify_email.py index 25fecce59b303f..bdbe9c93ee7d94 100644 --- a/src/sentry/mail/forms/notify_email.py +++ b/src/sentry/mail/forms/notify_email.py @@ -1,3 +1,4 @@ +from typing import int from django import forms from sentry.mail.forms.member_team import MemberTeamForm diff --git a/src/sentry/mail/notifications.py b/src/sentry/mail/notifications.py index 7c325fba3ba377..4214f84ec5fec0 100644 --- a/src/sentry/mail/notifications.py +++ b/src/sentry/mail/notifications.py @@ -2,7 +2,7 @@ import logging from collections.abc import Iterable, Mapping, MutableMapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar, int import orjson import sentry_sdk diff --git a/src/sentry/management/commands/check_notifications.py b/src/sentry/management/commands/check_notifications.py index 2693a46aec0ef0..838fcba389a235 100644 --- a/src/sentry/management/commands/check_notifications.py +++ b/src/sentry/management/commands/check_notifications.py @@ -1,3 +1,4 @@ +from typing import int from django.core.management.base import BaseCommand, CommandError from sentry.mail import mail_adapter diff --git a/src/sentry/management/commands/collectstatic.py b/src/sentry/management/commands/collectstatic.py index 377879694aebdf..1b377ccedd209f 100644 --- a/src/sentry/management/commands/collectstatic.py +++ b/src/sentry/management/commands/collectstatic.py @@ -1,3 +1,4 @@ +from typing import int import os from hashlib import md5 from itertools import chain diff --git a/src/sentry/management/commands/create_sample_event.py b/src/sentry/management/commands/create_sample_event.py index a2ef3f96e9e9f0..eafa871f4f4868 100644 --- a/src/sentry/management/commands/create_sample_event.py +++ b/src/sentry/management/commands/create_sample_event.py @@ -1,3 +1,4 @@ +from typing import int from django.core.management.base import BaseCommand, CommandError diff --git a/src/sentry/management/commands/createsuperuser.py b/src/sentry/management/commands/createsuperuser.py index 9dc13719ed3e5c..8920e3ebb39bb5 100644 --- a/src/sentry/management/commands/createsuperuser.py +++ b/src/sentry/management/commands/createsuperuser.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.auth.management.commands.createsuperuser import Command as DjangoCommand diff --git a/src/sentry/management/commands/devsyncdb.py b/src/sentry/management/commands/devsyncdb.py index f06889eb278dca..c7951a3c8640e0 100644 --- a/src/sentry/management/commands/devsyncdb.py +++ b/src/sentry/management/commands/devsyncdb.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.conf import settings from django.core.management.commands import migrate diff --git a/src/sentry/management/commands/generate_controlsilo_urls.py b/src/sentry/management/commands/generate_controlsilo_urls.py index 43109dd0a49d84..7e19e134f14505 100644 --- a/src/sentry/management/commands/generate_controlsilo_urls.py +++ b/src/sentry/management/commands/generate_controlsilo_urls.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import functools import importlib diff --git a/src/sentry/management/commands/generate_reset_password_link.py b/src/sentry/management/commands/generate_reset_password_link.py index 919dd64cb44095..f99e805dbbac8e 100644 --- a/src/sentry/management/commands/generate_reset_password_link.py +++ b/src/sentry/management/commands/generate_reset_password_link.py @@ -1,3 +1,4 @@ +from typing import int import sys from click import echo diff --git a/src/sentry/management/commands/makemigrations.py b/src/sentry/management/commands/makemigrations.py index e64af5706366f1..b0872afca6c4e9 100644 --- a/src/sentry/management/commands/makemigrations.py +++ b/src/sentry/management/commands/makemigrations.py @@ -1,3 +1,4 @@ +from typing import int import os import sys diff --git a/src/sentry/management/commands/merge_users.py b/src/sentry/management/commands/merge_users.py index c810dd2f3e58e0..e8260829c99501 100644 --- a/src/sentry/management/commands/merge_users.py +++ b/src/sentry/management/commands/merge_users.py @@ -1,3 +1,4 @@ +from typing import int import operator import sys from functools import reduce diff --git a/src/sentry/metrics/base.py b/src/sentry/metrics/base.py index 637d5602e67b4f..e291ea992c3d1f 100644 --- a/src/sentry/metrics/base.py +++ b/src/sentry/metrics/base.py @@ -3,7 +3,7 @@ from collections.abc import Mapping, MutableMapping from random import random from threading import local -from typing import Union +from typing import int, Union from django.conf import settings diff --git a/src/sentry/metrics/datadog.py b/src/sentry/metrics/datadog.py index 4ab1b22229f003..c8c75182901e24 100644 --- a/src/sentry/metrics/datadog.py +++ b/src/sentry/metrics/datadog.py @@ -1,6 +1,6 @@ __all__ = ["DatadogMetricsBackend"] -from typing import Any +from typing import int, Any from datadog import initialize from datadog.threadstats.base import ThreadStats diff --git a/src/sentry/metrics/dogstatsd.py b/src/sentry/metrics/dogstatsd.py index 0830dc3691ee2d..61899baed6fb83 100644 --- a/src/sentry/metrics/dogstatsd.py +++ b/src/sentry/metrics/dogstatsd.py @@ -1,5 +1,5 @@ import atexit -from typing import Any +from typing import int, Any from datadog import initialize from datadog.dogstatsd.base import statsd diff --git a/src/sentry/metrics/dualwrite.py b/src/sentry/metrics/dualwrite.py index da6b8d9e8db767..7d37a836291200 100644 --- a/src/sentry/metrics/dualwrite.py +++ b/src/sentry/metrics/dualwrite.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, Literal +from typing import Any, Literal, int from sentry.metrics.base import MetricsBackend, Tags from sentry.metrics.dummy import DummyMetricsBackend diff --git a/src/sentry/metrics/dummy.py b/src/sentry/metrics/dummy.py index 0c47a860f8b255..c4e9bed0f799c4 100644 --- a/src/sentry/metrics/dummy.py +++ b/src/sentry/metrics/dummy.py @@ -1,3 +1,4 @@ +from typing import int from .base import MetricsBackend, Tags __all__ = ["DummyMetricsBackend"] diff --git a/src/sentry/metrics/logging.py b/src/sentry/metrics/logging.py index ad82b1de34aa22..2cafe4eafa52bb 100644 --- a/src/sentry/metrics/logging.py +++ b/src/sentry/metrics/logging.py @@ -1,3 +1,4 @@ +from typing import int import logging from .base import MetricsBackend, Tags diff --git a/src/sentry/metrics/middleware.py b/src/sentry/metrics/middleware.py index f0369e88fc4cb9..83839aea6e1f25 100644 --- a/src/sentry/metrics/middleware.py +++ b/src/sentry/metrics/middleware.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from contextlib import contextmanager from threading import local diff --git a/src/sentry/metrics/precise_dogstatsd.py b/src/sentry/metrics/precise_dogstatsd.py index bc5f5b0d00aba4..85efabf0ad13a7 100644 --- a/src/sentry/metrics/precise_dogstatsd.py +++ b/src/sentry/metrics/precise_dogstatsd.py @@ -1,5 +1,5 @@ import atexit -from typing import Any +from typing import int, Any from datadog.dogstatsd.base import DogStatsd diff --git a/src/sentry/metrics/sentry_sdk.py b/src/sentry/metrics/sentry_sdk.py index c124ee165c472a..045e6eca23b44f 100644 --- a/src/sentry/metrics/sentry_sdk.py +++ b/src/sentry/metrics/sentry_sdk.py @@ -1,5 +1,5 @@ from random import random -from typing import Any +from typing import int, Any from sentry_sdk import metrics diff --git a/src/sentry/metrics/statsd.py b/src/sentry/metrics/statsd.py index cfd48b240c38a9..3be5f3fb29f65b 100644 --- a/src/sentry/metrics/statsd.py +++ b/src/sentry/metrics/statsd.py @@ -1,6 +1,6 @@ __all__ = ["StatsdMetricsBackend"] -from typing import Any +from typing import int, Any import statsd diff --git a/src/sentry/middleware/__init__.py b/src/sentry/middleware/__init__.py index 300cae46e77841..688d2e9734f216 100644 --- a/src/sentry/middleware/__init__.py +++ b/src/sentry/middleware/__init__.py @@ -2,7 +2,7 @@ import inspect from collections.abc import Callable -from typing import Union +from typing import int, Union from django.views import View from rest_framework.request import Request diff --git a/src/sentry/middleware/access_log.py b/src/sentry/middleware/access_log.py index 5410abeba80c4a..8e5751c654e291 100644 --- a/src/sentry/middleware/access_log.py +++ b/src/sentry/middleware/access_log.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import time diff --git a/src/sentry/middleware/auth.py b/src/sentry/middleware/auth.py index 98a6bcbad9fd85..2477e16342cd0b 100644 --- a/src/sentry/middleware/auth.py +++ b/src/sentry/middleware/auth.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.contrib.auth import get_user as auth_get_user from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/middleware/customer_domain.py b/src/sentry/middleware/customer_domain.py index bc0de539a98136..0e7b2741755b54 100644 --- a/src/sentry/middleware/customer_domain.py +++ b/src/sentry/middleware/customer_domain.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Callable diff --git a/src/sentry/middleware/demo_mode_guard.py b/src/sentry/middleware/demo_mode_guard.py index be514f64484501..310bc4c90501f1 100644 --- a/src/sentry/middleware/demo_mode_guard.py +++ b/src/sentry/middleware/demo_mode_guard.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Callable diff --git a/src/sentry/middleware/devtoolbar.py b/src/sentry/middleware/devtoolbar.py index 6028178aa815ab..1cc1340bb07bcd 100644 --- a/src/sentry/middleware/devtoolbar.py +++ b/src/sentry/middleware/devtoolbar.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/middleware/env.py b/src/sentry/middleware/env.py index a146b03b7bce52..12cc8ac88fc0f7 100644 --- a/src/sentry/middleware/env.py +++ b/src/sentry/middleware/env.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Callable from django.http.request import HttpRequest diff --git a/src/sentry/middleware/health.py b/src/sentry/middleware/health.py index 6947b27104dbe9..82d910d6c536d3 100644 --- a/src/sentry/middleware/health.py +++ b/src/sentry/middleware/health.py @@ -1,3 +1,4 @@ +from typing import int import itertools import orjson diff --git a/src/sentry/middleware/integrations/__init__.py b/src/sentry/middleware/integrations/__init__.py index 74f7d0883155d0..7510e58561ce22 100644 --- a/src/sentry/middleware/integrations/__init__.py +++ b/src/sentry/middleware/integrations/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .integration_control import IntegrationControlMiddleware __all__ = ("IntegrationControlMiddleware",) diff --git a/src/sentry/middleware/integrations/classifications.py b/src/sentry/middleware/integrations/classifications.py index 5200e0b492ec70..4f4ec9da6fb0b9 100644 --- a/src/sentry/middleware/integrations/classifications.py +++ b/src/sentry/middleware/integrations/classifications.py @@ -3,7 +3,7 @@ import abc import re from collections.abc import Mapping -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING import sentry_sdk from django.http import HttpRequest, HttpResponse diff --git a/src/sentry/middleware/integrations/integration_control.py b/src/sentry/middleware/integrations/integration_control.py index 614ceb71a2f2b6..96bb58fc867e26 100644 --- a/src/sentry/middleware/integrations/integration_control.py +++ b/src/sentry/middleware/integrations/integration_control.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Callable diff --git a/src/sentry/middleware/integrations/parsers/__init__.py b/src/sentry/middleware/integrations/parsers/__init__.py index 3f86f633a3fca4..2fffb44aeeab31 100644 --- a/src/sentry/middleware/integrations/parsers/__init__.py +++ b/src/sentry/middleware/integrations/parsers/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .bitbucket import BitbucketRequestParser from .bitbucket_server import BitbucketServerRequestParser from .discord import DiscordRequestParser diff --git a/src/sentry/middleware/integrations/parsers/bitbucket.py b/src/sentry/middleware/integrations/parsers/bitbucket.py index a449c0e4aeb1c4..978de8277a2bb5 100644 --- a/src/sentry/middleware/integrations/parsers/bitbucket.py +++ b/src/sentry/middleware/integrations/parsers/bitbucket.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from django.http.response import HttpResponseBase diff --git a/src/sentry/middleware/integrations/parsers/bitbucket_server.py b/src/sentry/middleware/integrations/parsers/bitbucket_server.py index c73215ce8599d5..096237aa565ceb 100644 --- a/src/sentry/middleware/integrations/parsers/bitbucket_server.py +++ b/src/sentry/middleware/integrations/parsers/bitbucket_server.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/middleware/integrations/parsers/discord.py b/src/sentry/middleware/integrations/parsers/discord.py index e86ef69c6561c6..36f866d8d88a3f 100644 --- a/src/sentry/middleware/integrations/parsers/discord.py +++ b/src/sentry/middleware/integrations/parsers/discord.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Sequence diff --git a/src/sentry/middleware/integrations/parsers/github.py b/src/sentry/middleware/integrations/parsers/github.py index ec61466bdeb2c0..cbd034023404ac 100644 --- a/src/sentry/middleware/integrations/parsers/github.py +++ b/src/sentry/middleware/integrations/parsers/github.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any import orjson from django.http import HttpRequest, HttpResponse diff --git a/src/sentry/middleware/integrations/parsers/github_enterprise.py b/src/sentry/middleware/integrations/parsers/github_enterprise.py index 3f7cbdce60d00a..3381a125cc2aa2 100644 --- a/src/sentry/middleware/integrations/parsers/github_enterprise.py +++ b/src/sentry/middleware/integrations/parsers/github_enterprise.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.hybridcloud.outbox.category import WebhookProviderIdentifier from sentry.integrations.github.webhook import get_github_external_id diff --git a/src/sentry/middleware/integrations/parsers/gitlab.py b/src/sentry/middleware/integrations/parsers/gitlab.py index 6b6390e17695f1..930e23a0542284 100644 --- a/src/sentry/middleware/integrations/parsers/gitlab.py +++ b/src/sentry/middleware/integrations/parsers/gitlab.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any import orjson from django.http.response import HttpResponseBase diff --git a/src/sentry/middleware/integrations/parsers/google.py b/src/sentry/middleware/integrations/parsers/google.py index fd1b3ef2f45d53..383110b7c79e54 100644 --- a/src/sentry/middleware/integrations/parsers/google.py +++ b/src/sentry/middleware/integrations/parsers/google.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/middleware/integrations/parsers/jira.py b/src/sentry/middleware/integrations/parsers/jira.py index 5391f2201939dd..88dbd742f26284 100644 --- a/src/sentry/middleware/integrations/parsers/jira.py +++ b/src/sentry/middleware/integrations/parsers/jira.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/middleware/integrations/parsers/jira_server.py b/src/sentry/middleware/integrations/parsers/jira_server.py index 0b869699b37500..1fb8e20755e0dc 100644 --- a/src/sentry/middleware/integrations/parsers/jira_server.py +++ b/src/sentry/middleware/integrations/parsers/jira_server.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any import orjson from django.http import HttpResponse diff --git a/src/sentry/middleware/integrations/parsers/msteams.py b/src/sentry/middleware/integrations/parsers/msteams.py index b3ecf0f9cc8094..81d0838b5da4b2 100644 --- a/src/sentry/middleware/integrations/parsers/msteams.py +++ b/src/sentry/middleware/integrations/parsers/msteams.py @@ -3,7 +3,7 @@ import logging from collections.abc import Mapping, Sequence from functools import cached_property -from typing import Any +from typing import int, Any import orjson import sentry_sdk diff --git a/src/sentry/middleware/integrations/parsers/plugin.py b/src/sentry/middleware/integrations/parsers/plugin.py index d4547261ef57f0..dfcf1cf3d7259c 100644 --- a/src/sentry/middleware/integrations/parsers/plugin.py +++ b/src/sentry/middleware/integrations/parsers/plugin.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from django.http import HttpResponse from django.http.response import HttpResponseBase diff --git a/src/sentry/middleware/integrations/parsers/slack.py b/src/sentry/middleware/integrations/parsers/slack.py index 73f657fe65cb36..e2ddf15efb1b1e 100644 --- a/src/sentry/middleware/integrations/parsers/slack.py +++ b/src/sentry/middleware/integrations/parsers/slack.py @@ -2,7 +2,7 @@ import logging from collections.abc import Sequence -from typing import Any +from typing import int, Any from urllib.parse import parse_qs import orjson diff --git a/src/sentry/middleware/integrations/parsers/vercel.py b/src/sentry/middleware/integrations/parsers/vercel.py index 9f093757e40537..a13f1d9ca1f74d 100644 --- a/src/sentry/middleware/integrations/parsers/vercel.py +++ b/src/sentry/middleware/integrations/parsers/vercel.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/middleware/integrations/parsers/vsts.py b/src/sentry/middleware/integrations/parsers/vsts.py index 680c9e8c88ecb9..9fd8cac594e541 100644 --- a/src/sentry/middleware/integrations/parsers/vsts.py +++ b/src/sentry/middleware/integrations/parsers/vsts.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/middleware/integrations/tasks.py b/src/sentry/middleware/integrations/tasks.py index 74249ed9edacc6..e9fb1b828e08bc 100644 --- a/src/sentry/middleware/integrations/tasks.py +++ b/src/sentry/middleware/integrations/tasks.py @@ -2,7 +2,7 @@ from abc import ABC, abstractmethod from collections.abc import Iterable from dataclasses import dataclass -from typing import Any, cast +from typing import Any, cast, int import orjson import requests diff --git a/src/sentry/middleware/locale.py b/src/sentry/middleware/locale.py index 4a0d10c9369e2d..e481b3ba6493a5 100644 --- a/src/sentry/middleware/locale.py +++ b/src/sentry/middleware/locale.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from django.conf import settings from django.http.request import HttpRequest diff --git a/src/sentry/middleware/placeholder.py b/src/sentry/middleware/placeholder.py index 143555e1f82ec6..aae2bf29ac663a 100644 --- a/src/sentry/middleware/placeholder.py +++ b/src/sentry/middleware/placeholder.py @@ -1,4 +1,4 @@ -from typing import NoReturn +from typing import int, NoReturn from django.http import HttpRequest diff --git a/src/sentry/middleware/proxy.py b/src/sentry/middleware/proxy.py index d3e1e254d7588a..f57021a0af40f8 100644 --- a/src/sentry/middleware/proxy.py +++ b/src/sentry/middleware/proxy.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.conf import settings from django.core.exceptions import MiddlewareNotUsed diff --git a/src/sentry/middleware/ratelimit.py b/src/sentry/middleware/ratelimit.py index 4a603dfe847a7d..b9af0f1ebfebca 100644 --- a/src/sentry/middleware/ratelimit.py +++ b/src/sentry/middleware/ratelimit.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import uuid diff --git a/src/sentry/middleware/reporting_endpoint.py b/src/sentry/middleware/reporting_endpoint.py index 82bee201708c5b..8292c3bcade388 100644 --- a/src/sentry/middleware/reporting_endpoint.py +++ b/src/sentry/middleware/reporting_endpoint.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Callable from django.http.request import HttpRequest diff --git a/src/sentry/middleware/security.py b/src/sentry/middleware/security.py index 37b182fd71c26a..bdeaf6a9e81321 100644 --- a/src/sentry/middleware/security.py +++ b/src/sentry/middleware/security.py @@ -1,3 +1,4 @@ +from typing import int from django.utils.deprecation import MiddlewareMixin from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/middleware/staff.py b/src/sentry/middleware/staff.py index fe3e83129996b1..d5c550136dbcbd 100644 --- a/src/sentry/middleware/staff.py +++ b/src/sentry/middleware/staff.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Callable from django.conf import settings diff --git a/src/sentry/middleware/stats.py b/src/sentry/middleware/stats.py index 10ebc2126e3500..ad91ba9634330d 100644 --- a/src/sentry/middleware/stats.py +++ b/src/sentry/middleware/stats.py @@ -1,7 +1,7 @@ from __future__ import annotations import time -from typing import Any +from typing import int, Any from django.conf import settings from django.http import Http404 diff --git a/src/sentry/middleware/subdomain.py b/src/sentry/middleware/subdomain.py index 6685a33879079a..8e81a7c18b745b 100644 --- a/src/sentry/middleware/subdomain.py +++ b/src/sentry/middleware/subdomain.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Callable diff --git a/src/sentry/middleware/sudo.py b/src/sentry/middleware/sudo.py index 2866846a5249f7..eb69426cf0a67c 100644 --- a/src/sentry/middleware/sudo.py +++ b/src/sentry/middleware/sudo.py @@ -1,3 +1,4 @@ +from typing import int from django.http.request import HttpRequest from sudo.middleware import SudoMiddleware as BaseSudoMiddleware diff --git a/src/sentry/middleware/superuser.py b/src/sentry/middleware/superuser.py index db794056ca8f15..52c917f4443814 100644 --- a/src/sentry/middleware/superuser.py +++ b/src/sentry/middleware/superuser.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.utils.deprecation import MiddlewareMixin from rest_framework.request import Request diff --git a/src/sentry/migrations/0001_squashed_0904_onboarding_task_project_id_idx.py b/src/sentry/migrations/0001_squashed_0904_onboarding_task_project_id_idx.py index 64742c84e62de6..32a0878bdce93a 100644 --- a/src/sentry/migrations/0001_squashed_0904_onboarding_task_project_id_idx.py +++ b/src/sentry/migrations/0001_squashed_0904_onboarding_task_project_id_idx.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 16:31 +from typing import int import datetime import uuid diff --git a/src/sentry/migrations/0905_fix_workflow_engine_cycle.py b/src/sentry/migrations/0905_fix_workflow_engine_cycle.py index 17e8ffd9ecdb2e..1140a48f50e776 100644 --- a/src/sentry/migrations/0905_fix_workflow_engine_cycle.py +++ b/src/sentry/migrations/0905_fix_workflow_engine_cycle.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 16:31 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/migrations/0906_django_arrayfield_users.py b/src/sentry/migrations/0906_django_arrayfield_users.py index efddabc8405e56..e3f88ad5b670a4 100644 --- a/src/sentry/migrations/0906_django_arrayfield_users.py +++ b/src/sentry/migrations/0906_django_arrayfield_users.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 20:20 +from typing import int import django.contrib.postgres.fields from django.db import migrations, models diff --git a/src/sentry/migrations/0907_sentry_apps_array.py b/src/sentry/migrations/0907_sentry_apps_array.py index 71c32086f31be3..3d1e6d8f00b575 100644 --- a/src/sentry/migrations/0907_sentry_apps_array.py +++ b/src/sentry/migrations/0907_sentry_apps_array.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 20:57 +from typing import int import django.contrib.postgres.fields from django.db import migrations, models diff --git a/src/sentry/migrations/0908_increase_email_field_length.py b/src/sentry/migrations/0908_increase_email_field_length.py index d08bea186bbc39..718c9ddae23e1e 100644 --- a/src/sentry/migrations/0908_increase_email_field_length.py +++ b/src/sentry/migrations/0908_increase_email_field_length.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 21:42 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0909_django_array_field_not_release.py b/src/sentry/migrations/0909_django_array_field_not_release.py index 60331d9a17e463..f4ce288bb972e0 100644 --- a/src/sentry/migrations/0909_django_array_field_not_release.py +++ b/src/sentry/migrations/0909_django_array_field_not_release.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-22 13:49 +from typing import int import django.contrib.postgres.fields from django.db import migrations, models diff --git a/src/sentry/migrations/0910_make_organizationmemberteam_is_active_default.py b/src/sentry/migrations/0910_make_organizationmemberteam_is_active_default.py index a0c365eebb4572..b5431a5b85df76 100644 --- a/src/sentry/migrations/0910_make_organizationmemberteam_is_active_default.py +++ b/src/sentry/migrations/0910_make_organizationmemberteam_is_active_default.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 20:55 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0911_increase_email_model_email_field_length.py b/src/sentry/migrations/0911_increase_email_model_email_field_length.py index 0e56a045741c66..04a278aa52fc2e 100644 --- a/src/sentry/migrations/0911_increase_email_model_email_field_length.py +++ b/src/sentry/migrations/0911_increase_email_model_email_field_length.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 23:05 +from typing import int from django.db import migrations, models import sentry.db.models.fields.citext diff --git a/src/sentry/migrations/0912_make_organizationmemberteam_replica_is_active_true.py b/src/sentry/migrations/0912_make_organizationmemberteam_replica_is_active_true.py index c53dac3aa2800a..9309d53149c54d 100644 --- a/src/sentry/migrations/0912_make_organizationmemberteam_replica_is_active_true.py +++ b/src/sentry/migrations/0912_make_organizationmemberteam_replica_is_active_true.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-22 17:58 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0913_split_discover_dataset_dashboards_self_hosted.py b/src/sentry/migrations/0913_split_discover_dataset_dashboards_self_hosted.py index da67316396088e..8fee75863a3846 100644 --- a/src/sentry/migrations/0913_split_discover_dataset_dashboards_self_hosted.py +++ b/src/sentry/migrations/0913_split_discover_dataset_dashboards_self_hosted.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-20 17:45 +from typing import int from enum import Enum from django.db import migrations diff --git a/src/sentry/migrations/0914_increase_orgmember_user_email_max_length.py b/src/sentry/migrations/0914_increase_orgmember_user_email_max_length.py index b8327eeba39ed1..97f6a62abc5823 100644 --- a/src/sentry/migrations/0914_increase_orgmember_user_email_max_length.py +++ b/src/sentry/migrations/0914_increase_orgmember_user_email_max_length.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-22 22:17 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0915_add_user_email_unique_column.py b/src/sentry/migrations/0915_add_user_email_unique_column.py index 3b572cabb70b6d..3ef4a17a43d843 100644 --- a/src/sentry/migrations/0915_add_user_email_unique_column.py +++ b/src/sentry/migrations/0915_add_user_email_unique_column.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-02 16:56 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0916_delete_open_period_rows.py b/src/sentry/migrations/0916_delete_open_period_rows.py index 5abe5320f5e1a9..a6a0ae7fd509ea 100644 --- a/src/sentry/migrations/0916_delete_open_period_rows.py +++ b/src/sentry/migrations/0916_delete_open_period_rows.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-02 20:17 +from typing import int import logging from django.db import migrations diff --git a/src/sentry/migrations/0917_convert_org_saved_searches_to_views.py b/src/sentry/migrations/0917_convert_org_saved_searches_to_views.py index e8718423086882..efec56eb3555a7 100644 --- a/src/sentry/migrations/0917_convert_org_saved_searches_to_views.py +++ b/src/sentry/migrations/0917_convert_org_saved_searches_to_views.py @@ -1,6 +1,7 @@ # Generated by Django 5.1.7 on 2025-04-28 16:43 +from typing import int from django.db import migrations from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/src/sentry/migrations/0918_sentry_release_arrayfield.py b/src/sentry/migrations/0918_sentry_release_arrayfield.py index 8e7f6bf52c5f69..bc92829db6c93e 100644 --- a/src/sentry/migrations/0918_sentry_release_arrayfield.py +++ b/src/sentry/migrations/0918_sentry_release_arrayfield.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-03 21:20 +from typing import int import django.contrib.postgres.fields from django.db import migrations, models diff --git a/src/sentry/migrations/0919_project_slug_non_null.py b/src/sentry/migrations/0919_project_slug_non_null.py index 1199bf1ad5b8e0..f3e7bdcc0c4eb9 100644 --- a/src/sentry/migrations/0919_project_slug_non_null.py +++ b/src/sentry/migrations/0919_project_slug_non_null.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-04 15:07 +from typing import int from django.db import migrations import sentry.db.models.fields.slug diff --git a/src/sentry/migrations/0920_convert_org_saved_searches_to_views_revised.py b/src/sentry/migrations/0920_convert_org_saved_searches_to_views_revised.py index c3cf88fda38c52..ef98c47313a2cd 100644 --- a/src/sentry/migrations/0920_convert_org_saved_searches_to_views_revised.py +++ b/src/sentry/migrations/0920_convert_org_saved_searches_to_views_revised.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-03 22:33 +from typing import int from django.db import migrations from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/src/sentry/migrations/0921_convert_org_saved_searches_to_views_rerevised.py b/src/sentry/migrations/0921_convert_org_saved_searches_to_views_rerevised.py index 018413669cbf73..9aa4fe97f7ed49 100644 --- a/src/sentry/migrations/0921_convert_org_saved_searches_to_views_rerevised.py +++ b/src/sentry/migrations/0921_convert_org_saved_searches_to_views_rerevised.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-04 21:35 +from typing import int from django.db import migrations from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/src/sentry/migrations/0922_dashboard_starred_add_position_column_and_constraint.py b/src/sentry/migrations/0922_dashboard_starred_add_position_column_and_constraint.py index 690ed16c489b04..f39083d8784925 100644 --- a/src/sentry/migrations/0922_dashboard_starred_add_position_column_and_constraint.py +++ b/src/sentry/migrations/0922_dashboard_starred_add_position_column_and_constraint.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-02 19:31 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/migrations/0923_dashboard_starred_backfill_orgs.py b/src/sentry/migrations/0923_dashboard_starred_backfill_orgs.py index 536cb8e11a8147..f0464ef4016944 100644 --- a/src/sentry/migrations/0923_dashboard_starred_backfill_orgs.py +++ b/src/sentry/migrations/0923_dashboard_starred_backfill_orgs.py @@ -1,6 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-02 19:33 -from typing import Any +from typing import int, Any from django.db import migrations diff --git a/src/sentry/migrations/0924_dashboard_add_unique_constraint_for_user_org_position.py b/src/sentry/migrations/0924_dashboard_add_unique_constraint_for_user_org_position.py index 05f7c6e664403f..4c9d783e8294b9 100644 --- a/src/sentry/migrations/0924_dashboard_add_unique_constraint_for_user_org_position.py +++ b/src/sentry/migrations/0924_dashboard_add_unique_constraint_for_user_org_position.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-06 15:48 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/migrations/0925_backfill_open_periods.py b/src/sentry/migrations/0925_backfill_open_periods.py index 12c1c23979694e..00259d3f5fc973 100644 --- a/src/sentry/migrations/0925_backfill_open_periods.py +++ b/src/sentry/migrations/0925_backfill_open_periods.py @@ -4,7 +4,7 @@ from collections import defaultdict from datetime import datetime from enum import Enum -from typing import Any +from typing import int, Any from django.conf import settings from django.db import DataError, IntegrityError, migrations, router, transaction diff --git a/src/sentry/migrations/0926_dashboard_favorite_defer_position_constraint.py b/src/sentry/migrations/0926_dashboard_favorite_defer_position_constraint.py index 964730a9018542..2ee6ff83cdfbe7 100644 --- a/src/sentry/migrations/0926_dashboard_favorite_defer_position_constraint.py +++ b/src/sentry/migrations/0926_dashboard_favorite_defer_position_constraint.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-10 14:57 +from typing import int import django.db.models.constraints from django.db import migrations, models diff --git a/src/sentry/migrations/0927_dashboard_add_unique_constraint_user_dashboard.py b/src/sentry/migrations/0927_dashboard_add_unique_constraint_user_dashboard.py index 427be648bf1f60..a6b5c88ce52fd2 100644 --- a/src/sentry/migrations/0927_dashboard_add_unique_constraint_user_dashboard.py +++ b/src/sentry/migrations/0927_dashboard_add_unique_constraint_user_dashboard.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-13 17:50 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0928_move_notifications_models.py b/src/sentry/migrations/0928_move_notifications_models.py index 1bf54f1330856c..583f9e7594107b 100644 --- a/src/sentry/migrations/0928_move_notifications_models.py +++ b/src/sentry/migrations/0928_move_notifications_models.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-14 16:22 +from typing import int from django.db import migrations from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0929_no_pickle_authenticator.py b/src/sentry/migrations/0929_no_pickle_authenticator.py index 393cd5f46b6865..7a616ba2f0322f 100644 --- a/src/sentry/migrations/0929_no_pickle_authenticator.py +++ b/src/sentry/migrations/0929_no_pickle_authenticator.py @@ -1,6 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-13 15:44 -from typing import LiteralString +from typing import int, LiteralString from django.db import migrations diff --git a/src/sentry/migrations/0930_make_open_period_range_boundary_inclusive.py b/src/sentry/migrations/0930_make_open_period_range_boundary_inclusive.py index 8a572505252a7c..3a6922625a9a33 100644 --- a/src/sentry/migrations/0930_make_open_period_range_boundary_inclusive.py +++ b/src/sentry/migrations/0930_make_open_period_range_boundary_inclusive.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-13 22:49 +from typing import int import django.contrib.postgres.constraints from django.contrib.postgres.fields.ranges import RangeBoundary, RangeOperators from django.db import migrations, models diff --git a/src/sentry/migrations/0931_add_hit_counter_columns_to_grouptombstone.py b/src/sentry/migrations/0931_add_hit_counter_columns_to_grouptombstone.py index d95e10d54c0ea8..28c529d121271b 100644 --- a/src/sentry/migrations/0931_add_hit_counter_columns_to_grouptombstone.py +++ b/src/sentry/migrations/0931_add_hit_counter_columns_to_grouptombstone.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-18 18:50 +from typing import int from django.db import migrations, models import sentry.db.models.fields.bounded diff --git a/src/sentry/migrations/0932_update_grouptombstone_with_auto_now_add.py b/src/sentry/migrations/0932_update_grouptombstone_with_auto_now_add.py index a3b602f2a8e9c3..9e4d2d3b6282ab 100644 --- a/src/sentry/migrations/0932_update_grouptombstone_with_auto_now_add.py +++ b/src/sentry/migrations/0932_update_grouptombstone_with_auto_now_add.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-23 07:09 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0933_add_has_agents_insights_flag.py b/src/sentry/migrations/0933_add_has_agents_insights_flag.py index fd680ef5d7e38c..f9c171e61707d3 100644 --- a/src/sentry/migrations/0933_add_has_agents_insights_flag.py +++ b/src/sentry/migrations/0933_add_has_agents_insights_flag.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-23 12:46 +from typing import int from django.db import migrations import bitfield.models diff --git a/src/sentry/migrations/0934_options_nullable_value.py b/src/sentry/migrations/0934_options_nullable_value.py index 2f182c05eece12..c23f2708896809 100644 --- a/src/sentry/migrations/0934_options_nullable_value.py +++ b/src/sentry/migrations/0934_options_nullable_value.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-24 14:40 +from typing import int from django.db import migrations import sentry.db.models.fields.picklefield diff --git a/src/sentry/migrations/0935_drop_old_openperiod_exclusion_constraint.py b/src/sentry/migrations/0935_drop_old_openperiod_exclusion_constraint.py index c18f79df80da88..34c5ab9be6b34c 100644 --- a/src/sentry/migrations/0935_drop_old_openperiod_exclusion_constraint.py +++ b/src/sentry/migrations/0935_drop_old_openperiod_exclusion_constraint.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-26 01:16 +from typing import int from django.db import migrations from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0936_prompts_activity_index.py b/src/sentry/migrations/0936_prompts_activity_index.py index c20040b58b06ff..71c4e4058dd03c 100644 --- a/src/sentry/migrations/0936_prompts_activity_index.py +++ b/src/sentry/migrations/0936_prompts_activity_index.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-26 17:34 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0937_fix_defaults.py b/src/sentry/migrations/0937_fix_defaults.py index 2c6b93eadcd935..ebd6cab1edbc3d 100644 --- a/src/sentry/migrations/0937_fix_defaults.py +++ b/src/sentry/migrations/0937_fix_defaults.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-26 23:53 +from typing import int from django.db import migrations import sentry.db.models.fields.jsonfield diff --git a/src/sentry/migrations/0938_rm_eventattachment_fileid_part1.py b/src/sentry/migrations/0938_rm_eventattachment_fileid_part1.py index 5712ca8b734aba..73d1aff435fc3b 100644 --- a/src/sentry/migrations/0938_rm_eventattachment_fileid_part1.py +++ b/src/sentry/migrations/0938_rm_eventattachment_fileid_part1.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-18 13:34 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/migrations/0939_rm_eventattachment_fileid_part2.py b/src/sentry/migrations/0939_rm_eventattachment_fileid_part2.py index b3a8687e72babf..f85ef2a29f2ac5 100644 --- a/src/sentry/migrations/0939_rm_eventattachment_fileid_part2.py +++ b/src/sentry/migrations/0939_rm_eventattachment_fileid_part2.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-18 13:34 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/migrations/0940_auditlog_json_field.py b/src/sentry/migrations/0940_auditlog_json_field.py index 8b7526b7a15caf..0355d3fceb38f9 100644 --- a/src/sentry/migrations/0940_auditlog_json_field.py +++ b/src/sentry/migrations/0940_auditlog_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-27 15:57 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0941_create_temporary_verification_code_table.py b/src/sentry/migrations/0941_create_temporary_verification_code_table.py index 31a5bfdf5072d8..60c00793a3c524 100644 --- a/src/sentry/migrations/0941_create_temporary_verification_code_table.py +++ b/src/sentry/migrations/0941_create_temporary_verification_code_table.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-01 20:14 +from typing import int import django.db.models.deletion from django.conf import settings from django.db import migrations, models diff --git a/src/sentry/migrations/0942_dashboard_remove_extra_user_org_position_constraint.py b/src/sentry/migrations/0942_dashboard_remove_extra_user_org_position_constraint.py index 10a944e4f24abf..4f4567b015f9a7 100644 --- a/src/sentry/migrations/0942_dashboard_remove_extra_user_org_position_constraint.py +++ b/src/sentry/migrations/0942_dashboard_remove_extra_user_org_position_constraint.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-03 20:04 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.special import SafeRunSQL diff --git a/src/sentry/migrations/0943_create_data_access_grant.py b/src/sentry/migrations/0943_create_data_access_grant.py index fdc1a7f7836eea..cfc5c33e2b5b0f 100644 --- a/src/sentry/migrations/0943_create_data_access_grant.py +++ b/src/sentry/migrations/0943_create_data_access_grant.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-07 20:49 +from typing import int import django.db.models.deletion import django.utils.timezone from django.conf import settings diff --git a/src/sentry/migrations/0944_flags_not_null.py b/src/sentry/migrations/0944_flags_not_null.py index 667734e23acc45..a901fc219e1b4b 100644 --- a/src/sentry/migrations/0944_flags_not_null.py +++ b/src/sentry/migrations/0944_flags_not_null.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-08 19:05 +from typing import int from django.db import migrations import bitfield.models diff --git a/src/sentry/migrations/0945_move_discover_models.py b/src/sentry/migrations/0945_move_discover_models.py index 168c2be62f35ba..72a14851bbc014 100644 --- a/src/sentry/migrations/0945_move_discover_models.py +++ b/src/sentry/migrations/0945_move_discover_models.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-08 14:54 +from typing import int from django.db import migrations from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0946_add_has_mcp_insights_flag.py b/src/sentry/migrations/0946_add_has_mcp_insights_flag.py index eeb92a744d6b1c..ae5c4e78d41dd3 100644 --- a/src/sentry/migrations/0946_add_has_mcp_insights_flag.py +++ b/src/sentry/migrations/0946_add_has_mcp_insights_flag.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-10 09:55 +from typing import int from django.db import migrations import bitfield.models diff --git a/src/sentry/migrations/0947_add_dashboard_last_visited_model.py b/src/sentry/migrations/0947_add_dashboard_last_visited_model.py index 2c1de424ac487d..87b56c4e91bedd 100644 --- a/src/sentry/migrations/0947_add_dashboard_last_visited_model.py +++ b/src/sentry/migrations/0947_add_dashboard_last_visited_model.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-14 14:23 +from typing import int import django.db.models.deletion import django.utils.timezone from django.db import migrations, models diff --git a/src/sentry/migrations/0948_ds_waiver_org_fk_not_db_constr.py b/src/sentry/migrations/0948_ds_waiver_org_fk_not_db_constr.py index 177ba374737d98..28ba8d29d63d96 100644 --- a/src/sentry/migrations/0948_ds_waiver_org_fk_not_db_constr.py +++ b/src/sentry/migrations/0948_ds_waiver_org_fk_not_db_constr.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-11 23:13 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/migrations/0949_add_dashboard_widget_snapshot_model.py b/src/sentry/migrations/0949_add_dashboard_widget_snapshot_model.py index 7cf379087bc375..782d314be8a600 100644 --- a/src/sentry/migrations/0949_add_dashboard_widget_snapshot_model.py +++ b/src/sentry/migrations/0949_add_dashboard_widget_snapshot_model.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-15 15:03 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/migrations/0950_safe_del_dswaiver.py b/src/sentry/migrations/0950_safe_del_dswaiver.py index 56d95fbfb662fb..682a928a1cea06 100644 --- a/src/sentry/migrations/0950_safe_del_dswaiver.py +++ b/src/sentry/migrations/0950_safe_del_dswaiver.py @@ -1,6 +1,7 @@ # Generated by Django 5.2.1 on 2025-07-14 18:38 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/migrations/0951_delete_ds_waiver.py b/src/sentry/migrations/0951_delete_ds_waiver.py index a9c85718c1d105..c0531043c00beb 100644 --- a/src/sentry/migrations/0951_delete_ds_waiver.py +++ b/src/sentry/migrations/0951_delete_ds_waiver.py @@ -1,6 +1,7 @@ # Generated by Django 5.2.1 on 2025-07-15 17:17 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/migrations/0952_fix_span_item_event_type_alerts.py b/src/sentry/migrations/0952_fix_span_item_event_type_alerts.py index 08d69aab15c949..e5fedb00783f10 100644 --- a/src/sentry/migrations/0952_fix_span_item_event_type_alerts.py +++ b/src/sentry/migrations/0952_fix_span_item_event_type_alerts.py @@ -1,7 +1,7 @@ # Generated by Django 5.2.1 on 2025-07-16 15:08 from enum import Enum -from typing import Any +from typing import int, Any from django.db import migrations from django.db.backends.base.schema import BaseDatabaseSchemaEditor diff --git a/src/sentry/migrations/0953_make_releasefiles_tti.py b/src/sentry/migrations/0953_make_releasefiles_tti.py index c9042691d6a171..e5ad4b43cd9f81 100644 --- a/src/sentry/migrations/0953_make_releasefiles_tti.py +++ b/src/sentry/migrations/0953_make_releasefiles_tti.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-18 10:28 +from typing import int import django.db.models.functions.datetime import django.utils.timezone from django.db import migrations, models diff --git a/src/sentry/migrations/0954_user_option_json_field.py b/src/sentry/migrations/0954_user_option_json_field.py index fe526e4965c8d2..480bef3af22043 100644 --- a/src/sentry/migrations/0954_user_option_json_field.py +++ b/src/sentry/migrations/0954_user_option_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-24 08:50 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0955_org_option_json_field.py b/src/sentry/migrations/0955_org_option_json_field.py index 9fad1bd0e94c87..8a0c57694c7afb 100644 --- a/src/sentry/migrations/0955_org_option_json_field.py +++ b/src/sentry/migrations/0955_org_option_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-24 10:40 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0956_add_group_by_to_snuba_query.py b/src/sentry/migrations/0956_add_group_by_to_snuba_query.py index c399dfdb57960c..71a4e7a360ce4c 100644 --- a/src/sentry/migrations/0956_add_group_by_to_snuba_query.py +++ b/src/sentry/migrations/0956_add_group_by_to_snuba_query.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-24 15:41 +from typing import int import django.contrib.postgres.fields from django.db import migrations, models diff --git a/src/sentry/migrations/0957_projecttemplateoption_json.py b/src/sentry/migrations/0957_projecttemplateoption_json.py index 8edf9c6c405bec..4c832049922b5b 100644 --- a/src/sentry/migrations/0957_projecttemplateoption_json.py +++ b/src/sentry/migrations/0957_projecttemplateoption_json.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-25 08:13 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0958_base_option_json_field.py b/src/sentry/migrations/0958_base_option_json_field.py index 02109247d3256c..985fdb96e9817b 100644 --- a/src/sentry/migrations/0958_base_option_json_field.py +++ b/src/sentry/migrations/0958_base_option_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-25 09:01 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0959_add_has_logs_bit_to_project_model.py b/src/sentry/migrations/0959_add_has_logs_bit_to_project_model.py index 88f8c8a889942e..a65a0d2cb2688f 100644 --- a/src/sentry/migrations/0959_add_has_logs_bit_to_project_model.py +++ b/src/sentry/migrations/0959_add_has_logs_bit_to_project_model.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-28 20:31 +from typing import int from django.db import migrations import bitfield.models diff --git a/src/sentry/migrations/0960_project_option_json_field.py b/src/sentry/migrations/0960_project_option_json_field.py index 684cbd5d019666..429cc0f0523673 100644 --- a/src/sentry/migrations/0960_project_option_json_field.py +++ b/src/sentry/migrations/0960_project_option_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-29 18:54 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0961_identity_json_field.py b/src/sentry/migrations/0961_identity_json_field.py index b8e76a332184e7..142ec6b02fe5fd 100644 --- a/src/sentry/migrations/0961_identity_json_field.py +++ b/src/sentry/migrations/0961_identity_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-01 14:44 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0962_json_fields_too_big.py b/src/sentry/migrations/0962_json_fields_too_big.py index 082d9d7fc5228b..3a219ec7489a32 100644 --- a/src/sentry/migrations/0962_json_fields_too_big.py +++ b/src/sentry/migrations/0962_json_fields_too_big.py @@ -1,5 +1,5 @@ # Generated by Django 5.2.1 on 2025-08-04 19:01 -from typing import LiteralString +from typing import int, LiteralString from django.db import migrations diff --git a/src/sentry/migrations/0963_scheduleddeletion_json_field.py b/src/sentry/migrations/0963_scheduleddeletion_json_field.py index 2b960d91e80b3b..f50a7b3269e668 100644 --- a/src/sentry/migrations/0963_scheduleddeletion_json_field.py +++ b/src/sentry/migrations/0963_scheduleddeletion_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-06 17:35 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0964_add_commitcomparison_table.py b/src/sentry/migrations/0964_add_commitcomparison_table.py index f95bec6df12701..7d837ab36bd295 100644 --- a/src/sentry/migrations/0964_add_commitcomparison_table.py +++ b/src/sentry/migrations/0964_add_commitcomparison_table.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-06 20:24 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/migrations/0965_gzippeddict_big_tables.py b/src/sentry/migrations/0965_gzippeddict_big_tables.py index 7115417585fe73..221d791fa45710 100644 --- a/src/sentry/migrations/0965_gzippeddict_big_tables.py +++ b/src/sentry/migrations/0965_gzippeddict_big_tables.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-07 15:00 +from typing import int from django.db import migrations import sentry.db.models.fields.jsonfield diff --git a/src/sentry/migrations/0966_groupopenperiod_data_pending_inc_detector_id_index.py b/src/sentry/migrations/0966_groupopenperiod_data_pending_inc_detector_id_index.py index 1decad68a2d9cc..1e8ccc62993811 100644 --- a/src/sentry/migrations/0966_groupopenperiod_data_pending_inc_detector_id_index.py +++ b/src/sentry/migrations/0966_groupopenperiod_data_pending_inc_detector_id_index.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-08 23:06 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0967_large_tables_legacy_json_field.py b/src/sentry/migrations/0967_large_tables_legacy_json_field.py index c7ff361579b18a..c986ab65f43a8a 100644 --- a/src/sentry/migrations/0967_large_tables_legacy_json_field.py +++ b/src/sentry/migrations/0967_large_tables_legacy_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-11 14:46 +from typing import int from django.db import migrations import sentry.db.models.fields.jsonfield diff --git a/src/sentry/migrations/0968_delete_dashboardwidgetsnapshot_db_constraint.py b/src/sentry/migrations/0968_delete_dashboardwidgetsnapshot_db_constraint.py index 0dd7751557eb85..7f9f605ed28f1c 100644 --- a/src/sentry/migrations/0968_delete_dashboardwidgetsnapshot_db_constraint.py +++ b/src/sentry/migrations/0968_delete_dashboardwidgetsnapshot_db_constraint.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-25 16:11 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/migrations/0969_safe_del_dashboardwidgetsnapshot.py b/src/sentry/migrations/0969_safe_del_dashboardwidgetsnapshot.py index b1a72451852ad4..cc17e50660a2f6 100644 --- a/src/sentry/migrations/0969_safe_del_dashboardwidgetsnapshot.py +++ b/src/sentry/migrations/0969_safe_del_dashboardwidgetsnapshot.py @@ -1,6 +1,7 @@ # Generated by Django 5.2.1 on 2025-08-25 16:14 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/migrations/0970_remove_pullrequestcommit_fk_constraint.py b/src/sentry/migrations/0970_remove_pullrequestcommit_fk_constraint.py index 4322929faf9daf..d577aa3fd9b437 100644 --- a/src/sentry/migrations/0970_remove_pullrequestcommit_fk_constraint.py +++ b/src/sentry/migrations/0970_remove_pullrequestcommit_fk_constraint.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-28 00:57 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/migrations/0971_make_dashboard_widget_order_optional_field.py b/src/sentry/migrations/0971_make_dashboard_widget_order_optional_field.py index f6fb32c43feded..2ef7ced810e4d9 100644 --- a/src/sentry/migrations/0971_make_dashboard_widget_order_optional_field.py +++ b/src/sentry/migrations/0971_make_dashboard_widget_order_optional_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-03 14:44 +from typing import int from django.db import migrations import sentry.db.models.fields.bounded diff --git a/src/sentry/migrations/0972_commit_comparison_drop_unique.py b/src/sentry/migrations/0972_commit_comparison_drop_unique.py index 46d8f2dff9de15..13894bac9ae60f 100644 --- a/src/sentry/migrations/0972_commit_comparison_drop_unique.py +++ b/src/sentry/migrations/0972_commit_comparison_drop_unique.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-03 17:01 +from typing import int from django.db import migrations from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0973_safe_del_dashboardwidgetsnapshot.py b/src/sentry/migrations/0973_safe_del_dashboardwidgetsnapshot.py index 7e6c6fcb73dbe6..cc562074101053 100644 --- a/src/sentry/migrations/0973_safe_del_dashboardwidgetsnapshot.py +++ b/src/sentry/migrations/0973_safe_del_dashboardwidgetsnapshot.py @@ -1,6 +1,7 @@ # Generated by Django 5.2.1 on 2025-09-04 15:41 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/migrations/0974_hc_json_field.py b/src/sentry/migrations/0974_hc_json_field.py index 0a4bef72ad1dd5..6e48e064a6b04c 100644 --- a/src/sentry/migrations/0974_hc_json_field.py +++ b/src/sentry/migrations/0974_hc_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-14 15:26 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0975_grouplink_json_field.py b/src/sentry/migrations/0975_grouplink_json_field.py index 99686d843fa878..9bc05a7d4376a4 100644 --- a/src/sentry/migrations/0975_grouplink_json_field.py +++ b/src/sentry/migrations/0975_grouplink_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-08 18:41 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0976_sentry_app_json_field.py b/src/sentry/migrations/0976_sentry_app_json_field.py index 0684c1e08ab8e1..7beec6038dbcce 100644 --- a/src/sentry/migrations/0976_sentry_app_json_field.py +++ b/src/sentry/migrations/0976_sentry_app_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-09 15:50 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0977_commitfilechange_break_commit_fk.py b/src/sentry/migrations/0977_commitfilechange_break_commit_fk.py index bc7b5e2f13b027..8b0f7a8327b4d5 100644 --- a/src/sentry/migrations/0977_commitfilechange_break_commit_fk.py +++ b/src/sentry/migrations/0977_commitfilechange_break_commit_fk.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-09 22:25 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/migrations/0978_break_commit_fks.py b/src/sentry/migrations/0978_break_commit_fks.py index b90eae0d9b01ae..e4a4f91f6eb228 100644 --- a/src/sentry/migrations/0978_break_commit_fks.py +++ b/src/sentry/migrations/0978_break_commit_fks.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-10 21:38 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/migrations/0979_add_apiapplication_version.py b/src/sentry/migrations/0979_add_apiapplication_version.py index 1d0c0ffbc49ae4..ad15091134b995 100644 --- a/src/sentry/migrations/0979_add_apiapplication_version.py +++ b/src/sentry/migrations/0979_add_apiapplication_version.py @@ -1,3 +1,4 @@ +from typing import int from django.db import migrations import sentry.db.models.fields.bounded diff --git a/src/sentry/migrations/0980_integrations_json_field.py b/src/sentry/migrations/0980_integrations_json_field.py index 0c9cf65a171142..63062200542a0b 100644 --- a/src/sentry/migrations/0980_integrations_json_field.py +++ b/src/sentry/migrations/0980_integrations_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-10 16:41 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0981_add_dashboard_migration_fields.py b/src/sentry/migrations/0981_add_dashboard_migration_fields.py index f5477747bbf9bf..1f7f4d1cdb48cf 100644 --- a/src/sentry/migrations/0981_add_dashboard_migration_fields.py +++ b/src/sentry/migrations/0981_add_dashboard_migration_fields.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-12 19:20 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0982_redirect_fk_and_date.py b/src/sentry/migrations/0982_redirect_fk_and_date.py index 91b0a60a29e65b..bf330f1efa6862 100644 --- a/src/sentry/migrations/0982_redirect_fk_and_date.py +++ b/src/sentry/migrations/0982_redirect_fk_and_date.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-12 17:44 +from typing import int import django.utils.timezone from django.db import migrations, models diff --git a/src/sentry/migrations/0983_create_groupopenperiodactivity_table.py b/src/sentry/migrations/0983_create_groupopenperiodactivity_table.py index 57b977d49552fb..6ea286bdd04599 100644 --- a/src/sentry/migrations/0983_create_groupopenperiodactivity_table.py +++ b/src/sentry/migrations/0983_create_groupopenperiodactivity_table.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-15 21:15 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/migrations/0984_authprovider_json_field.py b/src/sentry/migrations/0984_authprovider_json_field.py index ac00886073d016..19897c588b473b 100644 --- a/src/sentry/migrations/0984_authprovider_json_field.py +++ b/src/sentry/migrations/0984_authprovider_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-15 20:02 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0985_add_timestamp_to_grouphash_table.py b/src/sentry/migrations/0985_add_timestamp_to_grouphash_table.py index c694ffc4c2425c..992d8345928933 100644 --- a/src/sentry/migrations/0985_add_timestamp_to_grouphash_table.py +++ b/src/sentry/migrations/0985_add_timestamp_to_grouphash_table.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-16 16:05 +from typing import int import django.utils.timezone from django.db import migrations, models diff --git a/src/sentry/migrations/0986_add_future_release_version_to_groupresolution.py b/src/sentry/migrations/0986_add_future_release_version_to_groupresolution.py index 54bfa536532162..0d63ab484f9812 100644 --- a/src/sentry/migrations/0986_add_future_release_version_to_groupresolution.py +++ b/src/sentry/migrations/0986_add_future_release_version_to_groupresolution.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-16 21:55 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0987_authidentity_json_field.py b/src/sentry/migrations/0987_authidentity_json_field.py index e578c9a97f0cdd..85b2e40f507bac 100644 --- a/src/sentry/migrations/0987_authidentity_json_field.py +++ b/src/sentry/migrations/0987_authidentity_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-17 13:49 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0988_data_forwarding.py b/src/sentry/migrations/0988_data_forwarding.py index 7f244f758452c6..c26417393a08a7 100644 --- a/src/sentry/migrations/0988_data_forwarding.py +++ b/src/sentry/migrations/0988_data_forwarding.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-17 16:03 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/migrations/0989_add_release_date_added_idx.py b/src/sentry/migrations/0989_add_release_date_added_idx.py index 0a31c3a0046b97..6272431520299a 100644 --- a/src/sentry/migrations/0989_add_release_date_added_idx.py +++ b/src/sentry/migrations/0989_add_release_date_added_idx.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-17 22:32 +from typing import int import django.utils.timezone from django.db import migrations, models diff --git a/src/sentry/migrations/0990_groupowner_json_field.py b/src/sentry/migrations/0990_groupowner_json_field.py index 3c7a816418c6cb..6e630092e7cc27 100644 --- a/src/sentry/migrations/0990_groupowner_json_field.py +++ b/src/sentry/migrations/0990_groupowner_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-17 17:44 +from typing import int from django.db import migrations import sentry.db.models.fields.jsonfield diff --git a/src/sentry/migrations/0991_projectownership_json_field.py b/src/sentry/migrations/0991_projectownership_json_field.py index 4d9ca53f664a48..8902a68847fd67 100644 --- a/src/sentry/migrations/0991_projectownership_json_field.py +++ b/src/sentry/migrations/0991_projectownership_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-19 15:19 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0992_latestrepoerelease_indexes.py b/src/sentry/migrations/0992_latestrepoerelease_indexes.py index aebca12eb168ce..a82c6beaa90bbc 100644 --- a/src/sentry/migrations/0992_latestrepoerelease_indexes.py +++ b/src/sentry/migrations/0992_latestrepoerelease_indexes.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-26 21:30 +from typing import int from django.db import migrations import sentry.db.models.fields.bounded diff --git a/src/sentry/migrations/0993_add_event_id_to_grouphash_metadata.py b/src/sentry/migrations/0993_add_event_id_to_grouphash_metadata.py index 2b817f66b1e018..582c45cd37c3c1 100644 --- a/src/sentry/migrations/0993_add_event_id_to_grouphash_metadata.py +++ b/src/sentry/migrations/0993_add_event_id_to_grouphash_metadata.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-29 17:55 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/0994_add_groupreaction_table.py b/src/sentry/migrations/0994_add_groupreaction_table.py index 7c536f6a4b4b20..e4beafe1849b49 100644 --- a/src/sentry/migrations/0994_add_groupreaction_table.py +++ b/src/sentry/migrations/0994_add_groupreaction_table.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-29 23:51 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/migrations/0995_add_date_updated_to_grouphash_metadata.py b/src/sentry/migrations/0995_add_date_updated_to_grouphash_metadata.py index dc2edb4b46c87d..b9cb5ddcc624d8 100644 --- a/src/sentry/migrations/0995_add_date_updated_to_grouphash_metadata.py +++ b/src/sentry/migrations/0995_add_date_updated_to_grouphash_metadata.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-30 16:52 +from typing import int import django.utils.timezone from django.db import migrations, models diff --git a/src/sentry/migrations/0996_add_dashboard_field_link_model.py b/src/sentry/migrations/0996_add_dashboard_field_link_model.py index b78ebf919b765f..4ab0e7f1529a67 100644 --- a/src/sentry/migrations/0996_add_dashboard_field_link_model.py +++ b/src/sentry/migrations/0996_add_dashboard_field_link_model.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-10-09 18:51 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/migrations/0997_add_has_trace_metrics_bit_to_project_model.py b/src/sentry/migrations/0997_add_has_trace_metrics_bit_to_project_model.py index 780a00401d5d6e..7e9843c0a837e7 100644 --- a/src/sentry/migrations/0997_add_has_trace_metrics_bit_to_project_model.py +++ b/src/sentry/migrations/0997_add_has_trace_metrics_bit_to_project_model.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-10-22 18:19 +from typing import int from django.db import migrations import bitfield.models diff --git a/src/sentry/migrations/0998_add_prebuilt_id_to_dashboards.py b/src/sentry/migrations/0998_add_prebuilt_id_to_dashboards.py index ff442f544b7fe8..4e07a6204d06e3 100644 --- a/src/sentry/migrations/0998_add_prebuilt_id_to_dashboards.py +++ b/src/sentry/migrations/0998_add_prebuilt_id_to_dashboards.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-10-23 15:14 +from typing import int from django.db import migrations, models import sentry.db.models.fields.bounded diff --git a/src/sentry/migrations/0999_add_extrapolation_mode_to_snuba_query.py b/src/sentry/migrations/0999_add_extrapolation_mode_to_snuba_query.py index 19a65c0535cffb..f56d5ccc26d46d 100644 --- a/src/sentry/migrations/0999_add_extrapolation_mode_to_snuba_query.py +++ b/src/sentry/migrations/0999_add_extrapolation_mode_to_snuba_query.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-10-23 20:50 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/migrations/1000_add_project_distribution_scope.py b/src/sentry/migrations/1000_add_project_distribution_scope.py index a0451d0809b7cb..9f8b63056cbe91 100644 --- a/src/sentry/migrations/1000_add_project_distribution_scope.py +++ b/src/sentry/migrations/1000_add_project_distribution_scope.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-10-27 10:46 +from typing import int from django.db import migrations import bitfield.models diff --git a/src/sentry/migrations/1001_prevent_grouphistory_infinte_recursion.py b/src/sentry/migrations/1001_prevent_grouphistory_infinte_recursion.py index 5356388387ef11..92308fbcfe2e40 100644 --- a/src/sentry/migrations/1001_prevent_grouphistory_infinte_recursion.py +++ b/src/sentry/migrations/1001_prevent_grouphistory_infinte_recursion.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-10-31 12:18 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/migrations/1002_group_history_prev_history_remove_db_constraint.py b/src/sentry/migrations/1002_group_history_prev_history_remove_db_constraint.py index 82de4c85251e9b..1a3c5312ba215a 100644 --- a/src/sentry/migrations/1002_group_history_prev_history_remove_db_constraint.py +++ b/src/sentry/migrations/1002_group_history_prev_history_remove_db_constraint.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-11-04 15:02 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/migrations/1003_group_history_prev_history_safe_removal.py b/src/sentry/migrations/1003_group_history_prev_history_safe_removal.py index bcf4360d991d62..4e24e0982400a2 100644 --- a/src/sentry/migrations/1003_group_history_prev_history_safe_removal.py +++ b/src/sentry/migrations/1003_group_history_prev_history_safe_removal.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-11-04 15:18 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/models/__init__.py b/src/sentry/models/__init__.py index c4219227436d2e..d2683814bf771d 100644 --- a/src/sentry/models/__init__.py +++ b/src/sentry/models/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .activity import * # NOQA from .apiapplication import * # NOQA from .apiauthorization import * # NOQA diff --git a/src/sentry/models/activity.py b/src/sentry/models/activity.py index 7c749e60c48da6..f0be40a1f1e529 100644 --- a/src/sentry/models/activity.py +++ b/src/sentry/models/activity.py @@ -4,7 +4,7 @@ from collections.abc import Mapping, Sequence from datetime import datetime from enum import Enum -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django.conf import settings from django.db import models diff --git a/src/sentry/models/apiapplication.py b/src/sentry/models/apiapplication.py index 39e46a1b97aa0b..53bc778c8df64d 100644 --- a/src/sentry/models/apiapplication.py +++ b/src/sentry/models/apiapplication.py @@ -2,7 +2,7 @@ import os import secrets from enum import Enum -from typing import Any, ClassVar, Literal, Self, TypeIs +from typing import Any, ClassVar, Literal, Self, TypeIs, int from urllib.parse import urlparse, urlunparse import petname diff --git a/src/sentry/models/apiauthorization.py b/src/sentry/models/apiauthorization.py index 91a6ffe600fd77..12ce79690551aa 100644 --- a/src/sentry/models/apiauthorization.py +++ b/src/sentry/models/apiauthorization.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.db.models import Q from django.utils import timezone diff --git a/src/sentry/models/apigrant.py b/src/sentry/models/apigrant.py index 7e368f1b7a9d72..95b8dac6087335 100644 --- a/src/sentry/models/apigrant.py +++ b/src/sentry/models/apigrant.py @@ -1,6 +1,6 @@ import secrets from datetime import timedelta -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.postgres.fields.array import ArrayField from django.db import models diff --git a/src/sentry/models/apikey.py b/src/sentry/models/apikey.py index a98c158b26c66c..c90d1a3da332a0 100644 --- a/src/sentry/models/apikey.py +++ b/src/sentry/models/apikey.py @@ -1,7 +1,7 @@ from __future__ import annotations import secrets -from typing import TYPE_CHECKING, Any, ClassVar, Self, TypeGuard +from typing import TYPE_CHECKING, Any, ClassVar, Self, TypeGuard, int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/apiscopes.py b/src/sentry/models/apiscopes.py index 3bd4acdf2f9133..2e3322394cc0eb 100644 --- a/src/sentry/models/apiscopes.py +++ b/src/sentry/models/apiscopes.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import TypedDict +from typing import int, TypedDict from django.contrib.postgres.fields.array import ArrayField from django.db import models diff --git a/src/sentry/models/apitoken.py b/src/sentry/models/apitoken.py index b8df5855da9711..872bed03296b73 100644 --- a/src/sentry/models/apitoken.py +++ b/src/sentry/models/apitoken.py @@ -4,7 +4,7 @@ import secrets from collections.abc import Collection, Mapping from datetime import timedelta -from typing import Any, ClassVar +from typing import Any, ClassVar, int from django.db import models, router, transaction from django.utils import timezone diff --git a/src/sentry/models/artifactbundle.py b/src/sentry/models/artifactbundle.py index 943242ddb29f59..ea28c121cd9445 100644 --- a/src/sentry/models/artifactbundle.py +++ b/src/sentry/models/artifactbundle.py @@ -3,7 +3,7 @@ import zipfile from collections.abc import Callable, Iterable, Mapping from enum import Enum -from typing import IO, Any +from typing import IO, Any, int from django.db import models from django.db.models.signals import post_delete diff --git a/src/sentry/models/assistant.py b/src/sentry/models/assistant.py index bf1a5ff7ea012f..ea146e1bd97b4e 100644 --- a/src/sentry/models/assistant.py +++ b/src/sentry/models/assistant.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.db import models diff --git a/src/sentry/models/auditlogentry.py b/src/sentry/models/auditlogentry.py index b357f01e25fda7..5c296de9f52d3d 100644 --- a/src/sentry/models/auditlogentry.py +++ b/src/sentry/models/auditlogentry.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import re diff --git a/src/sentry/models/authidentity.py b/src/sentry/models/authidentity.py index 3f6f84afcc31c8..96a260a914850a 100644 --- a/src/sentry/models/authidentity.py +++ b/src/sentry/models/authidentity.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Collection -from typing import Any +from typing import int, Any from django.conf import settings from django.db import models diff --git a/src/sentry/models/authidentityreplica.py b/src/sentry/models/authidentityreplica.py index efa6eddb4b9e7b..c742c9def1f0c4 100644 --- a/src/sentry/models/authidentityreplica.py +++ b/src/sentry/models/authidentityreplica.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.db import models from django.db.models.functions import Now diff --git a/src/sentry/models/authprovider.py b/src/sentry/models/authprovider.py index be3b0f7085ec13..38fef5c203626c 100644 --- a/src/sentry/models/authprovider.py +++ b/src/sentry/models/authprovider.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any from django.db import models from django.utils import timezone diff --git a/src/sentry/models/authproviderreplica.py b/src/sentry/models/authproviderreplica.py index 8516c81edd916d..1d2395d64e1621 100644 --- a/src/sentry/models/authproviderreplica.py +++ b/src/sentry/models/authproviderreplica.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from django.db import models from django.utils import timezone diff --git a/src/sentry/models/avatars/__init__.py b/src/sentry/models/avatars/__init__.py index 2d191cf6b7e465..d7faf7b0dfb540 100644 --- a/src/sentry/models/avatars/__init__.py +++ b/src/sentry/models/avatars/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .base import AvatarBase from .control_base import ControlAvatarBase from .organization_avatar import OrganizationAvatar diff --git a/src/sentry/models/avatars/base.py b/src/sentry/models/avatars/base.py index a457ed1998bdb1..6a8cf4bc29ad2e 100644 --- a/src/sentry/models/avatars/base.py +++ b/src/sentry/models/avatars/base.py @@ -1,7 +1,7 @@ from __future__ import annotations from io import BytesIO -from typing import ClassVar, Self +from typing import ClassVar, Self, int from urllib.parse import urljoin from uuid import uuid4 diff --git a/src/sentry/models/avatars/control_base.py b/src/sentry/models/avatars/control_base.py index 494101e1870d8c..12660591216e85 100644 --- a/src/sentry/models/avatars/control_base.py +++ b/src/sentry/models/avatars/control_base.py @@ -1,3 +1,4 @@ +from typing import int from sentry.db.models import BoundedBigIntegerField from sentry.models.avatars.base import AvatarBase from sentry.models.files import ControlFile diff --git a/src/sentry/models/avatars/organization_avatar.py b/src/sentry/models/avatars/organization_avatar.py index 5af372aa10cf47..e33c3b9f480442 100644 --- a/src/sentry/models/avatars/organization_avatar.py +++ b/src/sentry/models/avatars/organization_avatar.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import models diff --git a/src/sentry/models/broadcast.py b/src/sentry/models/broadcast.py index 6aec7ed5032f88..aed2d686fa9afc 100644 --- a/src/sentry/models/broadcast.py +++ b/src/sentry/models/broadcast.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from django.db import models diff --git a/src/sentry/models/commit.py b/src/sentry/models/commit.py index dab398f8a33158..d736f5257da353 100644 --- a/src/sentry/models/commit.py +++ b/src/sentry/models/commit.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, ClassVar +from typing import TYPE_CHECKING, ClassVar, int from django.db import models from django.db.models.query import QuerySet diff --git a/src/sentry/models/commitauthor.py b/src/sentry/models/commitauthor.py index b68c675d1184c1..585c61b678a2f9 100644 --- a/src/sentry/models/commitauthor.py +++ b/src/sentry/models/commitauthor.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django.db import models diff --git a/src/sentry/models/commitcomparison.py b/src/sentry/models/commitcomparison.py index d6361bab8456fe..e11dab57a4b0d7 100644 --- a/src/sentry/models/commitcomparison.py +++ b/src/sentry/models/commitcomparison.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/models/commitfilechange.py b/src/sentry/models/commitfilechange.py index ad698711e73d54..13688525076f49 100644 --- a/src/sentry/models/commitfilechange.py +++ b/src/sentry/models/commitfilechange.py @@ -1,5 +1,5 @@ from collections.abc import Iterable -from typing import Any, ClassVar +from typing import Any, ClassVar, int from django.db import models, router, transaction from django.db.models.signals import post_save diff --git a/src/sentry/models/counter.py b/src/sentry/models/counter.py index 50cf1136220252..ce433a9e3e0a28 100644 --- a/src/sentry/models/counter.py +++ b/src/sentry/models/counter.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from django.conf import settings from django.db import connections, transaction diff --git a/src/sentry/models/dashboard.py b/src/sentry/models/dashboard.py index 30536cc7558cdb..66c0dab79a78ce 100644 --- a/src/sentry/models/dashboard.py +++ b/src/sentry/models/dashboard.py @@ -1,7 +1,7 @@ from __future__ import annotations import re -from typing import Any, ClassVar +from typing import Any, ClassVar, int import sentry_sdk from django.db import models, router, transaction diff --git a/src/sentry/models/dashboard_permissions.py b/src/sentry/models/dashboard_permissions.py index 4942ddb10f9589..f7fd60f6d7c330 100644 --- a/src/sentry/models/dashboard_permissions.py +++ b/src/sentry/models/dashboard_permissions.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import models diff --git a/src/sentry/models/dashboard_widget.py b/src/sentry/models/dashboard_widget.py index 61ee64a996c723..d37b431c32a9f8 100644 --- a/src/sentry/models/dashboard_widget.py +++ b/src/sentry/models/dashboard_widget.py @@ -1,7 +1,7 @@ from __future__ import annotations from enum import Enum -from typing import Any +from typing import int, Any from django.contrib.postgres.fields.array import ArrayField from django.db import models diff --git a/src/sentry/models/debugfile.py b/src/sentry/models/debugfile.py index 338044223cf2b4..330ab8defa4255 100644 --- a/src/sentry/models/debugfile.py +++ b/src/sentry/models/debugfile.py @@ -12,7 +12,7 @@ import uuid import zipfile from collections.abc import Container, Iterable, Mapping -from typing import TYPE_CHECKING, Any, BinaryIO, ClassVar +from typing import TYPE_CHECKING, Any, BinaryIO, ClassVar, int from django.db import models from django.db.models import Q diff --git a/src/sentry/models/deletedentry.py b/src/sentry/models/deletedentry.py index 41e3fed96cfaa9..9540dd9c6fd540 100644 --- a/src/sentry/models/deletedentry.py +++ b/src/sentry/models/deletedentry.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/deletedorganization.py b/src/sentry/models/deletedorganization.py index 9a44c214c2d462..0a3c875548a473 100644 --- a/src/sentry/models/deletedorganization.py +++ b/src/sentry/models/deletedorganization.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.db.models import region_silo_model, sane_repr diff --git a/src/sentry/models/deletedproject.py b/src/sentry/models/deletedproject.py index b59f569b3ee5c7..032ed2440fb9ee 100644 --- a/src/sentry/models/deletedproject.py +++ b/src/sentry/models/deletedproject.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.constants import PROJECT_SLUG_MAX_LENGTH diff --git a/src/sentry/models/deletedteam.py b/src/sentry/models/deletedteam.py index 3063bd57ec63c4..2daa9c77d5ec4a 100644 --- a/src/sentry/models/deletedteam.py +++ b/src/sentry/models/deletedteam.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.db.models import BoundedBigIntegerField, region_silo_model, sane_repr diff --git a/src/sentry/models/deploy.py b/src/sentry/models/deploy.py index 3b61425cc158eb..49b6644d79d276 100644 --- a/src/sentry/models/deploy.py +++ b/src/sentry/models/deploy.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/distribution.py b/src/sentry/models/distribution.py index 1f6506156bc843..2a4225ea37a929 100644 --- a/src/sentry/models/distribution.py +++ b/src/sentry/models/distribution.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/dynamicsampling.py b/src/sentry/models/dynamicsampling.py index 8bd48610e1e231..aadbc74c522db7 100644 --- a/src/sentry/models/dynamicsampling.py +++ b/src/sentry/models/dynamicsampling.py @@ -3,7 +3,7 @@ import hashlib from collections.abc import Mapping, Sequence from datetime import datetime, timedelta -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.db import models, router, transaction from django.db.models import F, IntegerField, Max, Q, Subquery, Value diff --git a/src/sentry/models/environment.py b/src/sentry/models/environment.py index c06061732db459..bedcf44dc63efc 100644 --- a/src/sentry/models/environment.py +++ b/src/sentry/models/environment.py @@ -1,5 +1,5 @@ import re -from typing import ClassVar, Self +from typing import ClassVar, Self, int from urllib.parse import unquote from django.db import models diff --git a/src/sentry/models/event.py b/src/sentry/models/event.py index c218148d72528b..f9f4d7d0e4adb2 100644 --- a/src/sentry/models/event.py +++ b/src/sentry/models/event.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Iterator, Mapping, MutableMapping -from typing import Self, TypeVar +from typing import Self, TypeVar, int import orjson from sentry_relay.processing import StoreNormalizer diff --git a/src/sentry/models/eventattachment.py b/src/sentry/models/eventattachment.py index 1e5bab96d939a1..ffac0b6f7a51f7 100644 --- a/src/sentry/models/eventattachment.py +++ b/src/sentry/models/eventattachment.py @@ -4,7 +4,7 @@ from dataclasses import dataclass from hashlib import sha1 from io import BytesIO -from typing import IO, Any +from typing import IO, Any, int import sentry_sdk import zstandard diff --git a/src/sentry/models/eventerror.py b/src/sentry/models/eventerror.py index 702697241710da..d9ba2528792e8d 100644 --- a/src/sentry/models/eventerror.py +++ b/src/sentry/models/eventerror.py @@ -1,3 +1,4 @@ +from typing import int class EventError: # Generic UNKNOWN_ERROR = "unknown_error" diff --git a/src/sentry/models/featureadoption.py b/src/sentry/models/featureadoption.py index d5542590331efe..c57349087cb4a2 100644 --- a/src/sentry/models/featureadoption.py +++ b/src/sentry/models/featureadoption.py @@ -1,5 +1,5 @@ import logging -from typing import ClassVar, cast +from typing import ClassVar, cast, int import rb from django.conf import settings diff --git a/src/sentry/models/file.py b/src/sentry/models/file.py index b28b2a93491668..c3d65e2ff6fba4 100644 --- a/src/sentry/models/file.py +++ b/src/sentry/models/file.py @@ -1 +1,2 @@ +from typing import int from sentry.models.files import * # NOQA diff --git a/src/sentry/models/files/__init__.py b/src/sentry/models/files/__init__.py index 0228dbc3e300f0..2d76a5f3460030 100644 --- a/src/sentry/models/files/__init__.py +++ b/src/sentry/models/files/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .control_file import ControlFile from .control_fileblob import ControlFileBlob from .control_fileblobindex import ControlFileBlobIndex diff --git a/src/sentry/models/files/abstractfile.py b/src/sentry/models/files/abstractfile.py index 2bcbc5fc316d2d..a5932a2d9b110f 100644 --- a/src/sentry/models/files/abstractfile.py +++ b/src/sentry/models/files/abstractfile.py @@ -9,7 +9,7 @@ from collections.abc import Sequence from concurrent.futures import ThreadPoolExecutor from hashlib import sha1 -from typing import TYPE_CHECKING, Any, Generic, TypeVar +from typing import TYPE_CHECKING, Any, Generic, TypeVar, int import sentry_sdk from django.core.files.base import ContentFile diff --git a/src/sentry/models/files/abstractfileblob.py b/src/sentry/models/files/abstractfileblob.py index 820f1acfde1e4e..b1fe00c1c9133f 100644 --- a/src/sentry/models/files/abstractfileblob.py +++ b/src/sentry/models/files/abstractfileblob.py @@ -2,7 +2,7 @@ from abc import abstractmethod from threading import Semaphore -from typing import TYPE_CHECKING, Any, Generic, Self, TypeVar +from typing import TYPE_CHECKING, Any, Generic, Self, TypeVar, int from uuid import uuid4 import sentry_sdk diff --git a/src/sentry/models/files/abstractfileblobindex.py b/src/sentry/models/files/abstractfileblobindex.py index a452f5c7ac1b66..a0795465f34643 100644 --- a/src/sentry/models/files/abstractfileblobindex.py +++ b/src/sentry/models/files/abstractfileblobindex.py @@ -1,3 +1,4 @@ +from typing import int from sentry.backup.scopes import RelocationScope from sentry.db.models import Model, WrappingU32IntegerField diff --git a/src/sentry/models/files/abstractfileblobowner.py b/src/sentry/models/files/abstractfileblobowner.py index 93094d695da9de..15c77b1d2ea379 100644 --- a/src/sentry/models/files/abstractfileblobowner.py +++ b/src/sentry/models/files/abstractfileblobowner.py @@ -1,3 +1,4 @@ +from typing import int from sentry.backup.scopes import RelocationScope from sentry.db.models import BoundedBigIntegerField, Model diff --git a/src/sentry/models/files/control_file.py b/src/sentry/models/files/control_file.py index d74dc2009dbd90..9e8c6faf6c478f 100644 --- a/src/sentry/models/files/control_file.py +++ b/src/sentry/models/files/control_file.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import Any +from typing import int, Any from django.core.files.base import ContentFile from django.db import models diff --git a/src/sentry/models/files/control_fileblob.py b/src/sentry/models/files/control_fileblob.py index f12ad451b49297..bc9a175485e6f0 100644 --- a/src/sentry/models/files/control_fileblob.py +++ b/src/sentry/models/files/control_fileblob.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry import options from sentry.db.models import control_silo_model diff --git a/src/sentry/models/files/control_fileblobindex.py b/src/sentry/models/files/control_fileblobindex.py index f9d5293724337c..12abf7299aa065 100644 --- a/src/sentry/models/files/control_fileblobindex.py +++ b/src/sentry/models/files/control_fileblobindex.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/models/files/control_fileblobowner.py b/src/sentry/models/files/control_fileblobowner.py index 2faa492fed88a9..49a58ccba8f909 100644 --- a/src/sentry/models/files/control_fileblobowner.py +++ b/src/sentry/models/files/control_fileblobowner.py @@ -1,3 +1,4 @@ +from typing import int from sentry.backup.scopes import RelocationScope from sentry.db.models import FlexibleForeignKey from sentry.db.models.base import control_silo_model diff --git a/src/sentry/models/files/file.py b/src/sentry/models/files/file.py index 6554c4b2d69ea9..87abfb3cdd75ef 100644 --- a/src/sentry/models/files/file.py +++ b/src/sentry/models/files/file.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import Any +from typing import int, Any from django.core.files.base import ContentFile from django.db import models diff --git a/src/sentry/models/files/fileblob.py b/src/sentry/models/files/fileblob.py index e19f4a930b8dcd..8ef2e952ad4ced 100644 --- a/src/sentry/models/files/fileblob.py +++ b/src/sentry/models/files/fileblob.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.db.models import region_silo_model from sentry.models.files.abstractfileblob import AbstractFileBlob diff --git a/src/sentry/models/files/fileblobindex.py b/src/sentry/models/files/fileblobindex.py index c4a2a162af254d..4508e4cb8add8d 100644 --- a/src/sentry/models/files/fileblobindex.py +++ b/src/sentry/models/files/fileblobindex.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/models/files/fileblobowner.py b/src/sentry/models/files/fileblobowner.py index 06a25e721c7757..809285a2f55c5d 100644 --- a/src/sentry/models/files/fileblobowner.py +++ b/src/sentry/models/files/fileblobowner.py @@ -1,3 +1,4 @@ +from typing import int from sentry.backup.scopes import RelocationScope from sentry.db.models import FlexibleForeignKey from sentry.db.models.base import region_silo_model diff --git a/src/sentry/models/files/utils.py b/src/sentry/models/files/utils.py index c4da30bc2dcdbb..ccfcd57609d6a5 100644 --- a/src/sentry/models/files/utils.py +++ b/src/sentry/models/files/utils.py @@ -4,7 +4,7 @@ import time from datetime import timedelta from hashlib import sha1 -from typing import IO, TYPE_CHECKING, TypeVar +from typing import IO, TYPE_CHECKING, TypeVar, int from django.conf import settings from django.core.files.storage import Storage diff --git a/src/sentry/models/group.py b/src/sentry/models/group.py index 14a37a54ab7e64..96a5c07077dd4c 100644 --- a/src/sentry/models/group.py +++ b/src/sentry/models/group.py @@ -9,7 +9,7 @@ from enum import Enum from functools import reduce from operator import or_ -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django.core.cache import cache from django.db import models diff --git a/src/sentry/models/groupassignee.py b/src/sentry/models/groupassignee.py index 0357aaf9024aa0..adcb8e3efe5757 100644 --- a/src/sentry/models/groupassignee.py +++ b/src/sentry/models/groupassignee.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import TYPE_CHECKING, Any, ClassVar, NamedTuple +from typing import TYPE_CHECKING, Any, ClassVar, NamedTuple, int from django.conf import settings from django.db import models, router, transaction diff --git a/src/sentry/models/groupbookmark.py b/src/sentry/models/groupbookmark.py index 3672be4b911f6a..a9561101d6fbbf 100644 --- a/src/sentry/models/groupbookmark.py +++ b/src/sentry/models/groupbookmark.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.db import models from django.utils import timezone diff --git a/src/sentry/models/groupcommitresolution.py b/src/sentry/models/groupcommitresolution.py index 1592fff2201c4e..8c77a4ccdd5475 100644 --- a/src/sentry/models/groupcommitresolution.py +++ b/src/sentry/models/groupcommitresolution.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/groupemailthread.py b/src/sentry/models/groupemailthread.py index 392fb61b3443de..71338f069e1615 100644 --- a/src/sentry/models/groupemailthread.py +++ b/src/sentry/models/groupemailthread.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/groupenvironment.py b/src/sentry/models/groupenvironment.py index b26c59fc0b7af6..8d2b0af0867ed0 100644 --- a/src/sentry/models/groupenvironment.py +++ b/src/sentry/models/groupenvironment.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import DO_NOTHING, DateTimeField, Index from django.db.models.signals import post_delete from django.utils import timezone diff --git a/src/sentry/models/grouphash.py b/src/sentry/models/grouphash.py index 34f483f946fe1e..3730039e2bc0c0 100644 --- a/src/sentry/models/grouphash.py +++ b/src/sentry/models/grouphash.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from django.db import models from django.utils import timezone diff --git a/src/sentry/models/grouphashmetadata.py b/src/sentry/models/grouphashmetadata.py index e01de4a481b0b4..60712461fcac67 100644 --- a/src/sentry/models/grouphashmetadata.py +++ b/src/sentry/models/grouphashmetadata.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from datetime import timezone as tz diff --git a/src/sentry/models/grouphistory.py b/src/sentry/models/grouphistory.py index 44f1086fc3d4af..4b529e54cb1d86 100644 --- a/src/sentry/models/grouphistory.py +++ b/src/sentry/models/grouphistory.py @@ -2,7 +2,7 @@ import datetime from collections.abc import Sequence -from typing import TYPE_CHECKING, ClassVar +from typing import TYPE_CHECKING, ClassVar, int from django.conf import settings from django.db import models diff --git a/src/sentry/models/groupinbox.py b/src/sentry/models/groupinbox.py index a2e732ad12fb85..e8a4a31aa07335 100644 --- a/src/sentry/models/groupinbox.py +++ b/src/sentry/models/groupinbox.py @@ -3,7 +3,7 @@ from collections.abc import Iterable from datetime import datetime from enum import Enum -from typing import TYPE_CHECKING, TypedDict +from typing import TYPE_CHECKING, TypedDict, int import sentry_sdk from django.db import models diff --git a/src/sentry/models/grouplink.py b/src/sentry/models/grouplink.py index fe783ddac19206..9e81a0d6fae3bb 100644 --- a/src/sentry/models/grouplink.py +++ b/src/sentry/models/grouplink.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, ClassVar +from typing import TYPE_CHECKING, ClassVar, int from django.db import models from django.db.models import QuerySet diff --git a/src/sentry/models/groupmeta.py b/src/sentry/models/groupmeta.py index 9c661bb03e388a..25c6c480b9739e 100644 --- a/src/sentry/models/groupmeta.py +++ b/src/sentry/models/groupmeta.py @@ -1,5 +1,5 @@ import threading -from typing import ClassVar +from typing import int, ClassVar from django.core.signals import request_finished from django.db import models diff --git a/src/sentry/models/groupopenperiod.py b/src/sentry/models/groupopenperiod.py index cd68ece00cebe2..0573f6adc5f445 100644 --- a/src/sentry/models/groupopenperiod.py +++ b/src/sentry/models/groupopenperiod.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import datetime, timedelta diff --git a/src/sentry/models/groupopenperiodactivity.py b/src/sentry/models/groupopenperiodactivity.py index 5b6cfa72aff9be..c43ecf9365ed37 100644 --- a/src/sentry/models/groupopenperiodactivity.py +++ b/src/sentry/models/groupopenperiodactivity.py @@ -1,3 +1,4 @@ +from typing import int from enum import IntEnum from uuid import UUID, uuid4 diff --git a/src/sentry/models/groupowner.py b/src/sentry/models/groupowner.py index bb63e6f0c20ef2..0610a6807d165a 100644 --- a/src/sentry/models/groupowner.py +++ b/src/sentry/models/groupowner.py @@ -5,7 +5,7 @@ from collections.abc import Sequence from datetime import datetime, timedelta from enum import Enum, StrEnum -from typing import ClassVar, TypedDict +from typing import ClassVar, TypedDict, int from django.conf import settings from django.db import models diff --git a/src/sentry/models/groupreaction.py b/src/sentry/models/groupreaction.py index 5faf9dd931c5aa..08806fc5e004c9 100644 --- a/src/sentry/models/groupreaction.py +++ b/src/sentry/models/groupreaction.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from enum import Enum diff --git a/src/sentry/models/groupredirect.py b/src/sentry/models/groupredirect.py index b7ab80979a454c..9294251aad8741 100644 --- a/src/sentry/models/groupredirect.py +++ b/src/sentry/models/groupredirect.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/grouprelease.py b/src/sentry/models/grouprelease.py index 5d3daba4d02ee9..c94091e1f2c5ad 100644 --- a/src/sentry/models/grouprelease.py +++ b/src/sentry/models/grouprelease.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.db import models diff --git a/src/sentry/models/groupresolution.py b/src/sentry/models/groupresolution.py index 934cd488d16c9f..8ca17d5d58f89e 100644 --- a/src/sentry/models/groupresolution.py +++ b/src/sentry/models/groupresolution.py @@ -1,3 +1,4 @@ +from typing import int import orjson from django.db import models from django.utils import timezone diff --git a/src/sentry/models/grouprulestatus.py b/src/sentry/models/grouprulestatus.py index 069bbdf6898702..f8b8ba6fc59b9e 100644 --- a/src/sentry/models/grouprulestatus.py +++ b/src/sentry/models/grouprulestatus.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/groupsearchview.py b/src/sentry/models/groupsearchview.py index f31e2915498b09..29c93b52057f77 100644 --- a/src/sentry/models/groupsearchview.py +++ b/src/sentry/models/groupsearchview.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.contrib.postgres.fields.array import ArrayField from django.db import models diff --git a/src/sentry/models/groupsearchviewlastvisited.py b/src/sentry/models/groupsearchviewlastvisited.py index f33c1059557438..f84041e37c4af6 100644 --- a/src/sentry/models/groupsearchviewlastvisited.py +++ b/src/sentry/models/groupsearchviewlastvisited.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.db.models import UniqueConstraint from django.utils import timezone diff --git a/src/sentry/models/groupsearchviewstarred.py b/src/sentry/models/groupsearchviewstarred.py index 053e7b551335ee..9fca271130aa86 100644 --- a/src/sentry/models/groupsearchviewstarred.py +++ b/src/sentry/models/groupsearchviewstarred.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import ClassVar +from typing import int, ClassVar from django.db import models, router, transaction from django.db.models import UniqueConstraint diff --git a/src/sentry/models/groupseen.py b/src/sentry/models/groupseen.py index e97f35e17f2604..b6e90edcb45f85 100644 --- a/src/sentry/models/groupseen.py +++ b/src/sentry/models/groupseen.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.db import models from django.utils import timezone diff --git a/src/sentry/models/groupshare.py b/src/sentry/models/groupshare.py index 13c170b16e4af8..9552e27ea11049 100644 --- a/src/sentry/models/groupshare.py +++ b/src/sentry/models/groupshare.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from django.conf import settings diff --git a/src/sentry/models/groupsnooze.py b/src/sentry/models/groupsnooze.py index 6a830f54783a3a..b963f191a2432b 100644 --- a/src/sentry/models/groupsnooze.py +++ b/src/sentry/models/groupsnooze.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import timedelta -from typing import TYPE_CHECKING, Any, ClassVar, Self +from typing import TYPE_CHECKING, Any, ClassVar, Self, int from django.db import models from django.db.models.signals import post_delete, post_save diff --git a/src/sentry/models/groupsubscription.py b/src/sentry/models/groupsubscription.py index ba7d8aedea8662..9b8a48b682883b 100644 --- a/src/sentry/models/groupsubscription.py +++ b/src/sentry/models/groupsubscription.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Iterable -from typing import TYPE_CHECKING, ClassVar +from typing import TYPE_CHECKING, ClassVar, int from django.conf import settings from django.db import IntegrityError, models, router, transaction diff --git a/src/sentry/models/grouptombstone.py b/src/sentry/models/grouptombstone.py index e9851f26e03a66..beb83d240d9c12 100644 --- a/src/sentry/models/grouptombstone.py +++ b/src/sentry/models/grouptombstone.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from django.db import models from django.utils import timezone diff --git a/src/sentry/models/importchunk.py b/src/sentry/models/importchunk.py index 0ded852498ade3..d7be19ff9bfc68 100644 --- a/src/sentry/models/importchunk.py +++ b/src/sentry/models/importchunk.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import models diff --git a/src/sentry/models/latestreporeleaseenvironment.py b/src/sentry/models/latestreporeleaseenvironment.py index 66e8e0f9016800..6c9f7bd627e310 100644 --- a/src/sentry/models/latestreporeleaseenvironment.py +++ b/src/sentry/models/latestreporeleaseenvironment.py @@ -1,3 +1,4 @@ +from typing import int from sentry.backup.scopes import RelocationScope from sentry.db.models import BoundedBigIntegerField, Model, region_silo_model, sane_repr diff --git a/src/sentry/models/options/__init__.py b/src/sentry/models/options/__init__.py index e2fc9d151c656b..75f5dbafe33b10 100644 --- a/src/sentry/models/options/__init__.py +++ b/src/sentry/models/options/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.users.models.user_option import UserOption from .option import ControlOption, Option diff --git a/src/sentry/models/options/option.py b/src/sentry/models/options/option.py index 553588c2a80cf3..b9ad772a5177f5 100644 --- a/src/sentry/models/options/option.py +++ b/src/sentry/models/options/option.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/options/organization_option.py b/src/sentry/models/options/organization_option.py index f3efcde3632402..3f241dced55001 100644 --- a/src/sentry/models/options/organization_option.py +++ b/src/sentry/models/options/organization_option.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Mapping, Sequence -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django.db import models diff --git a/src/sentry/models/options/project_option.py b/src/sentry/models/options/project_option.py index b2d628e3c9d5b7..c47977ceb7f3dc 100644 --- a/src/sentry/models/options/project_option.py +++ b/src/sentry/models/options/project_option.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Mapping, Sequence -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django.db import models, router, transaction diff --git a/src/sentry/models/options/project_template_option.py b/src/sentry/models/options/project_template_option.py index 335c64144ac42c..270987ed23c8b3 100644 --- a/src/sentry/models/options/project_template_option.py +++ b/src/sentry/models/options/project_template_option.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Mapping, Sequence -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django.db import models diff --git a/src/sentry/models/organization.py b/src/sentry/models/organization.py index a1fadf83e5f257..2781b35efcdf62 100644 --- a/src/sentry/models/organization.py +++ b/src/sentry/models/organization.py @@ -2,7 +2,7 @@ from collections.abc import Callable, Collection, Mapping, Sequence from enum import IntEnum -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django.conf import settings from django.db import models, router, transaction diff --git a/src/sentry/models/organizationaccessrequest.py b/src/sentry/models/organizationaccessrequest.py index c5bb20b1a0a385..689b2e590fa9a1 100644 --- a/src/sentry/models/organizationaccessrequest.py +++ b/src/sentry/models/organizationaccessrequest.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.db.models import Q from django.urls import reverse diff --git a/src/sentry/models/organizationmapping.py b/src/sentry/models/organizationmapping.py index 7906dec667bdfb..de11f5255f5589 100644 --- a/src/sentry/models/organizationmapping.py +++ b/src/sentry/models/organizationmapping.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from django.db import models from django.utils import timezone diff --git a/src/sentry/models/organizationmember.py b/src/sentry/models/organizationmember.py index 0c3002ec381326..2f53d7832a8135 100644 --- a/src/sentry/models/organizationmember.py +++ b/src/sentry/models/organizationmember.py @@ -8,7 +8,7 @@ from datetime import timedelta from enum import Enum from hashlib import md5 -from typing import TYPE_CHECKING, Any, ClassVar, TypedDict +from typing import TYPE_CHECKING, Any, ClassVar, TypedDict, int from urllib.parse import urlencode from django.conf import settings diff --git a/src/sentry/models/organizationmemberinvite.py b/src/sentry/models/organizationmemberinvite.py index 49e2ecef24bab1..ec365494345850 100644 --- a/src/sentry/models/organizationmemberinvite.py +++ b/src/sentry/models/organizationmemberinvite.py @@ -1,7 +1,7 @@ import secrets from datetime import datetime, timedelta from enum import Enum -from typing import TypedDict +from typing import int, TypedDict from django.conf import settings from django.db import models, router, transaction diff --git a/src/sentry/models/organizationmembermapping.py b/src/sentry/models/organizationmembermapping.py index 2799945ea72284..4f9986fdfa8425 100644 --- a/src/sentry/models/organizationmembermapping.py +++ b/src/sentry/models/organizationmembermapping.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.conf import settings from django.db import models diff --git a/src/sentry/models/organizationmemberteam.py b/src/sentry/models/organizationmemberteam.py index cbe8d8952bb782..997580e9c07448 100644 --- a/src/sentry/models/organizationmemberteam.py +++ b/src/sentry/models/organizationmemberteam.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, ClassVar, Self +from typing import Any, ClassVar, Self, int from django.db import models diff --git a/src/sentry/models/organizationmemberteamreplica.py b/src/sentry/models/organizationmemberteamreplica.py index 1c7ddd7e6d7e30..498d6081d9fb5d 100644 --- a/src/sentry/models/organizationmemberteamreplica.py +++ b/src/sentry/models/organizationmemberteamreplica.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/organizationonboardingtask.py b/src/sentry/models/organizationonboardingtask.py index d3806b1fa2f1a1..146829143f4a6c 100644 --- a/src/sentry/models/organizationonboardingtask.py +++ b/src/sentry/models/organizationonboardingtask.py @@ -1,7 +1,7 @@ from __future__ import annotations import enum -from typing import ClassVar +from typing import int, ClassVar from django.conf import settings from django.core.cache import cache diff --git a/src/sentry/models/organizationslugreservation.py b/src/sentry/models/organizationslugreservation.py index f160883ecd3da7..fcdc98c3b8e695 100644 --- a/src/sentry/models/organizationslugreservation.py +++ b/src/sentry/models/organizationslugreservation.py @@ -2,7 +2,7 @@ from collections.abc import Collection, Mapping from enum import IntEnum -from typing import Any +from typing import int, Any from django.db import models from django.utils import timezone diff --git a/src/sentry/models/organizationslugreservationreplica.py b/src/sentry/models/organizationslugreservationreplica.py index e2cffbcd5ba4e4..22bc95e9bc0cca 100644 --- a/src/sentry/models/organizationslugreservationreplica.py +++ b/src/sentry/models/organizationslugreservationreplica.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/orgauthtoken.py b/src/sentry/models/orgauthtoken.py index 5e0ea22e1ad206..15e8872d1f3639 100644 --- a/src/sentry/models/orgauthtoken.py +++ b/src/sentry/models/orgauthtoken.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, ClassVar, Self, TypeGuard +from typing import TYPE_CHECKING, ClassVar, Self, TypeGuard, int from django.contrib.postgres.fields.array import ArrayField from django.core.cache import cache diff --git a/src/sentry/models/owner_base.py b/src/sentry/models/owner_base.py index 48f2164c731a63..8a96222812a6c7 100644 --- a/src/sentry/models/owner_base.py +++ b/src/sentry/models/owner_base.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.conf import settings from django.db import models diff --git a/src/sentry/models/project.py b/src/sentry/models/project.py index 093e3badc3d790..4da862132955c4 100644 --- a/src/sentry/models/project.py +++ b/src/sentry/models/project.py @@ -3,7 +3,7 @@ import logging from collections import defaultdict from collections.abc import Callable, Collection, Iterable -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from uuid import uuid1 import sentry_sdk diff --git a/src/sentry/models/projectbookmark.py b/src/sentry/models/projectbookmark.py index 4db68ef029d543..87db2a35981598 100644 --- a/src/sentry/models/projectbookmark.py +++ b/src/sentry/models/projectbookmark.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.db import models from django.utils import timezone diff --git a/src/sentry/models/projectcodeowners.py b/src/sentry/models/projectcodeowners.py index 0de4fe5fc9e945..841066f45dd079 100644 --- a/src/sentry/models/projectcodeowners.py +++ b/src/sentry/models/projectcodeowners.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Iterable diff --git a/src/sentry/models/projectkey.py b/src/sentry/models/projectkey.py index ce9d09d00753c4..e722fcbfc84f00 100644 --- a/src/sentry/models/projectkey.py +++ b/src/sentry/models/projectkey.py @@ -3,7 +3,7 @@ import enum import re import secrets -from typing import ClassVar +from typing import int, ClassVar from urllib.parse import urlparse import petname diff --git a/src/sentry/models/projectownership.py b/src/sentry/models/projectownership.py index fe2c95dfdffcd6..f48f62b893a225 100644 --- a/src/sentry/models/projectownership.py +++ b/src/sentry/models/projectownership.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping, Sequence -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int import sentry_sdk from django.db import models diff --git a/src/sentry/models/projectplatform.py b/src/sentry/models/projectplatform.py index e82ed41dedc0e7..34b29edbe29231 100644 --- a/src/sentry/models/projectplatform.py +++ b/src/sentry/models/projectplatform.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/projectredirect.py b/src/sentry/models/projectredirect.py index f09de28d40e747..ec1dd2accb7b25 100644 --- a/src/sentry/models/projectredirect.py +++ b/src/sentry/models/projectredirect.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/projectsdk.py b/src/sentry/models/projectsdk.py index 4d8628dbb735d1..96c5123437fc8e 100644 --- a/src/sentry/models/projectsdk.py +++ b/src/sentry/models/projectsdk.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Sequence diff --git a/src/sentry/models/projectteam.py b/src/sentry/models/projectteam.py index 2967401c53774b..f95f1af1905f39 100644 --- a/src/sentry/models/projectteam.py +++ b/src/sentry/models/projectteam.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import TYPE_CHECKING, ClassVar +from typing import TYPE_CHECKING, ClassVar, int from django.db import router, transaction from django.db.models import QuerySet diff --git a/src/sentry/models/projecttemplate.py b/src/sentry/models/projecttemplate.py index 5b75163e1e4ad9..b97413542994e3 100644 --- a/src/sentry/models/projecttemplate.py +++ b/src/sentry/models/projecttemplate.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db import models diff --git a/src/sentry/models/promptsactivity.py b/src/sentry/models/promptsactivity.py index 87380b359cfa8a..045be45f700473 100644 --- a/src/sentry/models/promptsactivity.py +++ b/src/sentry/models/promptsactivity.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.db import models from django.utils import timezone diff --git a/src/sentry/models/pullrequest.py b/src/sentry/models/pullrequest.py index f7a40173a1bb94..692ce4a8774aef 100644 --- a/src/sentry/models/pullrequest.py +++ b/src/sentry/models/pullrequest.py @@ -2,7 +2,7 @@ from collections.abc import Mapping, Sequence from datetime import datetime -from typing import Any, ClassVar +from typing import Any, ClassVar, int from django.contrib.postgres.fields import ArrayField from django.db import models diff --git a/src/sentry/models/recentsearch.py b/src/sentry/models/recentsearch.py index b00c74d773f021..ee3fd1c81bb9ea 100644 --- a/src/sentry/models/recentsearch.py +++ b/src/sentry/models/recentsearch.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.db.models.signals import pre_save from django.dispatch import receiver diff --git a/src/sentry/models/relay.py b/src/sentry/models/relay.py index 71ca762ee2f13a..00a27a6ffa4cf2 100644 --- a/src/sentry/models/relay.py +++ b/src/sentry/models/relay.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db import models from django.utils import timezone diff --git a/src/sentry/models/release.py b/src/sentry/models/release.py index e5ecee580d7c8c..0f0cc66b3ce778 100644 --- a/src/sentry/models/release.py +++ b/src/sentry/models/release.py @@ -4,7 +4,7 @@ import logging from collections.abc import Mapping, Sequence from datetime import datetime -from typing import Any, ClassVar, Literal, TypedDict, cast +from typing import Any, ClassVar, Literal, TypedDict, cast, int import orjson import sentry_sdk diff --git a/src/sentry/models/release_threshold/__init__.py b/src/sentry/models/release_threshold/__init__.py index ab449eab63b6ad..8a592587d87de6 100644 --- a/src/sentry/models/release_threshold/__init__.py +++ b/src/sentry/models/release_threshold/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .release_threshold import ReleaseThreshold __all__ = ("ReleaseThreshold",) diff --git a/src/sentry/models/release_threshold/constants.py b/src/sentry/models/release_threshold/constants.py index e4cd871db21494..4ee1f30c86abfa 100644 --- a/src/sentry/models/release_threshold/constants.py +++ b/src/sentry/models/release_threshold/constants.py @@ -1,3 +1,4 @@ +from typing import int class ReleaseThresholdType: TOTAL_ERROR_COUNT = 0 NEW_ISSUE_COUNT = 1 diff --git a/src/sentry/models/release_threshold/release_threshold.py b/src/sentry/models/release_threshold/release_threshold.py index a9acb5f2d19ac6..9e74b154e614c7 100644 --- a/src/sentry/models/release_threshold/release_threshold.py +++ b/src/sentry/models/release_threshold/release_threshold.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/releaseactivity.py b/src/sentry/models/releaseactivity.py index 12b91f0c558a2c..6b35296d619a56 100644 --- a/src/sentry/models/releaseactivity.py +++ b/src/sentry/models/releaseactivity.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/models/releasecommit.py b/src/sentry/models/releasecommit.py index 065857c25d38a3..999373cb3d4cba 100644 --- a/src/sentry/models/releasecommit.py +++ b/src/sentry/models/releasecommit.py @@ -1,3 +1,4 @@ +from typing import int from sentry.backup.scopes import RelocationScope from sentry.db.models import ( BoundedBigIntegerField, diff --git a/src/sentry/models/releaseenvironment.py b/src/sentry/models/releaseenvironment.py index 81a14323cedd2c..fc4f0fe5ff9fa7 100644 --- a/src/sentry/models/releaseenvironment.py +++ b/src/sentry/models/releaseenvironment.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.db import models diff --git a/src/sentry/models/releasefile.py b/src/sentry/models/releasefile.py index 78b79704f580c2..41a92ab258e3bf 100644 --- a/src/sentry/models/releasefile.py +++ b/src/sentry/models/releasefile.py @@ -6,7 +6,7 @@ from hashlib import sha1 from io import BytesIO from tempfile import TemporaryDirectory -from typing import IO, ClassVar, Self +from typing import IO, ClassVar, Self, int from urllib.parse import urlunsplit import sentry_sdk diff --git a/src/sentry/models/releaseheadcommit.py b/src/sentry/models/releaseheadcommit.py index 8311dc494bf381..628b525275378b 100644 --- a/src/sentry/models/releaseheadcommit.py +++ b/src/sentry/models/releaseheadcommit.py @@ -1,3 +1,4 @@ +from typing import int from sentry.backup.scopes import RelocationScope from sentry.db.models import ( BoundedBigIntegerField, diff --git a/src/sentry/models/releaseprojectenvironment.py b/src/sentry/models/releaseprojectenvironment.py index 43fb3104945c8a..a0d4aaf326196a 100644 --- a/src/sentry/models/releaseprojectenvironment.py +++ b/src/sentry/models/releaseprojectenvironment.py @@ -2,7 +2,7 @@ from datetime import datetime, timedelta from enum import Enum -from typing import TypedDict +from typing import int, TypedDict from django.db import models from django.utils import timezone diff --git a/src/sentry/models/releases/constants.py b/src/sentry/models/releases/constants.py index 47ce332a21e834..561bf3e46c390a 100644 --- a/src/sentry/models/releases/constants.py +++ b/src/sentry/models/releases/constants.py @@ -1,3 +1,4 @@ +from typing import int DB_VERSION_LENGTH = 250 diff --git a/src/sentry/models/releases/exceptions.py b/src/sentry/models/releases/exceptions.py index d1d65b6f8d30b0..604da8cf9ae9ef 100644 --- a/src/sentry/models/releases/exceptions.py +++ b/src/sentry/models/releases/exceptions.py @@ -1,3 +1,4 @@ +from typing import int class UnsafeReleaseDeletion(Exception): pass diff --git a/src/sentry/models/releases/release_project.py b/src/sentry/models/releases/release_project.py index 889a5b080116d1..a15bbdba16faaf 100644 --- a/src/sentry/models/releases/release_project.py +++ b/src/sentry/models/releases/release_project.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import ClassVar +from typing import int, ClassVar from django.db import models diff --git a/src/sentry/models/releases/set_commits.py b/src/sentry/models/releases/set_commits.py index 3a21532f99ade8..6d2941132d39e2 100644 --- a/src/sentry/models/releases/set_commits.py +++ b/src/sentry/models/releases/set_commits.py @@ -3,7 +3,7 @@ import itertools import logging import re -from typing import TypedDict +from typing import int, TypedDict from django.db import IntegrityError, router diff --git a/src/sentry/models/releases/util.py b/src/sentry/models/releases/util.py index 66fa5b2829f5fe..00ecf924f6ba8d 100644 --- a/src/sentry/models/releases/util.py +++ b/src/sentry/models/releases/util.py @@ -4,7 +4,7 @@ from collections import namedtuple from collections.abc import Sequence from dataclasses import dataclass -from typing import TYPE_CHECKING, Self +from typing import TYPE_CHECKING, Self, int from django.db import models from django.db.models import Case, F, Func, Q, Subquery, Value, When diff --git a/src/sentry/models/repository.py b/src/sentry/models/repository.py index fc0a089859767a..e4b2a5d1b86508 100644 --- a/src/sentry/models/repository.py +++ b/src/sentry/models/repository.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.contrib.postgres.fields.array import ArrayField from django.db import models diff --git a/src/sentry/models/rollbackorganization.py b/src/sentry/models/rollbackorganization.py index 27e30ace77a71b..7e9943d1497c78 100644 --- a/src/sentry/models/rollbackorganization.py +++ b/src/sentry/models/rollbackorganization.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.db.models import UniqueConstraint diff --git a/src/sentry/models/rollbackuser.py b/src/sentry/models/rollbackuser.py index a30bdc986e4e12..8d39eb5624b484 100644 --- a/src/sentry/models/rollbackuser.py +++ b/src/sentry/models/rollbackuser.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from django.db import models diff --git a/src/sentry/models/rule.py b/src/sentry/models/rule.py index 32d60beb7e2330..7e94a2624a5d74 100644 --- a/src/sentry/models/rule.py +++ b/src/sentry/models/rule.py @@ -2,7 +2,7 @@ from collections.abc import Sequence from enum import Enum, IntEnum -from typing import Any, ClassVar, Self +from typing import Any, ClassVar, Self, int from django.conf import settings from django.db import models diff --git a/src/sentry/models/rulefirehistory.py b/src/sentry/models/rulefirehistory.py index 27814f26d953a5..e8d79ec269655c 100644 --- a/src/sentry/models/rulefirehistory.py +++ b/src/sentry/models/rulefirehistory.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import DateTimeField, Index from django.db.models.fields import UUIDField from django.utils import timezone diff --git a/src/sentry/models/rulesnooze.py b/src/sentry/models/rulesnooze.py index f50aa10b7d705a..c0ef48620f7a97 100644 --- a/src/sentry/models/rulesnooze.py +++ b/src/sentry/models/rulesnooze.py @@ -1,4 +1,4 @@ -from typing import ClassVar +from typing import int, ClassVar from django.db import models from django.db.models import CheckConstraint, Q, UniqueConstraint diff --git a/src/sentry/models/savedsearch.py b/src/sentry/models/savedsearch.py index d0e68aa508c02b..522b647cb2a0f7 100644 --- a/src/sentry/models/savedsearch.py +++ b/src/sentry/models/savedsearch.py @@ -1,7 +1,7 @@ from __future__ import annotations from enum import StrEnum -from typing import TYPE_CHECKING, Any, Literal +from typing import TYPE_CHECKING, Any, Literal, int from django.db import models from django.db.models import Q, UniqueConstraint diff --git a/src/sentry/models/search_common.py b/src/sentry/models/search_common.py index a338b6299475e0..fb9d550c50f50c 100644 --- a/src/sentry/models/search_common.py +++ b/src/sentry/models/search_common.py @@ -1,3 +1,4 @@ +from typing import int from enum import IntEnum diff --git a/src/sentry/models/sentryshot.py b/src/sentry/models/sentryshot.py index 1ad259c7e6a6d7..02af411c44fbdc 100644 --- a/src/sentry/models/sentryshot.py +++ b/src/sentry/models/sentryshot.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import uuid diff --git a/src/sentry/models/sourcemapprocessingissue.py b/src/sentry/models/sourcemapprocessingissue.py index 5ec28d2b7aef10..c537d259605ec9 100644 --- a/src/sentry/models/sourcemapprocessingissue.py +++ b/src/sentry/models/sourcemapprocessingissue.py @@ -1,3 +1,4 @@ +from typing import int """ A class for tracking specific source map errors, based on EventError """ diff --git a/src/sentry/models/statistical_detectors.py b/src/sentry/models/statistical_detectors.py index dd3b43b2fdbcd7..a2f30011dba9e6 100644 --- a/src/sentry/models/statistical_detectors.py +++ b/src/sentry/models/statistical_detectors.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from enum import Enum diff --git a/src/sentry/models/team.py b/src/sentry/models/team.py index 5aa34b59114eef..88e6b3a20b6454 100644 --- a/src/sentry/models/team.py +++ b/src/sentry/models/team.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Sequence -from typing import TYPE_CHECKING, ClassVar +from typing import TYPE_CHECKING, ClassVar, int from django.conf import settings from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/models/teamreplica.py b/src/sentry/models/teamreplica.py index f7f1e094979520..aae064fc291346 100644 --- a/src/sentry/models/teamreplica.py +++ b/src/sentry/models/teamreplica.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.db import models from django.utils import timezone diff --git a/src/sentry/models/tombstone.py b/src/sentry/models/tombstone.py index 6876081f14f231..8942ae1ccc0d12 100644 --- a/src/sentry/models/tombstone.py +++ b/src/sentry/models/tombstone.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import IntegrityError, models, router, transaction from django.utils import timezone diff --git a/src/sentry/models/transaction_threshold.py b/src/sentry/models/transaction_threshold.py index e4c73d29f10beb..8d7fcb592d5b24 100644 --- a/src/sentry/models/transaction_threshold.py +++ b/src/sentry/models/transaction_threshold.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum from django.db import models diff --git a/src/sentry/models/userreport.py b/src/sentry/models/userreport.py index 7888c045da8c13..f0c814e5958041 100644 --- a/src/sentry/models/userreport.py +++ b/src/sentry/models/userreport.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/monitors/apps.py b/src/sentry/monitors/apps.py index 04d256192a5603..5b77e4ed57948f 100644 --- a/src/sentry/monitors/apps.py +++ b/src/sentry/monitors/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/monitors/clock_dispatch.py b/src/sentry/monitors/clock_dispatch.py index ec424c20cf0fe9..45cf5342c61f0d 100644 --- a/src/sentry/monitors/clock_dispatch.py +++ b/src/sentry/monitors/clock_dispatch.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from datetime import datetime, timedelta, timezone diff --git a/src/sentry/monitors/clock_tasks/check_missed.py b/src/sentry/monitors/clock_tasks/check_missed.py index 85028adb066ac1..8bdf87cf6135a3 100644 --- a/src/sentry/monitors/clock_tasks/check_missed.py +++ b/src/sentry/monitors/clock_tasks/check_missed.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from datetime import datetime diff --git a/src/sentry/monitors/clock_tasks/check_timeout.py b/src/sentry/monitors/clock_tasks/check_timeout.py index 833f1d6a593ea6..78c1a1eafe6482 100644 --- a/src/sentry/monitors/clock_tasks/check_timeout.py +++ b/src/sentry/monitors/clock_tasks/check_timeout.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from datetime import datetime diff --git a/src/sentry/monitors/clock_tasks/mark_unknown.py b/src/sentry/monitors/clock_tasks/mark_unknown.py index 1dd85281d04bdd..b367376e988c68 100644 --- a/src/sentry/monitors/clock_tasks/mark_unknown.py +++ b/src/sentry/monitors/clock_tasks/mark_unknown.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from datetime import datetime diff --git a/src/sentry/monitors/clock_tasks/producer.py b/src/sentry/monitors/clock_tasks/producer.py index 089e5dcf6c87ed..97e2dbf9fecc90 100644 --- a/src/sentry/monitors/clock_tasks/producer.py +++ b/src/sentry/monitors/clock_tasks/producer.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from arroyo import Topic as ArroyoTopic from arroyo.backends.kafka import KafkaPayload, KafkaProducer diff --git a/src/sentry/monitors/constants.py b/src/sentry/monitors/constants.py index eee2a7096d2af9..4ba508ae24932d 100644 --- a/src/sentry/monitors/constants.py +++ b/src/sentry/monitors/constants.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum # default maximum runtime for a monitor, in minutes diff --git a/src/sentry/monitors/consumers/clock_tasks_consumer.py b/src/sentry/monitors/consumers/clock_tasks_consumer.py index 66a9ae784bf622..dd319ea540433a 100644 --- a/src/sentry/monitors/consumers/clock_tasks_consumer.py +++ b/src/sentry/monitors/consumers/clock_tasks_consumer.py @@ -3,7 +3,7 @@ import logging from collections.abc import Mapping from datetime import datetime, timezone -from typing import TypeGuard +from typing import int, TypeGuard from arroyo.backends.kafka.consumer import KafkaPayload from arroyo.processing.strategies.abstract import ProcessingStrategy, ProcessingStrategyFactory diff --git a/src/sentry/monitors/consumers/clock_tick_consumer.py b/src/sentry/monitors/consumers/clock_tick_consumer.py index a6cf0b8e19c52f..4609e5cdbf521f 100644 --- a/src/sentry/monitors/consumers/clock_tick_consumer.py +++ b/src/sentry/monitors/consumers/clock_tick_consumer.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Mapping diff --git a/src/sentry/monitors/consumers/incident_occurrences_consumer.py b/src/sentry/monitors/consumers/incident_occurrences_consumer.py index e8796581a631c4..7a7a851ba3c363 100644 --- a/src/sentry/monitors/consumers/incident_occurrences_consumer.py +++ b/src/sentry/monitors/consumers/incident_occurrences_consumer.py @@ -3,7 +3,7 @@ import logging from collections.abc import Mapping from datetime import UTC, datetime -from typing import TypeGuard +from typing import int, TypeGuard import sentry_sdk from arroyo.backends.kafka.consumer import KafkaPayload diff --git a/src/sentry/monitors/consumers/monitor_consumer.py b/src/sentry/monitors/consumers/monitor_consumer.py index ccd496975e260e..e63bdd1109a71c 100644 --- a/src/sentry/monitors/consumers/monitor_consumer.py +++ b/src/sentry/monitors/consumers/monitor_consumer.py @@ -8,7 +8,7 @@ from copy import deepcopy from datetime import UTC, datetime from functools import partial -from typing import Any, Literal, NotRequired, TypedDict +from typing import Any, Literal, NotRequired, TypedDict, int import sentry_sdk from arroyo.backends.kafka.consumer import KafkaPayload diff --git a/src/sentry/monitors/endpoints/base.py b/src/sentry/monitors/endpoints/base.py index f4b5f5f6943ef4..8e996c67a7894a 100644 --- a/src/sentry/monitors/endpoints/base.py +++ b/src/sentry/monitors/endpoints/base.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from uuid import UUID diff --git a/src/sentry/monitors/endpoints/base_monitor_checkin_index.py b/src/sentry/monitors/endpoints/base_monitor_checkin_index.py index dbf55dae2393de..45b6a24b0c4cf9 100644 --- a/src/sentry/monitors/endpoints/base_monitor_checkin_index.py +++ b/src/sentry/monitors/endpoints/base_monitor_checkin_index.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from rest_framework.exceptions import ParseError from rest_framework.request import Request diff --git a/src/sentry/monitors/endpoints/base_monitor_details.py b/src/sentry/monitors/endpoints/base_monitor_details.py index 9b46dc0af075bc..e5666dcf9930e0 100644 --- a/src/sentry/monitors/endpoints/base_monitor_details.py +++ b/src/sentry/monitors/endpoints/base_monitor_details.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import router, transaction from django.db.models import QuerySet diff --git a/src/sentry/monitors/endpoints/base_monitor_environment_details.py b/src/sentry/monitors/endpoints/base_monitor_environment_details.py index 330be3b288c71b..b30411c3259c04 100644 --- a/src/sentry/monitors/endpoints/base_monitor_environment_details.py +++ b/src/sentry/monitors/endpoints/base_monitor_environment_details.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/monitors/endpoints/base_monitor_stats.py b/src/sentry/monitors/endpoints/base_monitor_stats.py index 664bbfcc8192f1..cc34913ead8469 100644 --- a/src/sentry/monitors/endpoints/base_monitor_stats.py +++ b/src/sentry/monitors/endpoints/base_monitor_stats.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections import OrderedDict from datetime import UTC, datetime, timedelta diff --git a/src/sentry/monitors/endpoints/organization_monitor_checkin_index.py b/src/sentry/monitors/endpoints/organization_monitor_checkin_index.py index 438f9ef4e3d15c..9c256bb39b4fbc 100644 --- a/src/sentry/monitors/endpoints/organization_monitor_checkin_index.py +++ b/src/sentry/monitors/endpoints/organization_monitor_checkin_index.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/monitors/endpoints/organization_monitor_details.py b/src/sentry/monitors/endpoints/organization_monitor_details.py index b12e5741d21084..779fe96547186a 100644 --- a/src/sentry/monitors/endpoints/organization_monitor_details.py +++ b/src/sentry/monitors/endpoints/organization_monitor_details.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/monitors/endpoints/organization_monitor_environment_details.py b/src/sentry/monitors/endpoints/organization_monitor_environment_details.py index 2cdef8cce2cc7a..f0242840df1169 100644 --- a/src/sentry/monitors/endpoints/organization_monitor_environment_details.py +++ b/src/sentry/monitors/endpoints/organization_monitor_environment_details.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/monitors/endpoints/organization_monitor_index.py b/src/sentry/monitors/endpoints/organization_monitor_index.py index 8d825e81826411..b8428e495c1145 100644 --- a/src/sentry/monitors/endpoints/organization_monitor_index.py +++ b/src/sentry/monitors/endpoints/organization_monitor_index.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from django.db.models import ( Case, diff --git a/src/sentry/monitors/endpoints/organization_monitor_index_count.py b/src/sentry/monitors/endpoints/organization_monitor_index_count.py index 56522a69769d93..a7b3d566e966a5 100644 --- a/src/sentry/monitors/endpoints/organization_monitor_index_count.py +++ b/src/sentry/monitors/endpoints/organization_monitor_index_count.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Q from drf_spectacular.utils import extend_schema from rest_framework.response import Response diff --git a/src/sentry/monitors/endpoints/organization_monitor_index_stats.py b/src/sentry/monitors/endpoints/organization_monitor_index_stats.py index 1db33d47736f0a..41534ef50d0cca 100644 --- a/src/sentry/monitors/endpoints/organization_monitor_index_stats.py +++ b/src/sentry/monitors/endpoints/organization_monitor_index_stats.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections import OrderedDict, defaultdict from collections.abc import MutableMapping diff --git a/src/sentry/monitors/endpoints/organization_monitor_processing_errors_index.py b/src/sentry/monitors/endpoints/organization_monitor_processing_errors_index.py index 8c1b1aa509e6a9..5297a13cc05cdb 100644 --- a/src/sentry/monitors/endpoints/organization_monitor_processing_errors_index.py +++ b/src/sentry/monitors/endpoints/organization_monitor_processing_errors_index.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.response import Response diff --git a/src/sentry/monitors/endpoints/organization_monitor_schedule_sample_data.py b/src/sentry/monitors/endpoints/organization_monitor_schedule_sample_data.py index a4f92bbc33b6cf..e8e238ed6d83c8 100644 --- a/src/sentry/monitors/endpoints/organization_monitor_schedule_sample_data.py +++ b/src/sentry/monitors/endpoints/organization_monitor_schedule_sample_data.py @@ -2,7 +2,7 @@ import zoneinfo from datetime import datetime -from typing import cast +from typing import int, cast from cronsim import CronSim from dateutil import rrule diff --git a/src/sentry/monitors/endpoints/organization_monitor_stats.py b/src/sentry/monitors/endpoints/organization_monitor_stats.py index 81a9d4b6794b96..d1ee7fe7fd6308 100644 --- a/src/sentry/monitors/endpoints/organization_monitor_stats.py +++ b/src/sentry/monitors/endpoints/organization_monitor_stats.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/monitors/endpoints/project_monitor_checkin_index.py b/src/sentry/monitors/endpoints/project_monitor_checkin_index.py index 8357857391070f..ac2664d1b68d5b 100644 --- a/src/sentry/monitors/endpoints/project_monitor_checkin_index.py +++ b/src/sentry/monitors/endpoints/project_monitor_checkin_index.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/monitors/endpoints/project_monitor_details.py b/src/sentry/monitors/endpoints/project_monitor_details.py index cc06c14ed4c682..f17db44bf5a7ff 100644 --- a/src/sentry/monitors/endpoints/project_monitor_details.py +++ b/src/sentry/monitors/endpoints/project_monitor_details.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/monitors/endpoints/project_monitor_environment_details.py b/src/sentry/monitors/endpoints/project_monitor_environment_details.py index 8108cd48ad2b42..8b9055a7ac6b5a 100644 --- a/src/sentry/monitors/endpoints/project_monitor_environment_details.py +++ b/src/sentry/monitors/endpoints/project_monitor_environment_details.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/monitors/endpoints/project_monitor_processing_errors_index.py b/src/sentry/monitors/endpoints/project_monitor_processing_errors_index.py index 9260db9cc3f600..30b57963f88206 100644 --- a/src/sentry/monitors/endpoints/project_monitor_processing_errors_index.py +++ b/src/sentry/monitors/endpoints/project_monitor_processing_errors_index.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.exceptions import ValidationError from rest_framework.response import Response diff --git a/src/sentry/monitors/endpoints/project_monitor_stats.py b/src/sentry/monitors/endpoints/project_monitor_stats.py index bb582a2949f25c..d0e23bc14176a9 100644 --- a/src/sentry/monitors/endpoints/project_monitor_stats.py +++ b/src/sentry/monitors/endpoints/project_monitor_stats.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/monitors/endpoints/project_processing_errors_details.py b/src/sentry/monitors/endpoints/project_processing_errors_details.py index 711c63635f970f..f48e44f16f24a6 100644 --- a/src/sentry/monitors/endpoints/project_processing_errors_details.py +++ b/src/sentry/monitors/endpoints/project_processing_errors_details.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from uuid import UUID diff --git a/src/sentry/monitors/endpoints/project_processing_errors_index.py b/src/sentry/monitors/endpoints/project_processing_errors_index.py index e8b9fd146aa69d..9eaa078f7ddf0e 100644 --- a/src/sentry/monitors/endpoints/project_processing_errors_index.py +++ b/src/sentry/monitors/endpoints/project_processing_errors_index.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.exceptions import ValidationError diff --git a/src/sentry/monitors/grouptype.py b/src/sentry/monitors/grouptype.py index 435a1371b0c0a7..f2983bc1e1d390 100644 --- a/src/sentry/monitors/grouptype.py +++ b/src/sentry/monitors/grouptype.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from dataclasses import dataclass diff --git a/src/sentry/monitors/logic/incident_occurrence.py b/src/sentry/monitors/logic/incident_occurrence.py index ede1c595a8af73..c6eb9428464979 100644 --- a/src/sentry/monitors/logic/incident_occurrence.py +++ b/src/sentry/monitors/logic/incident_occurrence.py @@ -5,7 +5,7 @@ from collections import Counter from collections.abc import Mapping, Sequence from datetime import datetime, timezone -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from arroyo import Topic as ArroyoTopic from arroyo.backends.kafka import KafkaPayload diff --git a/src/sentry/monitors/logic/incidents.py b/src/sentry/monitors/logic/incidents.py index 7f1aaaf04383d9..3201afe710ce93 100644 --- a/src/sentry/monitors/logic/incidents.py +++ b/src/sentry/monitors/logic/incidents.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from dataclasses import dataclass diff --git a/src/sentry/monitors/logic/mark_failed.py b/src/sentry/monitors/logic/mark_failed.py index 5b882739ba3e2f..ad8657a44c263d 100644 --- a/src/sentry/monitors/logic/mark_failed.py +++ b/src/sentry/monitors/logic/mark_failed.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from datetime import datetime diff --git a/src/sentry/monitors/logic/mark_ok.py b/src/sentry/monitors/logic/mark_ok.py index 9af3673fbe8547..acd81705318b03 100644 --- a/src/sentry/monitors/logic/mark_ok.py +++ b/src/sentry/monitors/logic/mark_ok.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from datetime import datetime diff --git a/src/sentry/monitors/logic/monitor_environment.py b/src/sentry/monitors/logic/monitor_environment.py index 1156e5050893b8..334224ab22db54 100644 --- a/src/sentry/monitors/logic/monitor_environment.py +++ b/src/sentry/monitors/logic/monitor_environment.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from sentry.monitors.models import CheckInStatus, MonitorCheckIn, MonitorEnvironment diff --git a/src/sentry/monitors/migrations/0001_squashed_0005_record_date_in_progress_state.py b/src/sentry/monitors/migrations/0001_squashed_0005_record_date_in_progress_state.py index 5292926802d50b..3d190fdfbcad57 100644 --- a/src/sentry/monitors/migrations/0001_squashed_0005_record_date_in_progress_state.py +++ b/src/sentry/monitors/migrations/0001_squashed_0005_record_date_in_progress_state.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 16:30 +from typing import int import django.db.models.deletion import django.utils.timezone from django.db import migrations, models diff --git a/src/sentry/monitors/migrations/0006_add_is_upserting.py b/src/sentry/monitors/migrations/0006_add_is_upserting.py index 212ea5f41a342f..eb489292ac3f22 100644 --- a/src/sentry/monitors/migrations/0006_add_is_upserting.py +++ b/src/sentry/monitors/migrations/0006_add_is_upserting.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-04 15:48 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/monitors/migrations/0007_monitors_json_field.py b/src/sentry/monitors/migrations/0007_monitors_json_field.py index 64d3345022b8aa..53bfca6f5627ae 100644 --- a/src/sentry/monitors/migrations/0007_monitors_json_field.py +++ b/src/sentry/monitors/migrations/0007_monitors_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-01 15:46 +from typing import int from django.db import migrations, models import sentry.db.models.fields.jsonfield diff --git a/src/sentry/monitors/migrations/0008_fix_processing_error_keys.py b/src/sentry/monitors/migrations/0008_fix_processing_error_keys.py index c955976e8d7711..b3fd43ba2e3509 100644 --- a/src/sentry/monitors/migrations/0008_fix_processing_error_keys.py +++ b/src/sentry/monitors/migrations/0008_fix_processing_error_keys.py @@ -6,7 +6,7 @@ from dataclasses import dataclass, field from datetime import datetime, timedelta from itertools import chain -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.conf import settings from django.db import migrations diff --git a/src/sentry/monitors/migrations/0009_backfill_monitor_detectors.py b/src/sentry/monitors/migrations/0009_backfill_monitor_detectors.py index 5c60a09db550d6..738f5c6c93a410 100644 --- a/src/sentry/monitors/migrations/0009_backfill_monitor_detectors.py +++ b/src/sentry/monitors/migrations/0009_backfill_monitor_detectors.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-15 23:18 +from typing import int from django.db import migrations, router, transaction from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/src/sentry/monitors/migrations/0010_delete_orphaned_detectors.py b/src/sentry/monitors/migrations/0010_delete_orphaned_detectors.py index ae8b03ee5995a9..7550ee44e34f6d 100644 --- a/src/sentry/monitors/migrations/0010_delete_orphaned_detectors.py +++ b/src/sentry/monitors/migrations/0010_delete_orphaned_detectors.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-12 18:57 +from typing import int from django.db import migrations from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/src/sentry/monitors/models.py b/src/sentry/monitors/models.py index 5465cdc9944cb0..eab1054853f1ae 100644 --- a/src/sentry/monitors/models.py +++ b/src/sentry/monitors/models.py @@ -5,7 +5,7 @@ import zoneinfo from collections.abc import Sequence from datetime import datetime -from typing import TYPE_CHECKING, Any, ClassVar, Self, override +from typing import TYPE_CHECKING, Any, ClassVar, Self, override, int from uuid import uuid4 import jsonschema diff --git a/src/sentry/monitors/processing_errors/errors.py b/src/sentry/monitors/processing_errors/errors.py index 8d0edb504b6711..cc7077f42e6fc4 100644 --- a/src/sentry/monitors/processing_errors/errors.py +++ b/src/sentry/monitors/processing_errors/errors.py @@ -4,7 +4,7 @@ from collections.abc import Mapping, Sequence from dataclasses import dataclass, field from enum import IntEnum -from typing import Literal, TypedDict, Union +from typing import Literal, TypedDict, Union, int from sentry.monitors.models import Monitor from sentry.monitors.types import CheckinItem, CheckinItemData diff --git a/src/sentry/monitors/processing_errors/manager.py b/src/sentry/monitors/processing_errors/manager.py index 4ee59d9e18d6bd..ca471c15736c69 100644 --- a/src/sentry/monitors/processing_errors/manager.py +++ b/src/sentry/monitors/processing_errors/manager.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import random diff --git a/src/sentry/monitors/rate_limit.py b/src/sentry/monitors/rate_limit.py index a0fa238f2862d2..a0e3a1f1515469 100644 --- a/src/sentry/monitors/rate_limit.py +++ b/src/sentry/monitors/rate_limit.py @@ -1,3 +1,4 @@ +from typing import int from django.core.cache import cache from sentry import options diff --git a/src/sentry/monitors/schedule.py b/src/sentry/monitors/schedule.py index 2a08bca923df9a..ba888e7c35291f 100644 --- a/src/sentry/monitors/schedule.py +++ b/src/sentry/monitors/schedule.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from cronsim import CronSim diff --git a/src/sentry/monitors/serializers.py b/src/sentry/monitors/serializers.py index c3badbf4f0cdc9..c2ee4a9355e6ab 100644 --- a/src/sentry/monitors/serializers.py +++ b/src/sentry/monitors/serializers.py @@ -1,7 +1,7 @@ from collections import defaultdict from collections.abc import MutableMapping, Sequence from datetime import datetime -from typing import Any, Literal, TypedDict, cast +from typing import Any, Literal, TypedDict, cast, int from django.db.models import prefetch_related_objects diff --git a/src/sentry/monitors/system_incidents.py b/src/sentry/monitors/system_incidents.py index 21803cb3974ce2..1ae95b83a36074 100644 --- a/src/sentry/monitors/system_incidents.py +++ b/src/sentry/monitors/system_incidents.py @@ -1,3 +1,4 @@ +from typing import int """ This module contains functionality dedicated to detecting and mitigating "system incidents". Specifically this system is destined to detect drops in diff --git a/src/sentry/monitors/tasks/clock_pulse.py b/src/sentry/monitors/tasks/clock_pulse.py index b473f46e16b368..d5af3bd9171f4c 100644 --- a/src/sentry/monitors/tasks/clock_pulse.py +++ b/src/sentry/monitors/tasks/clock_pulse.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Mapping diff --git a/src/sentry/monitors/tasks/detect_broken_monitor_envs.py b/src/sentry/monitors/tasks/detect_broken_monitor_envs.py index dacbfe558ff731..f99e43955b4b9a 100644 --- a/src/sentry/monitors/tasks/detect_broken_monitor_envs.py +++ b/src/sentry/monitors/tasks/detect_broken_monitor_envs.py @@ -4,7 +4,7 @@ from collections import defaultdict from collections.abc import Iterable from datetime import timedelta -from typing import Any +from typing import int, Any from urllib.parse import urlencode, urlparse, urlunparse from django.db import router, transaction diff --git a/src/sentry/monitors/testutils.py b/src/sentry/monitors/testutils.py index 46d75e548480ae..1ed14bc98a4bb7 100644 --- a/src/sentry/monitors/testutils.py +++ b/src/sentry/monitors/testutils.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from datetime import datetime diff --git a/src/sentry/monitors/types.py b/src/sentry/monitors/types.py index 1f0bb556b54a83..2c45a463ba314f 100644 --- a/src/sentry/monitors/types.py +++ b/src/sentry/monitors/types.py @@ -2,7 +2,7 @@ from dataclasses import dataclass from datetime import datetime -from typing import Literal, NotRequired, TypedDict, Union +from typing import Literal, NotRequired, TypedDict, Union, int from django.utils.functional import cached_property from django.utils.text import slugify diff --git a/src/sentry/monitors/utils.py b/src/sentry/monitors/utils.py index 5db3416bf5568f..e94922b92270a0 100644 --- a/src/sentry/monitors/utils.py +++ b/src/sentry/monitors/utils.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections import defaultdict from datetime import datetime, timedelta diff --git a/src/sentry/monitors/validators.py b/src/sentry/monitors/validators.py index 18242405770030..350a1b5047a40c 100644 --- a/src/sentry/monitors/validators.py +++ b/src/sentry/monitors/validators.py @@ -1,5 +1,5 @@ import re -from typing import Any, Literal +from typing import Any, Literal, int import jsonschema import sentry_sdk diff --git a/src/sentry/monkey/__init__.py b/src/sentry/monkey/__init__.py index af4a3b1b5ecada..7827824986fcb6 100644 --- a/src/sentry/monkey/__init__.py +++ b/src/sentry/monkey/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any def register_scheme(name: str) -> None: diff --git a/src/sentry/net/http.py b/src/sentry/net/http.py index 2cee6e7caa7024..32c8b67b160276 100644 --- a/src/sentry/net/http.py +++ b/src/sentry/net/http.py @@ -5,7 +5,7 @@ from functools import partial from socket import error as SocketError from socket import timeout as SocketTimeout -from typing import Optional +from typing import int, Optional from requests import Session as _Session from requests.adapters import DEFAULT_POOLBLOCK, DEFAULT_RETRIES, HTTPAdapter, Retry diff --git a/src/sentry/net/socket.py b/src/sentry/net/socket.py index 48ab7cab2dac14..9a1a745a8fe5fb 100644 --- a/src/sentry/net/socket.py +++ b/src/sentry/net/socket.py @@ -4,7 +4,7 @@ import ipaddress import socket from collections.abc import Sequence -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from urllib.parse import urlparse from django.conf import settings diff --git a/src/sentry/new_migrations/migrations.py b/src/sentry/new_migrations/migrations.py index 4e90ae50c230d1..000f7ff380385a 100644 --- a/src/sentry/new_migrations/migrations.py +++ b/src/sentry/new_migrations/migrations.py @@ -1,3 +1,4 @@ +from typing import int from django.db.migrations import Migration, RunSQL, SeparateDatabaseAndState from django_zero_downtime_migrations.backends.postgres.schema import UnsafeOperationException diff --git a/src/sentry/new_migrations/monkey/__init__.py b/src/sentry/new_migrations/monkey/__init__.py index 144f2d5bc56f2a..1f73c44ab5dc3e 100644 --- a/src/sentry/new_migrations/monkey/__init__.py +++ b/src/sentry/new_migrations/monkey/__init__.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Callable from django import VERSION diff --git a/src/sentry/new_migrations/monkey/executor.py b/src/sentry/new_migrations/monkey/executor.py index 19bb8ad124ac33..71a831061e5444 100644 --- a/src/sentry/new_migrations/monkey/executor.py +++ b/src/sentry/new_migrations/monkey/executor.py @@ -1,3 +1,4 @@ +from typing import int import difflib import logging import os diff --git a/src/sentry/new_migrations/monkey/fields.py b/src/sentry/new_migrations/monkey/fields.py index b11e363dfb68ca..f39e8d25f0518f 100644 --- a/src/sentry/new_migrations/monkey/fields.py +++ b/src/sentry/new_migrations/monkey/fields.py @@ -1,3 +1,4 @@ +from typing import int from django.db.migrations import RemoveField from django.db.models import Field, ManyToManyField from django.db.models.fields import NOT_PROVIDED diff --git a/src/sentry/new_migrations/monkey/models.py b/src/sentry/new_migrations/monkey/models.py index e744e11b356e70..41d7e038942902 100644 --- a/src/sentry/new_migrations/monkey/models.py +++ b/src/sentry/new_migrations/monkey/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db.migrations import DeleteModel from django_zero_downtime_migrations.backends.postgres.schema import UnsafeOperationException diff --git a/src/sentry/new_migrations/monkey/special.py b/src/sentry/new_migrations/monkey/special.py index 4317bcba0d2e55..1e5ea5314616df 100644 --- a/src/sentry/new_migrations/monkey/special.py +++ b/src/sentry/new_migrations/monkey/special.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.db.migrations.operations.special import RunSQL diff --git a/src/sentry/new_migrations/monkey/state.py b/src/sentry/new_migrations/monkey/state.py index aa78cf1b3569a1..c4c06d201fcefd 100644 --- a/src/sentry/new_migrations/monkey/state.py +++ b/src/sentry/new_migrations/monkey/state.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from copy import deepcopy from enum import Enum diff --git a/src/sentry/newsletter/__init__.py b/src/sentry/newsletter/__init__.py index c3d658a8814937..86c3a4c8d1fc32 100644 --- a/src/sentry/newsletter/__init__.py +++ b/src/sentry/newsletter/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/newsletter/base.py b/src/sentry/newsletter/base.py index b2fe04bd6520d8..b72fe88d7f5e3b 100644 --- a/src/sentry/newsletter/base.py +++ b/src/sentry/newsletter/base.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Sequence -from typing import Any +from typing import int, Any from sentry.users.models.user import User from sentry.utils.services import Service diff --git a/src/sentry/newsletter/dummy.py b/src/sentry/newsletter/dummy.py index 54394d3648c948..e56da402d92740 100644 --- a/src/sentry/newsletter/dummy.py +++ b/src/sentry/newsletter/dummy.py @@ -3,7 +3,7 @@ import contextlib from collections import defaultdict from collections.abc import Generator, Sequence -from typing import Any +from typing import int, Any from django.utils import timezone diff --git a/src/sentry/nodestore/__init__.py b/src/sentry/nodestore/__init__.py index 914634e0bc6d78..b602730facef25 100644 --- a/src/sentry/nodestore/__init__.py +++ b/src/sentry/nodestore/__init__.py @@ -1,3 +1,4 @@ +from typing import int """ Backward compatibility shim for getsentry. diff --git a/src/sentry/nodestore/base.py b/src/sentry/nodestore/base.py index 1c49d87a5ddddb..c783e8d8ac7dc2 100644 --- a/src/sentry/nodestore/base.py +++ b/src/sentry/nodestore/base.py @@ -1,3 +1,4 @@ +from typing import int """ Backward compatibility shim for getsentry. diff --git a/src/sentry/nodestore/bigtable/__init__.py b/src/sentry/nodestore/bigtable/__init__.py index 3afc3d9d0efa09..4bee484a97a6a4 100644 --- a/src/sentry/nodestore/bigtable/__init__.py +++ b/src/sentry/nodestore/bigtable/__init__.py @@ -1,3 +1,4 @@ +from typing import int """ Backward compatibility shim for getsentry. diff --git a/src/sentry/nodestore/bigtable/backend.py b/src/sentry/nodestore/bigtable/backend.py index ffd076e702fe5d..bfc23c2d043f15 100644 --- a/src/sentry/nodestore/bigtable/backend.py +++ b/src/sentry/nodestore/bigtable/backend.py @@ -1,3 +1,4 @@ +from typing import int """ Backward compatibility shim for getsentry. diff --git a/src/sentry/nodestore/django/__init__.py b/src/sentry/nodestore/django/__init__.py index 2e8d2fa6e7092b..4d3c82df1744e1 100644 --- a/src/sentry/nodestore/django/__init__.py +++ b/src/sentry/nodestore/django/__init__.py @@ -1,3 +1,4 @@ +from typing import int """ Backward compatibility shim for getsentry. diff --git a/src/sentry/nodestore/django/backend.py b/src/sentry/nodestore/django/backend.py index 665f269b2cb4d6..056b2fb3582a00 100644 --- a/src/sentry/nodestore/django/backend.py +++ b/src/sentry/nodestore/django/backend.py @@ -1,3 +1,4 @@ +from typing import int """ Backward compatibility shim for getsentry. diff --git a/src/sentry/nodestore/django/models.py b/src/sentry/nodestore/django/models.py index 81b6ad4b99be88..fade60df3aee10 100644 --- a/src/sentry/nodestore/django/models.py +++ b/src/sentry/nodestore/django/models.py @@ -1,3 +1,4 @@ +from typing import int """ Backward compatibility shim for getsentry. diff --git a/src/sentry/nodestore/filesystem/__init__.py b/src/sentry/nodestore/filesystem/__init__.py index b7c6cd9ea10a8c..0eb983752d6f1a 100644 --- a/src/sentry/nodestore/filesystem/__init__.py +++ b/src/sentry/nodestore/filesystem/__init__.py @@ -1,3 +1,4 @@ +from typing import int """ Backward compatibility shim for getsentry. diff --git a/src/sentry/nodestore/filesystem/backend.py b/src/sentry/nodestore/filesystem/backend.py index 5fb5373a85a98e..60c8add67ad2d2 100644 --- a/src/sentry/nodestore/filesystem/backend.py +++ b/src/sentry/nodestore/filesystem/backend.py @@ -1,3 +1,4 @@ +from typing import int """ Backward compatibility shim for getsentry. diff --git a/src/sentry/nodestore/models.py b/src/sentry/nodestore/models.py index 8bba90bdd563ce..786e3e7c4d4683 100644 --- a/src/sentry/nodestore/models.py +++ b/src/sentry/nodestore/models.py @@ -1,3 +1,4 @@ +from typing import int """ Backward compatibility shim for getsentry. diff --git a/src/sentry/notifications/additional_attachment_manager.py b/src/sentry/notifications/additional_attachment_manager.py index 26c5dba589674f..93d8ec1d4aafb9 100644 --- a/src/sentry/notifications/additional_attachment_manager.py +++ b/src/sentry/notifications/additional_attachment_manager.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Callable, MutableMapping diff --git a/src/sentry/notifications/api/endpoints/notification_actions_available.py b/src/sentry/notifications/api/endpoints/notification_actions_available.py index a3b7d6757f4ebc..9ee850c921aeb9 100644 --- a/src/sentry/notifications/api/endpoints/notification_actions_available.py +++ b/src/sentry/notifications/api/endpoints/notification_actions_available.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/notifications/api/endpoints/notification_actions_details.py b/src/sentry/notifications/api/endpoints/notification_actions_details.py index 91f5d239be199c..8cd4acfa33e06d 100644 --- a/src/sentry/notifications/api/endpoints/notification_actions_details.py +++ b/src/sentry/notifications/api/endpoints/notification_actions_details.py @@ -1,3 +1,4 @@ +from typing import int import logging from drf_spectacular.utils import extend_schema diff --git a/src/sentry/notifications/api/endpoints/notification_actions_index.py b/src/sentry/notifications/api/endpoints/notification_actions_index.py index 489abd97c73c15..94f731701a32cc 100644 --- a/src/sentry/notifications/api/endpoints/notification_actions_index.py +++ b/src/sentry/notifications/api/endpoints/notification_actions_index.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db.models import Q diff --git a/src/sentry/notifications/api/endpoints/notification_defaults.py b/src/sentry/notifications/api/endpoints/notification_defaults.py index 2a9684f9143b1e..f3fadba5ed4ab0 100644 --- a/src/sentry/notifications/api/endpoints/notification_defaults.py +++ b/src/sentry/notifications/api/endpoints/notification_defaults.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/notifications/api/endpoints/user_notification_details.py b/src/sentry/notifications/api/endpoints/user_notification_details.py index 6ddeb967850e0e..e65a60c5c031c6 100644 --- a/src/sentry/notifications/api/endpoints/user_notification_details.py +++ b/src/sentry/notifications/api/endpoints/user_notification_details.py @@ -1,3 +1,4 @@ +from typing import int from collections import defaultdict from rest_framework import serializers, status diff --git a/src/sentry/notifications/api/endpoints/user_notification_email.py b/src/sentry/notifications/api/endpoints/user_notification_email.py index b5f7302b7d22dd..b14e0861f1bba8 100644 --- a/src/sentry/notifications/api/endpoints/user_notification_email.py +++ b/src/sentry/notifications/api/endpoints/user_notification_email.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/notifications/api/endpoints/user_notification_settings_options.py b/src/sentry/notifications/api/endpoints/user_notification_settings_options.py index f2685a45e2e289..2bca80a0a41f66 100644 --- a/src/sentry/notifications/api/endpoints/user_notification_settings_options.py +++ b/src/sentry/notifications/api/endpoints/user_notification_settings_options.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/notifications/api/endpoints/user_notification_settings_options_detail.py b/src/sentry/notifications/api/endpoints/user_notification_settings_options_detail.py index e7f46bcca4207c..0d1175d0f327f0 100644 --- a/src/sentry/notifications/api/endpoints/user_notification_settings_options_detail.py +++ b/src/sentry/notifications/api/endpoints/user_notification_settings_options_detail.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from rest_framework.exceptions import NotFound from rest_framework.request import Request diff --git a/src/sentry/notifications/api/endpoints/user_notification_settings_providers.py b/src/sentry/notifications/api/endpoints/user_notification_settings_providers.py index 758a6916bb847d..e26d550e94c33e 100644 --- a/src/sentry/notifications/api/endpoints/user_notification_settings_providers.py +++ b/src/sentry/notifications/api/endpoints/user_notification_settings_providers.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/notifications/api/parsers/notifications.py b/src/sentry/notifications/api/parsers/notifications.py index d948887ecda248..e0f22b5e8f0cdc 100644 --- a/src/sentry/notifications/api/parsers/notifications.py +++ b/src/sentry/notifications/api/parsers/notifications.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.exceptions import ParameterValidationError from sentry.notifications.helpers import validate as helper_validate from sentry.notifications.types import ( diff --git a/src/sentry/notifications/api/serializers/notification_action_request.py b/src/sentry/notifications/api/serializers/notification_action_request.py index 17c16b0b84f00f..a42727941eaa63 100644 --- a/src/sentry/notifications/api/serializers/notification_action_request.py +++ b/src/sentry/notifications/api/serializers/notification_action_request.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import TypedDict +from typing import int, TypedDict from django.db import router, transaction from drf_spectacular.utils import extend_schema_serializer diff --git a/src/sentry/notifications/api/serializers/notification_action_response.py b/src/sentry/notifications/api/serializers/notification_action_response.py index 52b1cf3aaabe32..d155b1baa49b19 100644 --- a/src/sentry/notifications/api/serializers/notification_action_response.py +++ b/src/sentry/notifications/api/serializers/notification_action_response.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import Any +from typing import int, Any from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/notifications/apps.py b/src/sentry/notifications/apps.py index e4be76f88a81fe..48ed3065fc6598 100644 --- a/src/sentry/notifications/apps.py +++ b/src/sentry/notifications/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/notifications/class_manager.py b/src/sentry/notifications/class_manager.py index 0812dd821a4dfa..1c01539c79982a 100644 --- a/src/sentry/notifications/class_manager.py +++ b/src/sentry/notifications/class_manager.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, MutableMapping -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING if TYPE_CHECKING: from .notifications.base import BaseNotification diff --git a/src/sentry/notifications/defaults.py b/src/sentry/notifications/defaults.py index 68b418ba5f9722..a548a6786fa8d7 100644 --- a/src/sentry/notifications/defaults.py +++ b/src/sentry/notifications/defaults.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.types import ExternalProviderEnum from sentry.notifications.types import NotificationSettingEnum, NotificationSettingsOptionEnum diff --git a/src/sentry/notifications/helpers.py b/src/sentry/notifications/helpers.py index 8986822c30f2ae..e0737393912ab6 100644 --- a/src/sentry/notifications/helpers.py +++ b/src/sentry/notifications/helpers.py @@ -3,7 +3,7 @@ import logging from collections import defaultdict from collections.abc import Iterable, Mapping, MutableMapping -from typing import TYPE_CHECKING, Any, TypedDict, TypeGuard +from typing import TYPE_CHECKING, Any, TypedDict, TypeGuard, int from django.db.models import Subquery diff --git a/src/sentry/notifications/migrations/0001_move_notifications_models.py b/src/sentry/notifications/migrations/0001_move_notifications_models.py index 09fbbe5435eaf8..129b09d8dd4041 100644 --- a/src/sentry/notifications/migrations/0001_move_notifications_models.py +++ b/src/sentry/notifications/migrations/0001_move_notifications_models.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-14 16:22 +from typing import int import datetime import django.db.models.deletion diff --git a/src/sentry/notifications/migrations/0002_notificationmessage_jsonfield.py b/src/sentry/notifications/migrations/0002_notificationmessage_jsonfield.py index 950f615241df9c..9555fbee03cd13 100644 --- a/src/sentry/notifications/migrations/0002_notificationmessage_jsonfield.py +++ b/src/sentry/notifications/migrations/0002_notificationmessage_jsonfield.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-04 19:14 +from typing import int from django.db import migrations import sentry.db.models.fields.jsonfield diff --git a/src/sentry/notifications/models/__init__.py b/src/sentry/notifications/models/__init__.py index 3b403cc7775ac4..aa0be93452a1a0 100644 --- a/src/sentry/notifications/models/__init__.py +++ b/src/sentry/notifications/models/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.models.notificationaction import ( ActionRegistration, ActionService, diff --git a/src/sentry/notifications/models/notificationaction.py b/src/sentry/notifications/models/notificationaction.py index c4c43f7105fcfe..64ef8824ff576d 100644 --- a/src/sentry/notifications/models/notificationaction.py +++ b/src/sentry/notifications/models/notificationaction.py @@ -4,7 +4,7 @@ from abc import ABCMeta, abstractmethod from collections.abc import Mapping, MutableMapping from enum import IntEnum -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar, int from django.db import models diff --git a/src/sentry/notifications/models/notificationmessage.py b/src/sentry/notifications/models/notificationmessage.py index e5b19ace6916bf..6c47bcb6c2cd25 100644 --- a/src/sentry/notifications/models/notificationmessage.py +++ b/src/sentry/notifications/models/notificationmessage.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import datetime diff --git a/src/sentry/notifications/models/notificationsettingbase.py b/src/sentry/notifications/models/notificationsettingbase.py index 701322fe0ecad7..7073d7f86ef026 100644 --- a/src/sentry/notifications/models/notificationsettingbase.py +++ b/src/sentry/notifications/models/notificationsettingbase.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from django.conf import settings from django.db import models diff --git a/src/sentry/notifications/models/notificationsettingoption.py b/src/sentry/notifications/models/notificationsettingoption.py index e1407ee3dcca3b..1936389ab2381c 100644 --- a/src/sentry/notifications/models/notificationsettingoption.py +++ b/src/sentry/notifications/models/notificationsettingoption.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/notifications/models/notificationsettingprovider.py b/src/sentry/notifications/models/notificationsettingprovider.py index f96898dfa27a97..6f1cefc2ef7b05 100644 --- a/src/sentry/notifications/models/notificationsettingprovider.py +++ b/src/sentry/notifications/models/notificationsettingprovider.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/notifications/notification_action/__init__.py b/src/sentry/notifications/notification_action/__init__.py index e004c751ead4c4..426bbc7cebae2e 100644 --- a/src/sentry/notifications/notification_action/__init__.py +++ b/src/sentry/notifications/notification_action/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "IssueAlertRegistryHandler", "MetricAlertRegistryHandler", diff --git a/src/sentry/notifications/notification_action/action_handler_registry/__init__.py b/src/sentry/notifications/notification_action/action_handler_registry/__init__.py index 739cf22e825b1e..ef74d13ca497d5 100644 --- a/src/sentry/notifications/notification_action/action_handler_registry/__init__.py +++ b/src/sentry/notifications/notification_action/action_handler_registry/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "EmailActionHandler", "PluginActionHandler", diff --git a/src/sentry/notifications/notification_action/action_handler_registry/base.py b/src/sentry/notifications/notification_action/action_handler_registry/base.py index 0d9896edbcacfc..43b4c2bb0d5bc6 100644 --- a/src/sentry/notifications/notification_action/action_handler_registry/base.py +++ b/src/sentry/notifications/notification_action/action_handler_registry/base.py @@ -1,3 +1,4 @@ +from typing import int import logging from abc import ABC diff --git a/src/sentry/notifications/notification_action/action_handler_registry/common.py b/src/sentry/notifications/notification_action/action_handler_registry/common.py index f0cc443f51790a..c2b86a084630c8 100644 --- a/src/sentry/notifications/notification_action/action_handler_registry/common.py +++ b/src/sentry/notifications/notification_action/action_handler_registry/common.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.models.notificationaction import ActionTarget MESSAGING_ACTION_CONFIG_SCHEMA = { diff --git a/src/sentry/notifications/notification_action/action_handler_registry/email_handler.py b/src/sentry/notifications/notification_action/action_handler_registry/email_handler.py index 74527b6ec22e09..7b46222a3e9a9d 100644 --- a/src/sentry/notifications/notification_action/action_handler_registry/email_handler.py +++ b/src/sentry/notifications/notification_action/action_handler_registry/email_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.models.notificationaction import ActionTarget from sentry.notifications.notification_action.utils import execute_via_group_type_registry from sentry.notifications.types import FallthroughChoiceType diff --git a/src/sentry/notifications/notification_action/action_handler_registry/plugin_handler.py b/src/sentry/notifications/notification_action/action_handler_registry/plugin_handler.py index 4b2e608a82640a..2919926f325cd8 100644 --- a/src/sentry/notifications/notification_action/action_handler_registry/plugin_handler.py +++ b/src/sentry/notifications/notification_action/action_handler_registry/plugin_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.notification_action.utils import execute_via_group_type_registry from sentry.workflow_engine.models import Action, Detector from sentry.workflow_engine.registry import action_handler_registry diff --git a/src/sentry/notifications/notification_action/action_handler_registry/sentry_app_handler.py b/src/sentry/notifications/notification_action/action_handler_registry/sentry_app_handler.py index 4adbed04bb43f6..118c3726f51a0a 100644 --- a/src/sentry/notifications/notification_action/action_handler_registry/sentry_app_handler.py +++ b/src/sentry/notifications/notification_action/action_handler_registry/sentry_app_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.models.notificationaction import ActionTarget from sentry.notifications.notification_action.utils import execute_via_group_type_registry from sentry.workflow_engine.models import Action, Detector diff --git a/src/sentry/notifications/notification_action/action_handler_registry/webhook_handler.py b/src/sentry/notifications/notification_action/action_handler_registry/webhook_handler.py index e3ac76dad58c60..797d35822a1d7a 100644 --- a/src/sentry/notifications/notification_action/action_handler_registry/webhook_handler.py +++ b/src/sentry/notifications/notification_action/action_handler_registry/webhook_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.notification_action.utils import execute_via_group_type_registry from sentry.workflow_engine.models import Action, Detector from sentry.workflow_engine.registry import action_handler_registry diff --git a/src/sentry/notifications/notification_action/action_validation.py b/src/sentry/notifications/notification_action/action_validation.py index 6aa42b883df3d5..cc822b31df8697 100644 --- a/src/sentry/notifications/notification_action/action_validation.py +++ b/src/sentry/notifications/notification_action/action_validation.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.core.exceptions import ValidationError diff --git a/src/sentry/notifications/notification_action/group_type_notification_registry/__init__.py b/src/sentry/notifications/notification_action/group_type_notification_registry/__init__.py index 7ee3296b12f906..ca4944fdcfbc28 100644 --- a/src/sentry/notifications/notification_action/group_type_notification_registry/__init__.py +++ b/src/sentry/notifications/notification_action/group_type_notification_registry/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "IssueAlertRegistryHandler", "MetricAlertRegistryHandler", diff --git a/src/sentry/notifications/notification_action/group_type_notification_registry/handlers/issue_alert_registry_handler.py b/src/sentry/notifications/notification_action/group_type_notification_registry/handlers/issue_alert_registry_handler.py index 1c06b930a34253..b3aed32b44f1d6 100644 --- a/src/sentry/notifications/notification_action/group_type_notification_registry/handlers/issue_alert_registry_handler.py +++ b/src/sentry/notifications/notification_action/group_type_notification_registry/handlers/issue_alert_registry_handler.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.grouping.grouptype import ErrorGroupType diff --git a/src/sentry/notifications/notification_action/group_type_notification_registry/handlers/metric_alert_registry_handler.py b/src/sentry/notifications/notification_action/group_type_notification_registry/handlers/metric_alert_registry_handler.py index 1c46317bb6b93d..819c3fbc85f169 100644 --- a/src/sentry/notifications/notification_action/group_type_notification_registry/handlers/metric_alert_registry_handler.py +++ b/src/sentry/notifications/notification_action/group_type_notification_registry/handlers/metric_alert_registry_handler.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.incidents.grouptype import MetricIssue diff --git a/src/sentry/notifications/notification_action/grouptype.py b/src/sentry/notifications/notification_action/grouptype.py index 1f8cd5ba4d96e0..bf526f33400c6e 100644 --- a/src/sentry/notifications/notification_action/grouptype.py +++ b/src/sentry/notifications/notification_action/grouptype.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from dataclasses import dataclass from datetime import UTC, datetime diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/__init__.py b/src/sentry/notifications/notification_action/issue_alert_registry/__init__.py index 6686926cfcdcba..895c7ef15f35f4 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/__init__.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "AzureDevopsIssueAlertHandler", "DiscordIssueAlertHandler", diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/azure_devops_issue_alert_handler.py b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/azure_devops_issue_alert_handler.py index 6f1090ca41ea34..f5f6fe23e176fe 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/azure_devops_issue_alert_handler.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/azure_devops_issue_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.notification_action.registry import issue_alert_handler_registry from sentry.notifications.notification_action.types import TicketingIssueAlertHandler from sentry.workflow_engine.models import Action diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/discord_issue_alert_handler.py b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/discord_issue_alert_handler.py index 3d1b84a210cccd..e03061e1d4c9b6 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/discord_issue_alert_handler.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/discord_issue_alert_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.notifications.notification_action.registry import issue_alert_handler_registry from sentry.notifications.notification_action.types import BaseIssueAlertHandler diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/email_issue_alert_handler.py b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/email_issue_alert_handler.py index 0e7a18d6bf61f4..10a57c5f1f7d02 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/email_issue_alert_handler.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/email_issue_alert_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.notifications.models.notificationaction import ActionTarget from sentry.notifications.notification_action.registry import issue_alert_handler_registry diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/github_enterprise_issue_alert_handler.py b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/github_enterprise_issue_alert_handler.py index c6668a1ff21b98..8b7a27f88185e3 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/github_enterprise_issue_alert_handler.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/github_enterprise_issue_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.notification_action.registry import issue_alert_handler_registry from sentry.notifications.notification_action.types import TicketingIssueAlertHandler from sentry.workflow_engine.models import Action diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/github_issue_alert_handler.py b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/github_issue_alert_handler.py index 3939f0d0678bba..d81e447be7fec2 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/github_issue_alert_handler.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/github_issue_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.notification_action.registry import issue_alert_handler_registry from sentry.notifications.notification_action.types import TicketingIssueAlertHandler from sentry.workflow_engine.models import Action diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/jira_issue_alert_handler.py b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/jira_issue_alert_handler.py index 093112635c4236..0c6c26f81aef87 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/jira_issue_alert_handler.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/jira_issue_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.notification_action.registry import issue_alert_handler_registry from sentry.notifications.notification_action.types import TicketingIssueAlertHandler from sentry.workflow_engine.models import Action diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/jira_server_issue_alert_handler.py b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/jira_server_issue_alert_handler.py index 04b3f0b08287fd..1846f5592bad82 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/jira_server_issue_alert_handler.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/jira_server_issue_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.notification_action.registry import issue_alert_handler_registry from sentry.notifications.notification_action.types import TicketingIssueAlertHandler from sentry.workflow_engine.models import Action diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/msteams_issue_alert_handler.py b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/msteams_issue_alert_handler.py index b74198db1794b4..dfae7c92ebe1fa 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/msteams_issue_alert_handler.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/msteams_issue_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.notification_action.registry import issue_alert_handler_registry from sentry.notifications.notification_action.types import BaseIssueAlertHandler from sentry.workflow_engine.models import Action diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/opsgenie_issue_alert_handler.py b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/opsgenie_issue_alert_handler.py index bb8b500d4b1e80..c670845162f31b 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/opsgenie_issue_alert_handler.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/opsgenie_issue_alert_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.notifications.notification_action.registry import issue_alert_handler_registry from sentry.notifications.notification_action.types import BaseIssueAlertHandler diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/pagerduty_issue_alert_handler.py b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/pagerduty_issue_alert_handler.py index c2df74ded19bde..d299ce289c23e4 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/pagerduty_issue_alert_handler.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/pagerduty_issue_alert_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.notifications.notification_action.registry import issue_alert_handler_registry from sentry.notifications.notification_action.types import BaseIssueAlertHandler diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/plugin_issue_alert_handler.py b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/plugin_issue_alert_handler.py index 58e2c191e37fd8..8fcb826469c6fb 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/plugin_issue_alert_handler.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/plugin_issue_alert_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.notifications.notification_action.registry import issue_alert_handler_registry from sentry.notifications.notification_action.types import BaseIssueAlertHandler diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/sentry_app_issue_alert_handler.py b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/sentry_app_issue_alert_handler.py index a72e5a725faaa9..766a914bc95487 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/sentry_app_issue_alert_handler.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/sentry_app_issue_alert_handler.py @@ -1,5 +1,5 @@ from dataclasses import asdict -from typing import Any +from typing import int, Any from sentry.notifications.notification_action.registry import issue_alert_handler_registry from sentry.notifications.notification_action.types import BaseIssueAlertHandler diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/slack_issue_alert_handler.py b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/slack_issue_alert_handler.py index 1ee397a622db5e..491728f8474a47 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/slack_issue_alert_handler.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/slack_issue_alert_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.notifications.notification_action.registry import issue_alert_handler_registry from sentry.notifications.notification_action.types import BaseIssueAlertHandler diff --git a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/webhook_issue_alert_handler.py b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/webhook_issue_alert_handler.py index b34ebd8bd16fab..90bcc459466431 100644 --- a/src/sentry/notifications/notification_action/issue_alert_registry/handlers/webhook_issue_alert_handler.py +++ b/src/sentry/notifications/notification_action/issue_alert_registry/handlers/webhook_issue_alert_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.notifications.notification_action.registry import issue_alert_handler_registry from sentry.notifications.notification_action.types import BaseIssueAlertHandler diff --git a/src/sentry/notifications/notification_action/metric_alert_registry/__init__.py b/src/sentry/notifications/notification_action/metric_alert_registry/__init__.py index 6d90a5c5ebf100..afc3c4c7209060 100644 --- a/src/sentry/notifications/notification_action/metric_alert_registry/__init__.py +++ b/src/sentry/notifications/notification_action/metric_alert_registry/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "OpsgenieMetricAlertHandler", "PagerDutyMetricAlertHandler", diff --git a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/discord_metric_alert_handler.py b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/discord_metric_alert_handler.py index 82bb285c12326f..6e6953ce4f0299 100644 --- a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/discord_metric_alert_handler.py +++ b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/discord_metric_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.incidents.models.incident import TriggerStatus diff --git a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/email_metric_alert_handler.py b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/email_metric_alert_handler.py index 2d2dc411c82c53..76fe454d10538b 100644 --- a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/email_metric_alert_handler.py +++ b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/email_metric_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.incidents.action_handlers import email_users diff --git a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/msteams_metric_alert_handler.py b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/msteams_metric_alert_handler.py index e74f1647b84b82..f24d843d1502a7 100644 --- a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/msteams_metric_alert_handler.py +++ b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/msteams_metric_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.incidents.models.incident import TriggerStatus diff --git a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/opsgenie_metric_alert_handler.py b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/opsgenie_metric_alert_handler.py index 1110daff31b825..0720d4d796b96f 100644 --- a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/opsgenie_metric_alert_handler.py +++ b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/opsgenie_metric_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.incidents.models.incident import TriggerStatus diff --git a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/pagerduty_metric_alert_handler.py b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/pagerduty_metric_alert_handler.py index 12a06b94524df9..42e496b6de21db 100644 --- a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/pagerduty_metric_alert_handler.py +++ b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/pagerduty_metric_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.incidents.models.incident import TriggerStatus diff --git a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/sentry_app_metric_alert_handler.py b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/sentry_app_metric_alert_handler.py index 8037d57b8214cd..f01d23571962bc 100644 --- a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/sentry_app_metric_alert_handler.py +++ b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/sentry_app_metric_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.incidents.models.incident import TriggerStatus diff --git a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/slack_metric_alert_handler.py b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/slack_metric_alert_handler.py index 54fc535ff9e08b..4a5e009f10b95e 100644 --- a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/slack_metric_alert_handler.py +++ b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/slack_metric_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.incidents.models.incident import TriggerStatus diff --git a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/utils.py b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/utils.py index d1f8edba7e3690..6b5222cf8819d6 100644 --- a/src/sentry/notifications/notification_action/metric_alert_registry/handlers/utils.py +++ b/src/sentry/notifications/notification_action/metric_alert_registry/handlers/utils.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.incidents.endpoints.serializers.alert_rule import AlertRuleSerializerResponse from sentry.incidents.endpoints.serializers.incident import ( diff --git a/src/sentry/notifications/notification_action/registry.py b/src/sentry/notifications/notification_action/registry.py index 711191f6dbb6b7..21f51dfbf441e3 100644 --- a/src/sentry/notifications/notification_action/registry.py +++ b/src/sentry/notifications/notification_action/registry.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.registry import Registry from .types import ( diff --git a/src/sentry/notifications/notification_action/types.py b/src/sentry/notifications/notification_action/types.py index 07f13d4a173546..d662e1d0b681b5 100644 --- a/src/sentry/notifications/notification_action/types.py +++ b/src/sentry/notifications/notification_action/types.py @@ -3,7 +3,7 @@ from abc import ABC, abstractmethod from collections.abc import Callable, Collection, Sequence from dataclasses import asdict -from typing import Any, NotRequired, Protocol, TypedDict +from typing import Any, NotRequired, Protocol, TypedDict, int from django.core.exceptions import ValidationError diff --git a/src/sentry/notifications/notification_action/utils.py b/src/sentry/notifications/notification_action/utils.py index f8e630293714ba..8654dcab78eac1 100644 --- a/src/sentry/notifications/notification_action/utils.py +++ b/src/sentry/notifications/notification_action/utils.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry import features, options diff --git a/src/sentry/notifications/notificationcontroller.py b/src/sentry/notifications/notificationcontroller.py index f18e5905fb837d..8a5d47b2937959 100644 --- a/src/sentry/notifications/notificationcontroller.py +++ b/src/sentry/notifications/notificationcontroller.py @@ -2,7 +2,7 @@ from collections import defaultdict from collections.abc import Iterable, Mapping, MutableMapping -from typing import Union +from typing import int, Union from django.db.models import Q diff --git a/src/sentry/notifications/notifications/activity/__init__.py b/src/sentry/notifications/notifications/activity/__init__.py index 38c6092a0e186b..93d2d2338fc415 100644 --- a/src/sentry/notifications/notifications/activity/__init__.py +++ b/src/sentry/notifications/notifications/activity/__init__.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.notifications.notifications.activity.assigned import AssignedActivityNotification from sentry.notifications.notifications.activity.base import ActivityNotification diff --git a/src/sentry/notifications/notifications/activity/archive.py b/src/sentry/notifications/notifications/activity/archive.py index 24d592f264464c..acd4553da1f499 100644 --- a/src/sentry/notifications/notifications/activity/archive.py +++ b/src/sentry/notifications/notifications/activity/archive.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.notifications.notifications.activity.base import GroupActivityNotification diff --git a/src/sentry/notifications/notifications/activity/assigned.py b/src/sentry/notifications/notifications/activity/assigned.py index a0e7b7dc5dc7a0..08893cc70634cc 100644 --- a/src/sentry/notifications/notifications/activity/assigned.py +++ b/src/sentry/notifications/notifications/activity/assigned.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.integrations.types import ExternalProviders from sentry.models.activity import Activity diff --git a/src/sentry/notifications/notifications/activity/base.py b/src/sentry/notifications/notifications/activity/base.py index 2d62fdb12fbe38..39bf75cec3fcc4 100644 --- a/src/sentry/notifications/notifications/activity/base.py +++ b/src/sentry/notifications/notifications/activity/base.py @@ -3,7 +3,7 @@ import abc from collections.abc import Mapping, MutableMapping from functools import cached_property -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from urllib.parse import urlparse, urlunparse from django.utils.html import format_html diff --git a/src/sentry/notifications/notifications/activity/escalating.py b/src/sentry/notifications/notifications/activity/escalating.py index 5824f1aa76d3b8..1836df294af78f 100644 --- a/src/sentry/notifications/notifications/activity/escalating.py +++ b/src/sentry/notifications/notifications/activity/escalating.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.integrations.types import ExternalProviders from sentry.types.actor import Actor diff --git a/src/sentry/notifications/notifications/activity/note.py b/src/sentry/notifications/notifications/activity/note.py index 80c61ca0728f8a..db990a5ed44b8b 100644 --- a/src/sentry/notifications/notifications/activity/note.py +++ b/src/sentry/notifications/notifications/activity/note.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from django.utils.html import format_html from django.utils.safestring import SafeString diff --git a/src/sentry/notifications/notifications/activity/regression.py b/src/sentry/notifications/notifications/activity/regression.py index 0160d04d96441e..98564fde29fc40 100644 --- a/src/sentry/notifications/notifications/activity/regression.py +++ b/src/sentry/notifications/notifications/activity/regression.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from urllib.parse import urlencode import orjson diff --git a/src/sentry/notifications/notifications/activity/release.py b/src/sentry/notifications/notifications/activity/release.py index 02693eaa02d95e..179f008d5d0284 100644 --- a/src/sentry/notifications/notifications/activity/release.py +++ b/src/sentry/notifications/notifications/activity/release.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Iterable, Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from urllib.parse import urlencode import orjson diff --git a/src/sentry/notifications/notifications/activity/resolved.py b/src/sentry/notifications/notifications/activity/resolved.py index c751b9cb484f3d..a19270c9269d70 100644 --- a/src/sentry/notifications/notifications/activity/resolved.py +++ b/src/sentry/notifications/notifications/activity/resolved.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from .base import GroupActivityNotification diff --git a/src/sentry/notifications/notifications/activity/resolved_in_pull_request.py b/src/sentry/notifications/notifications/activity/resolved_in_pull_request.py index 5332e98c88d0df..507c8168e356a1 100644 --- a/src/sentry/notifications/notifications/activity/resolved_in_pull_request.py +++ b/src/sentry/notifications/notifications/activity/resolved_in_pull_request.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.models.activity import Activity diff --git a/src/sentry/notifications/notifications/activity/resolved_in_release.py b/src/sentry/notifications/notifications/activity/resolved_in_release.py index 757491c2ddf294..1c7d219d6ba973 100644 --- a/src/sentry/notifications/notifications/activity/resolved_in_release.py +++ b/src/sentry/notifications/notifications/activity/resolved_in_release.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from urllib.parse import urlencode import orjson diff --git a/src/sentry/notifications/notifications/activity/unassigned.py b/src/sentry/notifications/notifications/activity/unassigned.py index 55993bb2a76364..5a1fb214f1a07b 100644 --- a/src/sentry/notifications/notifications/activity/unassigned.py +++ b/src/sentry/notifications/notifications/activity/unassigned.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.integrations.types import ExternalProviders diff --git a/src/sentry/notifications/notifications/activity/unresolved.py b/src/sentry/notifications/notifications/activity/unresolved.py index 921da7e715cfb2..3b252b2a59c17d 100644 --- a/src/sentry/notifications/notifications/activity/unresolved.py +++ b/src/sentry/notifications/notifications/activity/unresolved.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.notifications.notifications.activity.base import GroupActivityNotification diff --git a/src/sentry/notifications/notifications/base.py b/src/sentry/notifications/notifications/base.py index 04fcdc1cb6a08c..c01cb1558004dc 100644 --- a/src/sentry/notifications/notifications/base.py +++ b/src/sentry/notifications/notifications/base.py @@ -3,7 +3,7 @@ import abc import uuid from collections.abc import Iterable, Mapping, MutableMapping, Sequence -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from urllib.parse import urlencode import sentry_sdk diff --git a/src/sentry/notifications/notifications/codeowners_auto_sync.py b/src/sentry/notifications/notifications/codeowners_auto_sync.py index c16129d0dda262..feda8100fbdc37 100644 --- a/src/sentry/notifications/notifications/codeowners_auto_sync.py +++ b/src/sentry/notifications/notifications/codeowners_auto_sync.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Iterable, Mapping, MutableMapping -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.integrations.types import ExternalProviders from sentry.notifications.notifications.base import ProjectNotification diff --git a/src/sentry/notifications/notifications/daily_summary.py b/src/sentry/notifications/notifications/daily_summary.py index 98b58dcd8d94bf..14327e2353a098 100644 --- a/src/sentry/notifications/notifications/daily_summary.py +++ b/src/sentry/notifications/notifications/daily_summary.py @@ -2,7 +2,7 @@ import logging from collections.abc import Iterable, Mapping -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.urls import reverse diff --git a/src/sentry/notifications/notifications/digest.py b/src/sentry/notifications/notifications/digest.py index 2c2bbd89975f2b..239f329abe49be 100644 --- a/src/sentry/notifications/notifications/digest.py +++ b/src/sentry/notifications/notifications/digest.py @@ -5,7 +5,7 @@ from collections import defaultdict from collections.abc import Mapping, MutableMapping, Sequence from datetime import UTC, tzinfo -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from urllib.parse import urlencode import sentry_sdk diff --git a/src/sentry/notifications/notifications/integration_nudge.py b/src/sentry/notifications/notifications/integration_nudge.py index 12b19458904591..bc237d8ed09888 100644 --- a/src/sentry/notifications/notifications/integration_nudge.py +++ b/src/sentry/notifications/notifications/integration_nudge.py @@ -3,7 +3,7 @@ import logging import random from collections.abc import Iterable, Mapping, MutableMapping, Sequence -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.db.models import Model from sentry.integrations.types import ExternalProviders diff --git a/src/sentry/notifications/notifications/missing_members_nudge.py b/src/sentry/notifications/notifications/missing_members_nudge.py index b2322cdf877634..7710b9f2947a43 100644 --- a/src/sentry/notifications/notifications/missing_members_nudge.py +++ b/src/sentry/notifications/notifications/missing_members_nudge.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Iterable, Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from sentry import analytics from sentry.analytics.events.missing_members_nudge import MissingMembersNudgeEvent diff --git a/src/sentry/notifications/notifications/organization_request/__init__.py b/src/sentry/notifications/notifications/organization_request/__init__.py index b9787b4c5778ec..606cdb2ede9cf2 100644 --- a/src/sentry/notifications/notifications/organization_request/__init__.py +++ b/src/sentry/notifications/notifications/organization_request/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ( "InviteRequestNotification", "JoinRequestNotification", diff --git a/src/sentry/notifications/notifications/organization_request/abstract_invite_request.py b/src/sentry/notifications/notifications/organization_request/abstract_invite_request.py index 3729e918e1c1e8..77ada81758bc6a 100644 --- a/src/sentry/notifications/notifications/organization_request/abstract_invite_request.py +++ b/src/sentry/notifications/notifications/organization_request/abstract_invite_request.py @@ -2,7 +2,7 @@ import abc from collections.abc import Mapping, MutableMapping, Sequence -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.urls import reverse diff --git a/src/sentry/notifications/notifications/organization_request/base.py b/src/sentry/notifications/notifications/organization_request/base.py index 221fba9c79c73f..701d2c57eed4fc 100644 --- a/src/sentry/notifications/notifications/organization_request/base.py +++ b/src/sentry/notifications/notifications/organization_request/base.py @@ -3,7 +3,7 @@ import abc import logging from collections.abc import Mapping, MutableMapping -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.db.models import Model from sentry.integrations.types import ExternalProviders diff --git a/src/sentry/notifications/notifications/organization_request/integration_request.py b/src/sentry/notifications/notifications/organization_request/integration_request.py index ee41e4e121dbee..f65d78fa253500 100644 --- a/src/sentry/notifications/notifications/organization_request/integration_request.py +++ b/src/sentry/notifications/notifications/organization_request/integration_request.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, MutableMapping, Sequence -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.integrations.types import ExternalProviders from sentry.notifications.class_manager import register diff --git a/src/sentry/notifications/notifications/organization_request/invite_request.py b/src/sentry/notifications/notifications/organization_request/invite_request.py index a2d1acbdbae408..9210677d483592 100644 --- a/src/sentry/notifications/notifications/organization_request/invite_request.py +++ b/src/sentry/notifications/notifications/organization_request/invite_request.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry import analytics from sentry.analytics.events.inapp_request import InviteRequestSentEvent diff --git a/src/sentry/notifications/notifications/organization_request/join_request.py b/src/sentry/notifications/notifications/organization_request/join_request.py index 14adeedde7ed54..844f53acea15b7 100644 --- a/src/sentry/notifications/notifications/organization_request/join_request.py +++ b/src/sentry/notifications/notifications/organization_request/join_request.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry import analytics from sentry.analytics.events.inapp_request import JoinRequestSentEvent diff --git a/src/sentry/notifications/notifications/rules.py b/src/sentry/notifications/notifications/rules.py index e9f6863fe3440d..62950f706e4ee9 100644 --- a/src/sentry/notifications/notifications/rules.py +++ b/src/sentry/notifications/notifications/rules.py @@ -4,7 +4,7 @@ import zoneinfo from collections.abc import Iterable, Mapping, MutableMapping from datetime import UTC, tzinfo -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/notifications/notifications/strategies/member_write_role_recipient_strategy.py b/src/sentry/notifications/notifications/strategies/member_write_role_recipient_strategy.py index 4bee5ede890944..dccb57197d291a 100644 --- a/src/sentry/notifications/notifications/strategies/member_write_role_recipient_strategy.py +++ b/src/sentry/notifications/notifications/strategies/member_write_role_recipient_strategy.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from .role_based_recipient_strategy import RoleBasedRecipientStrategy diff --git a/src/sentry/notifications/notifications/strategies/owner_recipient_strategy.py b/src/sentry/notifications/notifications/strategies/owner_recipient_strategy.py index 6563f535e7fb65..7182415202c501 100644 --- a/src/sentry/notifications/notifications/strategies/owner_recipient_strategy.py +++ b/src/sentry/notifications/notifications/strategies/owner_recipient_strategy.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry import roles diff --git a/src/sentry/notifications/notifications/strategies/role_based_recipient_strategy.py b/src/sentry/notifications/notifications/strategies/role_based_recipient_strategy.py index 2315850a7ec40c..2c3200e990eb40 100644 --- a/src/sentry/notifications/notifications/strategies/role_based_recipient_strategy.py +++ b/src/sentry/notifications/notifications/strategies/role_based_recipient_strategy.py @@ -2,7 +2,7 @@ from abc import ABCMeta from collections.abc import MutableMapping -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from django.db.models import QuerySet diff --git a/src/sentry/notifications/notifications/user_report.py b/src/sentry/notifications/notifications/user_report.py index 3bbfcbb8f5f659..a9ad38b8516879 100644 --- a/src/sentry/notifications/notifications/user_report.py +++ b/src/sentry/notifications/notifications/user_report.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping, MutableMapping -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.utils.encoding import force_str diff --git a/src/sentry/notifications/notify.py b/src/sentry/notifications/notify.py index 30c0b7c8ea2fd4..c4b28d89a57cd2 100644 --- a/src/sentry/notifications/notify.py +++ b/src/sentry/notifications/notify.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Iterable, Mapping, MutableMapping -from typing import Any, Optional, TypeVar +from typing import Any, Optional, TypeVar, int from sentry.integrations.types import ExternalProviders from sentry.notifications.notifications.base import BaseNotification diff --git a/src/sentry/notifications/platform/api/endpoints/internal_registered_templates.py b/src/sentry/notifications/platform/api/endpoints/internal_registered_templates.py index 6b2c5de1c991aa..936be3e5815521 100644 --- a/src/sentry/notifications/platform/api/endpoints/internal_registered_templates.py +++ b/src/sentry/notifications/platform/api/endpoints/internal_registered_templates.py @@ -1,5 +1,5 @@ from collections import defaultdict -from typing import Any +from typing import int, Any from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/notifications/platform/api/endpoints/urls.py b/src/sentry/notifications/platform/api/endpoints/urls.py index 63a774d68ac959..b27f065a45121e 100644 --- a/src/sentry/notifications/platform/api/endpoints/urls.py +++ b/src/sentry/notifications/platform/api/endpoints/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from sentry.notifications.platform.api.endpoints.internal_registered_templates import ( diff --git a/src/sentry/notifications/platform/discord/provider.py b/src/sentry/notifications/platform/discord/provider.py index f85e9a4575f1d4..61e92428d1632c 100644 --- a/src/sentry/notifications/platform/discord/provider.py +++ b/src/sentry/notifications/platform/discord/provider.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.notifications.platform.provider import NotificationProvider, NotificationProviderError from sentry.notifications.platform.registry import provider_registry diff --git a/src/sentry/notifications/platform/email/provider.py b/src/sentry/notifications/platform/email/provider.py index 53546ec398782f..2ee99eddca7133 100644 --- a/src/sentry/notifications/platform/email/provider.py +++ b/src/sentry/notifications/platform/email/provider.py @@ -1,3 +1,4 @@ +from typing import int from django.core.mail import EmailMultiAlternatives from django.core.mail.message import make_msgid from django.utils.html import escape diff --git a/src/sentry/notifications/platform/metrics.py b/src/sentry/notifications/platform/metrics.py index cb0cfc987c5a78..f26e6b85260924 100644 --- a/src/sentry/notifications/platform/metrics.py +++ b/src/sentry/notifications/platform/metrics.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping from dataclasses import dataclass from enum import StrEnum diff --git a/src/sentry/notifications/platform/msteams/provider.py b/src/sentry/notifications/platform/msteams/provider.py index 53ecf261174b19..9b7d4b33628e07 100644 --- a/src/sentry/notifications/platform/msteams/provider.py +++ b/src/sentry/notifications/platform/msteams/provider.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.notifications.platform.provider import NotificationProvider, NotificationProviderError from sentry.notifications.platform.registry import provider_registry diff --git a/src/sentry/notifications/platform/provider.py b/src/sentry/notifications/platform/provider.py index 2ba5f3b8c73f97..ca60cfb8e1db29 100644 --- a/src/sentry/notifications/platform/provider.py +++ b/src/sentry/notifications/platform/provider.py @@ -1,4 +1,4 @@ -from typing import Protocol +from typing import int, Protocol from sentry.notifications.platform.renderer import NotificationRenderer from sentry.notifications.platform.target import IntegrationNotificationTarget diff --git a/src/sentry/notifications/platform/registry.py b/src/sentry/notifications/platform/registry.py index 84d313d4293fc7..9986cc9e2a3e82 100644 --- a/src/sentry/notifications/platform/registry.py +++ b/src/sentry/notifications/platform/registry.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.notifications.platform.provider import NotificationProvider from sentry.notifications.platform.types import NotificationTemplate diff --git a/src/sentry/notifications/platform/renderer.py b/src/sentry/notifications/platform/renderer.py index 9cbea90090bd1b..b2e33cd0ca6bb0 100644 --- a/src/sentry/notifications/platform/renderer.py +++ b/src/sentry/notifications/platform/renderer.py @@ -1,4 +1,4 @@ -from typing import Protocol +from typing import int, Protocol from sentry.notifications.platform.types import ( NotificationData, diff --git a/src/sentry/notifications/platform/service.py b/src/sentry/notifications/platform/service.py index eb88f56f0fe0f8..61008f7830c1c3 100644 --- a/src/sentry/notifications/platform/service.py +++ b/src/sentry/notifications/platform/service.py @@ -1,7 +1,7 @@ import logging from collections import defaultdict from collections.abc import Mapping -from typing import Any, Final +from typing import Any, Final, int import sentry_sdk diff --git a/src/sentry/notifications/platform/slack/provider.py b/src/sentry/notifications/platform/slack/provider.py index 7f2a6ffa3e6b45..f0d7e3260c82d5 100644 --- a/src/sentry/notifications/platform/slack/provider.py +++ b/src/sentry/notifications/platform/slack/provider.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from slack_sdk.models.blocks import ( ActionsBlock, diff --git a/src/sentry/notifications/platform/target.py b/src/sentry/notifications/platform/target.py index 66265686070169..6706b01026c8b8 100644 --- a/src/sentry/notifications/platform/target.py +++ b/src/sentry/notifications/platform/target.py @@ -1,7 +1,7 @@ from dataclasses import dataclass, field from enum import StrEnum from functools import cached_property -from typing import Any, Self +from typing import Any, Self, int from sentry.integrations.base import IntegrationInstallation from sentry.integrations.services.integration.model import ( diff --git a/src/sentry/notifications/platform/templates/__init__.py b/src/sentry/notifications/platform/templates/__init__.py index aa845e6e05e485..9f637b517360a0 100644 --- a/src/sentry/notifications/platform/templates/__init__.py +++ b/src/sentry/notifications/platform/templates/__init__.py @@ -1,4 +1,5 @@ # All templates should be imported here so they are registered in the notifications Django app. # See sentry/notifications/apps.py +from typing import int from .sample import * # noqa: F401,F403 diff --git a/src/sentry/notifications/platform/templates/sample.py b/src/sentry/notifications/platform/templates/sample.py index fe8e55cb6cb3f8..a82491eca688a9 100644 --- a/src/sentry/notifications/platform/templates/sample.py +++ b/src/sentry/notifications/platform/templates/sample.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from dataclasses import dataclass diff --git a/src/sentry/notifications/platform/types.py b/src/sentry/notifications/platform/types.py index 62f8a65b1725e3..61b571b0984074 100644 --- a/src/sentry/notifications/platform/types.py +++ b/src/sentry/notifications/platform/types.py @@ -3,7 +3,7 @@ import abc from dataclasses import dataclass, field from enum import StrEnum -from typing import Any, Literal, Protocol, Self +from typing import Any, Literal, Protocol, Self, int from sentry.integrations.types import ExternalProviderEnum diff --git a/src/sentry/notifications/serializers.py b/src/sentry/notifications/serializers.py index f7ef5c1fc14771..7cebb5b904d582 100644 --- a/src/sentry/notifications/serializers.py +++ b/src/sentry/notifications/serializers.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.api.serializers import Serializer from sentry.notifications.models.notificationsettingoption import NotificationSettingOption diff --git a/src/sentry/notifications/services/__init__.py b/src/sentry/notifications/services/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/notifications/services/__init__.py +++ b/src/sentry/notifications/services/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/notifications/services/impl.py b/src/sentry/notifications/services/impl.py index 0fde09dd733761..16f014365fc898 100644 --- a/src/sentry/notifications/services/impl.py +++ b/src/sentry/notifications/services/impl.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Mapping, MutableMapping diff --git a/src/sentry/notifications/services/model.py b/src/sentry/notifications/services/model.py index 620c225859c2a7..e7dc837ec389b4 100644 --- a/src/sentry/notifications/services/model.py +++ b/src/sentry/notifications/services/model.py @@ -4,6 +4,7 @@ # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from sentry.hybridcloud.rpc import RpcModel from sentry.integrations.types import ExternalProviders diff --git a/src/sentry/notifications/services/serial.py b/src/sentry/notifications/services/serial.py index 353aeacddf1531..a2a85dc4d71613 100644 --- a/src/sentry/notifications/services/serial.py +++ b/src/sentry/notifications/services/serial.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.models.external_actor import ExternalActor from sentry.notifications.services.model import RpcExternalActor diff --git a/src/sentry/notifications/services/service.py b/src/sentry/notifications/services/service.py index 9e42c8ecee3f25..546f9c49aa6d85 100644 --- a/src/sentry/notifications/services/service.py +++ b/src/sentry/notifications/services/service.py @@ -2,6 +2,7 @@ # from __future__ import annotations # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from abc import abstractmethod from collections.abc import Mapping, MutableMapping diff --git a/src/sentry/notifications/types.py b/src/sentry/notifications/types.py index 745efc34b5cadc..0bc68a4af5d6d3 100644 --- a/src/sentry/notifications/types.py +++ b/src/sentry/notifications/types.py @@ -2,7 +2,7 @@ from dataclasses import dataclass from enum import Enum, StrEnum -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.hybridcloud.rpc import ValueEqualityEnum diff --git a/src/sentry/notifications/utils/__init__.py b/src/sentry/notifications/utils/__init__.py index d5e43e7a649218..90caebb03e3f18 100644 --- a/src/sentry/notifications/utils/__init__.py +++ b/src/sentry/notifications/utils/__init__.py @@ -5,7 +5,7 @@ from collections.abc import Iterable, Mapping, MutableMapping, Sequence from dataclasses import dataclass from datetime import timedelta -from typing import TYPE_CHECKING, Any, Optional, TypedDict, cast +from typing import TYPE_CHECKING, Any, Optional, TypedDict, cast, int from urllib.parse import parse_qs, urlparse import sentry_sdk diff --git a/src/sentry/notifications/utils/actions.py b/src/sentry/notifications/utils/actions.py index d3f5d061d3a928..0ef505a0cf0a46 100644 --- a/src/sentry/notifications/utils/actions.py +++ b/src/sentry/notifications/utils/actions.py @@ -2,7 +2,7 @@ from collections.abc import Mapping, Sequence from dataclasses import dataclass -from typing import Any, Literal +from typing import Any, Literal, int @dataclass diff --git a/src/sentry/notifications/utils/avatar.py b/src/sentry/notifications/utils/avatar.py index 482317966a1c93..8a67a0c9104738 100644 --- a/src/sentry/notifications/utils/avatar.py +++ b/src/sentry/notifications/utils/avatar.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.urls import reverse from django.utils.html import format_html diff --git a/src/sentry/notifications/utils/digest.py b/src/sentry/notifications/utils/digest.py index 7358c4f2bab50b..fada73c36a1269 100644 --- a/src/sentry/notifications/utils/digest.py +++ b/src/sentry/notifications/utils/digest.py @@ -4,7 +4,7 @@ from collections import Counter from collections.abc import Mapping from datetime import datetime, tzinfo -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.utils import dateformat diff --git a/src/sentry/notifications/utils/links.py b/src/sentry/notifications/utils/links.py index 731b56af4ab2ad..8e52ee46c07664 100644 --- a/src/sentry/notifications/utils/links.py +++ b/src/sentry/notifications/utils/links.py @@ -1,6 +1,6 @@ import time from collections.abc import Sequence -from typing import Any +from typing import int, Any from django.utils.http import urlencode diff --git a/src/sentry/notifications/utils/open_period.py b/src/sentry/notifications/utils/open_period.py index 772cecbe894b30..ecd54fda68ff36 100644 --- a/src/sentry/notifications/utils/open_period.py +++ b/src/sentry/notifications/utils/open_period.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from sentry.models.activity import Activity diff --git a/src/sentry/notifications/utils/participants.py b/src/sentry/notifications/utils/participants.py index 443d228e109ab4..22301b96dfb424 100644 --- a/src/sentry/notifications/utils/participants.py +++ b/src/sentry/notifications/utils/participants.py @@ -3,7 +3,7 @@ import logging from collections import defaultdict from collections.abc import Iterable, Mapping, MutableMapping, Sequence -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.db.models import Q diff --git a/src/sentry/notifications/utils/rules.py b/src/sentry/notifications/utils/rules.py index 6ec390faddb0cd..0064ae25a0cda6 100644 --- a/src/sentry/notifications/utils/rules.py +++ b/src/sentry/notifications/utils/rules.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.rule import Rule diff --git a/src/sentry/notifications/utils/tasks.py b/src/sentry/notifications/utils/tasks.py index 7620cd593c0e17..5ffa514afef88a 100644 --- a/src/sentry/notifications/utils/tasks.py +++ b/src/sentry/notifications/utils/tasks.py @@ -2,7 +2,7 @@ from collections.abc import Iterable, Mapping from datetime import datetime -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.apps import apps from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/notifications/validators.py b/src/sentry/notifications/validators.py index 3c1b292a66fa51..74ff578c3fe6a6 100644 --- a/src/sentry/notifications/validators.py +++ b/src/sentry/notifications/validators.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from sentry.api.exceptions import ParameterValidationError diff --git a/src/sentry/objectstore/__init__.py b/src/sentry/objectstore/__init__.py index ead6115fcedec2..18fe78104db7ce 100644 --- a/src/sentry/objectstore/__init__.py +++ b/src/sentry/objectstore/__init__.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from objectstore_client import Client, ClientBuilder, ClientError, MetricsBackend, TimeToLive diff --git a/src/sentry/objectstore/metrics.py b/src/sentry/objectstore/metrics.py index 0282a7bf51ff39..c4e99cbce8c221 100644 --- a/src/sentry/objectstore/metrics.py +++ b/src/sentry/objectstore/metrics.py @@ -1,3 +1,4 @@ +from typing import int import time from collections.abc import Generator from contextlib import contextmanager diff --git a/src/sentry/onboarding_tasks/__init__.py b/src/sentry/onboarding_tasks/__init__.py index dc53edf0ec2959..658d42e9ff6a5a 100644 --- a/src/sentry/onboarding_tasks/__init__.py +++ b/src/sentry/onboarding_tasks/__init__.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.conf import settings diff --git a/src/sentry/onboarding_tasks/backends/organization_onboarding_task.py b/src/sentry/onboarding_tasks/backends/organization_onboarding_task.py index 2ab0870e2b1173..e7dafd8768b558 100644 --- a/src/sentry/onboarding_tasks/backends/organization_onboarding_task.py +++ b/src/sentry/onboarding_tasks/backends/organization_onboarding_task.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime import sentry_sdk diff --git a/src/sentry/onboarding_tasks/base.py b/src/sentry/onboarding_tasks/base.py index 7a2efc3207f935..4317c79df82e59 100644 --- a/src/sentry/onboarding_tasks/base.py +++ b/src/sentry/onboarding_tasks/base.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import datetime -from typing import Generic, TypeVar +from typing import Generic, TypeVar, int from sentry.models.organization import Organization from sentry.models.organizationonboardingtask import AbstractOnboardingTask diff --git a/src/sentry/options/__init__.py b/src/sentry/options/__init__.py index f348807e2da7ed..0d1d4371cddfbf 100644 --- a/src/sentry/options/__init__.py +++ b/src/sentry/options/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.core.signals import request_finished from .manager import ( diff --git a/src/sentry/options/defaults.py b/src/sentry/options/defaults.py index 2ca7030270f118..83201b6e447d7f 100644 --- a/src/sentry/options/defaults.py +++ b/src/sentry/options/defaults.py @@ -1,3 +1,4 @@ +from typing import int import os from sentry.logging import LoggingFormat diff --git a/src/sentry/options/manager.py b/src/sentry/options/manager.py index dcbf0dc09fc80a..844141c300a763 100644 --- a/src/sentry/options/manager.py +++ b/src/sentry/options/manager.py @@ -4,7 +4,7 @@ import sys from collections.abc import Sequence from enum import Enum -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from django.conf import settings diff --git a/src/sentry/options/rollout.py b/src/sentry/options/rollout.py index 13d2c3f5e90f06..072c7ee334d657 100644 --- a/src/sentry/options/rollout.py +++ b/src/sentry/options/rollout.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import hashlib import random diff --git a/src/sentry/options/store.py b/src/sentry/options/store.py index 3ef42854de2454..c7a5b69689b3b3 100644 --- a/src/sentry/options/store.py +++ b/src/sentry/options/store.py @@ -4,7 +4,7 @@ import logging from random import random from time import time -from typing import Any +from typing import int, Any from django.conf import settings from django.db.utils import OperationalError, ProgrammingError diff --git a/src/sentry/organizations/absolute_url.py b/src/sentry/organizations/absolute_url.py index a4e2c62a7154ba..17244f89e3b2d4 100644 --- a/src/sentry/organizations/absolute_url.py +++ b/src/sentry/organizations/absolute_url.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import re from urllib.parse import urlparse diff --git a/src/sentry/organizations/services/organization/__init__.py b/src/sentry/organizations/services/organization/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/organizations/services/organization/__init__.py +++ b/src/sentry/organizations/services/organization/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/organizations/services/organization/impl.py b/src/sentry/organizations/services/organization/impl.py index f4b438fbcb036f..8281e9cef6b618 100644 --- a/src/sentry/organizations/services/organization/impl.py +++ b/src/sentry/organizations/services/organization/impl.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, cast +from typing import Any, cast, int from django.contrib.postgres.aggregates import BitOr from django.db import models, router, transaction diff --git a/src/sentry/organizations/services/organization/model.py b/src/sentry/organizations/services/organization/model.py index bc3f89326e6a31..43201423c06273 100644 --- a/src/sentry/organizations/services/organization/model.py +++ b/src/sentry/organizations/services/organization/model.py @@ -6,7 +6,7 @@ from datetime import datetime from enum import IntEnum from functools import cached_property -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.dispatch import Signal from django.utils import timezone diff --git a/src/sentry/organizations/services/organization/serial.py b/src/sentry/organizations/services/organization/serial.py index a223920ea342ca..25ee52f98eb4d5 100644 --- a/src/sentry/organizations/services/organization/serial.py +++ b/src/sentry/organizations/services/organization/serial.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections import defaultdict from collections.abc import Iterable, MutableMapping diff --git a/src/sentry/organizations/services/organization/service.py b/src/sentry/organizations/services/organization/service.py index a0e28e24cebdd6..85483ae34e826c 100644 --- a/src/sentry/organizations/services/organization/service.py +++ b/src/sentry/organizations/services/organization/service.py @@ -5,7 +5,7 @@ import abc from abc import abstractmethod from collections.abc import Mapping -from typing import Any +from typing import int, Any from django.dispatch import Signal diff --git a/src/sentry/organizations/services/organization_actions/impl.py b/src/sentry/organizations/services/organization_actions/impl.py index 933d7da5b269f4..45d6640e79a695 100644 --- a/src/sentry/organizations/services/organization_actions/impl.py +++ b/src/sentry/organizations/services/organization_actions/impl.py @@ -1,5 +1,5 @@ import hashlib -from typing import TypedDict +from typing import int, TypedDict from uuid import uuid4 from django.db import router, transaction diff --git a/src/sentry/organizations/services/organization_actions/model.py b/src/sentry/organizations/services/organization_actions/model.py index 0a93b52b4a746d..3092840d0cef64 100644 --- a/src/sentry/organizations/services/organization_actions/model.py +++ b/src/sentry/organizations/services/organization_actions/model.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass from sentry.models.organization import Organization diff --git a/src/sentry/overwatch/endpoints/overwatch_rpc.py b/src/sentry/overwatch/endpoints/overwatch_rpc.py index bee94fd26bfb9e..d4d37db0bdc3dc 100644 --- a/src/sentry/overwatch/endpoints/overwatch_rpc.py +++ b/src/sentry/overwatch/endpoints/overwatch_rpc.py @@ -2,7 +2,7 @@ import hmac import logging from copy import deepcopy -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/overwatch_webhooks/overwatch_consent/impl.py b/src/sentry/overwatch_webhooks/overwatch_consent/impl.py index a9939831eb317e..ac9cc47cb88c7d 100644 --- a/src/sentry/overwatch_webhooks/overwatch_consent/impl.py +++ b/src/sentry/overwatch_webhooks/overwatch_consent/impl.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from sentry.constants import ENABLE_PR_REVIEW_TEST_GENERATION_DEFAULT, HIDE_AI_FEATURES_DEFAULT from sentry.models.organization import Organization from sentry.overwatch_webhooks.overwatch_consent.model import RpcOrganizationConsentStatus diff --git a/src/sentry/overwatch_webhooks/overwatch_consent/model.py b/src/sentry/overwatch_webhooks/overwatch_consent/model.py index 08ea19d439391e..e8160a99761789 100644 --- a/src/sentry/overwatch_webhooks/overwatch_consent/model.py +++ b/src/sentry/overwatch_webhooks/overwatch_consent/model.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from sentry.hybridcloud.rpc import RpcModel diff --git a/src/sentry/overwatch_webhooks/overwatch_consent/service.py b/src/sentry/overwatch_webhooks/overwatch_consent/service.py index 9a2b1f5aa491bc..ebd94cea94514f 100644 --- a/src/sentry/overwatch_webhooks/overwatch_consent/service.py +++ b/src/sentry/overwatch_webhooks/overwatch_consent/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from abc import abstractmethod from sentry.hybridcloud.rpc.resolvers import ByRegionName diff --git a/src/sentry/overwatch_webhooks/types.py b/src/sentry/overwatch_webhooks/types.py index cd08e7f97fb2da..81ad8209c58f5a 100644 --- a/src/sentry/overwatch_webhooks/types.py +++ b/src/sentry/overwatch_webhooks/types.py @@ -2,7 +2,7 @@ from collections.abc import Mapping from dataclasses import asdict, dataclass -from typing import Any +from typing import int, Any from sentry.integrations.models.organization_integration import OrganizationIntegration from sentry.models.organizationmapping import OrganizationMapping diff --git a/src/sentry/overwatch_webhooks/webhook_forwarder.py b/src/sentry/overwatch_webhooks/webhook_forwarder.py index 09f00ab446c8c0..0f48e7b0dac094 100644 --- a/src/sentry/overwatch_webhooks/webhook_forwarder.py +++ b/src/sentry/overwatch_webhooks/webhook_forwarder.py @@ -2,7 +2,7 @@ from collections import defaultdict from collections.abc import Mapping from dataclasses import dataclass -from typing import Any +from typing import int, Any from sentry import options from sentry.constants import ObjectStatus diff --git a/src/sentry/overwatch_webhooks/webhook_publisher.py b/src/sentry/overwatch_webhooks/webhook_publisher.py index 16d2cf37ecb14b..4f096dbd1e6788 100644 --- a/src/sentry/overwatch_webhooks/webhook_publisher.py +++ b/src/sentry/overwatch_webhooks/webhook_publisher.py @@ -1,3 +1,4 @@ +from typing import int import hashlib import hmac import logging diff --git a/src/sentry/ownership/grammar.py b/src/sentry/ownership/grammar.py index 4b6005c24469d0..3f247e46a5e021 100644 --- a/src/sentry/ownership/grammar.py +++ b/src/sentry/ownership/grammar.py @@ -1,3 +1,4 @@ +from typing import int from sentry.issues.ownership.grammar import ( # noqa: F401, F403 Matcher, Owner, diff --git a/src/sentry/partnerships/__init__.py b/src/sentry/partnerships/__init__.py index fc4051f140a01a..ea93a74856bc56 100644 --- a/src/sentry/partnerships/__init__.py +++ b/src/sentry/partnerships/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/partnerships/base.py b/src/sentry/partnerships/base.py index 19ded0123077a9..f5bf1d6efeb5fe 100644 --- a/src/sentry/partnerships/base.py +++ b/src/sentry/partnerships/base.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.organization import Organization from sentry.relay.types import GenericFilter from sentry.utils.services import Service diff --git a/src/sentry/pipeline/base.py b/src/sentry/pipeline/base.py index 6bdb1a3ea87caf..78d4e305401387 100644 --- a/src/sentry/pipeline/base.py +++ b/src/sentry/pipeline/base.py @@ -3,7 +3,7 @@ import abc import logging from collections.abc import Callable, Mapping, Sequence -from typing import Any, Protocol, Self +from typing import Any, Protocol, Self, int from django.http.request import HttpRequest from django.http.response import HttpResponseBase diff --git a/src/sentry/pipeline/constants.py b/src/sentry/pipeline/constants.py index 7ca21972e7d49d..d323672c582579 100644 --- a/src/sentry/pipeline/constants.py +++ b/src/sentry/pipeline/constants.py @@ -1,2 +1,3 @@ # Give users an hour to complete. +from typing import int PIPELINE_STATE_TTL = 60 * 60 diff --git a/src/sentry/pipeline/provider.py b/src/sentry/pipeline/provider.py index b92cf024805056..485bf47eccb6c7 100644 --- a/src/sentry/pipeline/provider.py +++ b/src/sentry/pipeline/provider.py @@ -2,7 +2,7 @@ import abc from collections.abc import Callable, Mapping, Sequence -from typing import Any +from typing import int, Any from sentry.pipeline.views.base import PipelineView diff --git a/src/sentry/pipeline/store.py b/src/sentry/pipeline/store.py index 1f026424d4b735..bdef9f49277aa2 100644 --- a/src/sentry/pipeline/store.py +++ b/src/sentry/pipeline/store.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.session_store import RedisSessionStore, redis_property diff --git a/src/sentry/pipeline/types.py b/src/sentry/pipeline/types.py index 8a3e86a473c03b..1dd66e0b4e32f7 100644 --- a/src/sentry/pipeline/types.py +++ b/src/sentry/pipeline/types.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from dataclasses import dataclass diff --git a/src/sentry/pipeline/views/base.py b/src/sentry/pipeline/views/base.py index 7a7e7f1dc813d7..ca96d460b60dc4 100644 --- a/src/sentry/pipeline/views/base.py +++ b/src/sentry/pipeline/views/base.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, Protocol +from typing import Any, Protocol, int from django.http.request import HttpRequest from django.http.response import HttpResponseBase diff --git a/src/sentry/pipeline/views/nested.py b/src/sentry/pipeline/views/nested.py index e2e30691849107..4586abd6f5668f 100644 --- a/src/sentry/pipeline/views/nested.py +++ b/src/sentry/pipeline/views/nested.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.http.request import HttpRequest from django.http.response import HttpResponseBase diff --git a/src/sentry/plugins/__init__.py b/src/sentry/plugins/__init__.py index 0bf511e3120d5d..4b84e92d9da28b 100644 --- a/src/sentry/plugins/__init__.py +++ b/src/sentry/plugins/__init__.py @@ -1,3 +1,4 @@ +from typing import int HIDDEN_PLUGINS = ( "bitbucket", "gitlab", diff --git a/src/sentry/plugins/base/__init__.py b/src/sentry/plugins/base/__init__.py index d5aaedffadebc7..56954a9eb98c1c 100644 --- a/src/sentry/plugins/base/__init__.py +++ b/src/sentry/plugins/base/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .binding_manager import BindingManager from .manager import PluginManager from .response import * # NOQA diff --git a/src/sentry/plugins/base/binding_manager.py b/src/sentry/plugins/base/binding_manager.py index eb57c614d88b73..7f10f9fbd4a13c 100644 --- a/src/sentry/plugins/base/binding_manager.py +++ b/src/sentry/plugins/base/binding_manager.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.plugins.providers import IntegrationRepositoryProvider, RepositoryProvider diff --git a/src/sentry/plugins/base/group_api_urls.py b/src/sentry/plugins/base/group_api_urls.py index 25bc4acd92ecb7..7bd81e8b655b26 100644 --- a/src/sentry/plugins/base/group_api_urls.py +++ b/src/sentry/plugins/base/group_api_urls.py @@ -1,3 +1,4 @@ +from typing import int import logging import re diff --git a/src/sentry/plugins/base/manager.py b/src/sentry/plugins/base/manager.py index 448432b4ce9acf..cf01d3bbf5c5ba 100644 --- a/src/sentry/plugins/base/manager.py +++ b/src/sentry/plugins/base/manager.py @@ -2,7 +2,7 @@ import logging from collections.abc import Generator, Iterator -from typing import TYPE_CHECKING, Literal, overload +from typing import TYPE_CHECKING, Literal, overload, int from sentry.utils.managers import InstanceManager from sentry.utils.safe import safe_execute diff --git a/src/sentry/plugins/base/response.py b/src/sentry/plugins/base/response.py index 85dda99b7fec02..ba760da0e57390 100644 --- a/src/sentry/plugins/base/response.py +++ b/src/sentry/plugins/base/response.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.http import HttpRequest, HttpResponse from django.template.context_processors import csrf diff --git a/src/sentry/plugins/base/structs.py b/src/sentry/plugins/base/structs.py index c214f0ef974617..a84b05558d27d6 100644 --- a/src/sentry/plugins/base/structs.py +++ b/src/sentry/plugins/base/structs.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ("Annotation", "Notification") import warnings diff --git a/src/sentry/plugins/base/urls.py b/src/sentry/plugins/base/urls.py index 9390805b0a4814..64a518239d2517 100644 --- a/src/sentry/plugins/base/urls.py +++ b/src/sentry/plugins/base/urls.py @@ -1,3 +1,4 @@ +from typing import int import re from django.conf.urls import include diff --git a/src/sentry/plugins/base/v1.py b/src/sentry/plugins/base/v1.py index 9722b07f113aef..e39e3194dc3d36 100644 --- a/src/sentry/plugins/base/v1.py +++ b/src/sentry/plugins/base/v1.py @@ -3,7 +3,7 @@ import logging from collections.abc import Sequence from threading import local -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django import forms from django.http import HttpResponseRedirect diff --git a/src/sentry/plugins/base/v2.py b/src/sentry/plugins/base/v2.py index 3a3142e5127ae9..5958953b2ca597 100644 --- a/src/sentry/plugins/base/v2.py +++ b/src/sentry/plugins/base/v2.py @@ -3,7 +3,7 @@ import logging from collections.abc import Mapping, MutableMapping, Sequence from threading import local -from typing import TYPE_CHECKING, Any, Protocol +from typing import TYPE_CHECKING, Any, Protocol, int from django import forms from django.http import HttpResponseRedirect diff --git a/src/sentry/plugins/base/view.py b/src/sentry/plugins/base/view.py index a7fff40fbe50dd..8bfbca2fc855e4 100644 --- a/src/sentry/plugins/base/view.py +++ b/src/sentry/plugins/base/view.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.http import HttpResponseRedirect diff --git a/src/sentry/plugins/bases/__init__.py b/src/sentry/plugins/bases/__init__.py index 692872020520e0..893a917886aaa5 100644 --- a/src/sentry/plugins/bases/__init__.py +++ b/src/sentry/plugins/bases/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .issue import IssueTrackingPlugin # NOQA from .issue2 import IssueTrackingPlugin2 # NOQA from .notify import NotificationPlugin # NOQA diff --git a/src/sentry/plugins/bases/data_forwarding.py b/src/sentry/plugins/bases/data_forwarding.py index bc96c90837bdda..46e8ac2e12283c 100644 --- a/src/sentry/plugins/bases/data_forwarding.py +++ b/src/sentry/plugins/bases/data_forwarding.py @@ -1,6 +1,6 @@ import logging from collections.abc import MutableMapping -from typing import Any +from typing import int, Any from sentry import ratelimits, tsdb from sentry.api.serializers import serialize diff --git a/src/sentry/plugins/bases/issue.py b/src/sentry/plugins/bases/issue.py index 15c92825f99c15..ffc1c8a89ad689 100644 --- a/src/sentry/plugins/bases/issue.py +++ b/src/sentry/plugins/bases/issue.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import sentry_sdk from django import forms diff --git a/src/sentry/plugins/bases/issue2.py b/src/sentry/plugins/bases/issue2.py index 9b017d8ab9cdc9..be69dfc1e3fbdd 100644 --- a/src/sentry/plugins/bases/issue2.py +++ b/src/sentry/plugins/bases/issue2.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable -from typing import TYPE_CHECKING, NotRequired, TypedDict +from typing import TYPE_CHECKING, NotRequired, TypedDict, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/plugins/bases/notify.py b/src/sentry/plugins/bases/notify.py index dbd92fb484fc1d..5d593346188413 100644 --- a/src/sentry/plugins/bases/notify.py +++ b/src/sentry/plugins/bases/notify.py @@ -1,3 +1,4 @@ +from typing import int import logging from urllib.error import HTTPError as UrllibHTTPError diff --git a/src/sentry/plugins/bases/releasetracking.py b/src/sentry/plugins/bases/releasetracking.py index 899406283388c0..acf36651c0a87c 100644 --- a/src/sentry/plugins/bases/releasetracking.py +++ b/src/sentry/plugins/bases/releasetracking.py @@ -1,3 +1,4 @@ +from typing import int from sentry.plugins.base.v2 import Plugin2 diff --git a/src/sentry/plugins/bases/tag.py b/src/sentry/plugins/bases/tag.py index 0b523aa4e1f53c..90fc3a12ca10c8 100644 --- a/src/sentry/plugins/bases/tag.py +++ b/src/sentry/plugins/bases/tag.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import ClassVar +from typing import int, ClassVar from sentry.constants import MAX_TAG_VALUE_LENGTH from sentry.plugins.base.v2 import Plugin2 diff --git a/src/sentry/plugins/config.py b/src/sentry/plugins/config.py index 21d724a89deccb..0c1de0367f1254 100644 --- a/src/sentry/plugins/config.py +++ b/src/sentry/plugins/config.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["PluginConfigMixin"] diff --git a/src/sentry/plugins/examples/issue_tracking.py b/src/sentry/plugins/examples/issue_tracking.py index ee868fc96b4889..be592b1747c88a 100644 --- a/src/sentry/plugins/examples/issue_tracking.py +++ b/src/sentry/plugins/examples/issue_tracking.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from sentry.plugins.bases.issue2 import IssuePlugin2 diff --git a/src/sentry/plugins/helpers.py b/src/sentry/plugins/helpers.py index c7e7d0ce71df31..23a78d1dc76ebd 100644 --- a/src/sentry/plugins/helpers.py +++ b/src/sentry/plugins/helpers.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry import options from sentry.models.options.project_option import ProjectOption diff --git a/src/sentry/plugins/interfaces/__init__.py b/src/sentry/plugins/interfaces/__init__.py index 4af390e86f4a22..3167822aad647d 100644 --- a/src/sentry/plugins/interfaces/__init__.py +++ b/src/sentry/plugins/interfaces/__init__.py @@ -1 +1,2 @@ +from typing import int from .releasehook import * # NOQA diff --git a/src/sentry/plugins/interfaces/releasehook.py b/src/sentry/plugins/interfaces/releasehook.py index a8cd3abd0d4258..b60f884cbe97a1 100644 --- a/src/sentry/plugins/interfaces/releasehook.py +++ b/src/sentry/plugins/interfaces/releasehook.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["ReleaseHook"] import logging diff --git a/src/sentry/plugins/migrator.py b/src/sentry/plugins/migrator.py index fc6dbfd346009f..ec672bc9127706 100644 --- a/src/sentry/plugins/migrator.py +++ b/src/sentry/plugins/migrator.py @@ -1,6 +1,6 @@ import logging from dataclasses import dataclass -from typing import Any +from typing import int, Any from django.utils.functional import cached_property diff --git a/src/sentry/plugins/providers/__init__.py b/src/sentry/plugins/providers/__init__.py index 0bcf071331d972..5b5ced81864de7 100644 --- a/src/sentry/plugins/providers/__init__.py +++ b/src/sentry/plugins/providers/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ( "ProviderMixin", "IntegrationRepositoryProvider", diff --git a/src/sentry/plugins/providers/base.py b/src/sentry/plugins/providers/base.py index 78aa5960d60afd..d452a608e459e3 100644 --- a/src/sentry/plugins/providers/base.py +++ b/src/sentry/plugins/providers/base.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/plugins/providers/dummy/__init__.py b/src/sentry/plugins/providers/dummy/__init__.py index 7030fe95730ab3..ef9451dd6cecb6 100644 --- a/src/sentry/plugins/providers/dummy/__init__.py +++ b/src/sentry/plugins/providers/dummy/__init__.py @@ -1 +1,2 @@ +from typing import int from .repository import * # noqa: F401,F403 diff --git a/src/sentry/plugins/providers/dummy/repository.py b/src/sentry/plugins/providers/dummy/repository.py index 0d3063cc6e96c1..81d9e150899da0 100644 --- a/src/sentry/plugins/providers/dummy/repository.py +++ b/src/sentry/plugins/providers/dummy/repository.py @@ -1,3 +1,4 @@ +from typing import int from sentry.plugins.providers.repository import RepositoryProvider diff --git a/src/sentry/plugins/providers/integration_repository.py b/src/sentry/plugins/providers/integration_repository.py index 9be762ce766856..d0c81c5b0015db 100644 --- a/src/sentry/plugins/providers/integration_repository.py +++ b/src/sentry/plugins/providers/integration_repository.py @@ -2,7 +2,7 @@ import logging from datetime import timezone -from typing import Any, ClassVar, TypedDict +from typing import Any, ClassVar, TypedDict, int from dateutil.parser import parse as parse_date from rest_framework import status diff --git a/src/sentry/plugins/providers/repository.py b/src/sentry/plugins/providers/repository.py index dddf6f77262380..a9cb95aac37a7d 100644 --- a/src/sentry/plugins/providers/repository.py +++ b/src/sentry/plugins/providers/repository.py @@ -1,7 +1,7 @@ from __future__ import annotations from logging import getLogger -from typing import ClassVar +from typing import int, ClassVar from django.db import IntegrityError, router, transaction from django.urls import reverse diff --git a/src/sentry/plugins/sentry_interface_types/apps.py b/src/sentry/plugins/sentry_interface_types/apps.py index 08610257b95697..5f08fdbdbe53c6 100644 --- a/src/sentry/plugins/sentry_interface_types/apps.py +++ b/src/sentry/plugins/sentry_interface_types/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/plugins/sentry_interface_types/models.py b/src/sentry/plugins/sentry_interface_types/models.py index ca4e7d572d3ab7..0a5d65a61542f3 100644 --- a/src/sentry/plugins/sentry_interface_types/models.py +++ b/src/sentry/plugins/sentry_interface_types/models.py @@ -1,3 +1,4 @@ +from typing import int import sentry from sentry.plugins.bases.tag import TagPlugin diff --git a/src/sentry/plugins/sentry_urls/apps.py b/src/sentry/plugins/sentry_urls/apps.py index fe4c76279e0bb1..844829308998d0 100644 --- a/src/sentry/plugins/sentry_urls/apps.py +++ b/src/sentry/plugins/sentry_urls/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/plugins/sentry_urls/models.py b/src/sentry/plugins/sentry_urls/models.py index 9bc3bd7f57259e..bbe0a27cc3ea18 100644 --- a/src/sentry/plugins/sentry_urls/models.py +++ b/src/sentry/plugins/sentry_urls/models.py @@ -1,3 +1,4 @@ +from typing import int import sentry from sentry.plugins.bases.tag import TagPlugin diff --git a/src/sentry/plugins/sentry_useragents/apps.py b/src/sentry/plugins/sentry_useragents/apps.py index c614a55efc0da8..cdeec95de2168f 100644 --- a/src/sentry/plugins/sentry_useragents/apps.py +++ b/src/sentry/plugins/sentry_useragents/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/plugins/sentry_useragents/models.py b/src/sentry/plugins/sentry_useragents/models.py index 0a0e9680fcf7e8..536c3bd2e0d0b6 100644 --- a/src/sentry/plugins/sentry_useragents/models.py +++ b/src/sentry/plugins/sentry_useragents/models.py @@ -1,3 +1,4 @@ +from typing import int from ua_parser.user_agent_parser import Parse import sentry diff --git a/src/sentry/plugins/sentry_webhooks/apps.py b/src/sentry/plugins/sentry_webhooks/apps.py index 3151298b801533..e0721c2354cd18 100644 --- a/src/sentry/plugins/sentry_webhooks/apps.py +++ b/src/sentry/plugins/sentry_webhooks/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/plugins/sentry_webhooks/client.py b/src/sentry/plugins/sentry_webhooks/client.py index 51b97bd8b77091..698ec4a9dfdc81 100644 --- a/src/sentry/plugins/sentry_webhooks/client.py +++ b/src/sentry/plugins/sentry_webhooks/client.py @@ -1,3 +1,4 @@ +from typing import int from sentry_plugins.client import ApiClient diff --git a/src/sentry/plugins/sentry_webhooks/plugin.py b/src/sentry/plugins/sentry_webhooks/plugin.py index ad0fec4dad6bb4..e201cc3f4bc99d 100644 --- a/src/sentry/plugins/sentry_webhooks/plugin.py +++ b/src/sentry/plugins/sentry_webhooks/plugin.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/plugins/utils.py b/src/sentry/plugins/utils.py index c62051a6430f2b..83800ab652004f 100644 --- a/src/sentry/plugins/utils.py +++ b/src/sentry/plugins/utils.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.base import FeatureDescription, IntegrationFeatures from sentry.plugins.bases.issue2 import IssueTrackingPlugin2 diff --git a/src/sentry/plugins/validators/__init__.py b/src/sentry/plugins/validators/__init__.py index 350bbfe0a6d02a..af0399fedba3e1 100644 --- a/src/sentry/plugins/validators/__init__.py +++ b/src/sentry/plugins/validators/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .url import URLValidator DEFAULT_VALIDATORS = {"url": [URLValidator]} diff --git a/src/sentry/plugins/validators/url.py b/src/sentry/plugins/validators/url.py index fd50a4bceda71f..12f1d512214be9 100644 --- a/src/sentry/plugins/validators/url.py +++ b/src/sentry/plugins/validators/url.py @@ -1,3 +1,4 @@ +from typing import int from sentry.exceptions import PluginError from sentry.net.socket import is_valid_url diff --git a/src/sentry/post_process_forwarder/post_process_forwarder.py b/src/sentry/post_process_forwarder/post_process_forwarder.py index 4c1ed75a3bee1a..dafe948d372bc4 100644 --- a/src/sentry/post_process_forwarder/post_process_forwarder.py +++ b/src/sentry/post_process_forwarder/post_process_forwarder.py @@ -1,3 +1,4 @@ +from typing import int import logging from abc import ABC, abstractmethod from collections.abc import Mapping diff --git a/src/sentry/preprod/__init__.py b/src/sentry/preprod/__init__.py index 32860f7f1574f9..379829baf7633e 100644 --- a/src/sentry/preprod/__init__.py +++ b/src/sentry/preprod/__init__.py @@ -1 +1,2 @@ +from typing import int from .analytics import * # NOQA diff --git a/src/sentry/preprod/analytics.py b/src/sentry/preprod/analytics.py index 759558a5272aac..6a17221beb691d 100644 --- a/src/sentry/preprod/analytics.py +++ b/src/sentry/preprod/analytics.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry import analytics diff --git a/src/sentry/preprod/api/bases/preprod_artifact_endpoint.py b/src/sentry/preprod/api/bases/preprod_artifact_endpoint.py index 91e6dcd62c5ddc..067826317233e2 100644 --- a/src/sentry/preprod/api/bases/preprod_artifact_endpoint.py +++ b/src/sentry/preprod/api/bases/preprod_artifact_endpoint.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from rest_framework import status from rest_framework.exceptions import APIException diff --git a/src/sentry/preprod/api/endpoints/organization_preprod_artifact_assemble.py b/src/sentry/preprod/api/endpoints/organization_preprod_artifact_assemble.py index 7c4cc35e91a17a..e9e905c4d20560 100644 --- a/src/sentry/preprod/api/endpoints/organization_preprod_artifact_assemble.py +++ b/src/sentry/preprod/api/endpoints/organization_preprod_artifact_assemble.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import jsonschema import orjson diff --git a/src/sentry/preprod/api/endpoints/preprod_artifact_admin_batch_delete.py b/src/sentry/preprod/api/endpoints/preprod_artifact_admin_batch_delete.py index 006e4d5b9122d9..38007e86948c13 100644 --- a/src/sentry/preprod/api/endpoints/preprod_artifact_admin_batch_delete.py +++ b/src/sentry/preprod/api/endpoints/preprod_artifact_admin_batch_delete.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/preprod/api/endpoints/preprod_artifact_admin_info.py b/src/sentry/preprod/api/endpoints/preprod_artifact_admin_info.py index e551d29762aa6b..eaf6b30fbce94a 100644 --- a/src/sentry/preprod/api/endpoints/preprod_artifact_admin_info.py +++ b/src/sentry/preprod/api/endpoints/preprod_artifact_admin_info.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/preprod/api/endpoints/preprod_artifact_rerun_analysis.py b/src/sentry/preprod/api/endpoints/preprod_artifact_rerun_analysis.py index 05c7df21046198..e07f1da5f57c4e 100644 --- a/src/sentry/preprod/api/endpoints/preprod_artifact_rerun_analysis.py +++ b/src/sentry/preprod/api/endpoints/preprod_artifact_rerun_analysis.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from dataclasses import asdict, dataclass diff --git a/src/sentry/preprod/api/endpoints/project_installable_preprod_artifact_download.py b/src/sentry/preprod/api/endpoints/project_installable_preprod_artifact_download.py index c55b6541d5470c..1818ce8e6f3b6c 100644 --- a/src/sentry/preprod/api/endpoints/project_installable_preprod_artifact_download.py +++ b/src/sentry/preprod/api/endpoints/project_installable_preprod_artifact_download.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db.models import F from django.http.response import FileResponse, HttpResponse, HttpResponseBase diff --git a/src/sentry/preprod/api/endpoints/project_preprod_artifact_assemble_generic.py b/src/sentry/preprod/api/endpoints/project_preprod_artifact_assemble_generic.py index 1bbeb88a2056a8..913dbde9c4a826 100644 --- a/src/sentry/preprod/api/endpoints/project_preprod_artifact_assemble_generic.py +++ b/src/sentry/preprod/api/endpoints/project_preprod_artifact_assemble_generic.py @@ -2,7 +2,7 @@ import logging from enum import Enum -from typing import Any +from typing import int, Any import jsonschema import orjson diff --git a/src/sentry/preprod/api/endpoints/project_preprod_artifact_delete.py b/src/sentry/preprod/api/endpoints/project_preprod_artifact_delete.py index cd1ab3d1d8eda5..b9aadba24ed74a 100644 --- a/src/sentry/preprod/api/endpoints/project_preprod_artifact_delete.py +++ b/src/sentry/preprod/api/endpoints/project_preprod_artifact_delete.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/preprod/api/endpoints/project_preprod_artifact_download.py b/src/sentry/preprod/api/endpoints/project_preprod_artifact_download.py index d1a763d170611a..6ba666c0490bcf 100644 --- a/src/sentry/preprod/api/endpoints/project_preprod_artifact_download.py +++ b/src/sentry/preprod/api/endpoints/project_preprod_artifact_download.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Iterator diff --git a/src/sentry/preprod/api/endpoints/project_preprod_artifact_install_details.py b/src/sentry/preprod/api/endpoints/project_preprod_artifact_install_details.py index aea74d6b5f1c95..95e64548b05389 100644 --- a/src/sentry/preprod/api/endpoints/project_preprod_artifact_install_details.py +++ b/src/sentry/preprod/api/endpoints/project_preprod_artifact_install_details.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any import sentry_sdk from django.db.models import Sum diff --git a/src/sentry/preprod/api/endpoints/project_preprod_artifact_update.py b/src/sentry/preprod/api/endpoints/project_preprod_artifact_update.py index 5139d880e06513..08c19e62d20141 100644 --- a/src/sentry/preprod/api/endpoints/project_preprod_artifact_update.py +++ b/src/sentry/preprod/api/endpoints/project_preprod_artifact_update.py @@ -2,7 +2,7 @@ import logging import re -from typing import Any +from typing import int, Any import jsonschema import orjson diff --git a/src/sentry/preprod/api/endpoints/project_preprod_build_details.py b/src/sentry/preprod/api/endpoints/project_preprod_build_details.py index f46a87101d8e77..dbb70b09882e20 100644 --- a/src/sentry/preprod/api/endpoints/project_preprod_build_details.py +++ b/src/sentry/preprod/api/endpoints/project_preprod_build_details.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/preprod/api/endpoints/project_preprod_check_for_updates.py b/src/sentry/preprod/api/endpoints/project_preprod_check_for_updates.py index db93027afe610d..8dd21228cc69fd 100644 --- a/src/sentry/preprod/api/endpoints/project_preprod_check_for_updates.py +++ b/src/sentry/preprod/api/endpoints/project_preprod_check_for_updates.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from packaging.version import parse as parse_version from pydantic import BaseModel diff --git a/src/sentry/preprod/api/endpoints/project_preprod_list_builds.py b/src/sentry/preprod/api/endpoints/project_preprod_list_builds.py index 707ff195ff16ab..9fa6a299811dfa 100644 --- a/src/sentry/preprod/api/endpoints/project_preprod_list_builds.py +++ b/src/sentry/preprod/api/endpoints/project_preprod_list_builds.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from django.db.models import Q from rest_framework.request import Request diff --git a/src/sentry/preprod/api/endpoints/project_preprod_size.py b/src/sentry/preprod/api/endpoints/project_preprod_size.py index 0fb1262cc588a3..aa16bb1a00d50f 100644 --- a/src/sentry/preprod/api/endpoints/project_preprod_size.py +++ b/src/sentry/preprod/api/endpoints/project_preprod_size.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, cast, int import orjson import pydantic diff --git a/src/sentry/preprod/api/endpoints/pull_request/organization_pullrequest_comments.py b/src/sentry/preprod/api/endpoints/pull_request/organization_pullrequest_comments.py index 6547b073754d83..9192676b800264 100644 --- a/src/sentry/preprod/api/endpoints/pull_request/organization_pullrequest_comments.py +++ b/src/sentry/preprod/api/endpoints/pull_request/organization_pullrequest_comments.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/preprod/api/endpoints/pull_request/organization_pullrequest_details.py b/src/sentry/preprod/api/endpoints/pull_request/organization_pullrequest_details.py index a0848acd326e17..0ce7916ec52411 100644 --- a/src/sentry/preprod/api/endpoints/pull_request/organization_pullrequest_details.py +++ b/src/sentry/preprod/api/endpoints/pull_request/organization_pullrequest_details.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/preprod/api/endpoints/pull_request/organization_pullrequest_size_analysis_download.py b/src/sentry/preprod/api/endpoints/pull_request/organization_pullrequest_size_analysis_download.py index 0703dcb753ac55..51714b82080e1e 100644 --- a/src/sentry/preprod/api/endpoints/pull_request/organization_pullrequest_size_analysis_download.py +++ b/src/sentry/preprod/api/endpoints/pull_request/organization_pullrequest_size_analysis_download.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/preprod/api/endpoints/size_analysis/project_preprod_size_analysis_compare.py b/src/sentry/preprod/api/endpoints/size_analysis/project_preprod_size_analysis_compare.py index 40508ba96e0f8a..52d7c15ca4941c 100644 --- a/src/sentry/preprod/api/endpoints/size_analysis/project_preprod_size_analysis_compare.py +++ b/src/sentry/preprod/api/endpoints/size_analysis/project_preprod_size_analysis_compare.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/preprod/api/endpoints/size_analysis/project_preprod_size_analysis_compare_download.py b/src/sentry/preprod/api/endpoints/size_analysis/project_preprod_size_analysis_compare_download.py index a5e4dca161160f..59a3cf4a2b5843 100644 --- a/src/sentry/preprod/api/endpoints/size_analysis/project_preprod_size_analysis_compare_download.py +++ b/src/sentry/preprod/api/endpoints/size_analysis/project_preprod_size_analysis_compare_download.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/preprod/api/endpoints/size_analysis/project_preprod_size_analysis_download.py b/src/sentry/preprod/api/endpoints/size_analysis/project_preprod_size_analysis_download.py index 05dc7ed5d8ab90..573d7e6e37fab3 100644 --- a/src/sentry/preprod/api/endpoints/size_analysis/project_preprod_size_analysis_download.py +++ b/src/sentry/preprod/api/endpoints/size_analysis/project_preprod_size_analysis_download.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/preprod/api/endpoints/urls.py b/src/sentry/preprod/api/endpoints/urls.py index 720a4c7cd81df2..52c5e0c31cbc80 100644 --- a/src/sentry/preprod/api/endpoints/urls.py +++ b/src/sentry/preprod/api/endpoints/urls.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.urls import re_path diff --git a/src/sentry/preprod/api/models/launchpad.py b/src/sentry/preprod/api/models/launchpad.py index ce3ca7db1de05f..350ffaa0855963 100644 --- a/src/sentry/preprod/api/models/launchpad.py +++ b/src/sentry/preprod/api/models/launchpad.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Annotated, Literal +from typing import Annotated, Literal, int from pydantic import BaseModel, ConfigDict, Field diff --git a/src/sentry/preprod/api/models/project_preprod_build_details_models.py b/src/sentry/preprod/api/models/project_preprod_build_details_models.py index ee105943dab4b9..c4dada494c7d8b 100644 --- a/src/sentry/preprod/api/models/project_preprod_build_details_models.py +++ b/src/sentry/preprod/api/models/project_preprod_build_details_models.py @@ -2,7 +2,7 @@ import logging from enum import StrEnum -from typing import Annotated, Literal +from typing import Annotated, Literal, int from pydantic import BaseModel, Field diff --git a/src/sentry/preprod/api/models/project_preprod_list_builds_models.py b/src/sentry/preprod/api/models/project_preprod_list_builds_models.py index 7f8672d4745948..fb30f442282b24 100644 --- a/src/sentry/preprod/api/models/project_preprod_list_builds_models.py +++ b/src/sentry/preprod/api/models/project_preprod_list_builds_models.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from pydantic import BaseModel diff --git a/src/sentry/preprod/api/models/size_analysis/project_preprod_size_analysis_compare_models.py b/src/sentry/preprod/api/models/size_analysis/project_preprod_size_analysis_compare_models.py index ba680acc8a5f75..c418ec18bfe977 100644 --- a/src/sentry/preprod/api/models/size_analysis/project_preprod_size_analysis_compare_models.py +++ b/src/sentry/preprod/api/models/size_analysis/project_preprod_size_analysis_compare_models.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from pydantic import BaseModel diff --git a/src/sentry/preprod/api/validators.py b/src/sentry/preprod/api/validators.py index 5b148b735fb465..1163fd4ed98ffe 100644 --- a/src/sentry/preprod/api/validators.py +++ b/src/sentry/preprod/api/validators.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from rest_framework import serializers diff --git a/src/sentry/preprod/authentication.py b/src/sentry/preprod/authentication.py index 3721249e472b5e..d2faa59cbc47b4 100644 --- a/src/sentry/preprod/authentication.py +++ b/src/sentry/preprod/authentication.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from rest_framework.permissions import BasePermission from rest_framework.request import Request diff --git a/src/sentry/preprod/build_distribution_utils.py b/src/sentry/preprod/build_distribution_utils.py index d4ffe56edebff6..f24e0e484d6474 100644 --- a/src/sentry/preprod/build_distribution_utils.py +++ b/src/sentry/preprod/build_distribution_utils.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import secrets diff --git a/src/sentry/preprod/integration_utils.py b/src/sentry/preprod/integration_utils.py index 8ae6519e4b081f..1bccfe6189e582 100644 --- a/src/sentry/preprod/integration_utils.py +++ b/src/sentry/preprod/integration_utils.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/preprod/migrations/0001_emerge_upload_models.py b/src/sentry/preprod/migrations/0001_emerge_upload_models.py index 286747858abc86..8f2482f8db4964 100644 --- a/src/sentry/preprod/migrations/0001_emerge_upload_models.py +++ b/src/sentry/preprod/migrations/0001_emerge_upload_models.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-28 16:49 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/preprod/migrations/0002_drop_sentry_jsonfield.py b/src/sentry/preprod/migrations/0002_drop_sentry_jsonfield.py index c327bf479be636..8dbd440809471b 100644 --- a/src/sentry/preprod/migrations/0002_drop_sentry_jsonfield.py +++ b/src/sentry/preprod/migrations/0002_drop_sentry_jsonfield.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-11 22:44 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/preprod/migrations/0003_drop_sentry_jsonfield_actual.py b/src/sentry/preprod/migrations/0003_drop_sentry_jsonfield_actual.py index 9a604f2f60fe21..2c50ee0d2b7f2a 100644 --- a/src/sentry/preprod/migrations/0003_drop_sentry_jsonfield_actual.py +++ b/src/sentry/preprod/migrations/0003_drop_sentry_jsonfield_actual.py @@ -1,3 +1,4 @@ +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/preprod/migrations/0004_add_django_jsonfield.py b/src/sentry/preprod/migrations/0004_add_django_jsonfield.py index 490c4d211f7af8..65b0b9698ac1da 100644 --- a/src/sentry/preprod/migrations/0004_add_django_jsonfield.py +++ b/src/sentry/preprod/migrations/0004_add_django_jsonfield.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-12 21:29 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/preprod/migrations/0005_add_git_commit.py b/src/sentry/preprod/migrations/0005_add_git_commit.py index 0dc846b5247537..75cbc97c7e9d2b 100644 --- a/src/sentry/preprod/migrations/0005_add_git_commit.py +++ b/src/sentry/preprod/migrations/0005_add_git_commit.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-16 20:52 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/preprod/migrations/0006_add_analysis_file_id_field.py b/src/sentry/preprod/migrations/0006_add_analysis_file_id_field.py index 7e9d0b53df9d7c..e66e8c23786fb2 100644 --- a/src/sentry/preprod/migrations/0006_add_analysis_file_id_field.py +++ b/src/sentry/preprod/migrations/0006_add_analysis_file_id_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-18 16:10 +from typing import int from django.db import migrations import sentry.db.models.fields.bounded diff --git a/src/sentry/preprod/migrations/0007_add_install_file.py b/src/sentry/preprod/migrations/0007_add_install_file.py index f961d1ef26c802..d288582a6f2661 100644 --- a/src/sentry/preprod/migrations/0007_add_install_file.py +++ b/src/sentry/preprod/migrations/0007_add_install_file.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-30 19:46 +from typing import int from django.db import migrations import sentry.db.models.fields.bounded diff --git a/src/sentry/preprod/migrations/0008_make_preprod_analysis_file_id_in_size_metrics_table.py b/src/sentry/preprod/migrations/0008_make_preprod_analysis_file_id_in_size_metrics_table.py index 28200285afd27f..721778ad350776 100644 --- a/src/sentry/preprod/migrations/0008_make_preprod_analysis_file_id_in_size_metrics_table.py +++ b/src/sentry/preprod/migrations/0008_make_preprod_analysis_file_id_in_size_metrics_table.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-30 20:25 +from typing import int from django.db import migrations import sentry.db.models.fields.bounded diff --git a/src/sentry/preprod/migrations/0009_drop_preprod_artifact_analysis_file_id_col.py b/src/sentry/preprod/migrations/0009_drop_preprod_artifact_analysis_file_id_col.py index a64ec23edd9500..7fe211dc74fde9 100644 --- a/src/sentry/preprod/migrations/0009_drop_preprod_artifact_analysis_file_id_col.py +++ b/src/sentry/preprod/migrations/0009_drop_preprod_artifact_analysis_file_id_col.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-30 20:48 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/preprod/migrations/0010_actual_drop_preprod_artifact_analysis_file_id_col.py b/src/sentry/preprod/migrations/0010_actual_drop_preprod_artifact_analysis_file_id_col.py index 765b1cbcfb14be..d68a5c0c48a00b 100644 --- a/src/sentry/preprod/migrations/0010_actual_drop_preprod_artifact_analysis_file_id_col.py +++ b/src/sentry/preprod/migrations/0010_actual_drop_preprod_artifact_analysis_file_id_col.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-30 20:48 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/preprod/migrations/0011_add_preprod_artifact_app_name_and_app_id_fields.py b/src/sentry/preprod/migrations/0011_add_preprod_artifact_app_name_and_app_id_fields.py index 80eb2798f6db0f..e5990354fd7978 100644 --- a/src/sentry/preprod/migrations/0011_add_preprod_artifact_app_name_and_app_id_fields.py +++ b/src/sentry/preprod/migrations/0011_add_preprod_artifact_app_name_and_app_id_fields.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-15 18:24 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/preprod/migrations/0012_installablepreprod.py b/src/sentry/preprod/migrations/0012_installablepreprod.py index af6165532d5523..ee6e2c9b9a0eef 100644 --- a/src/sentry/preprod/migrations/0012_installablepreprod.py +++ b/src/sentry/preprod/migrations/0012_installablepreprod.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-16 20:13 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/preprod/migrations/0013_binary_uuid.py b/src/sentry/preprod/migrations/0013_binary_uuid.py index 982f25dd484b21..d4a4a4d76a07c3 100644 --- a/src/sentry/preprod/migrations/0013_binary_uuid.py +++ b/src/sentry/preprod/migrations/0013_binary_uuid.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-25 14:16 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/preprod/migrations/0014_commitcomparisons_fk.py b/src/sentry/preprod/migrations/0014_commitcomparisons_fk.py index e10419ce5a5ab6..e1820a59db7ab7 100644 --- a/src/sentry/preprod/migrations/0014_commitcomparisons_fk.py +++ b/src/sentry/preprod/migrations/0014_commitcomparisons_fk.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-06 22:08 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/preprod/migrations/0015_add_preprod_artifact_size_metrics_identifier.py b/src/sentry/preprod/migrations/0015_add_preprod_artifact_size_metrics_identifier.py index 8290163c275e2c..9c0364e5585a15 100644 --- a/src/sentry/preprod/migrations/0015_add_preprod_artifact_size_metrics_identifier.py +++ b/src/sentry/preprod/migrations/0015_add_preprod_artifact_size_metrics_identifier.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-27 23:39 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/preprod/migrations/0016_add_preprod_artifact_size_comparison_table.py b/src/sentry/preprod/migrations/0016_add_preprod_artifact_size_comparison_table.py index 14a0c2cc3ed39b..2c55eb6350fcb9 100644 --- a/src/sentry/preprod/migrations/0016_add_preprod_artifact_size_comparison_table.py +++ b/src/sentry/preprod/migrations/0016_add_preprod_artifact_size_comparison_table.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-04 20:28 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/preprod/migrations/0017_break_commit_fks.py b/src/sentry/preprod/migrations/0017_break_commit_fks.py index ffef4eb8e760d0..92457f99fc5192 100644 --- a/src/sentry/preprod/migrations/0017_break_commit_fks.py +++ b/src/sentry/preprod/migrations/0017_break_commit_fks.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-10 21:50 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/preprod/migrations/0018_add_preprod_artifact_app_icon_id_field.py b/src/sentry/preprod/migrations/0018_add_preprod_artifact_app_icon_id_field.py index 9f8dbcd9f6567f..8160bc3fc60d1b 100644 --- a/src/sentry/preprod/migrations/0018_add_preprod_artifact_app_icon_id_field.py +++ b/src/sentry/preprod/migrations/0018_add_preprod_artifact_app_icon_id_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-10-23 22:57 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/preprod/models.py b/src/sentry/preprod/models.py index de172e278a9b89..f3850878dfb108 100644 --- a/src/sentry/preprod/models.py +++ b/src/sentry/preprod/models.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from enum import IntEnum diff --git a/src/sentry/preprod/producer.py b/src/sentry/preprod/producer.py index 4b3fdd496c632e..9dddb49b51c276 100644 --- a/src/sentry/preprod/producer.py +++ b/src/sentry/preprod/producer.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from enum import Enum diff --git a/src/sentry/preprod/pull_request/adapters.py b/src/sentry/preprod/pull_request/adapters.py index d97bea508d691b..402599a6b6380f 100644 --- a/src/sentry/preprod/pull_request/adapters.py +++ b/src/sentry/preprod/pull_request/adapters.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any, Literal +from typing import Any, Literal, int from dateutil.parser import parse as parse_datetime diff --git a/src/sentry/preprod/pull_request/comment_types.py b/src/sentry/preprod/pull_request/comment_types.py index 2f25508c46e271..a5a66d464d84c2 100644 --- a/src/sentry/preprod/pull_request/comment_types.py +++ b/src/sentry/preprod/pull_request/comment_types.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import datetime from enum import StrEnum diff --git a/src/sentry/preprod/pull_request/types.py b/src/sentry/preprod/pull_request/types.py index bfb9ce2d788c05..b2b3b2a981c816 100644 --- a/src/sentry/preprod/pull_request/types.py +++ b/src/sentry/preprod/pull_request/types.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import datetime from enum import StrEnum diff --git a/src/sentry/preprod/size_analysis/compare.py b/src/sentry/preprod/size_analysis/compare.py index afed78593f8db4..4d6a7f2d47cb47 100644 --- a/src/sentry/preprod/size_analysis/compare.py +++ b/src/sentry/preprod/size_analysis/compare.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/preprod/size_analysis/download.py b/src/sentry/preprod/size_analysis/download.py index c422397ce01e94..e16e6513b501ed 100644 --- a/src/sentry/preprod/size_analysis/download.py +++ b/src/sentry/preprod/size_analysis/download.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/preprod/size_analysis/models.py b/src/sentry/preprod/size_analysis/models.py index dc4f923fd7bde1..5ceb03e51acf1a 100644 --- a/src/sentry/preprod/size_analysis/models.py +++ b/src/sentry/preprod/size_analysis/models.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from enum import Enum diff --git a/src/sentry/preprod/size_analysis/tasks.py b/src/sentry/preprod/size_analysis/tasks.py index 7cad134cb3ee8a..c156325f1d8476 100644 --- a/src/sentry/preprod/size_analysis/tasks.py +++ b/src/sentry/preprod/size_analysis/tasks.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from io import BytesIO diff --git a/src/sentry/preprod/size_analysis/utils.py b/src/sentry/preprod/size_analysis/utils.py index 8789a90a2c7963..73404fe7a1c373 100644 --- a/src/sentry/preprod/size_analysis/utils.py +++ b/src/sentry/preprod/size_analysis/utils.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/preprod/tasks.py b/src/sentry/preprod/tasks.py index f80d71b2a49f9b..4fce7161e3c539 100644 --- a/src/sentry/preprod/tasks.py +++ b/src/sentry/preprod/tasks.py @@ -4,7 +4,7 @@ import logging import uuid from collections.abc import Callable -from typing import Any +from typing import int, Any import sentry_sdk from django.db import router, transaction diff --git a/src/sentry/preprod/url_utils.py b/src/sentry/preprod/url_utils.py index fdcd4bf7095600..7dc34f285d628f 100644 --- a/src/sentry/preprod/url_utils.py +++ b/src/sentry/preprod/url_utils.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.models.organization import Organization from sentry.preprod.models import PreprodArtifact diff --git a/src/sentry/preprod/utils.py b/src/sentry/preprod/utils.py index a8c8bfe3470cd7..e7353745219a5d 100644 --- a/src/sentry/preprod/utils.py +++ b/src/sentry/preprod/utils.py @@ -1,7 +1,7 @@ from __future__ import annotations import re -from typing import NamedTuple +from typing import int, NamedTuple class ParsedReleaseVersion(NamedTuple): diff --git a/src/sentry/preprod/vcs/status_checks/size/tasks.py b/src/sentry/preprod/vcs/status_checks/size/tasks.py index 3d62fab9112733..d49568ddffd9b0 100644 --- a/src/sentry/preprod/vcs/status_checks/size/tasks.py +++ b/src/sentry/preprod/vcs/status_checks/size/tasks.py @@ -3,7 +3,7 @@ import logging from abc import ABC, abstractmethod from datetime import datetime -from typing import Any +from typing import int, Any from sentry.constants import ObjectStatus from sentry.integrations.base import IntegrationInstallation diff --git a/src/sentry/preprod/vcs/status_checks/size/templates.py b/src/sentry/preprod/vcs/status_checks/size/templates.py index 3fffbf96114b06..669e59fda3a63b 100644 --- a/src/sentry/preprod/vcs/status_checks/size/templates.py +++ b/src/sentry/preprod/vcs/status_checks/size/templates.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.utils.translation import gettext_lazy as _ from django.utils.translation import ngettext diff --git a/src/sentry/prevent/endpoints/organization_github_repos.py b/src/sentry/prevent/endpoints/organization_github_repos.py index b54fd859312d9b..cbee1608c82d1c 100644 --- a/src/sentry/prevent/endpoints/organization_github_repos.py +++ b/src/sentry/prevent/endpoints/organization_github_repos.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections import defaultdict diff --git a/src/sentry/prevent/endpoints/pr_review_github_config.py b/src/sentry/prevent/endpoints/pr_review_github_config.py index 7e74c60ae3a2dc..828bd92c8c9d81 100644 --- a/src/sentry/prevent/endpoints/pr_review_github_config.py +++ b/src/sentry/prevent/endpoints/pr_review_github_config.py @@ -1,5 +1,5 @@ from copy import deepcopy -from typing import Any +from typing import int, Any from jsonschema import validate from rest_framework.request import Request diff --git a/src/sentry/prevent/migrations/0001_create_prevent_ai_configuration.py b/src/sentry/prevent/migrations/0001_create_prevent_ai_configuration.py index 7f6d97a97f0c7d..1bf9332324d3bf 100644 --- a/src/sentry/prevent/migrations/0001_create_prevent_ai_configuration.py +++ b/src/sentry/prevent/migrations/0001_create_prevent_ai_configuration.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-10-24 18:52 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/prevent/migrations/0002_alter_integration_id_not_null.py b/src/sentry/prevent/migrations/0002_alter_integration_id_not_null.py index e556610e6a4eff..eec6ced3d36c67 100644 --- a/src/sentry/prevent/migrations/0002_alter_integration_id_not_null.py +++ b/src/sentry/prevent/migrations/0002_alter_integration_id_not_null.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-10-30 21:42 +from typing import int from django.db import migrations import sentry.db.models.fields.hybrid_cloud_foreign_key diff --git a/src/sentry/prevent/models.py b/src/sentry/prevent/models.py index 2d305ba78c59be..663511088061a7 100644 --- a/src/sentry/prevent/models.py +++ b/src/sentry/prevent/models.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import models diff --git a/src/sentry/prevent/types/config.py b/src/sentry/prevent/types/config.py index 0416e896839f0a..c3cb6c23a7a7e8 100644 --- a/src/sentry/prevent/types/config.py +++ b/src/sentry/prevent/types/config.py @@ -1,3 +1,4 @@ +from typing import int _TRIGGER_SCHEMA = { "type": "object", "properties": { diff --git a/src/sentry/processing/backpressure/arroyo.py b/src/sentry/processing/backpressure/arroyo.py index 29ae241f78c632..27e4340ebf2963 100644 --- a/src/sentry/processing/backpressure/arroyo.py +++ b/src/sentry/processing/backpressure/arroyo.py @@ -1,7 +1,7 @@ from __future__ import annotations import time -from typing import TypeVar +from typing import int, TypeVar from arroyo.processing.strategies import MessageRejected, ProcessingStrategy, RunTask from arroyo.types import FilteredPayload, Message diff --git a/src/sentry/processing/backpressure/health.py b/src/sentry/processing/backpressure/health.py index a19660961d5dc3..64d81602aea365 100644 --- a/src/sentry/processing/backpressure/health.py +++ b/src/sentry/processing/backpressure/health.py @@ -1,6 +1,6 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/processing/backpressure/memory.py b/src/sentry/processing/backpressure/memory.py index 7e886c0f901e6c..c6bd41547c3a67 100644 --- a/src/sentry/processing/backpressure/memory.py +++ b/src/sentry/processing/backpressure/memory.py @@ -1,6 +1,6 @@ from collections.abc import Generator, Mapping from dataclasses import dataclass -from typing import Any, Union +from typing import Any, Union, int import rb from redis import StrictRedis diff --git a/src/sentry/processing/backpressure/monitor.py b/src/sentry/processing/backpressure/monitor.py index 2248664f958f00..225a5a84e6a20e 100644 --- a/src/sentry/processing/backpressure/monitor.py +++ b/src/sentry/processing/backpressure/monitor.py @@ -2,7 +2,7 @@ import time from collections.abc import Generator, Mapping, MutableMapping from dataclasses import dataclass -from typing import Union +from typing import int, Union import sentry_sdk from django.conf import settings diff --git a/src/sentry/processing/backpressure/topology.py b/src/sentry/processing/backpressure/topology.py index 846bf4a3563577..2fbfba21162de8 100644 --- a/src/sentry/processing/backpressure/topology.py +++ b/src/sentry/processing/backpressure/topology.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum """ diff --git a/src/sentry/profiles/consumers/process/factory.py b/src/sentry/profiles/consumers/process/factory.py index 53aef80e949615..428fd699a0b0af 100644 --- a/src/sentry/profiles/consumers/process/factory.py +++ b/src/sentry/profiles/consumers/process/factory.py @@ -1,3 +1,4 @@ +from typing import int from base64 import b64encode from collections.abc import Iterable, Mapping diff --git a/src/sentry/profiles/data_export.py b/src/sentry/profiles/data_export.py index 07a5cacd88b532..0a9e8c07abd5bd 100644 --- a/src/sentry/profiles/data_export.py +++ b/src/sentry/profiles/data_export.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import timedelta diff --git a/src/sentry/profiles/flamegraph.py b/src/sentry/profiles/flamegraph.py index 483b7f36df3ff6..f4d686e382d584 100644 --- a/src/sentry/profiles/flamegraph.py +++ b/src/sentry/profiles/flamegraph.py @@ -2,7 +2,7 @@ from collections.abc import Iterator, Mapping from dataclasses import dataclass from datetime import datetime, timedelta -from typing import Any, Literal, NotRequired, TypedDict +from typing import Any, Literal, NotRequired, TypedDict, int from rest_framework.request import Request as HttpRequest from snuba_sdk import ( diff --git a/src/sentry/profiles/java.py b/src/sentry/profiles/java.py index 972e4facf90e74..544fa86acecf4b 100644 --- a/src/sentry/profiles/java.py +++ b/src/sentry/profiles/java.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from symbolic.proguard import ProguardMapper diff --git a/src/sentry/profiles/profile_chunks.py b/src/sentry/profiles/profile_chunks.py index b43f3068457eba..36949655d56602 100644 --- a/src/sentry/profiles/profile_chunks.py +++ b/src/sentry/profiles/profile_chunks.py @@ -1,3 +1,4 @@ +from typing import int from snuba_sdk import Column, Condition, Direction, Op, OrderBy, Query, Request, Storage from sentry import options diff --git a/src/sentry/profiles/task.py b/src/sentry/profiles/task.py index 2006c6066dfbdf..595bc10d197b99 100644 --- a/src/sentry/profiles/task.py +++ b/src/sentry/profiles/task.py @@ -9,7 +9,7 @@ from datetime import datetime, timezone from operator import itemgetter from time import time -from typing import Any, TypedDict +from typing import Any, TypedDict, int from uuid import UUID import msgpack diff --git a/src/sentry/profiles/utils.py b/src/sentry/profiles/utils.py index 41ac7f51be2fff..1d2280f2656a40 100644 --- a/src/sentry/profiles/utils.py +++ b/src/sentry/profiles/utils.py @@ -1,7 +1,7 @@ from collections.abc import Mapping, MutableMapping from datetime import datetime from types import TracebackType -from typing import Any, Self +from typing import Any, Self, int from urllib.parse import urlencode, urlparse import brotli diff --git a/src/sentry/projectoptions/__init__.py b/src/sentry/projectoptions/__init__.py index 688a81bcc95768..926820f925c9f4 100644 --- a/src/sentry/projectoptions/__init__.py +++ b/src/sentry/projectoptions/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .manager import ProjectOptionsManager __all__ = ("get", "set", "delete", "register", "isset", "LATEST_EPOCH") diff --git a/src/sentry/projectoptions/defaults.py b/src/sentry/projectoptions/defaults.py index 7752127b27e647..2d319a6109ceac 100644 --- a/src/sentry/projectoptions/defaults.py +++ b/src/sentry/projectoptions/defaults.py @@ -1,3 +1,4 @@ +from typing import int from sentry.conf.server import DEFAULT_GROUPING_CONFIG from sentry.constants import TARGET_SAMPLE_RATE_DEFAULT from sentry.projectoptions import register diff --git a/src/sentry/projectoptions/manager.py b/src/sentry/projectoptions/manager.py index af5b3e572722ec..dd7a2f20958810 100644 --- a/src/sentry/projectoptions/manager.py +++ b/src/sentry/projectoptions/manager.py @@ -1,3 +1,4 @@ +from typing import int import bisect diff --git a/src/sentry/projects/project_rules/creator.py b/src/sentry/projects/project_rules/creator.py index d3bcb2ce2df251..6c400e9620d351 100644 --- a/src/sentry/projects/project_rules/creator.py +++ b/src/sentry/projects/project_rules/creator.py @@ -1,7 +1,7 @@ import logging from collections.abc import Sequence from dataclasses import dataclass -from typing import Any +from typing import int, Any from django.db import router, transaction from rest_framework.request import Request diff --git a/src/sentry/projects/project_rules/updater.py b/src/sentry/projects/project_rules/updater.py index 01ee4d99f9e50a..e7fc2609a57995 100644 --- a/src/sentry/projects/project_rules/updater.py +++ b/src/sentry/projects/project_rules/updater.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Sequence diff --git a/src/sentry/projects/services/project/__init__.py b/src/sentry/projects/services/project/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/projects/services/project/__init__.py +++ b/src/sentry/projects/services/project/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/projects/services/project/impl.py b/src/sentry/projects/services/project/impl.py index 7d12c14cb86ab1..c4f82de9a10bbf 100644 --- a/src/sentry/projects/services/project/impl.py +++ b/src/sentry/projects/services/project/impl.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import router, transaction diff --git a/src/sentry/projects/services/project/model.py b/src/sentry/projects/services/project/model.py index b6e20ccaaf0ded..b358058d85f735 100644 --- a/src/sentry/projects/services/project/model.py +++ b/src/sentry/projects/services/project/model.py @@ -5,7 +5,7 @@ from collections.abc import Callable from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int from pydantic.fields import Field diff --git a/src/sentry/projects/services/project/serial.py b/src/sentry/projects/services/project/serial.py index 284b7c304229af..b58ebdb3d27144 100644 --- a/src/sentry/projects/services/project/serial.py +++ b/src/sentry/projects/services/project/serial.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from rest_framework import serializers diff --git a/src/sentry/projects/services/project/service.py b/src/sentry/projects/services/project/service.py index 3e4f81a7d9d1e7..22cb42b95ac682 100644 --- a/src/sentry/projects/services/project/service.py +++ b/src/sentry/projects/services/project/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from abc import abstractmethod from sentry.auth.services.auth import AuthenticationContext diff --git a/src/sentry/projects/services/project_key/__init__.py b/src/sentry/projects/services/project_key/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/projects/services/project_key/__init__.py +++ b/src/sentry/projects/services/project_key/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/projects/services/project_key/impl.py b/src/sentry/projects/services/project_key/impl.py index 633d819959f86f..bdc61a144171bd 100644 --- a/src/sentry/projects/services/project_key/impl.py +++ b/src/sentry/projects/services/project_key/impl.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import F from sentry.models.projectkey import ProjectKey, ProjectKeyStatus, UseCase diff --git a/src/sentry/projects/services/project_key/model.py b/src/sentry/projects/services/project_key/model.py index 66722bca6d4dc0..839f97931c6c1f 100644 --- a/src/sentry/projects/services/project_key/model.py +++ b/src/sentry/projects/services/project_key/model.py @@ -4,7 +4,7 @@ # defined, because we want to reflect on type annotations and avoid forward references. from enum import Enum -from typing import Any +from typing import int, Any from sentry.hybridcloud.rpc import RpcModel from sentry.models.projectkey import ProjectKeyStatus diff --git a/src/sentry/projects/services/project_key/serial.py b/src/sentry/projects/services/project_key/serial.py index ad0e43d7505c2b..423d7e6b598b8d 100644 --- a/src/sentry/projects/services/project_key/serial.py +++ b/src/sentry/projects/services/project_key/serial.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.projectkey import ProjectKey from sentry.projects.services.project_key import RpcProjectKey diff --git a/src/sentry/projects/services/project_key/service.py b/src/sentry/projects/services/project_key/service.py index e60f76b6e39cdf..0baa3e5e1214c1 100644 --- a/src/sentry/projects/services/project_key/service.py +++ b/src/sentry/projects/services/project_key/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from abc import abstractmethod from sentry.hybridcloud.rpc.resolvers import ByOrganizationId, ByRegionName diff --git a/src/sentry/quotas/__init__.py b/src/sentry/quotas/__init__.py index 14f394f28c59fc..f2749f7bc8111c 100644 --- a/src/sentry/quotas/__init__.py +++ b/src/sentry/quotas/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/quotas/base.py b/src/sentry/quotas/base.py index d493eede4d4e3b..780d2d35c5b480 100644 --- a/src/sentry/quotas/base.py +++ b/src/sentry/quotas/base.py @@ -3,7 +3,7 @@ from collections.abc import Iterable, Mapping, Sequence from dataclasses import dataclass from enum import IntEnum, unique -from typing import TYPE_CHECKING, Any, Literal +from typing import TYPE_CHECKING, Any, Literal, int from django.core.cache import cache diff --git a/src/sentry/quotas/redis.py b/src/sentry/quotas/redis.py index 1b4f06eb95b12b..e811368950d60e 100644 --- a/src/sentry/quotas/redis.py +++ b/src/sentry/quotas/redis.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Iterable from time import time diff --git a/src/sentry/quotas/types.py b/src/sentry/quotas/types.py index 90d35079f020a6..7e34dbea35d42a 100644 --- a/src/sentry/quotas/types.py +++ b/src/sentry/quotas/types.py @@ -1,4 +1,4 @@ -from typing import TypeAlias, Union +from typing import TypeAlias, Union, int from sentry.monitors.models import Monitor from sentry.workflow_engine.models import Detector diff --git a/src/sentry/ratelimits/__init__.py b/src/sentry/ratelimits/__init__.py index f1e044ba757def..26b5e025df6807 100644 --- a/src/sentry/ratelimits/__init__.py +++ b/src/sentry/ratelimits/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/ratelimits/base.py b/src/sentry/ratelimits/base.py index b43b296d7a3625..847b3b98e80fb5 100644 --- a/src/sentry/ratelimits/base.py +++ b/src/sentry/ratelimits/base.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.utils.services import Service diff --git a/src/sentry/ratelimits/cardinality.py b/src/sentry/ratelimits/cardinality.py index 8a508a3800ba68..c001669c871f93 100644 --- a/src/sentry/ratelimits/cardinality.py +++ b/src/sentry/ratelimits/cardinality.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping, Sequence from sentry_redis_tools.cardinality_limiter import CardinalityLimiter as CardinalityLimiterBase diff --git a/src/sentry/ratelimits/concurrent.py b/src/sentry/ratelimits/concurrent.py index 2275c6268c57f3..e12ba7a3946b47 100644 --- a/src/sentry/ratelimits/concurrent.py +++ b/src/sentry/ratelimits/concurrent.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from dataclasses import dataclass diff --git a/src/sentry/ratelimits/config.py b/src/sentry/ratelimits/config.py index 907a62a01a32da..ed7b232e30fc11 100644 --- a/src/sentry/ratelimits/config.py +++ b/src/sentry/ratelimits/config.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Mapping diff --git a/src/sentry/ratelimits/leaky_bucket.py b/src/sentry/ratelimits/leaky_bucket.py index af9b288fb194ad..55e93b8eae238a 100644 --- a/src/sentry/ratelimits/leaky_bucket.py +++ b/src/sentry/ratelimits/leaky_bucket.py @@ -5,7 +5,7 @@ from collections.abc import Callable from dataclasses import dataclass from time import time -from typing import Any, ParamSpec, TypeVar +from typing import Any, ParamSpec, TypeVar, int from django.conf import settings diff --git a/src/sentry/ratelimits/redis.py b/src/sentry/ratelimits/redis.py index 62238969ae7557..7a1f2539847dc1 100644 --- a/src/sentry/ratelimits/redis.py +++ b/src/sentry/ratelimits/redis.py @@ -2,7 +2,7 @@ import logging from time import time -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.conf import settings from redis.exceptions import RedisError diff --git a/src/sentry/ratelimits/sliding_windows.py b/src/sentry/ratelimits/sliding_windows.py index 7a79eff5f7403b..f086333bec399a 100644 --- a/src/sentry/ratelimits/sliding_windows.py +++ b/src/sentry/ratelimits/sliding_windows.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Sequence -from typing import Any +from typing import int, Any from sentry_redis_tools.clients import RedisCluster, StrictRedis from sentry_redis_tools.sliding_windows_rate_limiter import GrantedQuota, Quota diff --git a/src/sentry/ratelimits/utils.py b/src/sentry/ratelimits/utils.py index cbda7fd372a732..923e9d7e9c6c2f 100644 --- a/src/sentry/ratelimits/utils.py +++ b/src/sentry/ratelimits/utils.py @@ -2,7 +2,7 @@ import logging from collections.abc import Callable, Mapping -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.conf import settings from django.http.request import HttpRequest diff --git a/src/sentry/receivers/__init__.py b/src/sentry/receivers/__init__.py index 0aa6c2be90d0c6..17ec98b2f374cd 100644 --- a/src/sentry/receivers/__init__.py +++ b/src/sentry/receivers/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .analytics import * # noqa: F401,F403 from .auth import * # noqa: F401,F403 from .core import * # noqa: F401,F403 diff --git a/src/sentry/receivers/analytics.py b/src/sentry/receivers/analytics.py index 988634680d93f4..047f4d0ecb4d9b 100644 --- a/src/sentry/receivers/analytics.py +++ b/src/sentry/receivers/analytics.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models.signals import post_save from sentry import analytics diff --git a/src/sentry/receivers/auth.py b/src/sentry/receivers/auth.py index ee0c59594f301d..6e79cb3c9b676c 100644 --- a/src/sentry/receivers/auth.py +++ b/src/sentry/receivers/auth.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.contrib.auth.models import update_last_login diff --git a/src/sentry/receivers/core.py b/src/sentry/receivers/core.py index 95a70944c95835..6065f6fa649699 100644 --- a/src/sentry/receivers/core.py +++ b/src/sentry/receivers/core.py @@ -1,3 +1,4 @@ +from typing import int import os from click import echo diff --git a/src/sentry/receivers/data_forwarding.py b/src/sentry/receivers/data_forwarding.py index f5c4a1573a3e8e..66632b56d0fdcd 100644 --- a/src/sentry/receivers/data_forwarding.py +++ b/src/sentry/receivers/data_forwarding.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from sentry.integrations.models.data_forwarder import DataForwarder diff --git a/src/sentry/receivers/email.py b/src/sentry/receivers/email.py index f074a9889a69e5..9164685ef49faa 100644 --- a/src/sentry/receivers/email.py +++ b/src/sentry/receivers/email.py @@ -1,3 +1,4 @@ +from typing import int from django.db import IntegrityError, router, transaction from django.db.models.signals import post_delete, post_save diff --git a/src/sentry/receivers/experiments.py b/src/sentry/receivers/experiments.py index 28c0e115c983b0..721eb0429cc8a0 100644 --- a/src/sentry/receivers/experiments.py +++ b/src/sentry/receivers/experiments.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from sentry import analytics diff --git a/src/sentry/receivers/features.py b/src/sentry/receivers/features.py index 0f596c2cd5f29c..8d73fd8412b004 100644 --- a/src/sentry/receivers/features.py +++ b/src/sentry/receivers/features.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import sentry_sdk from django.db.models.signals import post_save diff --git a/src/sentry/receivers/onboarding.py b/src/sentry/receivers/onboarding.py index f7cbd4b7da94f7..dd2f4761935656 100644 --- a/src/sentry/receivers/onboarding.py +++ b/src/sentry/receivers/onboarding.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from datetime import datetime, timezone diff --git a/src/sentry/receivers/outbox/__init__.py b/src/sentry/receivers/outbox/__init__.py index 2952dbd6e6cbe7..b3a6c528e4c51a 100644 --- a/src/sentry/receivers/outbox/__init__.py +++ b/src/sentry/receivers/outbox/__init__.py @@ -50,7 +50,7 @@ from __future__ import annotations -from typing import TypeVar +from typing import int, TypeVar from sentry.db.models import Model from sentry.hybridcloud.services.tombstone import ( diff --git a/src/sentry/receivers/outbox/control.py b/src/sentry/receivers/outbox/control.py index 3f90cb1d715195..e880e58da16bd2 100644 --- a/src/sentry/receivers/outbox/control.py +++ b/src/sentry/receivers/outbox/control.py @@ -10,7 +10,7 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any from django.dispatch import receiver diff --git a/src/sentry/receivers/outbox/region.py b/src/sentry/receivers/outbox/region.py index 3efcb47a9fe04e..b2954f112aea1a 100644 --- a/src/sentry/receivers/outbox/region.py +++ b/src/sentry/receivers/outbox/region.py @@ -9,7 +9,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from django.dispatch import receiver diff --git a/src/sentry/receivers/owners.py b/src/sentry/receivers/owners.py index 2490e82466798e..7f85dc01a1af36 100644 --- a/src/sentry/receivers/owners.py +++ b/src/sentry/receivers/owners.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models.signals import pre_save from rest_framework.serializers import ValidationError diff --git a/src/sentry/receivers/project_detectors.py b/src/sentry/receivers/project_detectors.py index 8a43a8424cdfc5..f5ed7b0b0dee11 100644 --- a/src/sentry/receivers/project_detectors.py +++ b/src/sentry/receivers/project_detectors.py @@ -1,3 +1,4 @@ +from typing import int import logging from contextlib import contextmanager diff --git a/src/sentry/receivers/releases.py b/src/sentry/receivers/releases.py index 7215fcd306a2a6..f1e9ef21b8994c 100644 --- a/src/sentry/receivers/releases.py +++ b/src/sentry/receivers/releases.py @@ -1,3 +1,4 @@ +from typing import int from django.core.exceptions import ValidationError from django.db import IntegrityError, router, transaction from django.db.models import F diff --git a/src/sentry/receivers/rule_snooze.py b/src/sentry/receivers/rule_snooze.py index b48515f8fa5029..0bf88751df9e35 100644 --- a/src/sentry/receivers/rule_snooze.py +++ b/src/sentry/receivers/rule_snooze.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models.signals import post_save, pre_delete from sentry.models.rulesnooze import RuleSnooze diff --git a/src/sentry/receivers/rules.py b/src/sentry/receivers/rules.py index b9699cb29c940f..d537eb2b79459b 100644 --- a/src/sentry/receivers/rules.py +++ b/src/sentry/receivers/rules.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db import router, transaction diff --git a/src/sentry/receivers/sentry_apps.py b/src/sentry/receivers/sentry_apps.py index 19d463b3d9b9fa..8e1368b419ee1e 100644 --- a/src/sentry/receivers/sentry_apps.py +++ b/src/sentry/receivers/sentry_apps.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.hybridcloud.rpc import coerce_id_from from sentry.models.group import Group diff --git a/src/sentry/receivers/staff.py b/src/sentry/receivers/staff.py index 42e4532f8e5a77..31506335d11faa 100644 --- a/src/sentry/receivers/staff.py +++ b/src/sentry/receivers/staff.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.auth.signals import user_logged_out diff --git a/src/sentry/receivers/stats.py b/src/sentry/receivers/stats.py index 541e4990dc2f3f..8cac3a5f167dc7 100644 --- a/src/sentry/receivers/stats.py +++ b/src/sentry/receivers/stats.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models.signals import post_save from sentry.utils import metrics diff --git a/src/sentry/receivers/superuser.py b/src/sentry/receivers/superuser.py index c63281e2984c2b..47a831d4c9bb6d 100644 --- a/src/sentry/receivers/superuser.py +++ b/src/sentry/receivers/superuser.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.contrib.auth.signals import user_logged_in, user_logged_out diff --git a/src/sentry/receivers/tokens.py b/src/sentry/receivers/tokens.py index 3e84176b43427a..558d497424c058 100644 --- a/src/sentry/receivers/tokens.py +++ b/src/sentry/receivers/tokens.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models.signals import pre_save from django.dispatch import receiver diff --git a/src/sentry/receivers/useremail.py b/src/sentry/receivers/useremail.py index 0ca3e030bcd475..cc554550020c2e 100644 --- a/src/sentry/receivers/useremail.py +++ b/src/sentry/receivers/useremail.py @@ -1,3 +1,4 @@ +from typing import int from django.db import IntegrityError from django.db.models.signals import post_save diff --git a/src/sentry/receivers/users.py b/src/sentry/receivers/users.py index e6cdebb00e11c1..c0904fcc3e526c 100644 --- a/src/sentry/receivers/users.py +++ b/src/sentry/receivers/users.py @@ -1,3 +1,4 @@ +from typing import int import sys from sentry.signals import post_upgrade diff --git a/src/sentry/relay/config/__init__.py b/src/sentry/relay/config/__init__.py index 0dc3b3334f092a..9a641fff328770 100644 --- a/src/sentry/relay/config/__init__.py +++ b/src/sentry/relay/config/__init__.py @@ -4,7 +4,7 @@ import uuid from collections.abc import Iterable, Mapping, MutableMapping, Sequence from datetime import datetime, timezone -from typing import Any, Literal, NotRequired, TypedDict +from typing import Any, Literal, NotRequired, TypedDict, int import sentry_sdk from sentry_sdk import capture_exception diff --git a/src/sentry/relay/config/ai_model_costs.py b/src/sentry/relay/config/ai_model_costs.py index 14e14aaa567df4..672c97068f4093 100644 --- a/src/sentry/relay/config/ai_model_costs.py +++ b/src/sentry/relay/config/ai_model_costs.py @@ -1,5 +1,5 @@ import logging -from typing import Required, TypedDict +from typing import Required, TypedDict, int from django.conf import settings diff --git a/src/sentry/relay/config/ai_operation_type_map.py b/src/sentry/relay/config/ai_operation_type_map.py index ee8c065efd5b67..d09f159139566e 100644 --- a/src/sentry/relay/config/ai_operation_type_map.py +++ b/src/sentry/relay/config/ai_operation_type_map.py @@ -1,4 +1,4 @@ -from typing import Literal, Required, TypedDict +from typing import Literal, Required, TypedDict, int AI_OPERATION_TYPE_VALUE = Literal["agent", "ai_client", "tool", "handoff"] diff --git a/src/sentry/relay/config/experimental.py b/src/sentry/relay/config/experimental.py index a9473d4f6e264d..2d7ca19da5f694 100644 --- a/src/sentry/relay/config/experimental.py +++ b/src/sentry/relay/config/experimental.py @@ -1,7 +1,7 @@ import logging from collections.abc import Callable, MutableMapping from datetime import datetime, timedelta, timezone -from typing import Any, Concatenate, ParamSpec, Protocol, TypeVar +from typing import Any, Concatenate, ParamSpec, Protocol, TypeVar, int import sentry_sdk diff --git a/src/sentry/relay/config/measurements.py b/src/sentry/relay/config/measurements.py index f7745e9e3e6c81..e6f090405cf71a 100644 --- a/src/sentry/relay/config/measurements.py +++ b/src/sentry/relay/config/measurements.py @@ -1,7 +1,7 @@ """Relay configuration related to transaction measurements.""" from collections.abc import Sequence -from typing import Literal, TypedDict +from typing import Literal, TypedDict, int #: The maximum number of custom measurements to be extracted from transactions. CUSTOM_MEASUREMENT_LIMIT = 10 diff --git a/src/sentry/relay/config/metric_extraction.py b/src/sentry/relay/config/metric_extraction.py index 770ca32f13c02b..6ba27f447060b9 100644 --- a/src/sentry/relay/config/metric_extraction.py +++ b/src/sentry/relay/config/metric_extraction.py @@ -4,7 +4,7 @@ from collections.abc import Sequence from dataclasses import dataclass from datetime import timedelta -from typing import Any, Literal, NotRequired, TypedDict +from typing import Any, Literal, NotRequired, TypedDict, int import sentry_sdk from django.utils import timezone diff --git a/src/sentry/relay/datascrubbing.py b/src/sentry/relay/datascrubbing.py index 971fb633689254..c1c54fbd6af204 100644 --- a/src/sentry/relay/datascrubbing.py +++ b/src/sentry/relay/datascrubbing.py @@ -2,7 +2,7 @@ import copy from collections.abc import MutableMapping -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int import orjson import sentry_sdk diff --git a/src/sentry/relay/globalconfig.py b/src/sentry/relay/globalconfig.py index f18164e4564f5a..65a811ce228bf4 100644 --- a/src/sentry/relay/globalconfig.py +++ b/src/sentry/relay/globalconfig.py @@ -1,4 +1,4 @@ -from typing import Any, TypedDict +from typing import Any, TypedDict, int import sentry.options from sentry.relay.config.ai_model_costs import AIModelCosts, ai_model_costs_config diff --git a/src/sentry/relay/projectconfig_cache/__init__.py b/src/sentry/relay/projectconfig_cache/__init__.py index d2f3a690618ee2..1adb66546ad824 100644 --- a/src/sentry/relay/projectconfig_cache/__init__.py +++ b/src/sentry/relay/projectconfig_cache/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/relay/projectconfig_cache/base.py b/src/sentry/relay/projectconfig_cache/base.py index 56b47b9ce854f9..b0001354a8094a 100644 --- a/src/sentry/relay/projectconfig_cache/base.py +++ b/src/sentry/relay/projectconfig_cache/base.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.services import Service diff --git a/src/sentry/relay/projectconfig_cache/redis.py b/src/sentry/relay/projectconfig_cache/redis.py index 102a2a24ac3867..9a2fe749214418 100644 --- a/src/sentry/relay/projectconfig_cache/redis.py +++ b/src/sentry/relay/projectconfig_cache/redis.py @@ -1,6 +1,6 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any import zstandard diff --git a/src/sentry/relay/projectconfig_debounce_cache/__init__.py b/src/sentry/relay/projectconfig_debounce_cache/__init__.py index 3220a919351d2b..74dbca7091a024 100644 --- a/src/sentry/relay/projectconfig_debounce_cache/__init__.py +++ b/src/sentry/relay/projectconfig_debounce_cache/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/relay/projectconfig_debounce_cache/base.py b/src/sentry/relay/projectconfig_debounce_cache/base.py index d2b143d6ef0916..72751ef6ed5d69 100644 --- a/src/sentry/relay/projectconfig_debounce_cache/base.py +++ b/src/sentry/relay/projectconfig_debounce_cache/base.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.services import Service diff --git a/src/sentry/relay/projectconfig_debounce_cache/redis.py b/src/sentry/relay/projectconfig_debounce_cache/redis.py index 05a6bdce546605..8fdbe0f9a950eb 100644 --- a/src/sentry/relay/projectconfig_debounce_cache/redis.py +++ b/src/sentry/relay/projectconfig_debounce_cache/redis.py @@ -1,3 +1,4 @@ +from typing import int import rb from rediscluster import RedisCluster diff --git a/src/sentry/relay/types/__init__.py b/src/sentry/relay/types/__init__.py index c238e3be8d2f6e..97f46b83e9cf00 100644 --- a/src/sentry/relay/types/__init__.py +++ b/src/sentry/relay/types/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .generic_filters import GenericFilter, GenericFiltersConfig from .rule_condition import RuleCondition diff --git a/src/sentry/relay/types/generic_filters.py b/src/sentry/relay/types/generic_filters.py index ed5fd9b162c5ed..980ff0a89cdbdc 100644 --- a/src/sentry/relay/types/generic_filters.py +++ b/src/sentry/relay/types/generic_filters.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import TypedDict +from typing import int, TypedDict from .rule_condition import RuleCondition diff --git a/src/sentry/relay/types/rule_condition.py b/src/sentry/relay/types/rule_condition.py index bb6181adc09b4f..2df95272d40af0 100644 --- a/src/sentry/relay/types/rule_condition.py +++ b/src/sentry/relay/types/rule_condition.py @@ -8,7 +8,7 @@ This file provides Python type hints that correspond to the Rust types used in Relay. """ -from typing import Literal, NotRequired, TypedDict, Union +from typing import Literal, NotRequired, TypedDict, Union, int # A value that can be matched against Value = str | float | int | list[str] | list[float] | list[int] diff --git a/src/sentry/relay/utils.py b/src/sentry/relay/utils.py index 801e26c45a2fb6..aca9f8a2f3106d 100644 --- a/src/sentry/relay/utils.py +++ b/src/sentry/relay/utils.py @@ -1,3 +1,4 @@ +from typing import int import uuid diff --git a/src/sentry/release_health/__init__.py b/src/sentry/release_health/__init__.py index 43f224ab999066..0e50e8b92fd7de 100644 --- a/src/sentry/release_health/__init__.py +++ b/src/sentry/release_health/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.services import LazyServiceWrapper from .base import ReleaseHealthBackend diff --git a/src/sentry/release_health/base.py b/src/sentry/release_health/base.py index e94b10f54bdc49..4689292543b965 100644 --- a/src/sentry/release_health/base.py +++ b/src/sentry/release_health/base.py @@ -4,7 +4,7 @@ from dataclasses import dataclass from datetime import datetime from enum import Enum -from typing import TYPE_CHECKING, Any, Literal, TypedDict, TypeIs, TypeVar, Union +from typing import TYPE_CHECKING, Any, Literal, TypedDict, TypeIs, TypeVar, Union, int from sentry.utils.services import Service diff --git a/src/sentry/release_health/metrics.py b/src/sentry/release_health/metrics.py index d581edd335ae87..d1010400dea0eb 100644 --- a/src/sentry/release_health/metrics.py +++ b/src/sentry/release_health/metrics.py @@ -2,7 +2,7 @@ from collections import defaultdict from collections.abc import Callable, Collection, Iterable, Mapping, Sequence from datetime import datetime, timedelta, timezone -from typing import Any, Literal, TypeVar +from typing import Any, Literal, TypeVar, int from snuba_sdk import Column, Condition, Direction, Op from snuba_sdk.expressions import Granularity, Limit, Offset diff --git a/src/sentry/release_health/metrics_sessions_v2.py b/src/sentry/release_health/metrics_sessions_v2.py index cb27034c51ab58..9d22a42b3c53c7 100644 --- a/src/sentry/release_health/metrics_sessions_v2.py +++ b/src/sentry/release_health/metrics_sessions_v2.py @@ -10,7 +10,7 @@ from copy import deepcopy from dataclasses import dataclass, replace from enum import Enum -from typing import Any, Literal, Optional, TypedDict, Union, cast +from typing import Any, Literal, Optional, TypedDict, Union, cast, int from snuba_sdk import ( BooleanCondition, diff --git a/src/sentry/release_health/release_monitor/__init__.py b/src/sentry/release_health/release_monitor/__init__.py index b2a0a9b2104635..560934edd7e982 100644 --- a/src/sentry/release_health/release_monitor/__init__.py +++ b/src/sentry/release_health/release_monitor/__init__.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/release_health/release_monitor/base.py b/src/sentry/release_health/release_monitor/base.py index bf2d01eb9ce57f..e65683a96f5cc8 100644 --- a/src/sentry/release_health/release_monitor/base.py +++ b/src/sentry/release_health/release_monitor/base.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, Sequence -from typing import TypedDict +from typing import int, TypedDict from sentry.utils.services import Service diff --git a/src/sentry/release_health/release_monitor/metrics.py b/src/sentry/release_health/release_monitor/metrics.py index 7d387cf21ff662..86137bc31d0c60 100644 --- a/src/sentry/release_health/release_monitor/metrics.py +++ b/src/sentry/release_health/release_monitor/metrics.py @@ -1,3 +1,4 @@ +from typing import int import logging import time from collections import defaultdict diff --git a/src/sentry/release_health/tasks.py b/src/sentry/release_health/tasks.py index 44dfa0cf08acd0..5b076e69adfb2a 100644 --- a/src/sentry/release_health/tasks.py +++ b/src/sentry/release_health/tasks.py @@ -2,7 +2,7 @@ import random from collections.abc import Sequence from datetime import datetime, timedelta -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.core.exceptions import ValidationError from django.db import IntegrityError diff --git a/src/sentry/releases/endpoints/organization_release_assemble.py b/src/sentry/releases/endpoints/organization_release_assemble.py index 982ac1818e6204..3f058a193297ed 100644 --- a/src/sentry/releases/endpoints/organization_release_assemble.py +++ b/src/sentry/releases/endpoints/organization_release_assemble.py @@ -1,3 +1,4 @@ +from typing import int import jsonschema import orjson from rest_framework.request import Request diff --git a/src/sentry/releases/endpoints/organization_release_commits.py b/src/sentry/releases/endpoints/organization_release_commits.py index fc93f9b5dc6353..9dd1d67be1d88b 100644 --- a/src/sentry/releases/endpoints/organization_release_commits.py +++ b/src/sentry/releases/endpoints/organization_release_commits.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/releases/endpoints/organization_release_details.py b/src/sentry/releases/endpoints/organization_release_details.py index bd3ec509ca27cb..9c5a6242818ebb 100644 --- a/src/sentry/releases/endpoints/organization_release_details.py +++ b/src/sentry/releases/endpoints/organization_release_details.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from django.db.models import Q from drf_spectacular.utils import extend_schema, extend_schema_serializer diff --git a/src/sentry/releases/endpoints/organization_release_file_details.py b/src/sentry/releases/endpoints/organization_release_file_details.py index f0813d16f559a1..9fa9c5d06bcc20 100644 --- a/src/sentry/releases/endpoints/organization_release_file_details.py +++ b/src/sentry/releases/endpoints/organization_release_file_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/releases/endpoints/organization_release_files.py b/src/sentry/releases/endpoints/organization_release_files.py index 7d7eb6c2542438..a24f57d9106a0f 100644 --- a/src/sentry/releases/endpoints/organization_release_files.py +++ b/src/sentry/releases/endpoints/organization_release_files.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework.request import Request diff --git a/src/sentry/releases/endpoints/organization_release_health_data.py b/src/sentry/releases/endpoints/organization_release_health_data.py index ec132ded8e634c..a128a44a3e7464 100644 --- a/src/sentry/releases/endpoints/organization_release_health_data.py +++ b/src/sentry/releases/endpoints/organization_release_health_data.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.exceptions import ParseError from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/releases/endpoints/organization_release_meta.py b/src/sentry/releases/endpoints/organization_release_meta.py index a347ddbce14de7..074c7a6117ba29 100644 --- a/src/sentry/releases/endpoints/organization_release_meta.py +++ b/src/sentry/releases/endpoints/organization_release_meta.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections import defaultdict -from typing import TypedDict +from typing import int, TypedDict from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/releases/endpoints/project_release_commits.py b/src/sentry/releases/endpoints/project_release_commits.py index b901629c8f65b0..8059bd5aed05b1 100644 --- a/src/sentry/releases/endpoints/project_release_commits.py +++ b/src/sentry/releases/endpoints/project_release_commits.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/releases/endpoints/project_release_details.py b/src/sentry/releases/endpoints/project_release_details.py index 7a1a3d45554a2a..f198525e480cee 100644 --- a/src/sentry/releases/endpoints/project_release_details.py +++ b/src/sentry/releases/endpoints/project_release_details.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from rest_framework.exceptions import ParseError from rest_framework.request import Request diff --git a/src/sentry/releases/endpoints/project_release_file_details.py b/src/sentry/releases/endpoints/project_release_file_details.py index e4c8a5decbe288..38d80c1771ac41 100644 --- a/src/sentry/releases/endpoints/project_release_file_details.py +++ b/src/sentry/releases/endpoints/project_release_file_details.py @@ -1,3 +1,4 @@ +from typing import int import posixpath from zipfile import ZipFile diff --git a/src/sentry/releases/endpoints/project_release_files.py b/src/sentry/releases/endpoints/project_release_files.py index b5e662e38598b0..ad107ddbec4e7b 100644 --- a/src/sentry/releases/endpoints/project_release_files.py +++ b/src/sentry/releases/endpoints/project_release_files.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import re diff --git a/src/sentry/releases/endpoints/project_release_repositories.py b/src/sentry/releases/endpoints/project_release_repositories.py index 95b57ce4e0dc46..3c22aeb19aaab1 100644 --- a/src/sentry/releases/endpoints/project_release_repositories.py +++ b/src/sentry/releases/endpoints/project_release_repositories.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/releases/endpoints/project_release_setup.py b/src/sentry/releases/endpoints/project_release_setup.py index 79d2a23b80fc73..2de8a16600d44b 100644 --- a/src/sentry/releases/endpoints/project_release_setup.py +++ b/src/sentry/releases/endpoints/project_release_setup.py @@ -1,3 +1,4 @@ +from typing import int from django.core.cache import cache from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/releases/endpoints/project_release_stats.py b/src/sentry/releases/endpoints/project_release_stats.py index 9a090ec770b5bd..e25b440f13289a 100644 --- a/src/sentry/releases/endpoints/project_release_stats.py +++ b/src/sentry/releases/endpoints/project_release_stats.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from rest_framework.request import Request diff --git a/src/sentry/releases/endpoints/project_releases.py b/src/sentry/releases/endpoints/project_releases.py index 60b666b97b450b..a4397f03b1e49a 100644 --- a/src/sentry/releases/endpoints/project_releases.py +++ b/src/sentry/releases/endpoints/project_releases.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import sentry_sdk from django.db import IntegrityError, router, transaction diff --git a/src/sentry/releases/endpoints/project_releases_token.py b/src/sentry/releases/endpoints/project_releases_token.py index 2fe9af624ce199..845d8e25d0f7ad 100644 --- a/src/sentry/releases/endpoints/project_releases_token.py +++ b/src/sentry/releases/endpoints/project_releases_token.py @@ -1,3 +1,4 @@ +from typing import int import hmac from hashlib import sha256 from uuid import uuid1 diff --git a/src/sentry/releases/endpoints/release_deploys.py b/src/sentry/releases/endpoints/release_deploys.py index d830dee7fbdd21..2096a379ebe1c5 100644 --- a/src/sentry/releases/endpoints/release_deploys.py +++ b/src/sentry/releases/endpoints/release_deploys.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db.models import F diff --git a/src/sentry/releases/migrations/0001_release_models.py b/src/sentry/releases/migrations/0001_release_models.py index dd17623d3d48e1..3b6d187b7dd81f 100644 --- a/src/sentry/releases/migrations/0001_release_models.py +++ b/src/sentry/releases/migrations/0001_release_models.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-03 18:57 +from typing import int import django.db.models.deletion import django.utils.timezone from django.db import migrations, models diff --git a/src/sentry/releases/migrations/0002_delete_dual_written_commit_tables.py b/src/sentry/releases/migrations/0002_delete_dual_written_commit_tables.py index 68126cf1693a25..5e732a7b40b4ae 100644 --- a/src/sentry/releases/migrations/0002_delete_dual_written_commit_tables.py +++ b/src/sentry/releases/migrations/0002_delete_dual_written_commit_tables.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-10-31 19:01 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/releases/migrations/0003_real_delete_dual_written_commit_tables.py b/src/sentry/releases/migrations/0003_real_delete_dual_written_commit_tables.py index 43547e4a55dffc..f06e9830845c2b 100644 --- a/src/sentry/releases/migrations/0003_real_delete_dual_written_commit_tables.py +++ b/src/sentry/releases/migrations/0003_real_delete_dual_written_commit_tables.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-10-31 19:10 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/releases/serializers/release.py b/src/sentry/releases/serializers/release.py index 92ba314b5bdab1..ab65c6b12345fe 100644 --- a/src/sentry/releases/serializers/release.py +++ b/src/sentry/releases/serializers/release.py @@ -3,7 +3,7 @@ """ from datetime import datetime -from typing import Any +from typing import int, Any from sentry.api.serializers.models.release import expose_version_info from sentry.api.serializers.release_details_types import Author, LastDeploy, Project diff --git a/src/sentry/releases/use_cases/release.py b/src/sentry/releases/use_cases/release.py index d7d2146dc8951a..4312567ca77f64 100644 --- a/src/sentry/releases/use_cases/release.py +++ b/src/sentry/releases/use_cases/release.py @@ -1,7 +1,7 @@ from collections import defaultdict from collections.abc import Callable, Iterable, Mapping from datetime import datetime, timezone -from typing import Any, cast +from typing import Any, cast, int import sentry_sdk from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/relocation/api/endpoints/__init__.py b/src/sentry/relocation/api/endpoints/__init__.py index 27aeb753555ebe..02044a12f5c221 100644 --- a/src/sentry/relocation/api/endpoints/__init__.py +++ b/src/sentry/relocation/api/endpoints/__init__.py @@ -1,3 +1,4 @@ +from typing import int from string import Template ERR_FEATURE_DISABLED = "This feature is not yet enabled" diff --git a/src/sentry/relocation/api/endpoints/abort.py b/src/sentry/relocation/api/endpoints/abort.py index 5b618a9afb0e20..7268c865e73299 100644 --- a/src/sentry/relocation/api/endpoints/abort.py +++ b/src/sentry/relocation/api/endpoints/abort.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework.request import Request diff --git a/src/sentry/relocation/api/endpoints/artifacts/details.py b/src/sentry/relocation/api/endpoints/artifacts/details.py index 8191c27b223cbb..0d7994689ad4ae 100644 --- a/src/sentry/relocation/api/endpoints/artifacts/details.py +++ b/src/sentry/relocation/api/endpoints/artifacts/details.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any import orjson from cryptography.fernet import Fernet diff --git a/src/sentry/relocation/api/endpoints/artifacts/index.py b/src/sentry/relocation/api/endpoints/artifacts/index.py index f842c30b1278c0..c0e8be889e67a3 100644 --- a/src/sentry/relocation/api/endpoints/artifacts/index.py +++ b/src/sentry/relocation/api/endpoints/artifacts/index.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework.exceptions import PermissionDenied diff --git a/src/sentry/relocation/api/endpoints/cancel.py b/src/sentry/relocation/api/endpoints/cancel.py index 4adde5f3e116c7..b9714b9b14113a 100644 --- a/src/sentry/relocation/api/endpoints/cancel.py +++ b/src/sentry/relocation/api/endpoints/cancel.py @@ -1,3 +1,4 @@ +from typing import int import logging from string import Template diff --git a/src/sentry/relocation/api/endpoints/details.py b/src/sentry/relocation/api/endpoints/details.py index f929ec66587089..925310717da234 100644 --- a/src/sentry/relocation/api/endpoints/details.py +++ b/src/sentry/relocation/api/endpoints/details.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework.request import Request diff --git a/src/sentry/relocation/api/endpoints/index.py b/src/sentry/relocation/api/endpoints/index.py index 70254c52d8bdb4..99e06c5127e729 100644 --- a/src/sentry/relocation/api/endpoints/index.py +++ b/src/sentry/relocation/api/endpoints/index.py @@ -1,3 +1,4 @@ +from typing import int import logging import re from datetime import timedelta diff --git a/src/sentry/relocation/api/endpoints/pause.py b/src/sentry/relocation/api/endpoints/pause.py index b2b6fc334f348d..527b3a7f007c3d 100644 --- a/src/sentry/relocation/api/endpoints/pause.py +++ b/src/sentry/relocation/api/endpoints/pause.py @@ -1,3 +1,4 @@ +from typing import int import logging from string import Template diff --git a/src/sentry/relocation/api/endpoints/public_key.py b/src/sentry/relocation/api/endpoints/public_key.py index 5505c2b8483f81..71bbc88d7fddb1 100644 --- a/src/sentry/relocation/api/endpoints/public_key.py +++ b/src/sentry/relocation/api/endpoints/public_key.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework.request import Request diff --git a/src/sentry/relocation/api/endpoints/recover.py b/src/sentry/relocation/api/endpoints/recover.py index 68807cb85f7d1e..e98e0fca6f832c 100644 --- a/src/sentry/relocation/api/endpoints/recover.py +++ b/src/sentry/relocation/api/endpoints/recover.py @@ -1,3 +1,4 @@ +from typing import int import logging from string import Template diff --git a/src/sentry/relocation/api/endpoints/retry.py b/src/sentry/relocation/api/endpoints/retry.py index dad61e67d2bbb4..af270247258f6b 100644 --- a/src/sentry/relocation/api/endpoints/retry.py +++ b/src/sentry/relocation/api/endpoints/retry.py @@ -1,3 +1,4 @@ +from typing import int import logging from string import Template diff --git a/src/sentry/relocation/api/endpoints/unpause.py b/src/sentry/relocation/api/endpoints/unpause.py index 0a94f9baa70253..f25d8b7a5e8692 100644 --- a/src/sentry/relocation/api/endpoints/unpause.py +++ b/src/sentry/relocation/api/endpoints/unpause.py @@ -1,3 +1,4 @@ +from typing import int import logging from string import Template diff --git a/src/sentry/relocation/api/serializers/relocation.py b/src/sentry/relocation/api/serializers/relocation.py index 3415f1a0ab10ce..8af29a33239a83 100644 --- a/src/sentry/relocation/api/serializers/relocation.py +++ b/src/sentry/relocation/api/serializers/relocation.py @@ -1,6 +1,6 @@ import dataclasses from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from django.contrib.auth.models import AnonymousUser from django.db.models import QuerySet diff --git a/src/sentry/relocation/models/__init__.py b/src/sentry/relocation/models/__init__.py index c9b671cd62295a..c1fab73e3cf3dd 100644 --- a/src/sentry/relocation/models/__init__.py +++ b/src/sentry/relocation/models/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .relocation import * # NOQA from .relocationtransfer import ControlRelocationTransfer, RegionRelocationTransfer # NOQA diff --git a/src/sentry/relocation/models/relocation.py b/src/sentry/relocation/models/relocation.py index 4afdf120fe2d8b..5b4d4e0f5384f8 100644 --- a/src/sentry/relocation/models/relocation.py +++ b/src/sentry/relocation/models/relocation.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from enum import Enum, IntEnum, unique from uuid import uuid4 diff --git a/src/sentry/relocation/models/relocationtransfer.py b/src/sentry/relocation/models/relocationtransfer.py index 1e8ebb01a0cced..e6e4dca8db3f32 100644 --- a/src/sentry/relocation/models/relocationtransfer.py +++ b/src/sentry/relocation/models/relocationtransfer.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import timedelta diff --git a/src/sentry/relocation/services/relocation_export/__init__.py b/src/sentry/relocation/services/relocation_export/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/relocation/services/relocation_export/__init__.py +++ b/src/sentry/relocation/services/relocation_export/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/relocation/services/relocation_export/impl.py b/src/sentry/relocation/services/relocation_export/impl.py index 240ae207a565a7..8765cf3ab638fd 100644 --- a/src/sentry/relocation/services/relocation_export/impl.py +++ b/src/sentry/relocation/services/relocation_export/impl.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int import base64 import logging from datetime import UTC, datetime diff --git a/src/sentry/relocation/services/relocation_export/model.py b/src/sentry/relocation/services/relocation_export/model.py index 2ad49d5b372c51..96779b4341d8f6 100644 --- a/src/sentry/relocation/services/relocation_export/model.py +++ b/src/sentry/relocation/services/relocation_export/model.py @@ -1,3 +1,4 @@ +from typing import int import pydantic diff --git a/src/sentry/relocation/services/relocation_export/service.py b/src/sentry/relocation/services/relocation_export/service.py index af6064f89df6a6..1a14d6d6073bf8 100644 --- a/src/sentry/relocation/services/relocation_export/service.py +++ b/src/sentry/relocation/services/relocation_export/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from abc import abstractmethod from dataclasses import dataclass diff --git a/src/sentry/relocation/tasks/process.py b/src/sentry/relocation/tasks/process.py index d5b1f01be529fc..19004119203aef 100644 --- a/src/sentry/relocation/tasks/process.py +++ b/src/sentry/relocation/tasks/process.py @@ -8,7 +8,7 @@ from datetime import UTC, datetime, timedelta from io import BytesIO from string import Template -from typing import Any +from typing import int, Any from uuid import UUID from zipfile import ZipFile diff --git a/src/sentry/relocation/tasks/transfer.py b/src/sentry/relocation/tasks/transfer.py index 8d662bda19af3c..bcba2a71e917de 100644 --- a/src/sentry/relocation/tasks/transfer.py +++ b/src/sentry/relocation/tasks/transfer.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db.models import Subquery diff --git a/src/sentry/relocation/utils.py b/src/sentry/relocation/utils.py index 3aecb7a800dcee..30cf796d15f060 100644 --- a/src/sentry/relocation/utils.py +++ b/src/sentry/relocation/utils.py @@ -7,7 +7,7 @@ from functools import lru_cache from io import BytesIO from string import Template -from typing import Any +from typing import int, Any from uuid import UUID from django.core.files.storage import Storage diff --git a/src/sentry/remote_subscriptions/apps.py b/src/sentry/remote_subscriptions/apps.py index f14a4543b52d1a..67faebdd48b470 100644 --- a/src/sentry/remote_subscriptions/apps.py +++ b/src/sentry/remote_subscriptions/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/remote_subscriptions/consumers/result_consumer.py b/src/sentry/remote_subscriptions/consumers/result_consumer.py index d6f31230aefd9e..103844f0b6646e 100644 --- a/src/sentry/remote_subscriptions/consumers/result_consumer.py +++ b/src/sentry/remote_subscriptions/consumers/result_consumer.py @@ -7,7 +7,7 @@ from collections.abc import Mapping from concurrent.futures import ThreadPoolExecutor, wait from functools import partial -from typing import Generic, Literal, TypeVar +from typing import Generic, Literal, TypeVar, int import sentry_sdk from arroyo.backends.kafka.consumer import KafkaPayload diff --git a/src/sentry/remote_subscriptions/models.py b/src/sentry/remote_subscriptions/models.py index d4a5d2dc9941f0..ce0795ea7fd711 100644 --- a/src/sentry/remote_subscriptions/models.py +++ b/src/sentry/remote_subscriptions/models.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum from django.db import models diff --git a/src/sentry/replays/_case_studies/INC_1184_consumer_backlog_from_increased_threads/report.py b/src/sentry/replays/_case_studies/INC_1184_consumer_backlog_from_increased_threads/report.py index 4c5f903159846a..69fe04c029567c 100644 --- a/src/sentry/replays/_case_studies/INC_1184_consumer_backlog_from_increased_threads/report.py +++ b/src/sentry/replays/_case_studies/INC_1184_consumer_backlog_from_increased_threads/report.py @@ -1,3 +1,4 @@ +from typing import int """ Analysis of INC-1184. Production backlog of four partitions (two consumers) of the ingest-replay-recordings Kafka consumer. diff --git a/src/sentry/replays/consumers/recording.py b/src/sentry/replays/consumers/recording.py index a15b0170999640..2ae17dabbfdaa5 100644 --- a/src/sentry/replays/consumers/recording.py +++ b/src/sentry/replays/consumers/recording.py @@ -1,7 +1,7 @@ import logging import zlib from collections.abc import Mapping -from typing import cast +from typing import int, cast import sentry_sdk from arroyo.backends.kafka.consumer import KafkaPayload diff --git a/src/sentry/replays/data_export.py b/src/sentry/replays/data_export.py index c55b10492054cc..fa8ec023c889f5 100644 --- a/src/sentry/replays/data_export.py +++ b/src/sentry/replays/data_export.py @@ -4,7 +4,7 @@ import logging from collections.abc import Callable, Generator from datetime import datetime, timedelta, timezone -from typing import Any, Protocol +from typing import Any, Protocol, int from django.db.models import F from google.cloud import storage_transfer_v1 diff --git a/src/sentry/replays/endpoints/data_export_notifications.py b/src/sentry/replays/endpoints/data_export_notifications.py index a914462ef6c7f3..320eec7750b993 100644 --- a/src/sentry/replays/endpoints/data_export_notifications.py +++ b/src/sentry/replays/endpoints/data_export_notifications.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework.request import Request diff --git a/src/sentry/replays/endpoints/organization_replay_count.py b/src/sentry/replays/endpoints/organization_replay_count.py index 41c0ddc4543224..a68048f206c478 100644 --- a/src/sentry/replays/endpoints/organization_replay_count.py +++ b/src/sentry/replays/endpoints/organization_replay_count.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db.models import F from drf_spectacular.utils import extend_schema diff --git a/src/sentry/replays/endpoints/organization_replay_details.py b/src/sentry/replays/endpoints/organization_replay_details.py index 25004500097f44..e2dac8b2072ba7 100644 --- a/src/sentry/replays/endpoints/organization_replay_details.py +++ b/src/sentry/replays/endpoints/organization_replay_details.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import datetime diff --git a/src/sentry/replays/endpoints/organization_replay_events_meta.py b/src/sentry/replays/endpoints/organization_replay_events_meta.py index e752a7e804c129..28e1f8b1093925 100644 --- a/src/sentry/replays/endpoints/organization_replay_events_meta.py +++ b/src/sentry/replays/endpoints/organization_replay_events_meta.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import Any +from typing import int, Any from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/replays/endpoints/organization_replay_index.py b/src/sentry/replays/endpoints/organization_replay_index.py index 5430938f8b7cd3..47d81bd3cd62b9 100644 --- a/src/sentry/replays/endpoints/organization_replay_index.py +++ b/src/sentry/replays/endpoints/organization_replay_index.py @@ -1,5 +1,5 @@ from collections.abc import Callable -from typing import cast +from typing import int, cast from drf_spectacular.utils import extend_schema from rest_framework.exceptions import ParseError diff --git a/src/sentry/replays/endpoints/organization_replay_selector_index.py b/src/sentry/replays/endpoints/organization_replay_selector_index.py index f24bb97eb6921f..63252e235ad936 100644 --- a/src/sentry/replays/endpoints/organization_replay_selector_index.py +++ b/src/sentry/replays/endpoints/organization_replay_selector_index.py @@ -2,7 +2,7 @@ from collections.abc import Sequence from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int from drf_spectacular.utils import extend_schema from rest_framework.exceptions import ParseError diff --git a/src/sentry/replays/endpoints/project_replay_clicks_index.py b/src/sentry/replays/endpoints/project_replay_clicks_index.py index 78e42a0bdac095..b793d6f718325a 100644 --- a/src/sentry/replays/endpoints/project_replay_clicks_index.py +++ b/src/sentry/replays/endpoints/project_replay_clicks_index.py @@ -3,7 +3,7 @@ import datetime import uuid from collections.abc import Sequence -from typing import TypedDict +from typing import int, TypedDict from drf_spectacular.utils import extend_schema from rest_framework.exceptions import ParseError diff --git a/src/sentry/replays/endpoints/project_replay_details.py b/src/sentry/replays/endpoints/project_replay_details.py index 87ca10c29cf2e3..aeff49b83f8ae5 100644 --- a/src/sentry/replays/endpoints/project_replay_details.py +++ b/src/sentry/replays/endpoints/project_replay_details.py @@ -1,3 +1,4 @@ +from typing import int import uuid from drf_spectacular.utils import extend_schema diff --git a/src/sentry/replays/endpoints/project_replay_jobs_delete.py b/src/sentry/replays/endpoints/project_replay_jobs_delete.py index e3d73ec93b066b..989a86e2b2b815 100644 --- a/src/sentry/replays/endpoints/project_replay_jobs_delete.py +++ b/src/sentry/replays/endpoints/project_replay_jobs_delete.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/replays/endpoints/project_replay_recording_segment_details.py b/src/sentry/replays/endpoints/project_replay_recording_segment_details.py index 95b7bf37bebd28..17d852647b72a0 100644 --- a/src/sentry/replays/endpoints/project_replay_recording_segment_details.py +++ b/src/sentry/replays/endpoints/project_replay_recording_segment_details.py @@ -1,5 +1,5 @@ from io import BytesIO -from typing import Any +from typing import int, Any import sentry_sdk from django.http import StreamingHttpResponse diff --git a/src/sentry/replays/endpoints/project_replay_recording_segment_index.py b/src/sentry/replays/endpoints/project_replay_recording_segment_index.py index 0f53dcd75ecbd8..bcb38fb079cb94 100644 --- a/src/sentry/replays/endpoints/project_replay_recording_segment_index.py +++ b/src/sentry/replays/endpoints/project_replay_recording_segment_index.py @@ -1,5 +1,5 @@ import functools -from typing import Any +from typing import int, Any from django.http import StreamingHttpResponse from drf_spectacular.utils import extend_schema diff --git a/src/sentry/replays/endpoints/project_replay_summary.py b/src/sentry/replays/endpoints/project_replay_summary.py index 3dfec583f1039e..6a3a868626a84c 100644 --- a/src/sentry/replays/endpoints/project_replay_summary.py +++ b/src/sentry/replays/endpoints/project_replay_summary.py @@ -1,6 +1,6 @@ import logging from datetime import datetime -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/replays/endpoints/project_replay_video_details.py b/src/sentry/replays/endpoints/project_replay_video_details.py index 3dcf4d6e66e01e..3f38cd18577db4 100644 --- a/src/sentry/replays/endpoints/project_replay_video_details.py +++ b/src/sentry/replays/endpoints/project_replay_video_details.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from io import BytesIO diff --git a/src/sentry/replays/endpoints/project_replay_viewed_by.py b/src/sentry/replays/endpoints/project_replay_viewed_by.py index 84180d2c454f73..351e9b48564aec 100644 --- a/src/sentry/replays/endpoints/project_replay_viewed_by.py +++ b/src/sentry/replays/endpoints/project_replay_viewed_by.py @@ -1,6 +1,6 @@ import uuid from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/replays/lib/cache.py b/src/sentry/replays/lib/cache.py index bcbfa3ce8489a8..9493f963df1c35 100644 --- a/src/sentry/replays/lib/cache.py +++ b/src/sentry/replays/lib/cache.py @@ -2,7 +2,7 @@ from collections import OrderedDict from collections.abc import Callable from threading import Lock -from typing import Protocol, TypeVar +from typing import Protocol, TypeVar, int T = TypeVar("T") U = TypeVar("U") diff --git a/src/sentry/replays/lib/eap/read.py b/src/sentry/replays/lib/eap/read.py index a697b207420697..14257efd64cb56 100644 --- a/src/sentry/replays/lib/eap/read.py +++ b/src/sentry/replays/lib/eap/read.py @@ -1,3 +1,4 @@ +from typing import int from snuba_sdk import Query from sentry.replays.lib.eap.snuba_transpiler import ( diff --git a/src/sentry/replays/lib/eap/snuba_transpiler.py b/src/sentry/replays/lib/eap/snuba_transpiler.py index 6631e7c71e97cf..ba698c99e58745 100644 --- a/src/sentry/replays/lib/eap/snuba_transpiler.py +++ b/src/sentry/replays/lib/eap/snuba_transpiler.py @@ -18,7 +18,7 @@ from collections.abc import MutableMapping, Sequence from datetime import date, datetime -from typing import Any +from typing import int, Any from typing import Literal as TLiteral from typing import NotRequired, Required, TypedDict, cast diff --git a/src/sentry/replays/lib/eap/write.py b/src/sentry/replays/lib/eap/write.py index 4f26685dcea68a..e5ca15b4915ed7 100644 --- a/src/sentry/replays/lib/eap/write.py +++ b/src/sentry/replays/lib/eap/write.py @@ -1,6 +1,6 @@ from collections.abc import MutableMapping, Sequence from datetime import datetime -from typing import TypedDict +from typing import int, TypedDict import requests from arroyo import Topic as ArroyoTopic diff --git a/src/sentry/replays/lib/event_linking.py b/src/sentry/replays/lib/event_linking.py index 9457e3cd18a7e5..2a4ab6fe1e1447 100644 --- a/src/sentry/replays/lib/event_linking.py +++ b/src/sentry/replays/lib/event_linking.py @@ -3,7 +3,7 @@ import time import uuid from hashlib import md5 -from typing import TYPE_CHECKING, TypedDict, Union +from typing import TYPE_CHECKING, TypedDict, Union, int if TYPE_CHECKING: from sentry.services.eventstore.models import BaseEvent diff --git a/src/sentry/replays/lib/http.py b/src/sentry/replays/lib/http.py index 2d3785372bceb3..753754db378562 100644 --- a/src/sentry/replays/lib/http.py +++ b/src/sentry/replays/lib/http.py @@ -1,6 +1,6 @@ import io from collections.abc import Iterator -from typing import Protocol +from typing import int, Protocol class MalformedRangeHeader(Exception): diff --git a/src/sentry/replays/lib/kafka.py b/src/sentry/replays/lib/kafka.py index c4d2f658f4add2..619e8d45928f71 100644 --- a/src/sentry/replays/lib/kafka.py +++ b/src/sentry/replays/lib/kafka.py @@ -1,3 +1,4 @@ +from typing import int from arroyo.backends.kafka import KafkaPayload from arroyo.types import Topic as ArroyoTopic from sentry_kafka_schemas.codecs import Codec diff --git a/src/sentry/replays/lib/new_query/conditions.py b/src/sentry/replays/lib/new_query/conditions.py index edecabecad5d02..cdf2633066435e 100644 --- a/src/sentry/replays/lib/new_query/conditions.py +++ b/src/sentry/replays/lib/new_query/conditions.py @@ -17,7 +17,7 @@ from __future__ import annotations -from typing import Any, NoReturn, TypeVar +from typing import Any, NoReturn, TypeVar, int from uuid import UUID from snuba_sdk import And, Condition, Function, Identifier, Lambda, Op, Or diff --git a/src/sentry/replays/lib/new_query/errors.py b/src/sentry/replays/lib/new_query/errors.py index 8d2d314b92ba64..d0d51e24847c29 100644 --- a/src/sentry/replays/lib/new_query/errors.py +++ b/src/sentry/replays/lib/new_query/errors.py @@ -1,3 +1,4 @@ +from typing import int class OperatorNotSupported(Exception): pass diff --git a/src/sentry/replays/lib/new_query/fields.py b/src/sentry/replays/lib/new_query/fields.py index cbd96a801d0b71..cec3ff59b1f8cd 100644 --- a/src/sentry/replays/lib/new_query/fields.py +++ b/src/sentry/replays/lib/new_query/fields.py @@ -19,7 +19,7 @@ import datetime from collections.abc import Callable -from typing import Generic, Protocol +from typing import Generic, Protocol, int from uuid import UUID from snuba_sdk import Column, Condition, Function diff --git a/src/sentry/replays/lib/new_query/parsers.py b/src/sentry/replays/lib/new_query/parsers.py index 092f37862b6479..6410657b2fd14f 100644 --- a/src/sentry/replays/lib/new_query/parsers.py +++ b/src/sentry/replays/lib/new_query/parsers.py @@ -1,3 +1,4 @@ +from typing import int """Parser module. Functions in this module coerce external types to internal types. Else they die. diff --git a/src/sentry/replays/lib/new_query/utils.py b/src/sentry/replays/lib/new_query/utils.py index a5bd3b1839fa40..84161c5da71dbb 100644 --- a/src/sentry/replays/lib/new_query/utils.py +++ b/src/sentry/replays/lib/new_query/utils.py @@ -1,3 +1,4 @@ +from typing import int """Query utility module.""" from __future__ import annotations diff --git a/src/sentry/replays/lib/query.py b/src/sentry/replays/lib/query.py index ae57c15a3f795c..4c74831ed8d56b 100644 --- a/src/sentry/replays/lib/query.py +++ b/src/sentry/replays/lib/query.py @@ -1,3 +1,4 @@ +from typing import int """Dynamic query parsing library.""" import uuid diff --git a/src/sentry/replays/lib/seer_api.py b/src/sentry/replays/lib/seer_api.py index deafe6cf36b742..d9288b59491d20 100644 --- a/src/sentry/replays/lib/seer_api.py +++ b/src/sentry/replays/lib/seer_api.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.net.http import connection_from_url diff --git a/src/sentry/replays/lib/selector/parse.py b/src/sentry/replays/lib/selector/parse.py index c9961dd1fe09ef..aeb9643b20466f 100644 --- a/src/sentry/replays/lib/selector/parse.py +++ b/src/sentry/replays/lib/selector/parse.py @@ -1,4 +1,4 @@ -from typing import Union +from typing import int, Union from cssselect import Selector, SelectorSyntaxError from cssselect import parse as cssselect_parse diff --git a/src/sentry/replays/lib/selector/query.py b/src/sentry/replays/lib/selector/query.py index 5be8b887c97ec2..02acd336195204 100644 --- a/src/sentry/replays/lib/selector/query.py +++ b/src/sentry/replays/lib/selector/query.py @@ -1,3 +1,4 @@ +from typing import int from snuba_sdk import Column, Function, Identifier, Lambda diff --git a/src/sentry/replays/lib/storage.py b/src/sentry/replays/lib/storage.py index 814399bb36fa00..ff5b11ef1773f9 100644 --- a/src/sentry/replays/lib/storage.py +++ b/src/sentry/replays/lib/storage.py @@ -1,3 +1,4 @@ +from typing import int """Replays storage blob driver module. Blob drivers are polymorphic on the service abstractions provided by Sentry. Blob drivers are diff --git a/src/sentry/replays/migrations/0001_squashed_0005_drop_replay_index.py b/src/sentry/replays/migrations/0001_squashed_0005_drop_replay_index.py index b49d69adfbf467..04146b226d237b 100644 --- a/src/sentry/replays/migrations/0001_squashed_0005_drop_replay_index.py +++ b/src/sentry/replays/migrations/0001_squashed_0005_drop_replay_index.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 16:28 +from typing import int import django.utils.timezone from django.db import migrations, models diff --git a/src/sentry/replays/migrations/0006_add_bulk_delete_job.py b/src/sentry/replays/migrations/0006_add_bulk_delete_job.py index e9848fbe2e8e65..aeef14aabb84b1 100644 --- a/src/sentry/replays/migrations/0006_add_bulk_delete_job.py +++ b/src/sentry/replays/migrations/0006_add_bulk_delete_job.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-20 15:54 +from typing import int import django.contrib.postgres.fields from django.db import migrations, models diff --git a/src/sentry/replays/models.py b/src/sentry/replays/models.py index b1fb841b71ae79..aee3a61cb7bea2 100644 --- a/src/sentry/replays/models.py +++ b/src/sentry/replays/models.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.postgres.fields.array import ArrayField from django.core.exceptions import ObjectDoesNotExist from django.db import models diff --git a/src/sentry/replays/post_process.py b/src/sentry/replays/post_process.py index a595450c3fc6b0..beb9360b639486 100644 --- a/src/sentry/replays/post_process.py +++ b/src/sentry/replays/post_process.py @@ -3,7 +3,7 @@ import collections from collections.abc import Generator, Iterable, Iterator, MutableMapping from itertools import zip_longest -from typing import Any, TypedDict +from typing import Any, TypedDict, int import sentry_sdk from drf_spectacular.utils import extend_schema_serializer diff --git a/src/sentry/replays/query.py b/src/sentry/replays/query.py index 5af2785131c64a..c9de6fe1a3e0c8 100644 --- a/src/sentry/replays/query.py +++ b/src/sentry/replays/query.py @@ -2,7 +2,7 @@ from collections.abc import Generator, Sequence from datetime import UTC, datetime, timedelta -from typing import Any, Literal +from typing import Any, Literal, int from snuba_sdk import ( Column, diff --git a/src/sentry/replays/scripts/delete_replays.py b/src/sentry/replays/scripts/delete_replays.py index 0abb9d174b7fdf..b43d4cc6b06dbb 100644 --- a/src/sentry/replays/scripts/delete_replays.py +++ b/src/sentry/replays/scripts/delete_replays.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Sequence diff --git a/src/sentry/replays/tasks.py b/src/sentry/replays/tasks.py index 355dd318717ffe..a5cd5ea859218f 100644 --- a/src/sentry/replays/tasks.py +++ b/src/sentry/replays/tasks.py @@ -2,7 +2,7 @@ import concurrent.futures as cf import logging -from typing import Any +from typing import int, Any from google.cloud.exceptions import NotFound diff --git a/src/sentry/replays/testutils.py b/src/sentry/replays/testutils.py index 20ea3052f4cd46..1de9870cef3d9b 100644 --- a/src/sentry/replays/testutils.py +++ b/src/sentry/replays/testutils.py @@ -3,7 +3,7 @@ import datetime import uuid from enum import Enum -from typing import Any +from typing import int, Any # This __must__ match the EventType enum in RRWeb, for the version of rrweb that we are using. diff --git a/src/sentry/replays/usecases/delete.py b/src/sentry/replays/usecases/delete.py index 0b17c148a00e68..05e1a016797a54 100644 --- a/src/sentry/replays/usecases/delete.py +++ b/src/sentry/replays/usecases/delete.py @@ -4,7 +4,7 @@ import functools import logging from datetime import datetime -from typing import TypedDict +from typing import int, TypedDict from django.conf import settings from google.cloud.exceptions import NotFound diff --git a/src/sentry/replays/usecases/errors.py b/src/sentry/replays/usecases/errors.py index 1b75499081e14e..c22ffeedb33b53 100644 --- a/src/sentry/replays/usecases/errors.py +++ b/src/sentry/replays/usecases/errors.py @@ -1,3 +1,4 @@ +from typing import int import functools import sentry_sdk diff --git a/src/sentry/replays/usecases/events.py b/src/sentry/replays/usecases/events.py index 8db08728718560..d1930c764c147a 100644 --- a/src/sentry/replays/usecases/events.py +++ b/src/sentry/replays/usecases/events.py @@ -2,7 +2,7 @@ import time import uuid -from typing import Any +from typing import int, Any from sentry.replays.lib.kafka import initialize_replays_publisher from sentry.utils import json diff --git a/src/sentry/replays/usecases/ingest/__init__.py b/src/sentry/replays/usecases/ingest/__init__.py index be8e56482b8549..f78d0bc5672130 100644 --- a/src/sentry/replays/usecases/ingest/__init__.py +++ b/src/sentry/replays/usecases/ingest/__init__.py @@ -3,7 +3,7 @@ import time import zlib from datetime import datetime, timezone -from typing import Any, TypedDict +from typing import Any, TypedDict, int import msgspec import sentry_sdk diff --git a/src/sentry/replays/usecases/ingest/cache.py b/src/sentry/replays/usecases/ingest/cache.py index 5c32e220322bc7..6562db96ee297e 100644 --- a/src/sentry/replays/usecases/ingest/cache.py +++ b/src/sentry/replays/usecases/ingest/cache.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.options.project_option import ProjectOption from sentry.models.project import Project from sentry.replays.lib.cache import AutoCache, BoundedLRUCache diff --git a/src/sentry/replays/usecases/ingest/event_logger.py b/src/sentry/replays/usecases/ingest/event_logger.py index c1569986a77954..72966aabb2d617 100644 --- a/src/sentry/replays/usecases/ingest/event_logger.py +++ b/src/sentry/replays/usecases/ingest/event_logger.py @@ -3,7 +3,7 @@ import uuid from collections.abc import Callable, Generator from hashlib import md5 -from typing import Any, Literal, TypedDict +from typing import Any, Literal, TypedDict, int import sentry_sdk from sentry_protos.snuba.v1.trace_item_pb2 import TraceItem diff --git a/src/sentry/replays/usecases/ingest/event_parser.py b/src/sentry/replays/usecases/ingest/event_parser.py index b3ceb8749575a1..0930abd4e27389 100644 --- a/src/sentry/replays/usecases/ingest/event_parser.py +++ b/src/sentry/replays/usecases/ingest/event_parser.py @@ -7,7 +7,7 @@ from dataclasses import dataclass from datetime import datetime from enum import Enum -from typing import Any, Literal, TypedDict, TypeVar +from typing import Any, Literal, TypedDict, TypeVar, int import sentry_sdk from sentry_protos.snuba.v1.trace_item_pb2 import TraceItem diff --git a/src/sentry/replays/usecases/ingest/issue_creation.py b/src/sentry/replays/usecases/ingest/issue_creation.py index 2081971bbc57cd..ed7aa20be1d53d 100644 --- a/src/sentry/replays/usecases/ingest/issue_creation.py +++ b/src/sentry/replays/usecases/ingest/issue_creation.py @@ -1,6 +1,6 @@ import datetime import logging -from typing import Any +from typing import int, Any from uuid import UUID from sentry.constants import MAX_CULPRIT_LENGTH diff --git a/src/sentry/replays/usecases/ingest/types.py b/src/sentry/replays/usecases/ingest/types.py index 5e038dd09f6c67..d6b608693006e3 100644 --- a/src/sentry/replays/usecases/ingest/types.py +++ b/src/sentry/replays/usecases/ingest/types.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from sentry.replays.lib.cache import AutoCache diff --git a/src/sentry/replays/usecases/issue.py b/src/sentry/replays/usecases/issue.py index 94679b7a0e1738..904a79faf054fc 100644 --- a/src/sentry/replays/usecases/issue.py +++ b/src/sentry/replays/usecases/issue.py @@ -1,7 +1,7 @@ import datetime import uuid from collections.abc import Sequence -from typing import Any +from typing import int, Any from sentry.issues.grouptype import GroupType from sentry.issues.issue_occurrence import IssueEvidence, IssueOccurrence diff --git a/src/sentry/replays/usecases/pack.py b/src/sentry/replays/usecases/pack.py index c23a59c58fd275..dde3e6a976c5e8 100644 --- a/src/sentry/replays/usecases/pack.py +++ b/src/sentry/replays/usecases/pack.py @@ -1,3 +1,4 @@ +from typing import int """Packed binary encoding module. Bytes are packed in varying formats dependent on their type. The type is diff --git a/src/sentry/replays/usecases/query/__init__.py b/src/sentry/replays/usecases/query/__init__.py index dcab9e74dadf80..3ca73fcc23b5f5 100644 --- a/src/sentry/replays/usecases/query/__init__.py +++ b/src/sentry/replays/usecases/query/__init__.py @@ -17,7 +17,7 @@ from collections.abc import Mapping, Sequence from datetime import datetime, timedelta -from typing import Any, Literal, cast +from typing import Any, Literal, cast, int import sentry_sdk from rest_framework.exceptions import ParseError diff --git a/src/sentry/replays/usecases/query/conditions/__init__.py b/src/sentry/replays/usecases/query/conditions/__init__.py index c4ca15cd99723b..da43d4b3307ec2 100644 --- a/src/sentry/replays/usecases/query/conditions/__init__.py +++ b/src/sentry/replays/usecases/query/conditions/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "AggregateActivityScalar", "ClickArray", diff --git a/src/sentry/replays/usecases/query/conditions/activity.py b/src/sentry/replays/usecases/query/conditions/activity.py index ff777f72490df9..8633381f8ffb6e 100644 --- a/src/sentry/replays/usecases/query/conditions/activity.py +++ b/src/sentry/replays/usecases/query/conditions/activity.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from snuba_sdk import Column, Condition, Function, Op diff --git a/src/sentry/replays/usecases/query/conditions/aggregate.py b/src/sentry/replays/usecases/query/conditions/aggregate.py index ccbfd43b899b93..becba0c1770710 100644 --- a/src/sentry/replays/usecases/query/conditions/aggregate.py +++ b/src/sentry/replays/usecases/query/conditions/aggregate.py @@ -1,3 +1,4 @@ +from typing import int """Aggregate visitor on row visitor module. This is the primary module containing our memory-optimizations. The logic is simple: looking at diff --git a/src/sentry/replays/usecases/query/conditions/base.py b/src/sentry/replays/usecases/query/conditions/base.py index 902688d27ba3a6..79684b7dd5c858 100644 --- a/src/sentry/replays/usecases/query/conditions/base.py +++ b/src/sentry/replays/usecases/query/conditions/base.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from snuba_sdk import Condition diff --git a/src/sentry/replays/usecases/query/conditions/duration.py b/src/sentry/replays/usecases/query/conditions/duration.py index 04bb8c9f16934f..36d69593b616c5 100644 --- a/src/sentry/replays/usecases/query/conditions/duration.py +++ b/src/sentry/replays/usecases/query/conditions/duration.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from snuba_sdk import Column, Condition, Function, Op diff --git a/src/sentry/replays/usecases/query/conditions/error_ids.py b/src/sentry/replays/usecases/query/conditions/error_ids.py index e1ed17f15ead16..4ae156216aebd3 100644 --- a/src/sentry/replays/usecases/query/conditions/error_ids.py +++ b/src/sentry/replays/usecases/query/conditions/error_ids.py @@ -1,3 +1,4 @@ +from typing import int """Error_ids array visitors module. This module demonstrates what's already present in other files but in a more direct and succinct diff --git a/src/sentry/replays/usecases/query/conditions/event_ids.py b/src/sentry/replays/usecases/query/conditions/event_ids.py index e4adba1c835920..af6766e66f8d26 100644 --- a/src/sentry/replays/usecases/query/conditions/event_ids.py +++ b/src/sentry/replays/usecases/query/conditions/event_ids.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from uuid import UUID diff --git a/src/sentry/replays/usecases/query/conditions/selector.py b/src/sentry/replays/usecases/query/conditions/selector.py index 8ce3f6143feef3..998465fe35f511 100644 --- a/src/sentry/replays/usecases/query/conditions/selector.py +++ b/src/sentry/replays/usecases/query/conditions/selector.py @@ -1,3 +1,4 @@ +from typing import int """Composite click selector visitor module. This module demonstrates how funky condition visitors can become. We're performing multiple diff --git a/src/sentry/replays/usecases/query/conditions/tags.py b/src/sentry/replays/usecases/query/conditions/tags.py index b2807720fc8da1..22d39e99ffbed1 100644 --- a/src/sentry/replays/usecases/query/conditions/tags.py +++ b/src/sentry/replays/usecases/query/conditions/tags.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from snuba_sdk import Column, Condition, Function, Identifier, Lambda, Op from snuba_sdk.expressions import Expression diff --git a/src/sentry/replays/usecases/query/configs/aggregate.py b/src/sentry/replays/usecases/query/configs/aggregate.py index 936f6d9e789cd9..8114319eec76fd 100644 --- a/src/sentry/replays/usecases/query/configs/aggregate.py +++ b/src/sentry/replays/usecases/query/configs/aggregate.py @@ -1,3 +1,4 @@ +from typing import int """Aggregate query filtering configuration module. Every field present in the configuration is filterable. If its not in the configuration then the diff --git a/src/sentry/replays/usecases/query/configs/aggregate_sort.py b/src/sentry/replays/usecases/query/configs/aggregate_sort.py index 842bc85634056a..f1c0af81ba68a7 100644 --- a/src/sentry/replays/usecases/query/configs/aggregate_sort.py +++ b/src/sentry/replays/usecases/query/configs/aggregate_sort.py @@ -1,3 +1,4 @@ +from typing import int """Aggregate query sorting configuration module. Very similar to our filtering configurations except in this module we do not need the field diff --git a/src/sentry/replays/usecases/query/configs/scalar.py b/src/sentry/replays/usecases/query/configs/scalar.py index 8712e2c34c0be3..4b2d0c813b3c60 100644 --- a/src/sentry/replays/usecases/query/configs/scalar.py +++ b/src/sentry/replays/usecases/query/configs/scalar.py @@ -1,3 +1,4 @@ +from typing import int """Scalar query filtering configuration module.""" from __future__ import annotations diff --git a/src/sentry/replays/usecases/query/errors.py b/src/sentry/replays/usecases/query/errors.py index 16d2c5121d7e60..d0952a65a7a988 100644 --- a/src/sentry/replays/usecases/query/errors.py +++ b/src/sentry/replays/usecases/query/errors.py @@ -1,3 +1,4 @@ +from typing import int class RetryAggregated(Exception): """Raised when a query can only be executed by an aggregate.""" diff --git a/src/sentry/replays/usecases/query/fields.py b/src/sentry/replays/usecases/query/fields.py index a494e90e0b483d..e43e0c489255f7 100644 --- a/src/sentry/replays/usecases/query/fields.py +++ b/src/sentry/replays/usecases/query/fields.py @@ -2,7 +2,7 @@ import datetime from collections.abc import Callable -from typing import Generic, TypeVar +from typing import Generic, TypeVar, int from snuba_sdk import Condition diff --git a/src/sentry/replays/usecases/reader.py b/src/sentry/replays/usecases/reader.py index 5c7b8de714c154..caca6bebd0eb57 100644 --- a/src/sentry/replays/usecases/reader.py +++ b/src/sentry/replays/usecases/reader.py @@ -5,7 +5,7 @@ from collections.abc import Generator, Iterator from concurrent.futures import ThreadPoolExecutor from datetime import datetime, timedelta -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/replays/usecases/replay_counts.py b/src/sentry/replays/usecases/replay_counts.py index 5c71f306a8bae5..dc95f1a9263d9e 100644 --- a/src/sentry/replays/usecases/replay_counts.py +++ b/src/sentry/replays/usecases/replay_counts.py @@ -4,7 +4,7 @@ import uuid from collections import defaultdict from collections.abc import Generator, Sequence -from typing import Any, Literal, overload +from typing import Any, Literal, overload, int from sentry.api.event_search import ParenExpression, QueryToken, SearchFilter, parse_search_query from sentry.models.group import Group diff --git a/src/sentry/replays/usecases/summarize.py b/src/sentry/replays/usecases/summarize.py index f0d48837e80252..2838b8a7d28c2e 100644 --- a/src/sentry/replays/usecases/summarize.py +++ b/src/sentry/replays/usecases/summarize.py @@ -1,7 +1,7 @@ import logging from collections.abc import Generator, Iterator from datetime import UTC, datetime, timedelta -from typing import Any, TypedDict +from typing import Any, TypedDict, int from urllib.parse import urlparse import sentry_sdk diff --git a/src/sentry/replays/validators.py b/src/sentry/replays/validators.py index d5da0cb5402e6e..3675e4d50e8038 100644 --- a/src/sentry/replays/validators.py +++ b/src/sentry/replays/validators.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers VALID_FIELD_SET = ( diff --git a/src/sentry/reprocessing2.py b/src/sentry/reprocessing2.py index a6a3b8233ed2a8..b9969f5d3900a2 100644 --- a/src/sentry/reprocessing2.py +++ b/src/sentry/reprocessing2.py @@ -85,7 +85,7 @@ from collections.abc import Mapping, MutableMapping from dataclasses import dataclass from datetime import datetime -from typing import Any, Literal, overload +from typing import Any, Literal, overload, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/roles/__init__.py b/src/sentry/roles/__init__.py index 9786b2bb157761..d5eb9dab32f0dc 100644 --- a/src/sentry/roles/__init__.py +++ b/src/sentry/roles/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from .manager import RoleManager diff --git a/src/sentry/roles/manager.py b/src/sentry/roles/manager.py index 126beea1ca21e7..7d474da5463164 100644 --- a/src/sentry/roles/manager.py +++ b/src/sentry/roles/manager.py @@ -4,7 +4,7 @@ import re from collections.abc import Iterable, Mapping, Sequence from dataclasses import dataclass -from typing import Any, Generic, TypeVar +from typing import Any, Generic, TypeVar, int from sentry.utils import warnings diff --git a/src/sentry/rules/__init__.py b/src/sentry/rules/__init__.py index b7d170031e6bf9..453dd2a4f371e9 100644 --- a/src/sentry/rules/__init__.py +++ b/src/sentry/rules/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .base import EventState, RuleBase from .match import LEVEL_MATCH_CHOICES, MATCH_CHOICES, MatchType, match_values from .registry import RuleRegistry diff --git a/src/sentry/rules/actions/__init__.py b/src/sentry/rules/actions/__init__.py index 7cee5b8db4a817..a5127400e812b5 100644 --- a/src/sentry/rules/actions/__init__.py +++ b/src/sentry/rules/actions/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules.actions.base import EventAction from sentry.rules.actions.integrations import IntegrationEventAction from sentry.rules.actions.integrations.create_ticket import ( diff --git a/src/sentry/rules/actions/base.py b/src/sentry/rules/actions/base.py index ddae0ba8127607..3d67828bd66b4e 100644 --- a/src/sentry/rules/actions/base.py +++ b/src/sentry/rules/actions/base.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import abc import logging diff --git a/src/sentry/rules/actions/integrations/__init__.py b/src/sentry/rules/actions/integrations/__init__.py index fbcba7ebbb6c9d..57c49d9d322404 100644 --- a/src/sentry/rules/actions/integrations/__init__.py +++ b/src/sentry/rules/actions/integrations/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .base import IntegrationEventAction __all__ = ("IntegrationEventAction",) diff --git a/src/sentry/rules/actions/integrations/base.py b/src/sentry/rules/actions/integrations/base.py index c3fbcdfa271bd6..31b3b3291f7580 100644 --- a/src/sentry/rules/actions/integrations/base.py +++ b/src/sentry/rules/actions/integrations/base.py @@ -2,7 +2,7 @@ import abc from collections.abc import Callable, Sequence -from typing import Any, override +from typing import Any, override, int import sentry_sdk diff --git a/src/sentry/rules/actions/integrations/create_ticket/__init__.py b/src/sentry/rules/actions/integrations/create_ticket/__init__.py index 8aea235194ab3d..55caa1475c3762 100644 --- a/src/sentry/rules/actions/integrations/create_ticket/__init__.py +++ b/src/sentry/rules/actions/integrations/create_ticket/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .base import TicketEventAction from .form import IntegrationNotifyServiceForm from .utils import build_description, create_issue, create_link diff --git a/src/sentry/rules/actions/integrations/create_ticket/base.py b/src/sentry/rules/actions/integrations/create_ticket/base.py index 5a5a630a2f3b88..b9a9e24bea2816 100644 --- a/src/sentry/rules/actions/integrations/create_ticket/base.py +++ b/src/sentry/rules/actions/integrations/create_ticket/base.py @@ -2,7 +2,7 @@ import abc from collections.abc import Generator, Mapping -from typing import Any +from typing import int, Any from sentry.integrations.services.integration import RpcIntegration from sentry.models.rule import Rule diff --git a/src/sentry/rules/actions/integrations/create_ticket/form.py b/src/sentry/rules/actions/integrations/create_ticket/form.py index ea5a70f721b3bc..a7475abd54256d 100644 --- a/src/sentry/rules/actions/integrations/create_ticket/form.py +++ b/src/sentry/rules/actions/integrations/create_ticket/form.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django import forms diff --git a/src/sentry/rules/actions/integrations/create_ticket/utils.py b/src/sentry/rules/actions/integrations/create_ticket/utils.py index af0b1b78029c88..a383514a8e1c56 100644 --- a/src/sentry/rules/actions/integrations/create_ticket/utils.py +++ b/src/sentry/rules/actions/integrations/create_ticket/utils.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Callable, Sequence diff --git a/src/sentry/rules/actions/notify_event.py b/src/sentry/rules/actions/notify_event.py index 0a73015ea99796..6f07ef09d16adf 100644 --- a/src/sentry/rules/actions/notify_event.py +++ b/src/sentry/rules/actions/notify_event.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator, Sequence from sentry.plugins.base import plugins diff --git a/src/sentry/rules/actions/notify_event_service.py b/src/sentry/rules/actions/notify_event_service.py index 31fe09bf88bc9a..994493313900ef 100644 --- a/src/sentry/rules/actions/notify_event_service.py +++ b/src/sentry/rules/actions/notify_event_service.py @@ -2,7 +2,7 @@ import logging from collections.abc import Generator, Sequence -from typing import Any +from typing import int, Any from django import forms diff --git a/src/sentry/rules/actions/sentry_apps/__init__.py b/src/sentry/rules/actions/sentry_apps/__init__.py index aaa63e984888dd..9089de999c9791 100644 --- a/src/sentry/rules/actions/sentry_apps/__init__.py +++ b/src/sentry/rules/actions/sentry_apps/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .base import SentryAppEventAction from .notify_event import NotifyEventSentryAppAction from .utils import trigger_sentry_app_action_creators_for_issues diff --git a/src/sentry/rules/actions/sentry_apps/base.py b/src/sentry/rules/actions/sentry_apps/base.py index 0a370d49a3aca3..6640ef69a655ab 100644 --- a/src/sentry/rules/actions/sentry_apps/base.py +++ b/src/sentry/rules/actions/sentry_apps/base.py @@ -2,7 +2,7 @@ import abc from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from sentry.models.project import Project from sentry.rules.actions import EventAction diff --git a/src/sentry/rules/actions/sentry_apps/notify_event.py b/src/sentry/rules/actions/sentry_apps/notify_event.py index 793bbc0d1a23ca..83cb41e8b8612d 100644 --- a/src/sentry/rules/actions/sentry_apps/notify_event.py +++ b/src/sentry/rules/actions/sentry_apps/notify_event.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Generator, Mapping, Sequence -from typing import Any +from typing import int, Any from rest_framework import serializers diff --git a/src/sentry/rules/actions/sentry_apps/utils.py b/src/sentry/rules/actions/sentry_apps/utils.py index 8622eb9c95bd1e..64aed9b62a5bcc 100644 --- a/src/sentry/rules/actions/sentry_apps/utils.py +++ b/src/sentry/rules/actions/sentry_apps/utils.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from sentry.constants import SENTRY_APP_ACTIONS from sentry.sentry_apps.services.app import app_service diff --git a/src/sentry/rules/actions/services.py b/src/sentry/rules/actions/services.py index a2ddc3743c84a8..baa1cf803d4381 100644 --- a/src/sentry/rules/actions/services.py +++ b/src/sentry/rules/actions/services.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any class PluginService: diff --git a/src/sentry/rules/actions/utils.py b/src/sentry/rules/actions/utils.py index 9d24a05ac92fde..c24c046b3c4e9d 100644 --- a/src/sentry/rules/actions/utils.py +++ b/src/sentry/rules/actions/utils.py @@ -1,5 +1,5 @@ from collections import defaultdict -from typing import Any, DefaultDict +from typing import Any, DefaultDict, int from sentry.api.serializers.models.rule import generate_rule_label from sentry.models.environment import Environment diff --git a/src/sentry/rules/age.py b/src/sentry/rules/age.py index 8cf09cabed8c17..5815b87837bad6 100644 --- a/src/sentry/rules/age.py +++ b/src/sentry/rules/age.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import operator from enum import StrEnum diff --git a/src/sentry/rules/base.py b/src/sentry/rules/base.py index 985e75f4ffeda5..817f7fd138f79e 100644 --- a/src/sentry/rules/base.py +++ b/src/sentry/rules/base.py @@ -4,7 +4,7 @@ import logging from collections import namedtuple from collections.abc import Callable, MutableMapping, Sequence -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django import forms diff --git a/src/sentry/rules/conditions/__init__.py b/src/sentry/rules/conditions/__init__.py index 530d26cce6bead..8e6260e34181e8 100644 --- a/src/sentry/rules/conditions/__init__.py +++ b/src/sentry/rules/conditions/__init__.py @@ -1 +1,2 @@ +from typing import int from .base import * # NOQA diff --git a/src/sentry/rules/conditions/base.py b/src/sentry/rules/conditions/base.py index d2e5d209671fda..b5c354af01c51e 100644 --- a/src/sentry/rules/conditions/base.py +++ b/src/sentry/rules/conditions/base.py @@ -1,7 +1,7 @@ import abc from collections.abc import Sequence from datetime import datetime -from typing import TypedDict +from typing import int, TypedDict from sentry.rules.base import EventState, RuleBase from sentry.services.eventstore.models import GroupEvent diff --git a/src/sentry/rules/conditions/event_attribute.py b/src/sentry/rules/conditions/event_attribute.py index 058a13d4686244..40a8858857337b 100644 --- a/src/sentry/rules/conditions/event_attribute.py +++ b/src/sentry/rules/conditions/event_attribute.py @@ -3,7 +3,7 @@ from abc import ABC, abstractmethod from collections.abc import Sequence from dataclasses import dataclass -from typing import Any +from typing import int, Any import sentry_sdk from django import forms diff --git a/src/sentry/rules/conditions/event_frequency.py b/src/sentry/rules/conditions/event_frequency.py index f11d8e3db8793a..2166c161ee0f9d 100644 --- a/src/sentry/rules/conditions/event_frequency.py +++ b/src/sentry/rules/conditions/event_frequency.py @@ -6,7 +6,7 @@ from collections import defaultdict from collections.abc import Callable, Mapping from datetime import datetime, timedelta -from typing import Any, Literal, NotRequired, TypedDict +from typing import Any, Literal, NotRequired, TypedDict, int from django import forms from django.core.cache import cache diff --git a/src/sentry/rules/conditions/every_event.py b/src/sentry/rules/conditions/every_event.py index c841cad0fb5cde..7cffd990b1c784 100644 --- a/src/sentry/rules/conditions/every_event.py +++ b/src/sentry/rules/conditions/every_event.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules import EventState from sentry.rules.conditions.base import EventCondition from sentry.services.eventstore.models import GroupEvent diff --git a/src/sentry/rules/conditions/existing_high_priority_issue.py b/src/sentry/rules/conditions/existing_high_priority_issue.py index 5455c48fb6edb1..efaf2c525e6ece 100644 --- a/src/sentry/rules/conditions/existing_high_priority_issue.py +++ b/src/sentry/rules/conditions/existing_high_priority_issue.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from datetime import datetime diff --git a/src/sentry/rules/conditions/first_seen_event.py b/src/sentry/rules/conditions/first_seen_event.py index 6903f7893caecf..7c0f26d2bc410d 100644 --- a/src/sentry/rules/conditions/first_seen_event.py +++ b/src/sentry/rules/conditions/first_seen_event.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from datetime import datetime diff --git a/src/sentry/rules/conditions/level.py b/src/sentry/rules/conditions/level.py index 7743f8cfe38d86..4e421d1cdc8205 100644 --- a/src/sentry/rules/conditions/level.py +++ b/src/sentry/rules/conditions/level.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Sequence -from typing import Any +from typing import int, Any from django import forms diff --git a/src/sentry/rules/conditions/new_high_priority_issue.py b/src/sentry/rules/conditions/new_high_priority_issue.py index a30b186be3f5c9..20f547bfa19876 100644 --- a/src/sentry/rules/conditions/new_high_priority_issue.py +++ b/src/sentry/rules/conditions/new_high_priority_issue.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from datetime import datetime diff --git a/src/sentry/rules/conditions/reappeared_event.py b/src/sentry/rules/conditions/reappeared_event.py index a95940e52e91eb..7d970c61701c63 100644 --- a/src/sentry/rules/conditions/reappeared_event.py +++ b/src/sentry/rules/conditions/reappeared_event.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from datetime import datetime diff --git a/src/sentry/rules/conditions/regression_event.py b/src/sentry/rules/conditions/regression_event.py index 8eb5d82364d058..d989502dcd6c15 100644 --- a/src/sentry/rules/conditions/regression_event.py +++ b/src/sentry/rules/conditions/regression_event.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from datetime import datetime diff --git a/src/sentry/rules/conditions/tagged_event.py b/src/sentry/rules/conditions/tagged_event.py index 6ce2d211497255..80214656d2aa43 100644 --- a/src/sentry/rules/conditions/tagged_event.py +++ b/src/sentry/rules/conditions/tagged_event.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Sequence -from typing import Any +from typing import int, Any from django import forms diff --git a/src/sentry/rules/filters/__init__.py b/src/sentry/rules/filters/__init__.py index 530d26cce6bead..8e6260e34181e8 100644 --- a/src/sentry/rules/filters/__init__.py +++ b/src/sentry/rules/filters/__init__.py @@ -1 +1,2 @@ +from typing import int from .base import * # NOQA diff --git a/src/sentry/rules/filters/age_comparison.py b/src/sentry/rules/filters/age_comparison.py index bbc99731d0f4bd..102fce3b66b613 100644 --- a/src/sentry/rules/filters/age_comparison.py +++ b/src/sentry/rules/filters/age_comparison.py @@ -2,7 +2,7 @@ from collections.abc import Sequence from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from django import forms from django.utils import timezone diff --git a/src/sentry/rules/filters/assigned_to.py b/src/sentry/rules/filters/assigned_to.py index d56d6cfe12fb6f..4234479467452e 100644 --- a/src/sentry/rules/filters/assigned_to.py +++ b/src/sentry/rules/filters/assigned_to.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from django import forms diff --git a/src/sentry/rules/filters/base.py b/src/sentry/rules/filters/base.py index 5a750bc94fdb22..ad1179d4b233fc 100644 --- a/src/sentry/rules/filters/base.py +++ b/src/sentry/rules/filters/base.py @@ -1,3 +1,4 @@ +from typing import int import abc from sentry.rules.base import EventState, RuleBase diff --git a/src/sentry/rules/filters/event_attribute.py b/src/sentry/rules/filters/event_attribute.py index a2f108dc7fc06a..1d94b4cb4a1d71 100644 --- a/src/sentry/rules/filters/event_attribute.py +++ b/src/sentry/rules/filters/event_attribute.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules.conditions.event_attribute import EventAttributeCondition diff --git a/src/sentry/rules/filters/issue_category.py b/src/sentry/rules/filters/issue_category.py index 901fb6393a1978..a8da33adf4f23d 100644 --- a/src/sentry/rules/filters/issue_category.py +++ b/src/sentry/rules/filters/issue_category.py @@ -1,5 +1,5 @@ from collections import OrderedDict -from typing import Any +from typing import int, Any from django import forms diff --git a/src/sentry/rules/filters/issue_occurrences.py b/src/sentry/rules/filters/issue_occurrences.py index 8dcee8394965ad..004cd4127a9f1e 100644 --- a/src/sentry/rules/filters/issue_occurrences.py +++ b/src/sentry/rules/filters/issue_occurrences.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django import forms from django.utils import timezone diff --git a/src/sentry/rules/filters/latest_adopted_release_filter.py b/src/sentry/rules/filters/latest_adopted_release_filter.py index e78fc5b5eb33c3..9da53da45bcd96 100644 --- a/src/sentry/rules/filters/latest_adopted_release_filter.py +++ b/src/sentry/rules/filters/latest_adopted_release_filter.py @@ -2,7 +2,7 @@ import logging from itertools import product -from typing import Any +from typing import int, Any from django import forms from django.db.models.signals import post_delete, post_save diff --git a/src/sentry/rules/filters/latest_release.py b/src/sentry/rules/filters/latest_release.py index 44801927a146fa..b7bfaa051e09df 100644 --- a/src/sentry/rules/filters/latest_release.py +++ b/src/sentry/rules/filters/latest_release.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.db.models.signals import post_delete, post_save, pre_delete diff --git a/src/sentry/rules/filters/level.py b/src/sentry/rules/filters/level.py index 1e11b8b538fa4f..378fe31b0e2b22 100644 --- a/src/sentry/rules/filters/level.py +++ b/src/sentry/rules/filters/level.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules.conditions.level import LevelCondition diff --git a/src/sentry/rules/filters/tagged_event.py b/src/sentry/rules/filters/tagged_event.py index 19aff02bab5310..81353a04993422 100644 --- a/src/sentry/rules/filters/tagged_event.py +++ b/src/sentry/rules/filters/tagged_event.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules.conditions.tagged_event import TaggedEventCondition diff --git a/src/sentry/rules/history/__init__.py b/src/sentry/rules/history/__init__.py index 6cb1b3e452f630..16ab1ab6eee702 100644 --- a/src/sentry/rules/history/__init__.py +++ b/src/sentry/rules/history/__init__.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from django.conf import settings diff --git a/src/sentry/rules/history/backends/postgres.py b/src/sentry/rules/history/backends/postgres.py index af999566a8d2fb..99fce66ca79b0d 100644 --- a/src/sentry/rules/history/backends/postgres.py +++ b/src/sentry/rules/history/backends/postgres.py @@ -3,7 +3,7 @@ import logging from collections.abc import Sequence from datetime import datetime, timedelta, timezone -from typing import TYPE_CHECKING, TypedDict +from typing import TYPE_CHECKING, TypedDict, int from django.db import connection from django.db.models import Count, Max, OuterRef, Subquery diff --git a/src/sentry/rules/history/base.py b/src/sentry/rules/history/base.py index 2b74e65aaf9977..24f11740948489 100644 --- a/src/sentry/rules/history/base.py +++ b/src/sentry/rules/history/base.py @@ -3,7 +3,7 @@ from collections.abc import Sequence from dataclasses import dataclass from datetime import datetime -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.utils.services import Service diff --git a/src/sentry/rules/history/endpoints/project_rule_group_history.py b/src/sentry/rules/history/endpoints/project_rule_group_history.py index 63f5e634934f20..b8dac581646b94 100644 --- a/src/sentry/rules/history/endpoints/project_rule_group_history.py +++ b/src/sentry/rules/history/endpoints/project_rule_group_history.py @@ -2,7 +2,7 @@ from collections.abc import Mapping, MutableMapping, Sequence from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int from drf_spectacular.utils import extend_schema from rest_framework.exceptions import ParseError diff --git a/src/sentry/rules/history/endpoints/project_rule_stats.py b/src/sentry/rules/history/endpoints/project_rule_stats.py index c3db13b255319c..bf6372fdbe7ebd 100644 --- a/src/sentry/rules/history/endpoints/project_rule_stats.py +++ b/src/sentry/rules/history/endpoints/project_rule_stats.py @@ -2,7 +2,7 @@ from collections.abc import Mapping from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int from drf_spectacular.utils import extend_schema from rest_framework.request import Request diff --git a/src/sentry/rules/history/preview.py b/src/sentry/rules/history/preview.py index 3fb7f141a61b7e..ba0f91c39ed936 100644 --- a/src/sentry/rules/history/preview.py +++ b/src/sentry/rules/history/preview.py @@ -3,7 +3,7 @@ from collections import defaultdict from collections.abc import Callable, Sequence from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from django.utils import timezone diff --git a/src/sentry/rules/history/preview_strategy.py b/src/sentry/rules/history/preview_strategy.py index 64fca181d9c928..b5a2e193463078 100644 --- a/src/sentry/rules/history/preview_strategy.py +++ b/src/sentry/rules/history/preview_strategy.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import Any +from typing import int, Any from sentry.issues.grouptype import GroupCategory from sentry.models.organization import Organization diff --git a/src/sentry/rules/match.py b/src/sentry/rules/match.py index 3ffca98db948b2..d332e6fdb3c30a 100644 --- a/src/sentry/rules/match.py +++ b/src/sentry/rules/match.py @@ -1,6 +1,6 @@ from collections.abc import Iterable from enum import StrEnum -from typing import Any +from typing import int, Any class MatchType(StrEnum): diff --git a/src/sentry/rules/processing/__init__.py b/src/sentry/rules/processing/__init__.py index 8181bf83b7683e..432ac41d190d0e 100644 --- a/src/sentry/rules/processing/__init__.py +++ b/src/sentry/rules/processing/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "DelayedRule", "apply_delayed", diff --git a/src/sentry/rules/processing/buffer_processing.py b/src/sentry/rules/processing/buffer_processing.py index c7004d701326fd..9865582101210e 100644 --- a/src/sentry/rules/processing/buffer_processing.py +++ b/src/sentry/rules/processing/buffer_processing.py @@ -5,7 +5,7 @@ from dataclasses import asdict, dataclass from datetime import datetime, timezone from itertools import islice -from typing import Any, ClassVar, Protocol +from typing import Any, ClassVar, Protocol, int from sentry import options from sentry.buffer.base import BufferField diff --git a/src/sentry/rules/processing/delayed_processing.py b/src/sentry/rules/processing/delayed_processing.py index 84bf9e187fdb3b..eaa544c9fb4079 100644 --- a/src/sentry/rules/processing/delayed_processing.py +++ b/src/sentry/rules/processing/delayed_processing.py @@ -4,7 +4,7 @@ from collections import defaultdict from dataclasses import dataclass from datetime import datetime, timedelta, timezone -from typing import Any, DefaultDict, NamedTuple, NotRequired, TypedDict +from typing import Any, DefaultDict, NamedTuple, NotRequired, TypedDict, int import sentry_sdk from django.db.models import OuterRef, Subquery diff --git a/src/sentry/rules/processing/processor.py b/src/sentry/rules/processing/processor.py index 182669c19165d3..0886d8979cdb77 100644 --- a/src/sentry/rules/processing/processor.py +++ b/src/sentry/rules/processing/processor.py @@ -6,7 +6,7 @@ from collections.abc import Callable, Collection, Mapping, MutableMapping, Sequence from datetime import datetime, timedelta from random import randrange -from typing import Any +from typing import int, Any from django.core.cache import cache from django.utils import timezone diff --git a/src/sentry/rules/registry.py b/src/sentry/rules/registry.py index b5eec92f09af18..f4b995d1c355ed 100644 --- a/src/sentry/rules/registry.py +++ b/src/sentry/rules/registry.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections import defaultdict from collections.abc import Generator diff --git a/src/sentry/runner/__init__.py b/src/sentry/runner/__init__.py index da300b9838fd19..a3b4f2ab1d09ab 100644 --- a/src/sentry/runner/__init__.py +++ b/src/sentry/runner/__init__.py @@ -1,7 +1,7 @@ from __future__ import annotations import os -from typing import Any +from typing import int, Any import click diff --git a/src/sentry/runner/commands/backup.py b/src/sentry/runner/commands/backup.py index 8461ae16b9b6e5..16c622d486112b 100644 --- a/src/sentry/runner/commands/backup.py +++ b/src/sentry/runner/commands/backup.py @@ -6,7 +6,7 @@ from io import BytesIO from threading import Event, Thread from time import sleep, time -from typing import IO, Any +from typing import IO, Any, int import click diff --git a/src/sentry/runner/commands/cleanup.py b/src/sentry/runner/commands/cleanup.py index b10a0c773badaf..77666e09b1fe4f 100644 --- a/src/sentry/runner/commands/cleanup.py +++ b/src/sentry/runner/commands/cleanup.py @@ -8,7 +8,7 @@ from datetime import timedelta from multiprocessing import JoinableQueue as Queue from multiprocessing import Process -from typing import TYPE_CHECKING, Any, Final, Literal, TypeAlias, TypeVar +from typing import TYPE_CHECKING, Any, Final, Literal, TypeAlias, TypeVar, int from uuid import uuid4 import click diff --git a/src/sentry/runner/commands/config.py b/src/sentry/runner/commands/config.py index 99c177a4e50540..bddfd201cbb3de 100644 --- a/src/sentry/runner/commands/config.py +++ b/src/sentry/runner/commands/config.py @@ -1,3 +1,4 @@ +from typing import int import click from sentry.runner.commands.init import generate_secret_key as _generate_secret_key diff --git a/src/sentry/runner/commands/configoptions.py b/src/sentry/runner/commands/configoptions.py index 5619783c99f8f6..3088528b1e2d31 100644 --- a/src/sentry/runner/commands/configoptions.py +++ b/src/sentry/runner/commands/configoptions.py @@ -1,6 +1,6 @@ import sys import time -from typing import Any +from typing import int, Any import click from yaml import safe_load diff --git a/src/sentry/runner/commands/createflag.py b/src/sentry/runner/commands/createflag.py index 27c9a4ff8e37d6..16bd439b1356d6 100644 --- a/src/sentry/runner/commands/createflag.py +++ b/src/sentry/runner/commands/createflag.py @@ -1,3 +1,4 @@ +from typing import int from datetime import date import click diff --git a/src/sentry/runner/commands/createuser.py b/src/sentry/runner/commands/createuser.py index 14caacc67593cc..bd6a26b3682763 100644 --- a/src/sentry/runner/commands/createuser.py +++ b/src/sentry/runner/commands/createuser.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING import click diff --git a/src/sentry/runner/commands/devserver.py b/src/sentry/runner/commands/devserver.py index 180ee9f7e320a6..2e270b524bb2d7 100644 --- a/src/sentry/runner/commands/devserver.py +++ b/src/sentry/runner/commands/devserver.py @@ -4,7 +4,7 @@ import re import threading from collections.abc import MutableSequence, Sequence -from typing import NoReturn +from typing import int, NoReturn import click import sentry_sdk diff --git a/src/sentry/runner/commands/devservices.py b/src/sentry/runner/commands/devservices.py index 58b21d638556fe..71b5285978a0d7 100644 --- a/src/sentry/runner/commands/devservices.py +++ b/src/sentry/runner/commands/devservices.py @@ -5,7 +5,7 @@ import os import sys from collections.abc import Generator -from typing import TYPE_CHECKING, ContextManager +from typing import TYPE_CHECKING, ContextManager, int import click diff --git a/src/sentry/runner/commands/django.py b/src/sentry/runner/commands/django.py index f5cc14ba2371a9..1f8cdbf3a98c18 100644 --- a/src/sentry/runner/commands/django.py +++ b/src/sentry/runner/commands/django.py @@ -1,3 +1,4 @@ +from typing import int import click from sentry.runner.decorators import configuration diff --git a/src/sentry/runner/commands/exec.py b/src/sentry/runner/commands/exec.py index 31e09378b8cad9..8ad9086a5178ee 100644 --- a/src/sentry/runner/commands/exec.py +++ b/src/sentry/runner/commands/exec.py @@ -1,3 +1,4 @@ +from typing import int import sys import click diff --git a/src/sentry/runner/commands/execfile.py b/src/sentry/runner/commands/execfile.py index 7452d90d608b6b..e8ac5e9f37d5c5 100644 --- a/src/sentry/runner/commands/execfile.py +++ b/src/sentry/runner/commands/execfile.py @@ -1,3 +1,4 @@ +from typing import int import pathlib import sys diff --git a/src/sentry/runner/commands/files.py b/src/sentry/runner/commands/files.py index 24dc0d9cb838fe..1e570c71cd54e5 100644 --- a/src/sentry/runner/commands/files.py +++ b/src/sentry/runner/commands/files.py @@ -1,3 +1,4 @@ +from typing import int import click import yaml diff --git a/src/sentry/runner/commands/help.py b/src/sentry/runner/commands/help.py index 034064d8c2b1c3..d8c7b568289bd8 100644 --- a/src/sentry/runner/commands/help.py +++ b/src/sentry/runner/commands/help.py @@ -1,3 +1,4 @@ +from typing import int import click diff --git a/src/sentry/runner/commands/init.py b/src/sentry/runner/commands/init.py index c01e26896b46d1..527c4828c4d26b 100644 --- a/src/sentry/runner/commands/init.py +++ b/src/sentry/runner/commands/init.py @@ -1,3 +1,4 @@ +from typing import int import importlib.resources import os diff --git a/src/sentry/runner/commands/killswitches.py b/src/sentry/runner/commands/killswitches.py index 69f835050dbe60..4746ee9632c0c7 100644 --- a/src/sentry/runner/commands/killswitches.py +++ b/src/sentry/runner/commands/killswitches.py @@ -1,6 +1,6 @@ import itertools import textwrap -from typing import IO, Any +from typing import IO, Any, int import click import yaml diff --git a/src/sentry/runner/commands/migrations.py b/src/sentry/runner/commands/migrations.py index 73abe017a8d7d1..5694bfb0b5ec45 100644 --- a/src/sentry/runner/commands/migrations.py +++ b/src/sentry/runner/commands/migrations.py @@ -1,3 +1,4 @@ +from typing import int import os import click diff --git a/src/sentry/runner/commands/notifications.py b/src/sentry/runner/commands/notifications.py index 0a57d03ffdeb21..38134e352e9382 100644 --- a/src/sentry/runner/commands/notifications.py +++ b/src/sentry/runner/commands/notifications.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -from typing import Any +from typing import int, Any import click diff --git a/src/sentry/runner/commands/performance.py b/src/sentry/runner/commands/performance.py index 7b426b3eca4144..4e629bf23c9fb3 100644 --- a/src/sentry/runner/commands/performance.py +++ b/src/sentry/runner/commands/performance.py @@ -1,6 +1,7 @@ #!/usr/bin/env python +from typing import int import os from inspect import isclass diff --git a/src/sentry/runner/commands/permissions.py b/src/sentry/runner/commands/permissions.py index d48c16164dd540..3eb0b4977fe522 100644 --- a/src/sentry/runner/commands/permissions.py +++ b/src/sentry/runner/commands/permissions.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING import click from django.db import router diff --git a/src/sentry/runner/commands/plugins.py b/src/sentry/runner/commands/plugins.py index 61f5990b833baf..597d7d26c418f4 100644 --- a/src/sentry/runner/commands/plugins.py +++ b/src/sentry/runner/commands/plugins.py @@ -1,3 +1,4 @@ +from typing import int import importlib.metadata import click diff --git a/src/sentry/runner/commands/presenters/audit_log_presenter.py b/src/sentry/runner/commands/presenters/audit_log_presenter.py index 184db5480fd458..00581c9a5a07d2 100644 --- a/src/sentry/runner/commands/presenters/audit_log_presenter.py +++ b/src/sentry/runner/commands/presenters/audit_log_presenter.py @@ -1,3 +1,4 @@ +from typing import int import itertools import logging from datetime import datetime, timezone diff --git a/src/sentry/runner/commands/presenters/consolepresenter.py b/src/sentry/runner/commands/presenters/consolepresenter.py index c20c0087cced2e..9612df30575109 100644 --- a/src/sentry/runner/commands/presenters/consolepresenter.py +++ b/src/sentry/runner/commands/presenters/consolepresenter.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import click from yaml import safe_dump diff --git a/src/sentry/runner/commands/presenters/optionspresenter.py b/src/sentry/runner/commands/presenters/optionspresenter.py index f333b2acf89cf8..33dfa6ebae814c 100644 --- a/src/sentry/runner/commands/presenters/optionspresenter.py +++ b/src/sentry/runner/commands/presenters/optionspresenter.py @@ -1,5 +1,5 @@ from abc import ABC, abstractmethod -from typing import Any +from typing import int, Any class OptionsPresenter(ABC): diff --git a/src/sentry/runner/commands/presenters/presenterdelegator.py b/src/sentry/runner/commands/presenters/presenterdelegator.py index a9db20eea22988..c238815a0f1bff 100644 --- a/src/sentry/runner/commands/presenters/presenterdelegator.py +++ b/src/sentry/runner/commands/presenters/presenterdelegator.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.runner.commands.presenters.consolepresenter import ConsolePresenter from sentry.runner.commands.presenters.webhookpresenter import WebhookPresenter diff --git a/src/sentry/runner/commands/presenters/webhookpresenter.py b/src/sentry/runner/commands/presenters/webhookpresenter.py index 3b9dd7ec3c2bd7..3ff6854a14771c 100644 --- a/src/sentry/runner/commands/presenters/webhookpresenter.py +++ b/src/sentry/runner/commands/presenters/webhookpresenter.py @@ -1,7 +1,7 @@ import hashlib import hmac import time -from typing import Any +from typing import int, Any import requests from django.conf import settings diff --git a/src/sentry/runner/commands/repair.py b/src/sentry/runner/commands/repair.py index df55c706309798..b350cb79322c9f 100644 --- a/src/sentry/runner/commands/repair.py +++ b/src/sentry/runner/commands/repair.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from contextlib import contextmanager diff --git a/src/sentry/runner/commands/rpcschema.py b/src/sentry/runner/commands/rpcschema.py index 881c385018a1ce..bac2e18a6a8630 100644 --- a/src/sentry/runner/commands/rpcschema.py +++ b/src/sentry/runner/commands/rpcschema.py @@ -2,7 +2,7 @@ import traceback from collections.abc import Iterable from dataclasses import dataclass -from typing import Any +from typing import int, Any import click from django.urls import reverse diff --git a/src/sentry/runner/commands/run.py b/src/sentry/runner/commands/run.py index 95260a333d49fe..1d78de28be6db8 100644 --- a/src/sentry/runner/commands/run.py +++ b/src/sentry/runner/commands/run.py @@ -5,7 +5,7 @@ import random import signal import time -from typing import Any +from typing import int, Any import click diff --git a/src/sentry/runner/commands/sendmail.py b/src/sentry/runner/commands/sendmail.py index 1bad8bad18a7e2..b7f58f28cb8f74 100644 --- a/src/sentry/runner/commands/sendmail.py +++ b/src/sentry/runner/commands/sendmail.py @@ -1,3 +1,4 @@ +from typing import int import email import click diff --git a/src/sentry/runner/commands/spans.py b/src/sentry/runner/commands/spans.py index 1fb4241231f471..c83b22fd5c3923 100644 --- a/src/sentry/runner/commands/spans.py +++ b/src/sentry/runner/commands/spans.py @@ -1,3 +1,4 @@ +from typing import int import os import shutil diff --git a/src/sentry/runner/commands/start.py b/src/sentry/runner/commands/start.py index 57270ac3b2ee0b..6b31e3643fd0f7 100644 --- a/src/sentry/runner/commands/start.py +++ b/src/sentry/runner/commands/start.py @@ -1,3 +1,4 @@ +from typing import int import sys import click diff --git a/src/sentry/runner/commands/tsdb.py b/src/sentry/runner/commands/tsdb.py index 8971cb098dc80f..ffb1da64a43969 100644 --- a/src/sentry/runner/commands/tsdb.py +++ b/src/sentry/runner/commands/tsdb.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Iterable from datetime import datetime, timedelta, timezone diff --git a/src/sentry/runner/commands/upgrade.py b/src/sentry/runner/commands/upgrade.py index a4f550382da291..a64c8364f87e52 100644 --- a/src/sentry/runner/commands/upgrade.py +++ b/src/sentry/runner/commands/upgrade.py @@ -1,3 +1,4 @@ +from typing import int import click from django.conf import settings from django.db import connections diff --git a/src/sentry/runner/decorators.py b/src/sentry/runner/decorators.py index 953e695fb764ec..9256d4ab86b6b5 100644 --- a/src/sentry/runner/decorators.py +++ b/src/sentry/runner/decorators.py @@ -1,6 +1,6 @@ import os from collections.abc import Callable -from typing import Concatenate, ParamSpec, TypeVar +from typing import Concatenate, ParamSpec, TypeVar, int import click diff --git a/src/sentry/runner/default_settings.py b/src/sentry/runner/default_settings.py index ea7520bae46bfb..a17f9a38d03683 100644 --- a/src/sentry/runner/default_settings.py +++ b/src/sentry/runner/default_settings.py @@ -1,3 +1,4 @@ +from typing import int """this module is lazily loaded -- it is ~/.sentry/sentry.conf.py overlayed on sentry.conf.server.""" from __future__ import annotations diff --git a/src/sentry/runner/formatting.py b/src/sentry/runner/formatting.py index 3be36216ae9f3d..5049e284af155c 100644 --- a/src/sentry/runner/formatting.py +++ b/src/sentry/runner/formatting.py @@ -1,7 +1,7 @@ from __future__ import annotations import re -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING if TYPE_CHECKING: import honcho.printer diff --git a/src/sentry/runner/importer.py b/src/sentry/runner/importer.py index 677d908900dfab..6c885cfa48c188 100644 --- a/src/sentry/runner/importer.py +++ b/src/sentry/runner/importer.py @@ -1,7 +1,7 @@ import importlib.metadata import os.path import types -from typing import Any +from typing import int, Any DEFAULT_SETTINGS_MODULE = "sentry.conf.server" SENTRY_CONF_PY = os.path.expanduser("~/.sentry/sentry.conf.py") diff --git a/src/sentry/runner/initializer.py b/src/sentry/runner/initializer.py index ffc72a0b6da8f6..4f2500486fdc9b 100644 --- a/src/sentry/runner/initializer.py +++ b/src/sentry/runner/initializer.py @@ -4,7 +4,7 @@ import logging import os import sys -from typing import IO, Any +from typing import IO, Any, int import click from django.conf import settings diff --git a/src/sentry/runner/main.py b/src/sentry/runner/main.py index f74fea6a8259bd..f50963bd7fc99f 100644 --- a/src/sentry/runner/main.py +++ b/src/sentry/runner/main.py @@ -1,3 +1,4 @@ +from typing import int import logging import os import sys diff --git a/src/sentry/runner/settings.py b/src/sentry/runner/settings.py index c039d441cb039a..ea8f71e0fbbf62 100644 --- a/src/sentry/runner/settings.py +++ b/src/sentry/runner/settings.py @@ -1,3 +1,4 @@ +from typing import int import os import warnings diff --git a/src/sentry/sdk_updates.py b/src/sentry/sdk_updates.py index 2e1fcb38be7f21..9f40f24c96c1f5 100644 --- a/src/sentry/sdk_updates.py +++ b/src/sentry/sdk_updates.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import TypedDict +from typing import int, TypedDict from django.conf import settings from django.core.cache import cache diff --git a/src/sentry/search/__init__.py b/src/sentry/search/__init__.py index 7631b7b44bbe4a..ccc9f31f567c55 100644 --- a/src/sentry/search/__init__.py +++ b/src/sentry/search/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/search/base.py b/src/sentry/search/base.py index 3c7d3f0b85f8bf..1b964ca0fc3bcc 100644 --- a/src/sentry/search/base.py +++ b/src/sentry/search/base.py @@ -2,7 +2,7 @@ from collections.abc import Mapping, Sequence from datetime import datetime -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.utils.services import Service diff --git a/src/sentry/search/eap/columns.py b/src/sentry/search/eap/columns.py index 01ff43c6e49b5c..7fe071998be91d 100644 --- a/src/sentry/search/eap/columns.py +++ b/src/sentry/search/eap/columns.py @@ -1,7 +1,7 @@ from collections.abc import Callable, Iterable, Mapping from dataclasses import dataclass, field from datetime import datetime -from typing import Any, Literal, TypeAlias, TypedDict, cast +from typing import Any, Literal, TypeAlias, TypedDict, cast, int from dateutil.tz import tz from sentry_protos.snuba.v1.attribute_conditional_aggregation_pb2 import ( diff --git a/src/sentry/search/eap/common_columns.py b/src/sentry/search/eap/common_columns.py index 95376b23810269..dc074a81e70622 100644 --- a/src/sentry/search/eap/common_columns.py +++ b/src/sentry/search/eap/common_columns.py @@ -1,3 +1,4 @@ +from typing import int from sentry.search.eap import constants from sentry.search.eap.columns import ResolvedAttribute, datetime_processor diff --git a/src/sentry/search/eap/constants.py b/src/sentry/search/eap/constants.py index 249671c8995a50..3b501ca1750933 100644 --- a/src/sentry/search/eap/constants.py +++ b/src/sentry/search/eap/constants.py @@ -1,4 +1,4 @@ -from typing import Literal +from typing import int, Literal from sentry_protos.snuba.v1.downsampled_storage_pb2 import DownsampledStorageConfig from sentry_protos.snuba.v1.endpoint_trace_item_table_pb2 import AggregationComparisonFilter, Column diff --git a/src/sentry/search/eap/normalizer.py b/src/sentry/search/eap/normalizer.py index fd2372172640a7..9f5ee50aa83e2f 100644 --- a/src/sentry/search/eap/normalizer.py +++ b/src/sentry/search/eap/normalizer.py @@ -1,3 +1,4 @@ +from typing import int def unquote_literal(value: str) -> str: if len(value) < 2 or value[0] != '"' or value[-1] != '"': return value diff --git a/src/sentry/search/eap/ourlogs/aggregates.py b/src/sentry/search/eap/ourlogs/aggregates.py index 543a8875c8aa02..674d9f8a7d8aad 100644 --- a/src/sentry/search/eap/ourlogs/aggregates.py +++ b/src/sentry/search/eap/ourlogs/aggregates.py @@ -1,3 +1,4 @@ +from typing import int from sentry_protos.snuba.v1.trace_item_attribute_pb2 import AttributeKey, Function from sentry.search.eap import constants diff --git a/src/sentry/search/eap/ourlogs/attributes.py b/src/sentry/search/eap/ourlogs/attributes.py index 2a56b810746dc3..81c32928e976e7 100644 --- a/src/sentry/search/eap/ourlogs/attributes.py +++ b/src/sentry/search/eap/ourlogs/attributes.py @@ -1,4 +1,4 @@ -from typing import Literal +from typing import int, Literal from sentry.search.eap import constants from sentry.search.eap.columns import ( diff --git a/src/sentry/search/eap/ourlogs/definitions.py b/src/sentry/search/eap/ourlogs/definitions.py index 2fe10eb8366534..8d0a963a14b132 100644 --- a/src/sentry/search/eap/ourlogs/definitions.py +++ b/src/sentry/search/eap/ourlogs/definitions.py @@ -1,3 +1,4 @@ +from typing import int from sentry_protos.snuba.v1.request_common_pb2 import TraceItemType from sentry.search.eap.columns import ColumnDefinitions diff --git a/src/sentry/search/eap/profile_functions/aggregates.py b/src/sentry/search/eap/profile_functions/aggregates.py index 168253fa759ba7..514a44abcb3576 100644 --- a/src/sentry/search/eap/profile_functions/aggregates.py +++ b/src/sentry/search/eap/profile_functions/aggregates.py @@ -1,3 +1,4 @@ +from typing import int from sentry.search.eap.ourlogs.aggregates import LOG_AGGREGATE_DEFINITIONS # For now, profile functions uses the same aggregates as logs diff --git a/src/sentry/search/eap/profile_functions/attributes.py b/src/sentry/search/eap/profile_functions/attributes.py index aa58928e65402e..f832cee01bd2eb 100644 --- a/src/sentry/search/eap/profile_functions/attributes.py +++ b/src/sentry/search/eap/profile_functions/attributes.py @@ -1,4 +1,4 @@ -from typing import Literal +from typing import int, Literal from sentry.search.eap import constants from sentry.search.eap.columns import ( diff --git a/src/sentry/search/eap/profile_functions/definitions.py b/src/sentry/search/eap/profile_functions/definitions.py index ca60342183f4f3..941a173d104442 100644 --- a/src/sentry/search/eap/profile_functions/definitions.py +++ b/src/sentry/search/eap/profile_functions/definitions.py @@ -1,3 +1,4 @@ +from typing import int from sentry_protos.snuba.v1.request_common_pb2 import TraceItemType from sentry.search.eap.columns import ColumnDefinitions diff --git a/src/sentry/search/eap/resolver.py b/src/sentry/search/eap/resolver.py index 84f580682882b5..8b5597df8f5608 100644 --- a/src/sentry/search/eap/resolver.py +++ b/src/sentry/search/eap/resolver.py @@ -2,7 +2,7 @@ from dataclasses import dataclass, field from datetime import datetime from re import Match -from typing import Any, Literal, cast +from typing import Any, Literal, cast, int import sentry_sdk from parsimonious.exceptions import ParseError diff --git a/src/sentry/search/eap/rpc_utils.py b/src/sentry/search/eap/rpc_utils.py index 2fb2465d41fc4e..3ec9ecee52fcae 100644 --- a/src/sentry/search/eap/rpc_utils.py +++ b/src/sentry/search/eap/rpc_utils.py @@ -1,3 +1,4 @@ +from typing import int from sentry_protos.snuba.v1.trace_item_filter_pb2 import AndFilter, TraceItemFilter diff --git a/src/sentry/search/eap/sampling.py b/src/sentry/search/eap/sampling.py index 5cc429ca4b2df7..cf302484a07a37 100644 --- a/src/sentry/search/eap/sampling.py +++ b/src/sentry/search/eap/sampling.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from sentry_protos.snuba.v1.downsampled_storage_pb2 import ( DownsampledStorageConfig, diff --git a/src/sentry/search/eap/spans/aggregates.py b/src/sentry/search/eap/spans/aggregates.py index 614077aa9d2e31..acac892ce94f68 100644 --- a/src/sentry/search/eap/spans/aggregates.py +++ b/src/sentry/search/eap/spans/aggregates.py @@ -1,4 +1,4 @@ -from typing import Literal, cast +from typing import Literal, cast, int from sentry_protos.snuba.v1.trace_item_attribute_pb2 import ( AttributeKey, diff --git a/src/sentry/search/eap/spans/attributes.py b/src/sentry/search/eap/spans/attributes.py index c5d089b116775d..d14960b47395be 100644 --- a/src/sentry/search/eap/spans/attributes.py +++ b/src/sentry/search/eap/spans/attributes.py @@ -1,7 +1,7 @@ import logging import os from dataclasses import replace -from typing import Any, Literal +from typing import Any, Literal, int from sentry_protos.snuba.v1.trace_item_attribute_pb2 import VirtualColumnContext diff --git a/src/sentry/search/eap/spans/definitions.py b/src/sentry/search/eap/spans/definitions.py index 03c6eca4f040e4..cb70bc90c1d3d0 100644 --- a/src/sentry/search/eap/spans/definitions.py +++ b/src/sentry/search/eap/spans/definitions.py @@ -1,3 +1,4 @@ +from typing import int from sentry_protos.snuba.v1.request_common_pb2 import TraceItemType from sentry.search.eap.columns import ColumnDefinitions diff --git a/src/sentry/search/eap/spans/filter_aliases.py b/src/sentry/search/eap/spans/filter_aliases.py index 7c6bff10435e41..ad6c1c217a811d 100644 --- a/src/sentry/search/eap/spans/filter_aliases.py +++ b/src/sentry/search/eap/spans/filter_aliases.py @@ -1,5 +1,5 @@ import string -from typing import Literal +from typing import int, Literal from sentry.api.event_search import SearchFilter, SearchKey, SearchValue from sentry.exceptions import InvalidSearchQuery diff --git a/src/sentry/search/eap/spans/formulas.py b/src/sentry/search/eap/spans/formulas.py index d8dcdf3fc69959..5c421aa0fd908e 100644 --- a/src/sentry/search/eap/spans/formulas.py +++ b/src/sentry/search/eap/spans/formulas.py @@ -1,4 +1,4 @@ -from typing import Literal, cast +from typing import Literal, cast, int from sentry_protos.snuba.v1.attribute_conditional_aggregation_pb2 import ( AttributeConditionalAggregation, diff --git a/src/sentry/search/eap/spans/sentry_conventions/__init__.py b/src/sentry/search/eap/spans/sentry_conventions/__init__.py index 4cd46ad447303c..6bb79175ba986a 100644 --- a/src/sentry/search/eap/spans/sentry_conventions/__init__.py +++ b/src/sentry/search/eap/spans/sentry_conventions/__init__.py @@ -1,3 +1,4 @@ +from typing import int import os SENTRY_CONVENTIONS_DIRECTORY = os.path.join(os.path.dirname(os.path.abspath(__file__))) diff --git a/src/sentry/search/eap/spans/utils.py b/src/sentry/search/eap/spans/utils.py index 0396ac41a90856..c6e599992a463e 100644 --- a/src/sentry/search/eap/spans/utils.py +++ b/src/sentry/search/eap/spans/utils.py @@ -1,4 +1,4 @@ -from typing import cast +from typing import int, cast from sentry_protos.snuba.v1.endpoint_trace_item_table_pb2 import Column from sentry_protos.snuba.v1.trace_item_attribute_pb2 import AttributeKey diff --git a/src/sentry/search/eap/trace_metrics/aggregates.py b/src/sentry/search/eap/trace_metrics/aggregates.py index b97513651edc9e..2a02f0a6601234 100644 --- a/src/sentry/search/eap/trace_metrics/aggregates.py +++ b/src/sentry/search/eap/trace_metrics/aggregates.py @@ -1,3 +1,4 @@ +from typing import int from sentry_protos.snuba.v1.trace_item_attribute_pb2 import AttributeKey, Function from sentry.search.eap import constants diff --git a/src/sentry/search/eap/trace_metrics/attributes.py b/src/sentry/search/eap/trace_metrics/attributes.py index 3882bea58727d3..e1f50fad078092 100644 --- a/src/sentry/search/eap/trace_metrics/attributes.py +++ b/src/sentry/search/eap/trace_metrics/attributes.py @@ -1,4 +1,4 @@ -from typing import Literal +from typing import int, Literal from sentry.search.eap import constants from sentry.search.eap.columns import ( diff --git a/src/sentry/search/eap/trace_metrics/config.py b/src/sentry/search/eap/trace_metrics/config.py index ceec30f6e90289..4ca76e00ac0b6e 100644 --- a/src/sentry/search/eap/trace_metrics/config.py +++ b/src/sentry/search/eap/trace_metrics/config.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import cast +from typing import int, cast from rest_framework.request import Request from sentry_protos.snuba.v1.trace_item_attribute_pb2 import AttributeKey, AttributeValue diff --git a/src/sentry/search/eap/trace_metrics/definitions.py b/src/sentry/search/eap/trace_metrics/definitions.py index 01b2ecd5007cff..7d459c65de1bad 100644 --- a/src/sentry/search/eap/trace_metrics/definitions.py +++ b/src/sentry/search/eap/trace_metrics/definitions.py @@ -1,3 +1,4 @@ +from typing import int from sentry_protos.snuba.v1.request_common_pb2 import TraceItemType from sentry.search.eap.columns import ColumnDefinitions diff --git a/src/sentry/search/eap/trace_metrics/formulas.py b/src/sentry/search/eap/trace_metrics/formulas.py index a3584bea7e7c91..00099d302b9264 100644 --- a/src/sentry/search/eap/trace_metrics/formulas.py +++ b/src/sentry/search/eap/trace_metrics/formulas.py @@ -1,4 +1,4 @@ -from typing import cast +from typing import int, cast from sentry_protos.snuba.v1.endpoint_trace_item_table_pb2 import Column from sentry_protos.snuba.v1.formula_pb2 import Literal as LiteralValue diff --git a/src/sentry/search/eap/types.py b/src/sentry/search/eap/types.py index bc97b73be9fa16..ad8378a2b88f77 100644 --- a/src/sentry/search/eap/types.py +++ b/src/sentry/search/eap/types.py @@ -1,6 +1,6 @@ from dataclasses import dataclass, field from enum import Enum -from typing import TYPE_CHECKING, Literal, NotRequired, TypedDict +from typing import TYPE_CHECKING, Literal, NotRequired, TypedDict, int from sentry_protos.snuba.v1.request_common_pb2 import PageToken from sentry_protos.snuba.v1.trace_item_attribute_pb2 import Reliability diff --git a/src/sentry/search/eap/uptime_results/attributes.py b/src/sentry/search/eap/uptime_results/attributes.py index a43ce07920a508..e9a833d196785f 100644 --- a/src/sentry/search/eap/uptime_results/attributes.py +++ b/src/sentry/search/eap/uptime_results/attributes.py @@ -1,3 +1,4 @@ +from typing import int from sentry.search.eap import constants from sentry.search.eap.columns import ResolvedAttribute, datetime_processor from sentry.search.eap.common_columns import COMMON_COLUMNS diff --git a/src/sentry/search/eap/uptime_results/definitions.py b/src/sentry/search/eap/uptime_results/definitions.py index 2fb6fa159e3e95..c52c64958577e2 100644 --- a/src/sentry/search/eap/uptime_results/definitions.py +++ b/src/sentry/search/eap/uptime_results/definitions.py @@ -1,3 +1,4 @@ +from typing import int from sentry_protos.snuba.v1.request_common_pb2 import TraceItemType from sentry.search.eap.columns import ColumnDefinitions diff --git a/src/sentry/search/eap/utils.py b/src/sentry/search/eap/utils.py index 9f890f4329f452..37ee54ea148208 100644 --- a/src/sentry/search/eap/utils.py +++ b/src/sentry/search/eap/utils.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import Literal +from typing import int, Literal from google.protobuf.timestamp_pb2 import Timestamp from sentry_protos.snuba.v1.endpoint_time_series_pb2 import TimeSeriesRequest diff --git a/src/sentry/search/eap/validator.py b/src/sentry/search/eap/validator.py index f2ba8af5892c8a..6d720f8dd57f17 100644 --- a/src/sentry/search/eap/validator.py +++ b/src/sentry/search/eap/validator.py @@ -1,5 +1,5 @@ from collections.abc import Callable -from typing import Any +from typing import int, Any from sentry.exceptions import InvalidSearchQuery diff --git a/src/sentry/search/events/builder/base.py b/src/sentry/search/events/builder/base.py index fe35ce6028c8c1..2cbe78e3bb479e 100644 --- a/src/sentry/search/events/builder/base.py +++ b/src/sentry/search/events/builder/base.py @@ -3,7 +3,7 @@ from collections.abc import Callable, Mapping, Sequence from datetime import datetime, timedelta from re import Match -from typing import Any, Union, cast +from typing import Any, Union, cast, int import sentry_sdk from django.utils.functional import cached_property diff --git a/src/sentry/search/events/builder/discover.py b/src/sentry/search/events/builder/discover.py index f00eccbb45fb1b..94e65d01dfddbb 100644 --- a/src/sentry/search/events/builder/discover.py +++ b/src/sentry/search/events/builder/discover.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from snuba_sdk import ( AliasedExpression, diff --git a/src/sentry/search/events/builder/errors.py b/src/sentry/search/events/builder/errors.py index 86b6070bcf2008..491d5121013f09 100644 --- a/src/sentry/search/events/builder/errors.py +++ b/src/sentry/search/events/builder/errors.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import dataclasses diff --git a/src/sentry/search/events/builder/issue_platform.py b/src/sentry/search/events/builder/issue_platform.py index 19499436f57376..7a83f7cef187f3 100644 --- a/src/sentry/search/events/builder/issue_platform.py +++ b/src/sentry/search/events/builder/issue_platform.py @@ -1,3 +1,4 @@ +from typing import int from sentry.issues.query import manual_group_on_time_aggregation from sentry.search.events.builder.discover import TimeseriesQueryBuilder from sentry.search.events.types import ParamsType, QueryBuilderConfig, SelectType, SnubaParams diff --git a/src/sentry/search/events/builder/metrics.py b/src/sentry/search/events/builder/metrics.py index fda1be90cb4cbf..175c4c2921bedd 100644 --- a/src/sentry/search/events/builder/metrics.py +++ b/src/sentry/search/events/builder/metrics.py @@ -3,7 +3,7 @@ from collections import defaultdict from collections.abc import Mapping, Sequence from datetime import datetime -from typing import Any +from typing import int, Any import sentry_sdk from django.utils.functional import cached_property diff --git a/src/sentry/search/events/builder/profile_functions.py b/src/sentry/search/events/builder/profile_functions.py index 08ee6e71c8520d..04178f83cdf9da 100644 --- a/src/sentry/search/events/builder/profile_functions.py +++ b/src/sentry/search/events/builder/profile_functions.py @@ -1,5 +1,5 @@ from datetime import UTC, datetime -from typing import Any, Protocol +from typing import Any, Protocol, int from snuba_sdk import AliasedExpression, And, Column, Condition, CurriedFunction, Op, Or from snuba_sdk.function import Function diff --git a/src/sentry/search/events/builder/profiles.py b/src/sentry/search/events/builder/profiles.py index e1fcaff0bb4cda..150725bb16300d 100644 --- a/src/sentry/search/events/builder/profiles.py +++ b/src/sentry/search/events/builder/profiles.py @@ -1,4 +1,4 @@ -from typing import Protocol +from typing import int, Protocol from snuba_sdk import Column diff --git a/src/sentry/search/events/builder/sessions.py b/src/sentry/search/events/builder/sessions.py index f19455d057a468..89cf440d920a44 100644 --- a/src/sentry/search/events/builder/sessions.py +++ b/src/sentry/search/events/builder/sessions.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import Any +from typing import int, Any from snuba_sdk import Column, Entity, Flags, Granularity, Query, Request diff --git a/src/sentry/search/events/builder/spans_indexed.py b/src/sentry/search/events/builder/spans_indexed.py index 698513c3536539..d1f2f6ca92638b 100644 --- a/src/sentry/search/events/builder/spans_indexed.py +++ b/src/sentry/search/events/builder/spans_indexed.py @@ -1,3 +1,4 @@ +from typing import int from sentry_relay.consts import SPAN_STATUS_CODE_TO_NAME from snuba_sdk import AliasedExpression, Column, Function diff --git a/src/sentry/search/events/builder/spans_metrics.py b/src/sentry/search/events/builder/spans_metrics.py index 1651337dcc153a..3ac86e7c674385 100644 --- a/src/sentry/search/events/builder/spans_metrics.py +++ b/src/sentry/search/events/builder/spans_metrics.py @@ -1,3 +1,4 @@ +from typing import int from snuba_sdk import Condition, Granularity from sentry.search.events import constants diff --git a/src/sentry/search/events/builder/utils.py b/src/sentry/search/events/builder/utils.py index 85f89f97c2d010..16990d52d08cd4 100644 --- a/src/sentry/search/events/builder/utils.py +++ b/src/sentry/search/events/builder/utils.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Callable from datetime import datetime, timedelta diff --git a/src/sentry/search/events/constants.py b/src/sentry/search/events/constants.py index 44c835c6f1d4df..742dce8ec78342 100644 --- a/src/sentry/search/events/constants.py +++ b/src/sentry/search/events/constants.py @@ -1,5 +1,5 @@ import re -from typing import Literal, TypedDict +from typing import Literal, TypedDict, int from sentry.snuba.dataset import Dataset from sentry.utils.snuba import DATASETS diff --git a/src/sentry/search/events/datasets/base.py b/src/sentry/search/events/datasets/base.py index 4bd0d3a8186eea..27a1553a7ad07a 100644 --- a/src/sentry/search/events/datasets/base.py +++ b/src/sentry/search/events/datasets/base.py @@ -2,7 +2,7 @@ import abc from collections.abc import Callable, Mapping -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int if TYPE_CHECKING: from sentry.search.events.builder.base import BaseQueryBuilder diff --git a/src/sentry/search/events/datasets/discover.py b/src/sentry/search/events/datasets/discover.py index 52bcf54f81dad3..d14675d197db1f 100644 --- a/src/sentry/search/events/datasets/discover.py +++ b/src/sentry/search/events/datasets/discover.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Callable, Mapping diff --git a/src/sentry/search/events/datasets/field_aliases.py b/src/sentry/search/events/datasets/field_aliases.py index 501ab596ae03db..4b3749b7c55173 100644 --- a/src/sentry/search/events/datasets/field_aliases.py +++ b/src/sentry/search/events/datasets/field_aliases.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import sentry_sdk from snuba_sdk import AliasedExpression, Column, Function diff --git a/src/sentry/search/events/datasets/filter_aliases.py b/src/sentry/search/events/datasets/filter_aliases.py index f68ffaeff7776f..4ab84cc5cde2f7 100644 --- a/src/sentry/search/events/datasets/filter_aliases.py +++ b/src/sentry/search/events/datasets/filter_aliases.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Mapping diff --git a/src/sentry/search/events/datasets/function_aliases.py b/src/sentry/search/events/datasets/function_aliases.py index e917e72fa87121..ee892f16557778 100644 --- a/src/sentry/search/events/datasets/function_aliases.py +++ b/src/sentry/search/events/datasets/function_aliases.py @@ -1,5 +1,5 @@ from collections.abc import Callable, Mapping, Sequence -from typing import Any +from typing import int, Any from snuba_sdk import Column, Entity, Function diff --git a/src/sentry/search/events/datasets/metrics.py b/src/sentry/search/events/datasets/metrics.py index 240ba1988ed03e..1f15a0262b2ea4 100644 --- a/src/sentry/search/events/datasets/metrics.py +++ b/src/sentry/search/events/datasets/metrics.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Callable, Mapping, MutableMapping diff --git a/src/sentry/search/events/datasets/metrics_layer.py b/src/sentry/search/events/datasets/metrics_layer.py index 5ee3510fd2c0c9..13021f58b6d2f6 100644 --- a/src/sentry/search/events/datasets/metrics_layer.py +++ b/src/sentry/search/events/datasets/metrics_layer.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Callable, Mapping diff --git a/src/sentry/search/events/datasets/profile_functions.py b/src/sentry/search/events/datasets/profile_functions.py index 1a7876ab888f86..d06fff5a01e235 100644 --- a/src/sentry/search/events/datasets/profile_functions.py +++ b/src/sentry/search/events/datasets/profile_functions.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import uuid from collections.abc import Callable, Mapping diff --git a/src/sentry/search/events/datasets/profiles.py b/src/sentry/search/events/datasets/profiles.py index 139a691022ba0a..d5bd21a98e35b0 100644 --- a/src/sentry/search/events/datasets/profiles.py +++ b/src/sentry/search/events/datasets/profiles.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Callable, Mapping from dataclasses import dataclass diff --git a/src/sentry/search/events/datasets/sessions.py b/src/sentry/search/events/datasets/sessions.py index d2430ef6a8c47e..143b392149d402 100644 --- a/src/sentry/search/events/datasets/sessions.py +++ b/src/sentry/search/events/datasets/sessions.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Callable, Mapping diff --git a/src/sentry/search/events/datasets/spans_indexed.py b/src/sentry/search/events/datasets/spans_indexed.py index 6f2f62940c4c26..3aaafd3ad8b0a0 100644 --- a/src/sentry/search/events/datasets/spans_indexed.py +++ b/src/sentry/search/events/datasets/spans_indexed.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Callable, Mapping diff --git a/src/sentry/search/events/datasets/spans_metrics.py b/src/sentry/search/events/datasets/spans_metrics.py index 48d1708c10407d..17a8b3ef19dc07 100644 --- a/src/sentry/search/events/datasets/spans_metrics.py +++ b/src/sentry/search/events/datasets/spans_metrics.py @@ -2,7 +2,7 @@ from collections.abc import Callable, Mapping from datetime import datetime -from typing import TypedDict +from typing import int, TypedDict import sentry_sdk from snuba_sdk import Column, Condition, Function, Identifier, Op, OrderBy diff --git a/src/sentry/search/events/fields.py b/src/sentry/search/events/fields.py index 109492951a4d8e..d2101cb874485f 100644 --- a/src/sentry/search/events/fields.py +++ b/src/sentry/search/events/fields.py @@ -6,7 +6,7 @@ from copy import copy, deepcopy from datetime import datetime, timezone from re import Match -from typing import Any, NamedTuple +from typing import Any, NamedTuple, int import sentry_sdk from sentry_relay.consts import SPAN_STATUS_NAME_TO_CODE diff --git a/src/sentry/search/events/filter.py b/src/sentry/search/events/filter.py index bb5f7792e2bd6f..0fce185aad673b 100644 --- a/src/sentry/search/events/filter.py +++ b/src/sentry/search/events/filter.py @@ -2,7 +2,7 @@ from collections.abc import Callable, Sequence from datetime import datetime -from typing import Any, TypedDict, Union +from typing import Any, TypedDict, Union, int import orjson from sentry_relay.consts import SPAN_STATUS_NAME_TO_CODE diff --git a/src/sentry/search/events/types.py b/src/sentry/search/events/types.py index 32a63bd7918e2a..b9a141856c61e0 100644 --- a/src/sentry/search/events/types.py +++ b/src/sentry/search/events/types.py @@ -5,7 +5,7 @@ from copy import deepcopy from dataclasses import dataclass, field from datetime import datetime, timedelta, timezone -from typing import Any, Literal, NotRequired, Optional, TypedDict, Union +from typing import Any, Literal, NotRequired, Optional, TypedDict, Union, int from django.utils import timezone as django_timezone from google.protobuf.timestamp_pb2 import Timestamp diff --git a/src/sentry/search/snuba/__init__.py b/src/sentry/search/snuba/__init__.py index 98599af813e933..91e0087f194bb6 100644 --- a/src/sentry/search/snuba/__init__.py +++ b/src/sentry/search/snuba/__init__.py @@ -1 +1,2 @@ +from typing import int from .backend import * # NOQA diff --git a/src/sentry/search/snuba/backend.py b/src/sentry/search/snuba/backend.py index 8daaed371d7c7a..aac75e7bcd63f3 100644 --- a/src/sentry/search/snuba/backend.py +++ b/src/sentry/search/snuba/backend.py @@ -6,7 +6,7 @@ from collections import defaultdict from collections.abc import Callable, Mapping, Sequence from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from django.db.models import Q from django.utils import timezone diff --git a/src/sentry/search/snuba/executors.py b/src/sentry/search/snuba/executors.py index b19dbc7712f0ad..aac33e46a0b5c7 100644 --- a/src/sentry/search/snuba/executors.py +++ b/src/sentry/search/snuba/executors.py @@ -10,7 +10,7 @@ from enum import Enum, auto from hashlib import md5 from math import floor -from typing import Any, TypedDict, cast +from typing import Any, TypedDict, cast, int import sentry_sdk from django.db.models import Q diff --git a/src/sentry/search/utils.py b/src/sentry/search/utils.py index 9146ca6fb99885..7a69505230a017 100644 --- a/src/sentry/search/utils.py +++ b/src/sentry/search/utils.py @@ -4,7 +4,7 @@ from collections.abc import Callable, Sequence from datetime import datetime, timedelta, timezone from enum import Enum -from typing import Any, Optional +from typing import Any, Optional, int from django.contrib.auth.models import AnonymousUser from django.db import DataError, connections, router diff --git a/src/sentry/security/csp.py b/src/sentry/security/csp.py index 33e87c83229b07..7f0388a8f57e89 100644 --- a/src/sentry/security/csp.py +++ b/src/sentry/security/csp.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from urllib.parse import urlunsplit diff --git a/src/sentry/security/emails.py b/src/sentry/security/emails.py index afc96d33bd1169..10da874f3d3a08 100644 --- a/src/sentry/security/emails.py +++ b/src/sentry/security/emails.py @@ -2,7 +2,7 @@ from collections.abc import Mapping from datetime import datetime -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.contrib.auth.models import AnonymousUser from django.utils import timezone diff --git a/src/sentry/security/utils.py b/src/sentry/security/utils.py index 0a91323d11a810..a863f920209f9e 100644 --- a/src/sentry/security/utils.py +++ b/src/sentry/security/utils.py @@ -3,7 +3,7 @@ import logging from collections.abc import Mapping from datetime import datetime -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.contrib.auth.models import AnonymousUser from django.utils import timezone diff --git a/src/sentry/seer/anomaly_detection/delete_rule.py b/src/sentry/seer/anomaly_detection/delete_rule.py index 1c9d23d794849b..03236da5da0f14 100644 --- a/src/sentry/seer/anomaly_detection/delete_rule.py +++ b/src/sentry/seer/anomaly_detection/delete_rule.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from django.conf import settings from urllib3.exceptions import MaxRetryError, TimeoutError diff --git a/src/sentry/seer/anomaly_detection/get_anomaly_data.py b/src/sentry/seer/anomaly_detection/get_anomaly_data.py index d8992a125edf3f..51841222ef73d2 100644 --- a/src/sentry/seer/anomaly_detection/get_anomaly_data.py +++ b/src/sentry/seer/anomaly_detection/get_anomaly_data.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.conf import settings diff --git a/src/sentry/seer/anomaly_detection/get_historical_anomalies.py b/src/sentry/seer/anomaly_detection/get_historical_anomalies.py index e32249d730450d..79f6cf143ffa21 100644 --- a/src/sentry/seer/anomaly_detection/get_historical_anomalies.py +++ b/src/sentry/seer/anomaly_detection/get_historical_anomalies.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import datetime, timedelta diff --git a/src/sentry/seer/anomaly_detection/store_data.py b/src/sentry/seer/anomaly_detection/store_data.py index 065083dc30f0c4..60b8d4b08a3b4f 100644 --- a/src/sentry/seer/anomaly_detection/store_data.py +++ b/src/sentry/seer/anomaly_detection/store_data.py @@ -1,7 +1,7 @@ import logging from datetime import datetime, timedelta from enum import StrEnum -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/seer/anomaly_detection/store_data_workflow_engine.py b/src/sentry/seer/anomaly_detection/store_data_workflow_engine.py index eb5d08d4c79462..42aac03d9057dc 100644 --- a/src/sentry/seer/anomaly_detection/store_data_workflow_engine.py +++ b/src/sentry/seer/anomaly_detection/store_data_workflow_engine.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/seer/anomaly_detection/types.py b/src/sentry/seer/anomaly_detection/types.py index 4882e9c8c6917e..74e1628b1ab52c 100644 --- a/src/sentry/seer/anomaly_detection/types.py +++ b/src/sentry/seer/anomaly_detection/types.py @@ -1,5 +1,5 @@ from enum import IntEnum, StrEnum -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int class Anomaly(TypedDict): diff --git a/src/sentry/seer/anomaly_detection/utils.py b/src/sentry/seer/anomaly_detection/utils.py index 659a51182ea5fa..e40e50bced75af 100644 --- a/src/sentry/seer/anomaly_detection/utils.py +++ b/src/sentry/seer/anomaly_detection/utils.py @@ -1,5 +1,5 @@ from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from django.utils import timezone from django.utils.datastructures import MultiValueDict diff --git a/src/sentry/seer/assisted_query/issues_tools.py b/src/sentry/seer/assisted_query/issues_tools.py index d71101a070b7d1..f888c56c9d00ea 100644 --- a/src/sentry/seer/assisted_query/issues_tools.py +++ b/src/sentry/seer/assisted_query/issues_tools.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from sentry.api import client from sentry.issues.grouptype import registry as group_type_registry diff --git a/src/sentry/seer/autofix/autofix.py b/src/sentry/seer/autofix/autofix.py index 8584f35f0f0d1d..dbc0b7a33bf98c 100644 --- a/src/sentry/seer/autofix/autofix.py +++ b/src/sentry/seer/autofix/autofix.py @@ -3,7 +3,7 @@ import concurrent.futures import logging from datetime import datetime, timedelta -from typing import Any +from typing import int, Any import orjson import requests diff --git a/src/sentry/seer/autofix/autofix_tools.py b/src/sentry/seer/autofix/autofix_tools.py index b120d6785996be..19fab86c769497 100644 --- a/src/sentry/seer/autofix/autofix_tools.py +++ b/src/sentry/seer/autofix/autofix_tools.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import EventSerializer, serialize from sentry.seer.explorer.utils import _convert_profile_to_execution_tree, fetch_profile_data from sentry.services import eventstore diff --git a/src/sentry/seer/autofix/coding_agent.py b/src/sentry/seer/autofix/coding_agent.py index 628850f7f75107..9f878cecd221e8 100644 --- a/src/sentry/seer/autofix/coding_agent.py +++ b/src/sentry/seer/autofix/coding_agent.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import secrets diff --git a/src/sentry/seer/autofix/constants.py b/src/sentry/seer/autofix/constants.py index 8ad7143cfce437..e7ba5ec296e884 100644 --- a/src/sentry/seer/autofix/constants.py +++ b/src/sentry/seer/autofix/constants.py @@ -1,3 +1,4 @@ +from typing import int import enum diff --git a/src/sentry/seer/autofix/issue_summary.py b/src/sentry/seer/autofix/issue_summary.py index a29be8c95c4841..c86409f930f1c6 100644 --- a/src/sentry/seer/autofix/issue_summary.py +++ b/src/sentry/seer/autofix/issue_summary.py @@ -2,7 +2,7 @@ import logging from datetime import timedelta -from typing import Any +from typing import int, Any import orjson import requests diff --git a/src/sentry/seer/autofix/types.py b/src/sentry/seer/autofix/types.py index 701e838a281643..e56be8ef53a964 100644 --- a/src/sentry/seer/autofix/types.py +++ b/src/sentry/seer/autofix/types.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, TypedDict +from typing import Any, TypedDict, int class AutofixPostResponse(TypedDict): diff --git a/src/sentry/seer/autofix/utils.py b/src/sentry/seer/autofix/utils.py index deb848980c1926..adf48c9b9145da 100644 --- a/src/sentry/seer/autofix/utils.py +++ b/src/sentry/seer/autofix/utils.py @@ -1,7 +1,7 @@ import logging from datetime import UTC, datetime from enum import StrEnum -from typing import TypedDict +from typing import int, TypedDict import orjson import requests diff --git a/src/sentry/seer/autofix/webhooks.py b/src/sentry/seer/autofix/webhooks.py index c1d35e823f1491..5ea68cdc13ba7e 100644 --- a/src/sentry/seer/autofix/webhooks.py +++ b/src/sentry/seer/autofix/webhooks.py @@ -1,4 +1,4 @@ -from typing import Any, Literal +from typing import Any, Literal, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/seer/breakpoints.py b/src/sentry/seer/breakpoints.py index 80e0e047abec4f..b837138f7cc828 100644 --- a/src/sentry/seer/breakpoints.py +++ b/src/sentry/seer/breakpoints.py @@ -1,6 +1,6 @@ import logging from collections.abc import Mapping -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/seer/constants.py b/src/sentry/seer/constants.py index 575b04731fa3de..9bfb637e204746 100644 --- a/src/sentry/seer/constants.py +++ b/src/sentry/seer/constants.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.types import IntegrationProviderSlug # Supported repository providers for Seer features diff --git a/src/sentry/seer/endpoints/compare.py b/src/sentry/seer/endpoints/compare.py index 15d39cb394187c..4aba77fd4102cd 100644 --- a/src/sentry/seer/endpoints/compare.py +++ b/src/sentry/seer/endpoints/compare.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any import orjson import requests diff --git a/src/sentry/seer/endpoints/group_ai_autofix.py b/src/sentry/seer/endpoints/group_ai_autofix.py index 5aa55093fda2ac..29f447ae6bb108 100644 --- a/src/sentry/seer/endpoints/group_ai_autofix.py +++ b/src/sentry/seer/endpoints/group_ai_autofix.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from drf_spectacular.utils import extend_schema from rest_framework import serializers diff --git a/src/sentry/seer/endpoints/group_ai_summary.py b/src/sentry/seer/endpoints/group_ai_summary.py index 028b21c8501f04..385343bf6a4047 100644 --- a/src/sentry/seer/endpoints/group_ai_summary.py +++ b/src/sentry/seer/endpoints/group_ai_summary.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/seer/endpoints/group_autofix_setup_check.py b/src/sentry/seer/endpoints/group_autofix_setup_check.py index 3d650dc3a3ab97..243e58d1420309 100644 --- a/src/sentry/seer/endpoints/group_autofix_setup_check.py +++ b/src/sentry/seer/endpoints/group_autofix_setup_check.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/seer/endpoints/group_autofix_update.py b/src/sentry/seer/endpoints/group_autofix_update.py index ce04e7870c9beb..de7764236e1f3f 100644 --- a/src/sentry/seer/endpoints/group_autofix_update.py +++ b/src/sentry/seer/endpoints/group_autofix_update.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/seer/endpoints/organization_events_anomalies.py b/src/sentry/seer/endpoints/organization_events_anomalies.py index 5742b16ce111c7..3ae55255c0b3b2 100644 --- a/src/sentry/seer/endpoints/organization_events_anomalies.py +++ b/src/sentry/seer/endpoints/organization_events_anomalies.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/seer/endpoints/organization_seer_explorer_chat.py b/src/sentry/seer/endpoints/organization_seer_explorer_chat.py index ebdbaf91c34141..10a89629fd8fbb 100644 --- a/src/sentry/seer/endpoints/organization_seer_explorer_chat.py +++ b/src/sentry/seer/endpoints/organization_seer_explorer_chat.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/seer/endpoints/organization_seer_explorer_runs.py b/src/sentry/seer/endpoints/organization_seer_explorer_runs.py index fdb4a0ad44dba2..1d47b480512c77 100644 --- a/src/sentry/seer/endpoints/organization_seer_explorer_runs.py +++ b/src/sentry/seer/endpoints/organization_seer_explorer_runs.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from rest_framework.exceptions import PermissionDenied from rest_framework.request import Request diff --git a/src/sentry/seer/endpoints/organization_seer_explorer_update.py b/src/sentry/seer/endpoints/organization_seer_explorer_update.py index 0f8a662503d77d..4d98066f3bfaf6 100644 --- a/src/sentry/seer/endpoints/organization_seer_explorer_update.py +++ b/src/sentry/seer/endpoints/organization_seer_explorer_update.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/seer/endpoints/organization_seer_setup_check.py b/src/sentry/seer/endpoints/organization_seer_setup_check.py index 90a31abce48244..f118ed28e80f05 100644 --- a/src/sentry/seer/endpoints/organization_seer_setup_check.py +++ b/src/sentry/seer/endpoints/organization_seer_setup_check.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/seer/endpoints/organization_trace_summary.py b/src/sentry/seer/endpoints/organization_trace_summary.py index 948c21647ab625..1bbd6291967fec 100644 --- a/src/sentry/seer/endpoints/organization_trace_summary.py +++ b/src/sentry/seer/endpoints/organization_trace_summary.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/seer/endpoints/project_seer_preferences.py b/src/sentry/seer/endpoints/project_seer_preferences.py index 7c391821b7acd4..4a022acbac9d57 100644 --- a/src/sentry/seer/endpoints/project_seer_preferences.py +++ b/src/sentry/seer/endpoints/project_seer_preferences.py @@ -2,7 +2,7 @@ import logging from enum import StrEnum -from typing import Literal +from typing import int, Literal import orjson import requests diff --git a/src/sentry/seer/endpoints/seer_rpc.py b/src/sentry/seer/endpoints/seer_rpc.py index 536f04230c015a..88c332b5371576 100644 --- a/src/sentry/seer/endpoints/seer_rpc.py +++ b/src/sentry/seer/endpoints/seer_rpc.py @@ -5,7 +5,7 @@ import uuid from collections.abc import Callable from concurrent.futures import ThreadPoolExecutor, as_completed -from typing import Any, TypedDict +from typing import Any, TypedDict, int import sentry_sdk from cryptography.fernet import Fernet diff --git a/src/sentry/seer/endpoints/trace_explorer_ai_query.py b/src/sentry/seer/endpoints/trace_explorer_ai_query.py index 5548155f3553c8..7d80e5ac2481d7 100644 --- a/src/sentry/seer/endpoints/trace_explorer_ai_query.py +++ b/src/sentry/seer/endpoints/trace_explorer_ai_query.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any import orjson import requests diff --git a/src/sentry/seer/endpoints/trace_explorer_ai_setup.py b/src/sentry/seer/endpoints/trace_explorer_ai_setup.py index 5a6507be9cd870..714b33a9af9807 100644 --- a/src/sentry/seer/endpoints/trace_explorer_ai_setup.py +++ b/src/sentry/seer/endpoints/trace_explorer_ai_setup.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/seer/endpoints/trace_explorer_ai_translate_agentic.py b/src/sentry/seer/endpoints/trace_explorer_ai_translate_agentic.py index 945a03a85b4a5d..8f57b4a9a91110 100644 --- a/src/sentry/seer/endpoints/trace_explorer_ai_translate_agentic.py +++ b/src/sentry/seer/endpoints/trace_explorer_ai_translate_agentic.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any import orjson import requests diff --git a/src/sentry/seer/explorer/client.py b/src/sentry/seer/explorer/client.py index f8945e5ecc8782..cb14a1f3b0494c 100644 --- a/src/sentry/seer/explorer/client.py +++ b/src/sentry/seer/explorer/client.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any import orjson import requests diff --git a/src/sentry/seer/explorer/client_models.py b/src/sentry/seer/explorer/client_models.py index 43cdfd70dd88f4..a3eafbc476b3d5 100644 --- a/src/sentry/seer/explorer/client_models.py +++ b/src/sentry/seer/explorer/client_models.py @@ -5,7 +5,7 @@ from __future__ import annotations from datetime import datetime -from typing import Any, Literal +from typing import Any, Literal, int from pydantic import BaseModel diff --git a/src/sentry/seer/explorer/client_utils.py b/src/sentry/seer/explorer/client_utils.py index 1042803b25f2de..2dd8ac5730a214 100644 --- a/src/sentry/seer/explorer/client_utils.py +++ b/src/sentry/seer/explorer/client_utils.py @@ -9,7 +9,7 @@ import logging import time -from typing import Any +from typing import int, Any import orjson import requests diff --git a/src/sentry/seer/explorer/custom_tool_utils.py b/src/sentry/seer/explorer/custom_tool_utils.py index fa258dc2ecf747..c9b2592ecbffa1 100644 --- a/src/sentry/seer/explorer/custom_tool_utils.py +++ b/src/sentry/seer/explorer/custom_tool_utils.py @@ -3,7 +3,7 @@ import importlib from abc import ABC, abstractmethod from enum import StrEnum -from typing import Any, Literal +from typing import Any, Literal, int from pydantic import BaseModel diff --git a/src/sentry/seer/explorer/index_data.py b/src/sentry/seer/explorer/index_data.py index 26b8ee150591b0..cafd59206c92a4 100644 --- a/src/sentry/seer/explorer/index_data.py +++ b/src/sentry/seer/explorer/index_data.py @@ -2,7 +2,7 @@ import re from concurrent.futures import ThreadPoolExecutor, as_completed from datetime import UTC, datetime, timedelta -from typing import Any +from typing import int, Any from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/seer/explorer/tools.py b/src/sentry/seer/explorer/tools.py index 2ea0f2a4971324..0ad0659f90df9c 100644 --- a/src/sentry/seer/explorer/tools.py +++ b/src/sentry/seer/explorer/tools.py @@ -1,6 +1,6 @@ import logging from datetime import UTC, datetime, timedelta, timezone -from typing import Any, Literal +from typing import Any, Literal, int from django.urls import reverse diff --git a/src/sentry/seer/explorer/utils.py b/src/sentry/seer/explorer/utils.py index 967fba28d3e87f..66b75e995a0b17 100644 --- a/src/sentry/seer/explorer/utils.py +++ b/src/sentry/seer/explorer/utils.py @@ -1,7 +1,7 @@ import logging import re from datetime import UTC, datetime, timedelta -from typing import Any +from typing import int, Any import orjson diff --git a/src/sentry/seer/fetch_issues/by_error_type.py b/src/sentry/seer/fetch_issues/by_error_type.py index f11b1cb3c65f5c..98040688dd46a5 100644 --- a/src/sentry/seer/fetch_issues/by_error_type.py +++ b/src/sentry/seer/fetch_issues/by_error_type.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from django.db.models.expressions import RawSQL diff --git a/src/sentry/seer/fetch_issues/by_function_name.py b/src/sentry/seer/fetch_issues/by_function_name.py index 5463bdf4819ddb..0ce05113da2f51 100644 --- a/src/sentry/seer/fetch_issues/by_function_name.py +++ b/src/sentry/seer/fetch_issues/by_function_name.py @@ -1,7 +1,7 @@ import logging from datetime import UTC, datetime, timedelta from pathlib import Path -from typing import TypedDict +from typing import int, TypedDict from django.db.models import Value from django.db.models.functions import StrIndex diff --git a/src/sentry/seer/fetch_issues/by_text_query.py b/src/sentry/seer/fetch_issues/by_text_query.py index 33a1996a565b5e..4f161f1ac1712e 100644 --- a/src/sentry/seer/fetch_issues/by_text_query.py +++ b/src/sentry/seer/fetch_issues/by_text_query.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/seer/fetch_issues/utils.py b/src/sentry/seer/fetch_issues/utils.py index 28ec393dd45f90..845b0985d2135b 100644 --- a/src/sentry/seer/fetch_issues/utils.py +++ b/src/sentry/seer/fetch_issues/utils.py @@ -2,7 +2,7 @@ from collections.abc import Callable from dataclasses import dataclass from functools import wraps -from typing import Any, TypedDict +from typing import Any, TypedDict, int import sentry_sdk diff --git a/src/sentry/seer/math.py b/src/sentry/seer/math.py index 6668078f1157e5..762480f94e4f02 100644 --- a/src/sentry/seer/math.py +++ b/src/sentry/seer/math.py @@ -1,3 +1,4 @@ +from typing import int import math from sentry.seer.vendored import entr, rel_entr diff --git a/src/sentry/seer/models.py b/src/sentry/seer/models.py index 3268b41d8194cb..01f18dd19f9d4b 100644 --- a/src/sentry/seer/models.py +++ b/src/sentry/seer/models.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from pydantic import BaseModel diff --git a/src/sentry/seer/seer_setup.py b/src/sentry/seer/seer_setup.py index f6a2db46cf845a..b5459592fdafe8 100644 --- a/src/sentry/seer/seer_setup.py +++ b/src/sentry/seer/seer_setup.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.auth.models import AnonymousUser from sentry import features diff --git a/src/sentry/seer/sentry_data_models.py b/src/sentry/seer/sentry_data_models.py index c8fa55080aea36..f133110379cadc 100644 --- a/src/sentry/seer/sentry_data_models.py +++ b/src/sentry/seer/sentry_data_models.py @@ -5,7 +5,7 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from pydantic import BaseModel, Field diff --git a/src/sentry/seer/services/test_generation/impl.py b/src/sentry/seer/services/test_generation/impl.py index 06dd0bfe6c3510..a94bf02862ccaf 100644 --- a/src/sentry/seer/services/test_generation/impl.py +++ b/src/sentry/seer/services/test_generation/impl.py @@ -1,3 +1,4 @@ +from typing import int import orjson import requests from django.conf import settings diff --git a/src/sentry/seer/services/test_generation/model.py b/src/sentry/seer/services/test_generation/model.py index 8715f71f21e131..ad5e20f320a17b 100644 --- a/src/sentry/seer/services/test_generation/model.py +++ b/src/sentry/seer/services/test_generation/model.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. # from typing import Any, Dict, Optional +from typing import int from sentry.hybridcloud.rpc import RpcModel diff --git a/src/sentry/seer/services/test_generation/service.py b/src/sentry/seer/services/test_generation/service.py index 56027efae2bdaa..6b76458bea4e66 100644 --- a/src/sentry/seer/services/test_generation/service.py +++ b/src/sentry/seer/services/test_generation/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int import abc from sentry.hybridcloud.rpc.resolvers import ByRegionName diff --git a/src/sentry/seer/signed_seer_api.py b/src/sentry/seer/signed_seer_api.py index 9bd2c7f045a5fd..0758e83923470d 100644 --- a/src/sentry/seer/signed_seer_api.py +++ b/src/sentry/seer/signed_seer_api.py @@ -2,7 +2,7 @@ import hmac import logging from random import random -from typing import Any +from typing import int, Any from urllib.parse import urlparse import sentry_sdk diff --git a/src/sentry/seer/similarity/config.py b/src/sentry/seer/similarity/config.py index 4cef92d01fdc0a..cc4b4d13251bc2 100644 --- a/src/sentry/seer/similarity/config.py +++ b/src/sentry/seer/similarity/config.py @@ -1,3 +1,4 @@ +from typing import int """ Configuration for similarity grouping model versions. diff --git a/src/sentry/seer/similarity/grouping_records.py b/src/sentry/seer/similarity/grouping_records.py index f8e36118943283..b0ce232d17952f 100644 --- a/src/sentry/seer/similarity/grouping_records.py +++ b/src/sentry/seer/similarity/grouping_records.py @@ -2,7 +2,7 @@ import logging from collections.abc import Sequence -from typing import TypedDict +from typing import int, TypedDict from django.conf import settings from urllib3.exceptions import ReadTimeoutError diff --git a/src/sentry/seer/similarity/similar_issues.py b/src/sentry/seer/similarity/similar_issues.py index ee095cb2b49c78..b14280e942e793 100644 --- a/src/sentry/seer/similarity/similar_issues.py +++ b/src/sentry/seer/similarity/similar_issues.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Mapping diff --git a/src/sentry/seer/similarity/types.py b/src/sentry/seer/similarity/types.py index e786b0de4f8c56..f73f874c327a6c 100644 --- a/src/sentry/seer/similarity/types.py +++ b/src/sentry/seer/similarity/types.py @@ -2,7 +2,7 @@ from collections.abc import Mapping from dataclasses import dataclass from enum import StrEnum -from typing import Any, ClassVar, NotRequired, Self, TypedDict +from typing import Any, ClassVar, NotRequired, Self, TypedDict, int from sentry.models.grouphash import GroupHash diff --git a/src/sentry/seer/similarity/utils.py b/src/sentry/seer/similarity/utils.py index 07d274fd265502..604ca8f393e1c8 100644 --- a/src/sentry/seer/similarity/utils.py +++ b/src/sentry/seer/similarity/utils.py @@ -3,7 +3,7 @@ import threading from collections.abc import Mapping, Sequence from enum import StrEnum -from typing import Any, TypedDict, TypeVar +from typing import Any, TypedDict, TypeVar, int import sentry_sdk from tokenizers import Tokenizer diff --git a/src/sentry/seer/trace_summary.py b/src/sentry/seer/trace_summary.py index 6bd2ad1a115d68..a89a10ee2e8108 100644 --- a/src/sentry/seer/trace_summary.py +++ b/src/sentry/seer/trace_summary.py @@ -1,6 +1,6 @@ import logging from datetime import timedelta -from typing import Any +from typing import int, Any import orjson import requests diff --git a/src/sentry/seer/vendored.py b/src/sentry/seer/vendored.py index 0f7f6bb82ac8eb..22f0aaed8649e5 100644 --- a/src/sentry/seer/vendored.py +++ b/src/sentry/seer/vendored.py @@ -28,6 +28,7 @@ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from typing import int import math diff --git a/src/sentry/seer/workflows/compare.py b/src/sentry/seer/workflows/compare.py index cc2f6671ac8fb3..a43f7e6ca33f81 100644 --- a/src/sentry/seer/workflows/compare.py +++ b/src/sentry/seer/workflows/compare.py @@ -1,6 +1,6 @@ from collections import defaultdict from collections.abc import Callable, Generator, Mapping, Sequence -from typing import TypeVar +from typing import int, TypeVar from sentry.seer.math import ( boxcox_transform, diff --git a/src/sentry/sentry_apps/alert_rule_action_creator.py b/src/sentry/sentry_apps/alert_rule_action_creator.py index d0ade2a4c5c426..f9b59fc64f4303 100644 --- a/src/sentry/sentry_apps/alert_rule_action_creator.py +++ b/src/sentry/sentry_apps/alert_rule_action_creator.py @@ -1,6 +1,6 @@ from collections.abc import Mapping from dataclasses import dataclass, field -from typing import Any +from typing import int, Any from django.db import router, transaction from django.utils.functional import cached_property diff --git a/src/sentry/sentry_apps/api/bases/sentryapps.py b/src/sentry/sentry_apps/api/bases/sentryapps.py index 3224f0fe18ce9a..9f1b1c4c858c6e 100644 --- a/src/sentry/sentry_apps/api/bases/sentryapps.py +++ b/src/sentry/sentry_apps/api/bases/sentryapps.py @@ -2,7 +2,7 @@ import logging from collections.abc import Sequence -from typing import Any +from typing import int, Any import sentry_sdk from rest_framework.permissions import BasePermission diff --git a/src/sentry/sentry_apps/api/endpoints/group_external_issue_details.py b/src/sentry/sentry_apps/api/endpoints/group_external_issue_details.py index 5d647e8b3126d9..de4b95d43869f2 100644 --- a/src/sentry/sentry_apps/api/endpoints/group_external_issue_details.py +++ b/src/sentry/sentry_apps/api/endpoints/group_external_issue_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/sentry_apps/api/endpoints/group_external_issues.py b/src/sentry/sentry_apps/api/endpoints/group_external_issues.py index 8e81b0482d9064..762443449b8efa 100644 --- a/src/sentry/sentry_apps/api/endpoints/group_external_issues.py +++ b/src/sentry/sentry_apps/api/endpoints/group_external_issues.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/sentry_apps/api/endpoints/installation_details.py b/src/sentry/sentry_apps/api/endpoints/installation_details.py index f1cb0dd852de76..974975ed4eaddb 100644 --- a/src/sentry/sentry_apps/api/endpoints/installation_details.py +++ b/src/sentry/sentry_apps/api/endpoints/installation_details.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from django.db import router, transaction from requests import RequestException diff --git a/src/sentry/sentry_apps/api/endpoints/installation_external_issue_actions.py b/src/sentry/sentry_apps/api/endpoints/installation_external_issue_actions.py index 67c5fdaeb96d12..2cbd2db932d07f 100644 --- a/src/sentry/sentry_apps/api/endpoints/installation_external_issue_actions.py +++ b/src/sentry/sentry_apps/api/endpoints/installation_external_issue_actions.py @@ -1,3 +1,4 @@ +from typing import int from django.utils.functional import empty from rest_framework import serializers from rest_framework.request import Request diff --git a/src/sentry/sentry_apps/api/endpoints/installation_external_issue_details.py b/src/sentry/sentry_apps/api/endpoints/installation_external_issue_details.py index 702e709ffa9427..5b6426e1fa97fa 100644 --- a/src/sentry/sentry_apps/api/endpoints/installation_external_issue_details.py +++ b/src/sentry/sentry_apps/api/endpoints/installation_external_issue_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/sentry_apps/api/endpoints/installation_external_issues.py b/src/sentry/sentry_apps/api/endpoints/installation_external_issues.py index 6aef63a5562bc1..84dc4b4a0d9c6b 100644 --- a/src/sentry/sentry_apps/api/endpoints/installation_external_issues.py +++ b/src/sentry/sentry_apps/api/endpoints/installation_external_issues.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/sentry_apps/api/endpoints/installation_external_requests.py b/src/sentry/sentry_apps/api/endpoints/installation_external_requests.py index 3842e3c39c817e..f55b41fe517b03 100644 --- a/src/sentry/sentry_apps/api/endpoints/installation_external_requests.py +++ b/src/sentry/sentry_apps/api/endpoints/installation_external_requests.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework.request import Request diff --git a/src/sentry/sentry_apps/api/endpoints/installation_service_hook_projects.py b/src/sentry/sentry_apps/api/endpoints/installation_service_hook_projects.py index 21b6545f7cd08a..704afa667ddea5 100644 --- a/src/sentry/sentry_apps/api/endpoints/installation_service_hook_projects.py +++ b/src/sentry/sentry_apps/api/endpoints/installation_service_hook_projects.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from rest_framework import serializers from rest_framework.request import Request diff --git a/src/sentry/sentry_apps/api/endpoints/organization_sentry_apps.py b/src/sentry/sentry_apps/api/endpoints/organization_sentry_apps.py index e9168ce147c629..8ff5b6d393445f 100644 --- a/src/sentry/sentry_apps/api/endpoints/organization_sentry_apps.py +++ b/src/sentry/sentry_apps/api/endpoints/organization_sentry_apps.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_app_authorizations.py b/src/sentry/sentry_apps/api/endpoints/sentry_app_authorizations.py index a67feeb895c4af..e3c9d9c9883586 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_app_authorizations.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_app_authorizations.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_app_avatar.py b/src/sentry/sentry_apps/api/endpoints/sentry_app_avatar.py index 115bb1655ad7d3..f964bdce62cc35 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_app_avatar.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_app_avatar.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_app_components.py b/src/sentry/sentry_apps/api/endpoints/sentry_app_components.py index efef233bbee2ec..960eab273ae292 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_app_components.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_app_components.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_app_details.py b/src/sentry/sentry_apps/api/endpoints/sentry_app_details.py index 00bf4031d90ced..3e8cefaebac363 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_app_details.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_app_details.py @@ -1,3 +1,4 @@ +from typing import int import logging import orjson diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_app_features.py b/src/sentry/sentry_apps/api/endpoints/sentry_app_features.py index c4a7ff4efad003..4bcd194e4b5d82 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_app_features.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_app_features.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_app_installations.py b/src/sentry/sentry_apps/api/endpoints/sentry_app_installations.py index a84577c3c13bbc..2529f8e7c11049 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_app_installations.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_app_installations.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_app_interaction.py b/src/sentry/sentry_apps/api/endpoints/sentry_app_interaction.py index 819a0064bee14b..e9ca00a5de2666 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_app_interaction.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_app_interaction.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework.request import Request diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_app_publish_request.py b/src/sentry/sentry_apps/api/endpoints/sentry_app_publish_request.py index 80e296eff25adc..6855883df5dce0 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_app_publish_request.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_app_publish_request.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Iterable diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_app_requests.py b/src/sentry/sentry_apps/api/endpoints/sentry_app_requests.py index b35d079c8a3dd3..f428a7a1e46bc3 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_app_requests.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_app_requests.py @@ -1,7 +1,7 @@ from collections.abc import Mapping from dataclasses import dataclass from datetime import datetime -from typing import Any +from typing import int, Any from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_app_rotate_secret.py b/src/sentry/sentry_apps/api/endpoints/sentry_app_rotate_secret.py index fc951688ffe5c1..bf938ad9ec35ea 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_app_rotate_secret.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_app_rotate_secret.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.http import Http404 diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_app_stats_details.py b/src/sentry/sentry_apps/api/endpoints/sentry_app_stats_details.py index f3d1119407e0c6..8fe402a875e8fd 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_app_stats_details.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_app_stats_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_app_webhook_requests.py b/src/sentry/sentry_apps/api/endpoints/sentry_app_webhook_requests.py index 112a7a9a72712f..3f97d04b4574a3 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_app_webhook_requests.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_app_webhook_requests.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from dateutil.parser import parse as parse_date diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_apps.py b/src/sentry/sentry_apps/api/endpoints/sentry_apps.py index b25beefefb8843..b1c5b7a16ec9d4 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_apps.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_apps.py @@ -1,3 +1,4 @@ +from typing import int import logging import orjson diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_apps_stats.py b/src/sentry/sentry_apps/api/endpoints/sentry_apps_stats.py index 7f8aae8ad5f161..b87f9c9080088a 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_apps_stats.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_apps_stats.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Count from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_internal_app_token_details.py b/src/sentry/sentry_apps/api/endpoints/sentry_internal_app_token_details.py index f9d5211e5450b3..58c5379f698eba 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_internal_app_token_details.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_internal_app_token_details.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from django.http import Http404 from rest_framework import status diff --git a/src/sentry/sentry_apps/api/endpoints/sentry_internal_app_tokens.py b/src/sentry/sentry_apps/api/endpoints/sentry_internal_app_tokens.py index 62a912dd17a36b..1fea020553764c 100644 --- a/src/sentry/sentry_apps/api/endpoints/sentry_internal_app_tokens.py +++ b/src/sentry/sentry_apps/api/endpoints/sentry_internal_app_tokens.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/sentry_apps/api/parsers/schema.py b/src/sentry/sentry_apps/api/parsers/schema.py index 8713530ef74131..73e140ba492f5d 100644 --- a/src/sentry/sentry_apps/api/parsers/schema.py +++ b/src/sentry/sentry_apps/api/parsers/schema.py @@ -1,3 +1,4 @@ +from typing import int import logging import orjson diff --git a/src/sentry/sentry_apps/api/parsers/sentry_app.py b/src/sentry/sentry_apps/api/parsers/sentry_app.py index c647ea5f27790a..de86dea9db49de 100644 --- a/src/sentry/sentry_apps/api/parsers/sentry_app.py +++ b/src/sentry/sentry_apps/api/parsers/sentry_app.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.types import OpenApiTypes from drf_spectacular.utils import extend_schema_field, extend_schema_serializer from jsonschema.exceptions import ValidationError as SchemaValidationError diff --git a/src/sentry/sentry_apps/api/parsers/sentry_app_avatar.py b/src/sentry/sentry_apps/api/parsers/sentry_app_avatar.py index efc7ee8cd65a96..5f49843b698406 100644 --- a/src/sentry/sentry_apps/api/parsers/sentry_app_avatar.py +++ b/src/sentry/sentry_apps/api/parsers/sentry_app_avatar.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from rest_framework.serializers import Serializer diff --git a/src/sentry/sentry_apps/api/parsers/sentry_app_installation.py b/src/sentry/sentry_apps/api/parsers/sentry_app_installation.py index 0a690164613456..507ca355d78449 100644 --- a/src/sentry/sentry_apps/api/parsers/sentry_app_installation.py +++ b/src/sentry/sentry_apps/api/parsers/sentry_app_installation.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from rest_framework.serializers import Serializer, ValidationError diff --git a/src/sentry/sentry_apps/api/parsers/servicehook.py b/src/sentry/sentry_apps/api/parsers/servicehook.py index 6ec25f0108edda..ffaff4a5bce91e 100644 --- a/src/sentry/sentry_apps/api/parsers/servicehook.py +++ b/src/sentry/sentry_apps/api/parsers/servicehook.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from sentry.sentry_apps.models.servicehook import SERVICE_HOOK_EVENTS diff --git a/src/sentry/sentry_apps/api/serializers/app_platform_event.py b/src/sentry/sentry_apps/api/serializers/app_platform_event.py index 40c6e995cbdd9a..938ce8414ff356 100644 --- a/src/sentry/sentry_apps/api/serializers/app_platform_event.py +++ b/src/sentry/sentry_apps/api/serializers/app_platform_event.py @@ -1,7 +1,7 @@ from collections.abc import Mapping from enum import StrEnum from time import time -from typing import Any, TypedDict +from typing import Any, TypedDict, int from uuid import uuid4 from sentry.sentry_apps.models.sentry_app_installation import SentryAppInstallation diff --git a/src/sentry/sentry_apps/api/serializers/platform_external_issue.py b/src/sentry/sentry_apps/api/serializers/platform_external_issue.py index aae65c03576853..6685e658f0467d 100644 --- a/src/sentry/sentry_apps/api/serializers/platform_external_issue.py +++ b/src/sentry/sentry_apps/api/serializers/platform_external_issue.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/sentry_apps/api/serializers/request.py b/src/sentry/sentry_apps/api/serializers/request.py index 8dc71b5ec9cd46..054f6dce1d3261 100644 --- a/src/sentry/sentry_apps/api/serializers/request.py +++ b/src/sentry/sentry_apps/api/serializers/request.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from django.urls import reverse diff --git a/src/sentry/sentry_apps/api/serializers/sentry_app.py b/src/sentry/sentry_apps/api/serializers/sentry_app.py index b2b97799b383eb..7ff6c9aa771cf9 100644 --- a/src/sentry/sentry_apps/api/serializers/sentry_app.py +++ b/src/sentry/sentry_apps/api/serializers/sentry_app.py @@ -1,6 +1,6 @@ from collections.abc import Mapping, Sequence from datetime import datetime, timedelta -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int from django.contrib.auth.models import AnonymousUser from django.utils import timezone diff --git a/src/sentry/sentry_apps/api/serializers/sentry_app_avatar.py b/src/sentry/sentry_apps/api/serializers/sentry_app_avatar.py index d9c3d01a8098ac..c7a8101ae9dc38 100644 --- a/src/sentry/sentry_apps/api/serializers/sentry_app_avatar.py +++ b/src/sentry/sentry_apps/api/serializers/sentry_app_avatar.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from sentry.api.serializers import Serializer, register from sentry.sentry_apps.models.sentry_app_avatar import SentryAppAvatar diff --git a/src/sentry/sentry_apps/api/serializers/sentry_app_component.py b/src/sentry/sentry_apps/api/serializers/sentry_app_component.py index 975d7af2961c1b..2cc1c1bde0d1f1 100644 --- a/src/sentry/sentry_apps/api/serializers/sentry_app_component.py +++ b/src/sentry/sentry_apps/api/serializers/sentry_app_component.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.api.serializers import Serializer, register from sentry.api.serializers.base import serialize diff --git a/src/sentry/sentry_apps/api/serializers/sentry_app_installation.py b/src/sentry/sentry_apps/api/serializers/sentry_app_installation.py index b9e0af5f587efe..96ca5b9c23d5e5 100644 --- a/src/sentry/sentry_apps/api/serializers/sentry_app_installation.py +++ b/src/sentry/sentry_apps/api/serializers/sentry_app_installation.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import MutableMapping, Sequence -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/sentry_apps/api/serializers/sentry_app_webhook_request.py b/src/sentry/sentry_apps/api/serializers/sentry_app_webhook_request.py index da692818f05903..b5192b68adb628 100644 --- a/src/sentry/sentry_apps/api/serializers/sentry_app_webhook_request.py +++ b/src/sentry/sentry_apps/api/serializers/sentry_app_webhook_request.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/sentry_apps/api/serializers/servicehook.py b/src/sentry/sentry_apps/api/serializers/servicehook.py index a0ee0838c9b42e..2d75f1257fe73f 100644 --- a/src/sentry/sentry_apps/api/serializers/servicehook.py +++ b/src/sentry/sentry_apps/api/serializers/servicehook.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.sentry_apps.models.servicehook import ServiceHook diff --git a/src/sentry/sentry_apps/api/serializers/servicehookproject.py b/src/sentry/sentry_apps/api/serializers/servicehookproject.py index 6df683d17096b3..ae4d95f6ab5e37 100644 --- a/src/sentry/sentry_apps/api/serializers/servicehookproject.py +++ b/src/sentry/sentry_apps/api/serializers/servicehookproject.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, register from sentry.sentry_apps.models.servicehook import ServiceHookProject diff --git a/src/sentry/sentry_apps/api/utils/webhook_requests.py b/src/sentry/sentry_apps/api/utils/webhook_requests.py index 9010c6b3474b19..073de6caad7ad3 100644 --- a/src/sentry/sentry_apps/api/utils/webhook_requests.py +++ b/src/sentry/sentry_apps/api/utils/webhook_requests.py @@ -1,6 +1,6 @@ from dataclasses import dataclass from datetime import datetime, timezone -from typing import TypedDict +from typing import int, TypedDict from sentry.models.organizationmapping import OrganizationMapping from sentry.sentry_apps.models.sentry_app import SentryApp diff --git a/src/sentry/sentry_apps/components.py b/src/sentry/sentry_apps/components.py index ffedd70c2ee356..1d923620aeeddc 100644 --- a/src/sentry/sentry_apps/components.py +++ b/src/sentry/sentry_apps/components.py @@ -2,7 +2,7 @@ import dataclasses from collections.abc import Mapping, MutableMapping -from typing import Any +from typing import int, Any from urllib.parse import urlparse, urlunparse from django.utils.encoding import force_str diff --git a/src/sentry/sentry_apps/external_issues/external_issue_creator.py b/src/sentry/sentry_apps/external_issues/external_issue_creator.py index 797134093b2eb2..f4d3a69f82f008 100644 --- a/src/sentry/sentry_apps/external_issues/external_issue_creator.py +++ b/src/sentry/sentry_apps/external_issues/external_issue_creator.py @@ -1,3 +1,4 @@ +from typing import int import logging from dataclasses import dataclass from html import escape diff --git a/src/sentry/sentry_apps/external_issues/issue_link_creator.py b/src/sentry/sentry_apps/external_issues/issue_link_creator.py index 736bfe0d43597d..edf9f3d429449a 100644 --- a/src/sentry/sentry_apps/external_issues/issue_link_creator.py +++ b/src/sentry/sentry_apps/external_issues/issue_link_creator.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import Any +from typing import int, Any from django.db import router, transaction diff --git a/src/sentry/sentry_apps/external_requests/alert_rule_action_requester.py b/src/sentry/sentry_apps/external_requests/alert_rule_action_requester.py index 0299b72253cb0e..51982ad941b89e 100644 --- a/src/sentry/sentry_apps/external_requests/alert_rule_action_requester.py +++ b/src/sentry/sentry_apps/external_requests/alert_rule_action_requester.py @@ -1,7 +1,7 @@ import logging from collections.abc import Mapping, Sequence from dataclasses import dataclass, field -from typing import Any, TypedDict +from typing import Any, TypedDict, int from urllib.parse import urlparse, urlunparse from uuid import uuid4 diff --git a/src/sentry/sentry_apps/external_requests/issue_link_requester.py b/src/sentry/sentry_apps/external_requests/issue_link_requester.py index f5a7c5ce49e704..d6bdbebfd7da86 100644 --- a/src/sentry/sentry_apps/external_requests/issue_link_requester.py +++ b/src/sentry/sentry_apps/external_requests/issue_link_requester.py @@ -1,7 +1,7 @@ import logging from dataclasses import dataclass from enum import StrEnum -from typing import Any +from typing import int, Any from urllib.parse import urlparse from uuid import uuid4 diff --git a/src/sentry/sentry_apps/external_requests/select_requester.py b/src/sentry/sentry_apps/external_requests/select_requester.py index dad5041b006f69..979f328114c9d8 100644 --- a/src/sentry/sentry_apps/external_requests/select_requester.py +++ b/src/sentry/sentry_apps/external_requests/select_requester.py @@ -1,6 +1,6 @@ from collections.abc import Sequence from dataclasses import dataclass, field -from typing import Annotated, Any, TypedDict +from typing import Annotated, Any, TypedDict, int from urllib.parse import urlencode, urlparse, urlunparse from uuid import uuid4 diff --git a/src/sentry/sentry_apps/external_requests/utils.py b/src/sentry/sentry_apps/external_requests/utils.py index 020a0c5dc9cda1..5287e97c4b3791 100644 --- a/src/sentry/sentry_apps/external_requests/utils.py +++ b/src/sentry/sentry_apps/external_requests/utils.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from jsonschema import Draft7Validator from requests import RequestException diff --git a/src/sentry/sentry_apps/installations.py b/src/sentry/sentry_apps/installations.py index 8661ad3ed0e97d..d92fd1dfdefe23 100644 --- a/src/sentry/sentry_apps/installations.py +++ b/src/sentry/sentry_apps/installations.py @@ -3,7 +3,7 @@ import dataclasses import datetime from functools import cached_property -from typing import TypedDict +from typing import int, TypedDict from django.db import router, transaction from django.http.request import HttpRequest diff --git a/src/sentry/sentry_apps/logic.py b/src/sentry/sentry_apps/logic.py index 20d6a0227d7eae..972b0f6cdf04f8 100644 --- a/src/sentry/sentry_apps/logic.py +++ b/src/sentry/sentry_apps/logic.py @@ -4,7 +4,7 @@ import logging from collections.abc import Iterable, Mapping from dataclasses import field -from typing import Any +from typing import int, Any import sentry_sdk from django.db import IntegrityError, router, transaction diff --git a/src/sentry/sentry_apps/metrics.py b/src/sentry/sentry_apps/metrics.py index 95f465d4aed186..fabc40ad32e207 100644 --- a/src/sentry/sentry_apps/metrics.py +++ b/src/sentry/sentry_apps/metrics.py @@ -1,7 +1,7 @@ from collections.abc import Mapping from dataclasses import dataclass from enum import StrEnum -from typing import Any +from typing import int, Any from sentry.integrations.types import EventLifecycleOutcome from sentry.integrations.utils.metrics import EventLifecycleMetric diff --git a/src/sentry/sentry_apps/models/__init__.py b/src/sentry/sentry_apps/models/__init__.py index f2b771f3263117..2f9ab81d3f74a4 100644 --- a/src/sentry/sentry_apps/models/__init__.py +++ b/src/sentry/sentry_apps/models/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .platformexternalissue import PlatformExternalIssue from .sentry_app import SentryApp from .sentry_app_avatar import SentryAppAvatar diff --git a/src/sentry/sentry_apps/models/platformexternalissue.py b/src/sentry/sentry_apps/models/platformexternalissue.py index 7d2347efd9eb5b..29465b08c0e8ec 100644 --- a/src/sentry/sentry_apps/models/platformexternalissue.py +++ b/src/sentry/sentry_apps/models/platformexternalissue.py @@ -1,3 +1,4 @@ +from typing import int from collections import defaultdict from django.db import models diff --git a/src/sentry/sentry_apps/models/sentry_app.py b/src/sentry/sentry_apps/models/sentry_app.py index 26218ea992c668..c600a767ee2615 100644 --- a/src/sentry/sentry_apps/models/sentry_app.py +++ b/src/sentry/sentry_apps/models/sentry_app.py @@ -2,7 +2,7 @@ import itertools import uuid from hashlib import sha256 -from typing import Any, ClassVar +from typing import Any, ClassVar, int from django.contrib.postgres.fields.array import ArrayField from django.db import models, router, transaction diff --git a/src/sentry/sentry_apps/models/sentry_app_avatar.py b/src/sentry/sentry_apps/models/sentry_app_avatar.py index 456e97daf0f0e1..e74bea54d460b5 100644 --- a/src/sentry/sentry_apps/models/sentry_app_avatar.py +++ b/src/sentry/sentry_apps/models/sentry_app_avatar.py @@ -3,7 +3,7 @@ from collections import defaultdict from collections.abc import Iterable from enum import Enum, StrEnum -from typing import TYPE_CHECKING, ClassVar +from typing import TYPE_CHECKING, ClassVar, int from django.db import models diff --git a/src/sentry/sentry_apps/models/sentry_app_component.py b/src/sentry/sentry_apps/models/sentry_app_component.py index 2838589e241ee8..2b9e5dda43f1b6 100644 --- a/src/sentry/sentry_apps/models/sentry_app_component.py +++ b/src/sentry/sentry_apps/models/sentry_app_component.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import MutableMapping -from typing import Any +from typing import int, Any from django.db import models diff --git a/src/sentry/sentry_apps/models/sentry_app_installation.py b/src/sentry/sentry_apps/models/sentry_app_installation.py index e441d0b0739f4e..0e310e702bee81 100644 --- a/src/sentry/sentry_apps/models/sentry_app_installation.py +++ b/src/sentry/sentry_apps/models/sentry_app_installation.py @@ -2,7 +2,7 @@ import uuid from collections.abc import Collection, Mapping -from typing import TYPE_CHECKING, Any, ClassVar, overload +from typing import TYPE_CHECKING, Any, ClassVar, overload, int from django.db import models, router, transaction from django.utils import timezone diff --git a/src/sentry/sentry_apps/models/sentry_app_installation_for_provider.py b/src/sentry/sentry_apps/models/sentry_app_installation_for_provider.py index 2710d2216f76b4..beb225a972e826 100644 --- a/src/sentry/sentry_apps/models/sentry_app_installation_for_provider.py +++ b/src/sentry/sentry_apps/models/sentry_app_installation_for_provider.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/sentry_apps/models/sentry_app_installation_token.py b/src/sentry/sentry_apps/models/sentry_app_installation_token.py index 46a4d0cd27c823..400dc012086fdb 100644 --- a/src/sentry/sentry_apps/models/sentry_app_installation_token.py +++ b/src/sentry/sentry_apps/models/sentry_app_installation_token.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING, ClassVar +from typing import TYPE_CHECKING, ClassVar, int from django.db.models import QuerySet diff --git a/src/sentry/sentry_apps/models/servicehook.py b/src/sentry/sentry_apps/models/servicehook.py index 365264c2bab06a..cfc0e0777c161b 100644 --- a/src/sentry/sentry_apps/models/servicehook.py +++ b/src/sentry/sentry_apps/models/servicehook.py @@ -2,7 +2,7 @@ import secrets from functools import cached_property from hashlib import sha256 -from typing import Any, ClassVar, Self +from typing import Any, ClassVar, Self, int from uuid import uuid4 from django.contrib.postgres.fields.array import ArrayField diff --git a/src/sentry/sentry_apps/services/app/__init__.py b/src/sentry/sentry_apps/services/app/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/sentry_apps/services/app/__init__.py +++ b/src/sentry/sentry_apps/services/app/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/sentry_apps/services/app/impl.py b/src/sentry/sentry_apps/services/app/impl.py index a448d01b1e2399..edcf5a985127e4 100644 --- a/src/sentry/sentry_apps/services/app/impl.py +++ b/src/sentry/sentry_apps/services/app/impl.py @@ -2,7 +2,7 @@ from collections import defaultdict from collections.abc import Callable, Mapping -from typing import Any +from typing import int, Any from django.db.models import Q, QuerySet diff --git a/src/sentry/sentry_apps/services/app/model.py b/src/sentry/sentry_apps/services/app/model.py index fb06d5eb5d4e39..d592e589bc2905 100644 --- a/src/sentry/sentry_apps/services/app/model.py +++ b/src/sentry/sentry_apps/services/app/model.py @@ -7,7 +7,7 @@ import hmac from collections.abc import MutableMapping from hashlib import sha256 -from typing import Any, Protocol, TypedDict +from typing import Any, Protocol, TypedDict, int from urllib.parse import urljoin from pydantic.fields import Field diff --git a/src/sentry/sentry_apps/services/app/serial.py b/src/sentry/sentry_apps/services/app/serial.py index 4f4c7f02a8a0ff..30d426e515a977 100644 --- a/src/sentry/sentry_apps/services/app/serial.py +++ b/src/sentry/sentry_apps/services/app/serial.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import SentryAppStatus from sentry.models.apiapplication import ApiApplication from sentry.models.apitoken import ApiToken diff --git a/src/sentry/sentry_apps/services/app/service.py b/src/sentry/sentry_apps/services/app/service.py index c0c494b3d57541..9cc89ba1a1d67a 100644 --- a/src/sentry/sentry_apps/services/app/service.py +++ b/src/sentry/sentry_apps/services/app/service.py @@ -5,7 +5,7 @@ import abc from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.auth.services.auth import AuthenticationContext from sentry.hybridcloud.rpc.caching.service import back_with_silo_cache, back_with_silo_cache_list diff --git a/src/sentry/sentry_apps/services/app_request/__init__.py b/src/sentry/sentry_apps/services/app_request/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/sentry_apps/services/app_request/__init__.py +++ b/src/sentry/sentry_apps/services/app_request/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/sentry_apps/services/app_request/impl.py b/src/sentry/sentry_apps/services/app_request/impl.py index b791620fff09a2..bc631c606ae954 100644 --- a/src/sentry/sentry_apps/services/app_request/impl.py +++ b/src/sentry/sentry_apps/services/app_request/impl.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.services.app import app_service from sentry.sentry_apps.services.app_request.model import ( RpcSentryAppRequest, diff --git a/src/sentry/sentry_apps/services/app_request/model.py b/src/sentry/sentry_apps/services/app_request/model.py index 3fdb7ad056ffc4..0fd057c7436c51 100644 --- a/src/sentry/sentry_apps/services/app_request/model.py +++ b/src/sentry/sentry_apps/services/app_request/model.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import TypedDict +from typing import int, TypedDict from sentry.hybridcloud.rpc import RpcModel diff --git a/src/sentry/sentry_apps/services/app_request/serial.py b/src/sentry/sentry_apps/services/app_request/serial.py index 148d61827164ad..783af01f10d53e 100644 --- a/src/sentry/sentry_apps/services/app_request/serial.py +++ b/src/sentry/sentry_apps/services/app_request/serial.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.services.app_request.model import RpcSentryAppRequest from sentry.utils.sentry_apps.request_buffer import SentryAppRequest diff --git a/src/sentry/sentry_apps/services/app_request/service.py b/src/sentry/sentry_apps/services/app_request/service.py index 88567a5ed34e3d..ddf97ffb5b3770 100644 --- a/src/sentry/sentry_apps/services/app_request/service.py +++ b/src/sentry/sentry_apps/services/app_request/service.py @@ -1,3 +1,4 @@ +from typing import int import abc from sentry.hybridcloud.rpc.resolvers import ByRegionName diff --git a/src/sentry/sentry_apps/services/hook/__init__.py b/src/sentry/sentry_apps/services/hook/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/sentry_apps/services/hook/__init__.py +++ b/src/sentry/sentry_apps/services/hook/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/sentry_apps/services/hook/impl.py b/src/sentry/sentry_apps/services/hook/impl.py index 6805edcf14bec6..e0444571168bf9 100644 --- a/src/sentry/sentry_apps/services/hook/impl.py +++ b/src/sentry/sentry_apps/services/hook/impl.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/sentry_apps/services/hook/model.py b/src/sentry/sentry_apps/services/hook/model.py index d255db12500bc3..a01794fa26906f 100644 --- a/src/sentry/sentry_apps/services/hook/model.py +++ b/src/sentry/sentry_apps/services/hook/model.py @@ -3,7 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. -from typing import Any +from typing import int, Any from pydantic.fields import Field diff --git a/src/sentry/sentry_apps/services/hook/serial.py b/src/sentry/sentry_apps/services/hook/serial.py index adf272c0c93f4f..935fb33d430a17 100644 --- a/src/sentry/sentry_apps/services/hook/serial.py +++ b/src/sentry/sentry_apps/services/hook/serial.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.models.servicehook import ServiceHook from sentry.sentry_apps.services.hook import RpcServiceHook diff --git a/src/sentry/sentry_apps/services/hook/service.py b/src/sentry/sentry_apps/services/hook/service.py index da2e2f394e7ae9..751d100c6f0d66 100644 --- a/src/sentry/sentry_apps/services/hook/service.py +++ b/src/sentry/sentry_apps/services/hook/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int import abc from sentry.hybridcloud.rpc.resolvers import ByOrganizationId, ByRegionName diff --git a/src/sentry/sentry_apps/tasks/__init__.py b/src/sentry/sentry_apps/tasks/__init__.py index f96910bb934916..7633b798a18795 100644 --- a/src/sentry/sentry_apps/tasks/__init__.py +++ b/src/sentry/sentry_apps/tasks/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .sentry_apps import ( broadcast_webhooks_for_organization, build_comment_webhook, diff --git a/src/sentry/sentry_apps/tasks/sentry_apps.py b/src/sentry/sentry_apps/tasks/sentry_apps.py index a3c86e027a6e0e..ea22244d42fa4e 100644 --- a/src/sentry/sentry_apps/tasks/sentry_apps.py +++ b/src/sentry/sentry_apps/tasks/sentry_apps.py @@ -4,7 +4,7 @@ from collections import defaultdict from collections.abc import Mapping, Sequence from datetime import datetime -from typing import Any, Protocol, SupportsInt, cast +from typing import Any, Protocol, SupportsInt, cast, int import sentry_sdk from django.urls import reverse diff --git a/src/sentry/sentry_apps/tasks/service_hooks.py b/src/sentry/sentry_apps/tasks/service_hooks.py index 5ad26198c0fcec..0d0d8cd03bc8bc 100644 --- a/src/sentry/sentry_apps/tasks/service_hooks.py +++ b/src/sentry/sentry_apps/tasks/service_hooks.py @@ -1,3 +1,4 @@ +from typing import int from time import time from sentry import nodestore diff --git a/src/sentry/sentry_apps/token_exchange/grant_exchanger.py b/src/sentry/sentry_apps/token_exchange/grant_exchanger.py index 9415f57da80d5b..bd53d4b108492d 100644 --- a/src/sentry/sentry_apps/token_exchange/grant_exchanger.py +++ b/src/sentry/sentry_apps/token_exchange/grant_exchanger.py @@ -1,3 +1,4 @@ +from typing import int import logging from dataclasses import dataclass from datetime import datetime, timezone diff --git a/src/sentry/sentry_apps/token_exchange/manual_refresher.py b/src/sentry/sentry_apps/token_exchange/manual_refresher.py index 19e2d80b95ca4a..e996879a02b5a3 100644 --- a/src/sentry/sentry_apps/token_exchange/manual_refresher.py +++ b/src/sentry/sentry_apps/token_exchange/manual_refresher.py @@ -1,3 +1,4 @@ +from typing import int import logging from dataclasses import dataclass diff --git a/src/sentry/sentry_apps/token_exchange/refresher.py b/src/sentry/sentry_apps/token_exchange/refresher.py index be22a9fe285950..09ed25d020243e 100644 --- a/src/sentry/sentry_apps/token_exchange/refresher.py +++ b/src/sentry/sentry_apps/token_exchange/refresher.py @@ -1,3 +1,4 @@ +from typing import int import logging from dataclasses import dataclass diff --git a/src/sentry/sentry_apps/token_exchange/util.py b/src/sentry/sentry_apps/token_exchange/util.py index 632e65b0f0ae0d..3942d5f0523cfa 100644 --- a/src/sentry/sentry_apps/token_exchange/util.py +++ b/src/sentry/sentry_apps/token_exchange/util.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from django.utils import timezone diff --git a/src/sentry/sentry_apps/token_exchange/validator.py b/src/sentry/sentry_apps/token_exchange/validator.py index 625ba7dae17ad3..001d58bab67eb7 100644 --- a/src/sentry/sentry_apps/token_exchange/validator.py +++ b/src/sentry/sentry_apps/token_exchange/validator.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass from django.utils.functional import cached_property diff --git a/src/sentry/sentry_apps/utils/alert_rule_action.py b/src/sentry/sentry_apps/utils/alert_rule_action.py index 4c38b89521fede..29640fd3ba0f24 100644 --- a/src/sentry/sentry_apps/utils/alert_rule_action.py +++ b/src/sentry/sentry_apps/utils/alert_rule_action.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.sentry_apps.services.app.model import RpcAlertRuleActionResult diff --git a/src/sentry/sentry_apps/utils/errors.py b/src/sentry/sentry_apps/utils/errors.py index 35db6ff8cf3c99..a22b2c806c19ae 100644 --- a/src/sentry/sentry_apps/utils/errors.py +++ b/src/sentry/sentry_apps/utils/errors.py @@ -1,5 +1,5 @@ from enum import Enum -from typing import Any, TypedDict +from typing import Any, TypedDict, int import sentry_sdk from rest_framework.response import Response diff --git a/src/sentry/sentry_apps/utils/webhooks.py b/src/sentry/sentry_apps/utils/webhooks.py index 28d70279ed7f48..8b5d792e20ede5 100644 --- a/src/sentry/sentry_apps/utils/webhooks.py +++ b/src/sentry/sentry_apps/utils/webhooks.py @@ -1,5 +1,5 @@ from enum import StrEnum -from typing import Final +from typing import int, Final class SentryAppActionType(StrEnum): diff --git a/src/sentry/sentry_apps/web/sentryapp_avatar.py b/src/sentry/sentry_apps/web/sentryapp_avatar.py index f987d02547e850..ab108d6ff154c6 100644 --- a/src/sentry/sentry_apps/web/sentryapp_avatar.py +++ b/src/sentry/sentry_apps/web/sentryapp_avatar.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.models.sentry_app_avatar import SentryAppAvatar from sentry.web.frontend.base import AvatarPhotoView, control_silo_view diff --git a/src/sentry/sentry_metrics/__init__.py b/src/sentry/sentry_metrics/__init__.py index a5663a04d860a4..f6e75f7e92e058 100644 --- a/src/sentry/sentry_metrics/__init__.py +++ b/src/sentry/sentry_metrics/__init__.py @@ -1,3 +1,4 @@ +from typing import int """ Module for the Metrics product built by sentry. Not to be confused with sentry.metrics, which collects statsd / datadog metrics diff --git a/src/sentry/sentry_metrics/aggregation_option_registry.py b/src/sentry/sentry_metrics/aggregation_option_registry.py index eeec60c2b1f5da..a97b7f5faf7ad2 100644 --- a/src/sentry/sentry_metrics/aggregation_option_registry.py +++ b/src/sentry/sentry_metrics/aggregation_option_registry.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum from sentry import options diff --git a/src/sentry/sentry_metrics/client/__init__.py b/src/sentry/sentry_metrics/client/__init__.py index b888130e65928d..c9d4ca23f07320 100644 --- a/src/sentry/sentry_metrics/client/__init__.py +++ b/src/sentry/sentry_metrics/client/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/sentry_metrics/client/base.py b/src/sentry/sentry_metrics/client/base.py index a65775dbab2cba..0eb94b691e5676 100644 --- a/src/sentry/sentry_metrics/client/base.py +++ b/src/sentry/sentry_metrics/client/base.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Sequence diff --git a/src/sentry/sentry_metrics/client/kafka.py b/src/sentry/sentry_metrics/client/kafka.py index 4db47dcd6b3d43..0278c425fbe9d9 100644 --- a/src/sentry/sentry_metrics/client/kafka.py +++ b/src/sentry/sentry_metrics/client/kafka.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import datetime diff --git a/src/sentry/sentry_metrics/client/snuba.py b/src/sentry/sentry_metrics/client/snuba.py index 75d285474aa221..9a22280344b3d7 100644 --- a/src/sentry/sentry_metrics/client/snuba.py +++ b/src/sentry/sentry_metrics/client/snuba.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Sequence from datetime import datetime diff --git a/src/sentry/sentry_metrics/configuration.py b/src/sentry/sentry_metrics/configuration.py index 9e9aec0514e981..9e5b10a6729f57 100644 --- a/src/sentry/sentry_metrics/configuration.py +++ b/src/sentry/sentry_metrics/configuration.py @@ -6,7 +6,7 @@ from collections.abc import Mapping, MutableMapping from dataclasses import dataclass from enum import Enum -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/sentry_metrics/consumers/indexer/batch.py b/src/sentry/sentry_metrics/consumers/indexer/batch.py index b27465770069fc..41365a0c8eae9d 100644 --- a/src/sentry/sentry_metrics/consumers/indexer/batch.py +++ b/src/sentry/sentry_metrics/consumers/indexer/batch.py @@ -3,7 +3,7 @@ from collections import defaultdict from collections.abc import Callable, Iterable, Mapping, MutableMapping, MutableSequence from dataclasses import dataclass -from typing import Any, cast +from typing import Any, cast, int import orjson import rapidjson diff --git a/src/sentry/sentry_metrics/consumers/indexer/common.py b/src/sentry/sentry_metrics/consumers/indexer/common.py index 54fbfdf066520d..b2deb5f6b0b2ac 100644 --- a/src/sentry/sentry_metrics/consumers/indexer/common.py +++ b/src/sentry/sentry_metrics/consumers/indexer/common.py @@ -2,7 +2,7 @@ import time from collections.abc import Mapping, MutableSequence from dataclasses import dataclass -from typing import NamedTuple +from typing import int, NamedTuple from arroyo import Partition from arroyo.backends.kafka import KafkaPayload diff --git a/src/sentry/sentry_metrics/consumers/indexer/multiprocess.py b/src/sentry/sentry_metrics/consumers/indexer/multiprocess.py index 307fdfd50ed4f7..e9214a15262f31 100644 --- a/src/sentry/sentry_metrics/consumers/indexer/multiprocess.py +++ b/src/sentry/sentry_metrics/consumers/indexer/multiprocess.py @@ -3,7 +3,7 @@ import time from collections.abc import Mapping, MutableMapping from functools import partial -from typing import Any +from typing import int, Any from arroyo.backends.abstract import Producer as AbstractProducer from arroyo.backends.kafka import KafkaPayload diff --git a/src/sentry/sentry_metrics/consumers/indexer/parallel.py b/src/sentry/sentry_metrics/consumers/indexer/parallel.py index 61ad500bd73eaf..cd43897e68dabf 100644 --- a/src/sentry/sentry_metrics/consumers/indexer/parallel.py +++ b/src/sentry/sentry_metrics/consumers/indexer/parallel.py @@ -4,7 +4,7 @@ import logging from collections import deque from collections.abc import Mapping -from typing import Any, Deque, Union, cast +from typing import Any, Deque, Union, cast, int from arroyo.backends.kafka import KafkaPayload from arroyo.dlq import InvalidMessage diff --git a/src/sentry/sentry_metrics/consumers/indexer/parsed_message.py b/src/sentry/sentry_metrics/consumers/indexer/parsed_message.py index 9a7c69c0526ba7..b67ae7ba1bf7bd 100644 --- a/src/sentry/sentry_metrics/consumers/indexer/parsed_message.py +++ b/src/sentry/sentry_metrics/consumers/indexer/parsed_message.py @@ -1,4 +1,4 @@ -from typing import Required +from typing import int, Required from sentry_kafka_schemas.schema_types.ingest_metrics_v1 import IngestMetric diff --git a/src/sentry/sentry_metrics/consumers/indexer/processing.py b/src/sentry/sentry_metrics/consumers/indexer/processing.py index 3971be7edd5893..df5467877558a3 100644 --- a/src/sentry/sentry_metrics/consumers/indexer/processing.py +++ b/src/sentry/sentry_metrics/consumers/indexer/processing.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Callable, Mapping diff --git a/src/sentry/sentry_metrics/consumers/indexer/routing_producer.py b/src/sentry/sentry_metrics/consumers/indexer/routing_producer.py index 114560f6886866..a8d764cd2541dd 100644 --- a/src/sentry/sentry_metrics/consumers/indexer/routing_producer.py +++ b/src/sentry/sentry_metrics/consumers/indexer/routing_producer.py @@ -5,7 +5,7 @@ from collections.abc import Mapping, MutableMapping, Sequence from concurrent.futures import Future from functools import partial -from typing import Any, Deque, NamedTuple +from typing import Any, Deque, NamedTuple, int from arroyo.backends.kafka import KafkaPayload from arroyo.processing.strategies import ProcessingStrategy diff --git a/src/sentry/sentry_metrics/consumers/indexer/schema_validator.py b/src/sentry/sentry_metrics/consumers/indexer/schema_validator.py index a7b056a59bf1b5..fbe45f2ef3f44f 100644 --- a/src/sentry/sentry_metrics/consumers/indexer/schema_validator.py +++ b/src/sentry/sentry_metrics/consumers/indexer/schema_validator.py @@ -1,5 +1,5 @@ import random -from typing import Any +from typing import int, Any from sentry_kafka_schemas.codecs import Codec from sentry_kafka_schemas.schema_types.ingest_metrics_v1 import IngestMetric diff --git a/src/sentry/sentry_metrics/consumers/indexer/slicing_router.py b/src/sentry/sentry_metrics/consumers/indexer/slicing_router.py index 375d7166d59710..1bba5558a4efa6 100644 --- a/src/sentry/sentry_metrics/consumers/indexer/slicing_router.py +++ b/src/sentry/sentry_metrics/consumers/indexer/slicing_router.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import MutableMapping, Sequence -from typing import Final +from typing import int, Final from arroyo import Message, Topic from confluent_kafka import Producer diff --git a/src/sentry/sentry_metrics/consumers/indexer/tags_validator.py b/src/sentry/sentry_metrics/consumers/indexer/tags_validator.py index 4d0b821019c1b0..026ca0f3f540bd 100644 --- a/src/sentry/sentry_metrics/consumers/indexer/tags_validator.py +++ b/src/sentry/sentry_metrics/consumers/indexer/tags_validator.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping from sentry.sentry_metrics.configuration import MAX_INDEXED_COLUMN_LENGTH diff --git a/src/sentry/sentry_metrics/consumers/last_seen_updater.py b/src/sentry/sentry_metrics/consumers/last_seen_updater.py index f0523411c2b780..b43fa1d93dafff 100644 --- a/src/sentry/sentry_metrics/consumers/last_seen_updater.py +++ b/src/sentry/sentry_metrics/consumers/last_seen_updater.py @@ -3,7 +3,7 @@ from abc import abstractmethod from collections.abc import Callable, Mapping from datetime import timedelta -from typing import Any +from typing import int, Any import rapidjson from arroyo.backends.kafka import KafkaPayload diff --git a/src/sentry/sentry_metrics/indexer/__init__.py b/src/sentry/sentry_metrics/indexer/__init__.py index a5fc956e93e31d..8e5a235e23036e 100644 --- a/src/sentry/sentry_metrics/indexer/__init__.py +++ b/src/sentry/sentry_metrics/indexer/__init__.py @@ -11,7 +11,7 @@ ) backend.expose(locals()) -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING if TYPE_CHECKING: bulk_record = StringIndexer().bulk_record diff --git a/src/sentry/sentry_metrics/indexer/base.py b/src/sentry/sentry_metrics/indexer/base.py index f598f9775bd78d..d9d1bd68800b80 100644 --- a/src/sentry/sentry_metrics/indexer/base.py +++ b/src/sentry/sentry_metrics/indexer/base.py @@ -4,7 +4,7 @@ from enum import Enum from functools import wraps from itertools import groupby -from typing import Any, NamedTuple, TypeVar +from typing import Any, NamedTuple, TypeVar, int from sentry.sentry_metrics.configuration import UseCaseKey from sentry.sentry_metrics.use_case_id_registry import REVERSE_METRIC_PATH_MAPPING, UseCaseID diff --git a/src/sentry/sentry_metrics/indexer/cache.py b/src/sentry/sentry_metrics/indexer/cache.py index 40791d962362c5..1ac73aabcb877f 100644 --- a/src/sentry/sentry_metrics/indexer/cache.py +++ b/src/sentry/sentry_metrics/indexer/cache.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import random diff --git a/src/sentry/sentry_metrics/indexer/limiters/writes.py b/src/sentry/sentry_metrics/indexer/limiters/writes.py index 589d3b06f8ca6a..457c0296c32b92 100644 --- a/src/sentry/sentry_metrics/indexer/limiters/writes.py +++ b/src/sentry/sentry_metrics/indexer/limiters/writes.py @@ -2,7 +2,7 @@ import dataclasses from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from sentry import options from sentry.ratelimits.sliding_windows import ( diff --git a/src/sentry/sentry_metrics/indexer/mock.py b/src/sentry/sentry_metrics/indexer/mock.py index 21a304857a1abe..5e2b1bff0ce693 100644 --- a/src/sentry/sentry_metrics/indexer/mock.py +++ b/src/sentry/sentry_metrics/indexer/mock.py @@ -1,7 +1,7 @@ import itertools from collections import defaultdict from collections.abc import Collection, Mapping -from typing import DefaultDict +from typing import int, DefaultDict from sentry.sentry_metrics.indexer.base import ( FetchType, diff --git a/src/sentry/sentry_metrics/indexer/postgres/__init__.py b/src/sentry/sentry_metrics/indexer/postgres/__init__.py index 61a2d87d81346e..a2b53ce4f73ecf 100644 --- a/src/sentry/sentry_metrics/indexer/postgres/__init__.py +++ b/src/sentry/sentry_metrics/indexer/postgres/__init__.py @@ -1 +1,2 @@ +from typing import int default_app_config = "sentry.sentry_metrics.indexer.postgres.apps.Config" # noqa diff --git a/src/sentry/sentry_metrics/indexer/postgres/apps.py b/src/sentry/sentry_metrics/indexer/postgres/apps.py index 7b83ae9d08499c..46ff44f03925ee 100644 --- a/src/sentry/sentry_metrics/indexer/postgres/apps.py +++ b/src/sentry/sentry_metrics/indexer/postgres/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/sentry_metrics/indexer/postgres/models.py b/src/sentry/sentry_metrics/indexer/postgres/models.py index e9ad2ca8a763db..c74a88d9e59276 100644 --- a/src/sentry/sentry_metrics/indexer/postgres/models.py +++ b/src/sentry/sentry_metrics/indexer/postgres/models.py @@ -1,5 +1,5 @@ import logging -from typing import ClassVar, Self +from typing import ClassVar, Self, int from django.conf import settings from django.db import models diff --git a/src/sentry/sentry_metrics/indexer/postgres/postgres_v2.py b/src/sentry/sentry_metrics/indexer/postgres/postgres_v2.py index 0ce236f3401313..2ed07e6665e400 100644 --- a/src/sentry/sentry_metrics/indexer/postgres/postgres_v2.py +++ b/src/sentry/sentry_metrics/indexer/postgres/postgres_v2.py @@ -2,7 +2,7 @@ from functools import reduce from operator import or_ from time import sleep -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/sentry_metrics/indexer/strings.py b/src/sentry/sentry_metrics/indexer/strings.py index 6b241e1f012be2..8b616ff0b28dca 100644 --- a/src/sentry/sentry_metrics/indexer/strings.py +++ b/src/sentry/sentry_metrics/indexer/strings.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Collection, Mapping from django.conf import settings diff --git a/src/sentry/sentry_metrics/querying/constants.py b/src/sentry/sentry_metrics/querying/constants.py index 508202c3262d84..3c316ea33d66c3 100644 --- a/src/sentry/sentry_metrics/querying/constants.py +++ b/src/sentry/sentry_metrics/querying/constants.py @@ -1,3 +1,4 @@ +from typing import int from snuba_sdk import ArithmeticOperator # Snuba can return at most 10.000 rows. diff --git a/src/sentry/sentry_metrics/querying/data/__init__.py b/src/sentry/sentry_metrics/querying/data/__init__.py index 4d3b3b06eab998..0cc5f88f67a647 100644 --- a/src/sentry/sentry_metrics/querying/data/__init__.py +++ b/src/sentry/sentry_metrics/querying/data/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .api import run_queries from .query import MQLQueriesResult, MQLQuery from .transformation.metrics_api import MetricsAPIQueryResultsTransformer diff --git a/src/sentry/sentry_metrics/querying/data/api.py b/src/sentry/sentry_metrics/querying/data/api.py index 8abcdb040bfd80..ed079eacb94492 100644 --- a/src/sentry/sentry_metrics/querying/data/api.py +++ b/src/sentry/sentry_metrics/querying/data/api.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from datetime import datetime diff --git a/src/sentry/sentry_metrics/querying/data/execution.py b/src/sentry/sentry_metrics/querying/data/execution.py index 1699e4789aed17..378ebfabe19242 100644 --- a/src/sentry/sentry_metrics/querying/data/execution.py +++ b/src/sentry/sentry_metrics/querying/data/execution.py @@ -2,7 +2,7 @@ from dataclasses import dataclass, field, replace from datetime import datetime from enum import Enum -from typing import Any, Union, cast +from typing import Any, Union, cast, int import sentry_sdk from snuba_sdk import Column, Direction, MetricsQuery, Request diff --git a/src/sentry/sentry_metrics/querying/data/mapping/base.py b/src/sentry/sentry_metrics/querying/data/mapping/base.py index b67384654bf093..c55c238cb0f743 100644 --- a/src/sentry/sentry_metrics/querying/data/mapping/base.py +++ b/src/sentry/sentry_metrics/querying/data/mapping/base.py @@ -1,6 +1,6 @@ import abc from collections.abc import Sequence -from typing import Any +from typing import int, Any from sentry.models.project import Project diff --git a/src/sentry/sentry_metrics/querying/data/mapping/project_mapper.py b/src/sentry/sentry_metrics/querying/data/mapping/project_mapper.py index f8506e963a231d..8282148ae9fa66 100644 --- a/src/sentry/sentry_metrics/querying/data/mapping/project_mapper.py +++ b/src/sentry/sentry_metrics/querying/data/mapping/project_mapper.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from sentry.models.project import Project diff --git a/src/sentry/sentry_metrics/querying/data/parsing.py b/src/sentry/sentry_metrics/querying/data/parsing.py index 136d30d52d4994..b5fa799c847f66 100644 --- a/src/sentry/sentry_metrics/querying/data/parsing.py +++ b/src/sentry/sentry_metrics/querying/data/parsing.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator, Sequence from parsimonious.exceptions import IncompleteParseError diff --git a/src/sentry/sentry_metrics/querying/data/postprocessing/base.py b/src/sentry/sentry_metrics/querying/data/postprocessing/base.py index 5357a8ecab0592..7184edb2aa8821 100644 --- a/src/sentry/sentry_metrics/querying/data/postprocessing/base.py +++ b/src/sentry/sentry_metrics/querying/data/postprocessing/base.py @@ -1,3 +1,4 @@ +from typing import int from abc import ABC, abstractmethod from sentry.sentry_metrics.querying.data.execution import QueryResult diff --git a/src/sentry/sentry_metrics/querying/data/postprocessing/remapping.py b/src/sentry/sentry_metrics/querying/data/postprocessing/remapping.py index 30f4e9cf5261d3..7cc2aafba5c4c2 100644 --- a/src/sentry/sentry_metrics/querying/data/postprocessing/remapping.py +++ b/src/sentry/sentry_metrics/querying/data/postprocessing/remapping.py @@ -1,6 +1,6 @@ from collections.abc import Mapping, Sequence from copy import deepcopy -from typing import Any, cast +from typing import Any, cast, int from sentry.models.project import Project from sentry.sentry_metrics.querying.data.execution import QueryResult diff --git a/src/sentry/sentry_metrics/querying/data/preparation/base.py b/src/sentry/sentry_metrics/querying/data/preparation/base.py index eb25bf75bab511..b0fc58ce1883ba 100644 --- a/src/sentry/sentry_metrics/querying/data/preparation/base.py +++ b/src/sentry/sentry_metrics/querying/data/preparation/base.py @@ -1,3 +1,4 @@ +from typing import int from abc import ABC, abstractmethod from dataclasses import dataclass, field diff --git a/src/sentry/sentry_metrics/querying/data/preparation/mapping.py b/src/sentry/sentry_metrics/querying/data/preparation/mapping.py index f1f8682df4a036..f9e82fbc61e6a8 100644 --- a/src/sentry/sentry_metrics/querying/data/preparation/mapping.py +++ b/src/sentry/sentry_metrics/querying/data/preparation/mapping.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from dataclasses import replace diff --git a/src/sentry/sentry_metrics/querying/data/preparation/units_normalization.py b/src/sentry/sentry_metrics/querying/data/preparation/units_normalization.py index 863c977208aa2d..ee0ee4b8a1ad85 100644 --- a/src/sentry/sentry_metrics/querying/data/preparation/units_normalization.py +++ b/src/sentry/sentry_metrics/querying/data/preparation/units_normalization.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import replace from sentry.sentry_metrics.querying.data.preparation.base import IntermediateQuery, PreparationStep diff --git a/src/sentry/sentry_metrics/querying/data/query.py b/src/sentry/sentry_metrics/querying/data/query.py index 81bce8efc159ed..ee7fa664724399 100644 --- a/src/sentry/sentry_metrics/querying/data/query.py +++ b/src/sentry/sentry_metrics/querying/data/query.py @@ -1,6 +1,6 @@ from collections.abc import Mapping from dataclasses import dataclass -from typing import Any, cast +from typing import Any, cast, int from sentry.sentry_metrics.querying.data.execution import QueryResult from sentry.sentry_metrics.querying.data.transformation.base import ( diff --git a/src/sentry/sentry_metrics/querying/data/transformation/base.py b/src/sentry/sentry_metrics/querying/data/transformation/base.py index 53f1dd21afabd9..d6c43ced6c3853 100644 --- a/src/sentry/sentry_metrics/querying/data/transformation/base.py +++ b/src/sentry/sentry_metrics/querying/data/transformation/base.py @@ -1,5 +1,5 @@ from abc import ABC, abstractmethod -from typing import Generic, TypeVar +from typing import Generic, TypeVar, int from sentry.sentry_metrics.querying.data.execution import QueryResult diff --git a/src/sentry/sentry_metrics/querying/data/transformation/metrics_api.py b/src/sentry/sentry_metrics/querying/data/transformation/metrics_api.py index f9cc8234048886..9d61c8cef99e2f 100644 --- a/src/sentry/sentry_metrics/querying/data/transformation/metrics_api.py +++ b/src/sentry/sentry_metrics/querying/data/transformation/metrics_api.py @@ -2,7 +2,7 @@ from collections.abc import Callable, Mapping, Sequence from dataclasses import dataclass from datetime import datetime, timezone -from typing import Any, cast +from typing import Any, cast, int from sentry.search.utils import parse_datetime_string from sentry.sentry_metrics.querying.data.execution import QueryResult diff --git a/src/sentry/sentry_metrics/querying/data/utils.py b/src/sentry/sentry_metrics/querying/data/utils.py index 8f92cd830fec7b..663443e629f56f 100644 --- a/src/sentry/sentry_metrics/querying/data/utils.py +++ b/src/sentry/sentry_metrics/querying/data/utils.py @@ -1,3 +1,4 @@ +from typing import int import math from datetime import datetime, timedelta, timezone diff --git a/src/sentry/sentry_metrics/querying/eap/mql_eap_bridge.py b/src/sentry/sentry_metrics/querying/eap/mql_eap_bridge.py index 20c977a5d4b0b9..24b81199924dae 100644 --- a/src/sentry/sentry_metrics/querying/eap/mql_eap_bridge.py +++ b/src/sentry/sentry_metrics/querying/eap/mql_eap_bridge.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Iterable, Sequence from datetime import datetime, timedelta diff --git a/src/sentry/sentry_metrics/querying/errors.py b/src/sentry/sentry_metrics/querying/errors.py index 365e2f628e7e84..d99d9bde0a9043 100644 --- a/src/sentry/sentry_metrics/querying/errors.py +++ b/src/sentry/sentry_metrics/querying/errors.py @@ -1,3 +1,4 @@ +from typing import int class InvalidMetricsQueryError(Exception): pass diff --git a/src/sentry/sentry_metrics/querying/types.py b/src/sentry/sentry_metrics/querying/types.py index e3244d3bf428d9..eee59bcc310d81 100644 --- a/src/sentry/sentry_metrics/querying/types.py +++ b/src/sentry/sentry_metrics/querying/types.py @@ -1,6 +1,6 @@ from collections.abc import Sequence from enum import Enum -from typing import Optional, Union +from typing import Optional, Union, int from snuba_sdk import BooleanCondition, Condition, Direction, Formula, Timeseries diff --git a/src/sentry/sentry_metrics/querying/units.py b/src/sentry/sentry_metrics/querying/units.py index 64f5d2881cc2b5..9d47ede2851363 100644 --- a/src/sentry/sentry_metrics/querying/units.py +++ b/src/sentry/sentry_metrics/querying/units.py @@ -1,7 +1,7 @@ from collections.abc import Sequence from dataclasses import dataclass from enum import Enum -from typing import Literal, Union +from typing import Literal, Union, int from snuba_sdk import ArithmeticOperator, Formula diff --git a/src/sentry/sentry_metrics/querying/visitors/__init__.py b/src/sentry/sentry_metrics/querying/visitors/__init__.py index b4af4db58fbeae..055a5561d928c1 100644 --- a/src/sentry/sentry_metrics/querying/visitors/__init__.py +++ b/src/sentry/sentry_metrics/querying/visitors/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .base import QueryConditionVisitor, QueryExpressionVisitor, VisitableQueryExpression from .query_condition import ( LatestReleaseTransformationVisitor, diff --git a/src/sentry/sentry_metrics/querying/visitors/base.py b/src/sentry/sentry_metrics/querying/visitors/base.py index 1d82a2489f7bad..9cc7536924de54 100644 --- a/src/sentry/sentry_metrics/querying/visitors/base.py +++ b/src/sentry/sentry_metrics/querying/visitors/base.py @@ -1,5 +1,5 @@ from abc import ABC -from typing import Generic, TypeVar +from typing import Generic, TypeVar, int from snuba_sdk import BooleanCondition, Condition, Formula, Timeseries from snuba_sdk.conditions import ConditionGroup diff --git a/src/sentry/sentry_metrics/querying/visitors/query_condition.py b/src/sentry/sentry_metrics/querying/visitors/query_condition.py index 5c0e672e428183..483303ce498ea4 100644 --- a/src/sentry/sentry_metrics/querying/visitors/query_condition.py +++ b/src/sentry/sentry_metrics/querying/visitors/query_condition.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping, Sequence from snuba_sdk import BooleanCondition, BooleanOp, Column, Condition, Op diff --git a/src/sentry/sentry_metrics/querying/visitors/query_expression.py b/src/sentry/sentry_metrics/querying/visitors/query_expression.py index 6d23694850cff5..5b7a7b39796089 100644 --- a/src/sentry/sentry_metrics/querying/visitors/query_expression.py +++ b/src/sentry/sentry_metrics/querying/visitors/query_expression.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import Any +from typing import int, Any import sentry_sdk from snuba_sdk import AliasedExpression, Column, Condition, Formula, Op, Timeseries diff --git a/src/sentry/sentry_metrics/use_case_id_registry.py b/src/sentry/sentry_metrics/use_case_id_registry.py index c9d7d0f5ff8af5..51584741aadf5b 100644 --- a/src/sentry/sentry_metrics/use_case_id_registry.py +++ b/src/sentry/sentry_metrics/use_case_id_registry.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Mapping from enum import Enum diff --git a/src/sentry/sentry_metrics/use_case_utils.py b/src/sentry/sentry_metrics/use_case_utils.py index cd36d536d10370..03d637f9f16b2e 100644 --- a/src/sentry/sentry_metrics/use_case_utils.py +++ b/src/sentry/sentry_metrics/use_case_utils.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.exceptions import ParseError from rest_framework.request import Request diff --git a/src/sentry/sentry_metrics/utils.py b/src/sentry/sentry_metrics/utils.py index 8bae7996aa743c..bc099fa7c76dfe 100644 --- a/src/sentry/sentry_metrics/utils.py +++ b/src/sentry/sentry_metrics/utils.py @@ -1,5 +1,5 @@ from collections.abc import Collection, Mapping, Sequence -from typing import Union, cast +from typing import Union, cast, int from sentry.exceptions import InvalidParams from sentry.sentry_metrics import indexer diff --git a/src/sentry/services/base.py b/src/sentry/services/base.py index 955ae2f7503a3f..1bdada15ad9487 100644 --- a/src/sentry/services/base.py +++ b/src/sentry/services/base.py @@ -1,3 +1,4 @@ +from typing import int class Service: name = "" diff --git a/src/sentry/services/eventstore/__init__.py b/src/sentry/services/eventstore/__init__.py index a7ebb20cb44998..2a5c3d7f527595 100644 --- a/src/sentry/services/eventstore/__init__.py +++ b/src/sentry/services/eventstore/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.services import LazyServiceWrapper from .base import EventStorage, Filter # NOQA diff --git a/src/sentry/services/eventstore/base.py b/src/sentry/services/eventstore/base.py index 79016ff981f4c9..c5929324e14031 100644 --- a/src/sentry/services/eventstore/base.py +++ b/src/sentry/services/eventstore/base.py @@ -4,7 +4,7 @@ from collections.abc import Mapping, Sequence from copy import deepcopy from datetime import datetime -from typing import Any, Literal, Self, overload +from typing import Any, Literal, Self, overload, int import sentry_sdk from snuba_sdk import Condition diff --git a/src/sentry/services/eventstore/models.py b/src/sentry/services/eventstore/models.py index 6c1311448690de..7b61d7659ddd77 100644 --- a/src/sentry/services/eventstore/models.py +++ b/src/sentry/services/eventstore/models.py @@ -7,7 +7,7 @@ from copy import deepcopy from datetime import datetime, timezone from hashlib import md5 -from typing import TYPE_CHECKING, Any, Literal, Optional, cast, overload +from typing import TYPE_CHECKING, Any, Literal, Optional, cast, overload, int import orjson import sentry_sdk diff --git a/src/sentry/services/eventstore/processing/__init__.py b/src/sentry/services/eventstore/processing/__init__.py index d967557e97b786..a791c146271913 100644 --- a/src/sentry/services/eventstore/processing/__init__.py +++ b/src/sentry/services/eventstore/processing/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.services.eventstore.processing.base import EventProcessingStore diff --git a/src/sentry/services/eventstore/processing/base.py b/src/sentry/services/eventstore/processing/base.py index 4cc2a75d8658a3..ab6aa83bd5995c 100644 --- a/src/sentry/services/eventstore/processing/base.py +++ b/src/sentry/services/eventstore/processing/base.py @@ -2,7 +2,7 @@ from collections.abc import MutableMapping from datetime import timedelta -from typing import Any +from typing import int, Any from sentry.utils.cache import cache_key_for_event from sentry.utils.kvstore.abstract import KVStorage diff --git a/src/sentry/services/eventstore/processing/bigtable.py b/src/sentry/services/eventstore/processing/bigtable.py index f4b5254c5387bc..ae1e20329dc46c 100644 --- a/src/sentry/services/eventstore/processing/bigtable.py +++ b/src/sentry/services/eventstore/processing/bigtable.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.utils.codecs import BytesCodec, JSONCodec from sentry.utils.kvstore.bigtable import BigtableKVStorage diff --git a/src/sentry/services/eventstore/processing/redis.py b/src/sentry/services/eventstore/processing/redis.py index a885a29a672173..d244e9f9a882dc 100644 --- a/src/sentry/services/eventstore/processing/redis.py +++ b/src/sentry/services/eventstore/processing/redis.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.utils.codecs import JSONCodec from sentry.utils.kvstore.encoding import KVStorageCodecWrapper diff --git a/src/sentry/services/eventstore/query_preprocessing.py b/src/sentry/services/eventstore/query_preprocessing.py index ca7054197f812f..a134a5a4fbd670 100644 --- a/src/sentry/services/eventstore/query_preprocessing.py +++ b/src/sentry/services/eventstore/query_preprocessing.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Iterable import sentry_sdk diff --git a/src/sentry/services/eventstore/reprocessing/__init__.py b/src/sentry/services/eventstore/reprocessing/__init__.py index e288b35b28c3dd..5a30a9c2ae4694 100644 --- a/src/sentry/services/eventstore/reprocessing/__init__.py +++ b/src/sentry/services/eventstore/reprocessing/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.services.eventstore.reprocessing.base import ReprocessingStore diff --git a/src/sentry/services/eventstore/reprocessing/base.py b/src/sentry/services/eventstore/reprocessing/base.py index 3d2dfe729035f2..fe5e70d2748fc8 100644 --- a/src/sentry/services/eventstore/reprocessing/base.py +++ b/src/sentry/services/eventstore/reprocessing/base.py @@ -1,5 +1,5 @@ from datetime import datetime -from typing import Any +from typing import int, Any from sentry.utils.services import Service diff --git a/src/sentry/services/eventstore/reprocessing/redis.py b/src/sentry/services/eventstore/reprocessing/redis.py index 1b95f68b326292..37164f66ed03b5 100644 --- a/src/sentry/services/eventstore/reprocessing/redis.py +++ b/src/sentry/services/eventstore/reprocessing/redis.py @@ -1,6 +1,6 @@ import uuid from datetime import datetime -from typing import Any +from typing import int, Any import orjson import redis diff --git a/src/sentry/services/eventstore/snuba/__init__.py b/src/sentry/services/eventstore/snuba/__init__.py index 58ed7e499a3d4b..93b1d4ee306dc7 100644 --- a/src/sentry/services/eventstore/snuba/__init__.py +++ b/src/sentry/services/eventstore/snuba/__init__.py @@ -1 +1,2 @@ +from typing import int from .backend import SnubaEventStorage # NOQA diff --git a/src/sentry/services/eventstore/snuba/backend.py b/src/sentry/services/eventstore/snuba/backend.py index bf6e248c95d61a..3450fb68a5ea20 100644 --- a/src/sentry/services/eventstore/snuba/backend.py +++ b/src/sentry/services/eventstore/snuba/backend.py @@ -5,7 +5,7 @@ from collections.abc import Mapping, Sequence from copy import copy, deepcopy from datetime import UTC, datetime, timedelta -from typing import Any, Literal, overload +from typing import Any, Literal, overload, int import sentry_sdk from django.utils import timezone diff --git a/src/sentry/services/filestore/gcs.py b/src/sentry/services/filestore/gcs.py index 45ee330266777c..279e0694505be6 100644 --- a/src/sentry/services/filestore/gcs.py +++ b/src/sentry/services/filestore/gcs.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import mimetypes import os diff --git a/src/sentry/services/filestore/s3.py b/src/sentry/services/filestore/s3.py index 21333fea4912a7..dabed79249f9a3 100644 --- a/src/sentry/services/filestore/s3.py +++ b/src/sentry/services/filestore/s3.py @@ -1,3 +1,4 @@ +from typing import int """ sentry.services.filestore.s3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/src/sentry/services/http.py b/src/sentry/services/http.py index d4bff72be70131..d4c84995b2048d 100644 --- a/src/sentry/services/http.py +++ b/src/sentry/services/http.py @@ -3,7 +3,7 @@ import os import sys from collections.abc import Generator, MutableMapping -from typing import Any, NoReturn +from typing import Any, NoReturn, int from sentry.services.base import Service diff --git a/src/sentry/services/nodestore/__init__.py b/src/sentry/services/nodestore/__init__.py index d80e61b602f06a..c97ff670badce8 100644 --- a/src/sentry/services/nodestore/__init__.py +++ b/src/sentry/services/nodestore/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/services/nodestore/base.py b/src/sentry/services/nodestore/base.py index 5800eb4bfceacc..cf003a30fe7e3c 100644 --- a/src/sentry/services/nodestore/base.py +++ b/src/sentry/services/nodestore/base.py @@ -3,7 +3,7 @@ from collections.abc import Mapping from datetime import datetime, timedelta from threading import local -from typing import Any +from typing import int, Any import sentry_sdk from django.core.cache import BaseCache, InvalidCacheBackendError, caches diff --git a/src/sentry/services/nodestore/bigtable/__init__.py b/src/sentry/services/nodestore/bigtable/__init__.py index 98599af813e933..91e0087f194bb6 100644 --- a/src/sentry/services/nodestore/bigtable/__init__.py +++ b/src/sentry/services/nodestore/bigtable/__init__.py @@ -1 +1,2 @@ +from typing import int from .backend import * # NOQA diff --git a/src/sentry/services/nodestore/bigtable/backend.py b/src/sentry/services/nodestore/bigtable/backend.py index d41526ac8b2007..94236ea48ccf6a 100644 --- a/src/sentry/services/nodestore/bigtable/backend.py +++ b/src/sentry/services/nodestore/bigtable/backend.py @@ -2,7 +2,7 @@ import os from datetime import timedelta -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/services/nodestore/django/__init__.py b/src/sentry/services/nodestore/django/__init__.py index 8f20a08b25e68b..35338f16944d99 100644 --- a/src/sentry/services/nodestore/django/__init__.py +++ b/src/sentry/services/nodestore/django/__init__.py @@ -1 +1,2 @@ +from typing import int from .backend import DjangoNodeStorage # NOQA diff --git a/src/sentry/services/nodestore/django/backend.py b/src/sentry/services/nodestore/django/backend.py index 2e72b65d570c8a..3bd5d8ba347e59 100644 --- a/src/sentry/services/nodestore/django/backend.py +++ b/src/sentry/services/nodestore/django/backend.py @@ -4,7 +4,7 @@ import math import pickle from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from django.utils import timezone diff --git a/src/sentry/services/nodestore/django/models.py b/src/sentry/services/nodestore/django/models.py index f1b91600ba72fa..fc43416124d096 100644 --- a/src/sentry/services/nodestore/django/models.py +++ b/src/sentry/services/nodestore/django/models.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.utils import timezone diff --git a/src/sentry/services/nodestore/filesystem/__init__.py b/src/sentry/services/nodestore/filesystem/__init__.py index 209db451bf811f..b0cabb306646c5 100644 --- a/src/sentry/services/nodestore/filesystem/__init__.py +++ b/src/sentry/services/nodestore/filesystem/__init__.py @@ -1 +1,2 @@ +from typing import int from .backend import FileSystemNodeStorage # NOQA diff --git a/src/sentry/services/nodestore/filesystem/backend.py b/src/sentry/services/nodestore/filesystem/backend.py index 30d2b02c8e9fba..e930d8bcdf58e7 100644 --- a/src/sentry/services/nodestore/filesystem/backend.py +++ b/src/sentry/services/nodestore/filesystem/backend.py @@ -1,3 +1,4 @@ +from typing import int import os from datetime import datetime, timedelta, timezone diff --git a/src/sentry/services/nodestore/migrations/0001_squashed_0002_nodestore_no_dictfield.py b/src/sentry/services/nodestore/migrations/0001_squashed_0002_nodestore_no_dictfield.py index cd3dc1d63b206c..459f7155c70172 100644 --- a/src/sentry/services/nodestore/migrations/0001_squashed_0002_nodestore_no_dictfield.py +++ b/src/sentry/services/nodestore/migrations/0001_squashed_0002_nodestore_no_dictfield.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 16:28 +from typing import int import django.utils.timezone from django.db import migrations, models diff --git a/src/sentry/services/nodestore/models.py b/src/sentry/services/nodestore/models.py index ea801bb95ae2fd..a2c5d7fd24d884 100644 --- a/src/sentry/services/nodestore/models.py +++ b/src/sentry/services/nodestore/models.py @@ -1,3 +1,4 @@ # HACK(dcramer): Django doesn't play well with our naming schemes, and we prefer # our methods ways over Django's limited scoping +from typing import int from .django.models import * # NOQA diff --git a/src/sentry/services/organization/__init__.py b/src/sentry/services/organization/__init__.py index 1582bfab346a69..3d905338c23f67 100644 --- a/src/sentry/services/organization/__init__.py +++ b/src/sentry/services/organization/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .provisioning import * # noqa diff --git a/src/sentry/services/organization/model.py b/src/sentry/services/organization/model.py index cb9a171dca9be7..e6cef5b7e0151c 100644 --- a/src/sentry/services/organization/model.py +++ b/src/sentry/services/organization/model.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import pydantic diff --git a/src/sentry/services/organization/provisioning.py b/src/sentry/services/organization/provisioning.py index 5886d597a45b75..cf421c2ee11f6c 100644 --- a/src/sentry/services/organization/provisioning.py +++ b/src/sentry/services/organization/provisioning.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db import router, transaction from django.dispatch import receiver diff --git a/src/sentry/shared_integrations/client/__init__.py b/src/sentry/shared_integrations/client/__init__.py index 1083f97dfaa2fa..7f8ace63470ca4 100644 --- a/src/sentry/shared_integrations/client/__init__.py +++ b/src/sentry/shared_integrations/client/__init__.py @@ -1,3 +1,4 @@ +from typing import int from ..response import BaseApiResponse from .base import BaseApiClient diff --git a/src/sentry/shared_integrations/client/base.py b/src/sentry/shared_integrations/client/base.py index 95b59bb20be6cf..5ba5122e783f25 100644 --- a/src/sentry/shared_integrations/client/base.py +++ b/src/sentry/shared_integrations/client/base.py @@ -2,7 +2,7 @@ import logging from collections.abc import Callable, Mapping -from typing import Any, Literal, Self, TypedDict, overload +from typing import Any, Literal, Self, TypedDict, overload, int import sentry_sdk from django.core.cache import cache diff --git a/src/sentry/shared_integrations/client/proxy.py b/src/sentry/shared_integrations/client/proxy.py index f1dd7001976c59..37569ff467723c 100644 --- a/src/sentry/shared_integrations/client/proxy.py +++ b/src/sentry/shared_integrations/client/proxy.py @@ -5,7 +5,7 @@ import socket from collections.abc import Mapping from functools import lru_cache -from typing import Any +from typing import int, Any from urllib.parse import ParseResult, urljoin, urlparse import sentry_sdk diff --git a/src/sentry/shared_integrations/constants.py b/src/sentry/shared_integrations/constants.py index e612f7c33a95c7..924a6a0d8bb0e1 100644 --- a/src/sentry/shared_integrations/constants.py +++ b/src/sentry/shared_integrations/constants.py @@ -1,3 +1,4 @@ +from typing import int ERR_INTERNAL = ( "An internal error occurred with the integration and the Sentry team has been notified" ) diff --git a/src/sentry/shared_integrations/exceptions/__init__.py b/src/sentry/shared_integrations/exceptions/__init__.py index f0617fe8bbebdf..7d928e5ebbb2c1 100644 --- a/src/sentry/shared_integrations/exceptions/__init__.py +++ b/src/sentry/shared_integrations/exceptions/__init__.py @@ -2,7 +2,7 @@ import errno from collections.abc import Mapping -from typing import Any, Protocol +from typing import Any, Protocol, int from urllib.parse import urlparse from bs4 import BeautifulSoup diff --git a/src/sentry/shared_integrations/response/__init__.py b/src/sentry/shared_integrations/response/__init__.py index 5a2a81e3f127c4..fb600d2ceae624 100644 --- a/src/sentry/shared_integrations/response/__init__.py +++ b/src/sentry/shared_integrations/response/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ( "BaseApiResponse", "MappingApiResponse", diff --git a/src/sentry/shared_integrations/response/base.py b/src/sentry/shared_integrations/response/base.py index 6c3a693c9a32dd..45fce7e217d7f0 100644 --- a/src/sentry/shared_integrations/response/base.py +++ b/src/sentry/shared_integrations/response/base.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any import requests from django.utils.functional import cached_property diff --git a/src/sentry/shared_integrations/response/mapping.py b/src/sentry/shared_integrations/response/mapping.py index 3e194643e01f4d..93427d97175d5c 100644 --- a/src/sentry/shared_integrations/response/mapping.py +++ b/src/sentry/shared_integrations/response/mapping.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.shared_integrations.response.base import BaseApiResponse diff --git a/src/sentry/shared_integrations/response/sequence.py b/src/sentry/shared_integrations/response/sequence.py index fff6f4db7b9d25..a0cfc243646bd0 100644 --- a/src/sentry/shared_integrations/response/sequence.py +++ b/src/sentry/shared_integrations/response/sequence.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Sequence -from typing import Any +from typing import int, Any from sentry.shared_integrations.response.base import BaseApiResponse diff --git a/src/sentry/shared_integrations/response/text.py b/src/sentry/shared_integrations/response/text.py index ecccf9efc30ae9..84ead44959e340 100644 --- a/src/sentry/shared_integrations/response/text.py +++ b/src/sentry/shared_integrations/response/text.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.shared_integrations.response.base import BaseApiResponse diff --git a/src/sentry/shared_integrations/response/xml.py b/src/sentry/shared_integrations/response/xml.py index 6e68ad25816f64..a5a5c0ae4ab8da 100644 --- a/src/sentry/shared_integrations/response/xml.py +++ b/src/sentry/shared_integrations/response/xml.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from bs4 import BeautifulSoup diff --git a/src/sentry/signals.py b/src/sentry/signals.py index 4eb0c564338b87..4f9f3ea9891a8a 100644 --- a/src/sentry/signals.py +++ b/src/sentry/signals.py @@ -4,7 +4,7 @@ import functools import logging from collections.abc import Callable -from typing import Any +from typing import int, Any from django.dispatch.dispatcher import Signal diff --git a/src/sentry/silo/base.py b/src/sentry/silo/base.py index d7e20653ce80ac..821b32588d0f49 100644 --- a/src/sentry/silo/base.py +++ b/src/sentry/silo/base.py @@ -8,7 +8,7 @@ import typing from collections.abc import Callable, Generator, Iterable from enum import Enum -from typing import Any, ParamSpec, TypeVar +from typing import Any, ParamSpec, TypeVar, int from sentry.utils.env import in_test_environment diff --git a/src/sentry/silo/client.py b/src/sentry/silo/client.py index b8c68682bcce34..93ec6921decd5f 100644 --- a/src/sentry/silo/client.py +++ b/src/sentry/silo/client.py @@ -5,7 +5,7 @@ import socket from collections.abc import Mapping from hashlib import sha256 -from typing import Any +from typing import int, Any import sentry_sdk import urllib3 diff --git a/src/sentry/silo/patches/silo_aware_transaction_patch.py b/src/sentry/silo/patches/silo_aware_transaction_patch.py index b4f429aef8cb7d..54c8c3597cdc06 100644 --- a/src/sentry/silo/patches/silo_aware_transaction_patch.py +++ b/src/sentry/silo/patches/silo_aware_transaction_patch.py @@ -1,7 +1,7 @@ import re import traceback from collections.abc import Callable -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.db import router, transaction from django.db.backends.base.base import BaseDatabaseWrapper diff --git a/src/sentry/silo/safety.py b/src/sentry/silo/safety.py index b847ef129b8f07..e5e7ab4374f5c7 100644 --- a/src/sentry/silo/safety.py +++ b/src/sentry/silo/safety.py @@ -4,7 +4,7 @@ import re from collections import defaultdict from collections.abc import Generator, MutableMapping -from typing import Any +from typing import int, Any from django.db.transaction import get_connection diff --git a/src/sentry/silo/util.py b/src/sentry/silo/util.py index 4a56b95a7fd638..c2a665a72ec3f1 100644 --- a/src/sentry/silo/util.py +++ b/src/sentry/silo/util.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import hmac from collections.abc import Iterable, Mapping diff --git a/src/sentry/similarity/__init__.py b/src/sentry/similarity/__init__.py index 403cdc51e7b915..695ca035e9bccb 100644 --- a/src/sentry/similarity/__init__.py +++ b/src/sentry/similarity/__init__.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.conf import settings diff --git a/src/sentry/similarity/backends/abstract.py b/src/sentry/similarity/backends/abstract.py index bdc054e77fb722..62d7acccb2ea18 100644 --- a/src/sentry/similarity/backends/abstract.py +++ b/src/sentry/similarity/backends/abstract.py @@ -1,3 +1,4 @@ +from typing import int from abc import ABCMeta, abstractmethod diff --git a/src/sentry/similarity/backends/dummy.py b/src/sentry/similarity/backends/dummy.py index 2cf4e54f34652e..dceca1704ac865 100644 --- a/src/sentry/similarity/backends/dummy.py +++ b/src/sentry/similarity/backends/dummy.py @@ -1,3 +1,4 @@ +from typing import int from sentry.similarity.backends.abstract import AbstractIndexBackend diff --git a/src/sentry/similarity/backends/metrics.py b/src/sentry/similarity/backends/metrics.py index af88af160c10f6..ccefd9cc8686e5 100644 --- a/src/sentry/similarity/backends/metrics.py +++ b/src/sentry/similarity/backends/metrics.py @@ -1,3 +1,4 @@ +from typing import int from sentry.similarity.backends.abstract import AbstractIndexBackend from sentry.utils.metrics import timer diff --git a/src/sentry/similarity/backends/redis.py b/src/sentry/similarity/backends/redis.py index 26a2b816732f8a..5c52a3e374a933 100644 --- a/src/sentry/similarity/backends/redis.py +++ b/src/sentry/similarity/backends/redis.py @@ -1,3 +1,4 @@ +from typing import int import itertools import time diff --git a/src/sentry/similarity/encoder.py b/src/sentry/similarity/encoder.py index 06e3f2b5e6916b..09114d3c249dd5 100644 --- a/src/sentry/similarity/encoder.py +++ b/src/sentry/similarity/encoder.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping, Sequence, Set diff --git a/src/sentry/similarity/features.py b/src/sentry/similarity/features.py index ed089808d40268..9392d99c65c933 100644 --- a/src/sentry/similarity/features.py +++ b/src/sentry/similarity/features.py @@ -1,3 +1,4 @@ +from typing import int import itertools import logging diff --git a/src/sentry/similarity/signatures.py b/src/sentry/similarity/signatures.py index 127d9222afee30..ac7177d55815b2 100644 --- a/src/sentry/similarity/signatures.py +++ b/src/sentry/similarity/signatures.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Iterable diff --git a/src/sentry/snuba/dataset.py b/src/sentry/snuba/dataset.py index 40032fae084b61..232d344a78910e 100644 --- a/src/sentry/snuba/dataset.py +++ b/src/sentry/snuba/dataset.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum, unique diff --git a/src/sentry/snuba/discover.py b/src/sentry/snuba/discover.py index bd06bf91dcc5df..468cabbfd19be3 100644 --- a/src/sentry/snuba/discover.py +++ b/src/sentry/snuba/discover.py @@ -4,7 +4,7 @@ from collections import namedtuple from collections.abc import Callable, Mapping, Sequence from datetime import datetime, timedelta -from typing import Any, Literal, cast +from typing import Any, Literal, cast, int import sentry_sdk from sentry_relay.consts import SPAN_STATUS_CODE_TO_NAME diff --git a/src/sentry/snuba/entity_subscription.py b/src/sentry/snuba/entity_subscription.py index 76ca1bf41e39b9..74c822e02ff091 100644 --- a/src/sentry/snuba/entity_subscription.py +++ b/src/sentry/snuba/entity_subscription.py @@ -5,7 +5,7 @@ from collections.abc import Mapping, MutableMapping, Sequence from dataclasses import dataclass from datetime import datetime, timedelta, timezone -from typing import Any, TypedDict, Union +from typing import Any, TypedDict, Union, int from sentry_protos.snuba.v1.endpoint_time_series_pb2 import TimeSeriesRequest from snuba_sdk import Column, Condition, Entity, Join, Op, Request diff --git a/src/sentry/snuba/errors.py b/src/sentry/snuba/errors.py index 644a9ab8514a65..b9ef1454b9fb6b 100644 --- a/src/sentry/snuba/errors.py +++ b/src/sentry/snuba/errors.py @@ -1,7 +1,7 @@ import logging from collections.abc import Mapping, Sequence from datetime import timedelta -from typing import cast +from typing import int, cast import sentry_sdk from snuba_sdk import Column, Condition diff --git a/src/sentry/snuba/events.py b/src/sentry/snuba/events.py index cf88710805a6e1..f3aa01ba311c28 100644 --- a/src/sentry/snuba/events.py +++ b/src/sentry/snuba/events.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass from enum import Enum diff --git a/src/sentry/snuba/functions.py b/src/sentry/snuba/functions.py index 0e27bbee9167ea..f3c2fe0f5aef33 100644 --- a/src/sentry/snuba/functions.py +++ b/src/sentry/snuba/functions.py @@ -1,6 +1,6 @@ import logging from datetime import timedelta -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/snuba/issue_platform.py b/src/sentry/snuba/issue_platform.py index 13817bf3c70ec6..43e2f35abe9070 100644 --- a/src/sentry/snuba/issue_platform.py +++ b/src/sentry/snuba/issue_platform.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from datetime import timedelta diff --git a/src/sentry/snuba/metrics/__init__.py b/src/sentry/snuba/metrics/__init__.py index 1ff67ecebbdd38..bf77e61977eb7e 100644 --- a/src/sentry/snuba/metrics/__init__.py +++ b/src/sentry/snuba/metrics/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .datasource import * # NOQA from .fields import * # NOQA from .naming_layer import * # NOQA diff --git a/src/sentry/snuba/metrics/datasource.py b/src/sentry/snuba/metrics/datasource.py index 1da216ac980842..d8f457ea3847e2 100644 --- a/src/sentry/snuba/metrics/datasource.py +++ b/src/sentry/snuba/metrics/datasource.py @@ -15,7 +15,7 @@ from dataclasses import dataclass, replace from datetime import datetime from operator import itemgetter -from typing import Any +from typing import int, Any import sentry_sdk from rest_framework.exceptions import NotFound diff --git a/src/sentry/snuba/metrics/extraction.py b/src/sentry/snuba/metrics/extraction.py index 853f4b62925355..e6b8d034d9ae93 100644 --- a/src/sentry/snuba/metrics/extraction.py +++ b/src/sentry/snuba/metrics/extraction.py @@ -7,7 +7,7 @@ from collections.abc import Callable, Sequence from dataclasses import dataclass from enum import Enum -from typing import Any, Literal, NamedTuple, NotRequired, Optional, Self, TypedDict, TypeVar, cast +from typing import Any, Literal, NamedTuple, NotRequired, Optional, Self, TypedDict, TypeVar, cast, int import sentry_sdk from django.utils.functional import cached_property diff --git a/src/sentry/snuba/metrics/fields/__init__.py b/src/sentry/snuba/metrics/fields/__init__.py index 18feafff77f4fe..71b3130e8d7090 100644 --- a/src/sentry/snuba/metrics/fields/__init__.py +++ b/src/sentry/snuba/metrics/fields/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .base import * # NOQA from .snql import * # NOQA diff --git a/src/sentry/snuba/metrics/fields/base.py b/src/sentry/snuba/metrics/fields/base.py index 1e69d23f7a44de..aea66da77627b6 100644 --- a/src/sentry/snuba/metrics/fields/base.py +++ b/src/sentry/snuba/metrics/fields/base.py @@ -6,7 +6,7 @@ from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence from dataclasses import dataclass, replace from datetime import datetime, timedelta -from typing import TYPE_CHECKING, Any, Deque, Optional, Union +from typing import TYPE_CHECKING, Any, Deque, Optional, Union, int from django.db.models import QuerySet from snuba_sdk import Column, Condition, Entity, Function, Granularity, Op, Query, Request diff --git a/src/sentry/snuba/metrics/fields/histogram.py b/src/sentry/snuba/metrics/fields/histogram.py index b5a3be0b8eab3b..ae3c13619d3e02 100644 --- a/src/sentry/snuba/metrics/fields/histogram.py +++ b/src/sentry/snuba/metrics/fields/histogram.py @@ -1,3 +1,4 @@ +from typing import int import math import sentry_sdk diff --git a/src/sentry/snuba/metrics/fields/snql.py b/src/sentry/snuba/metrics/fields/snql.py index 2d307e1bb499ca..03d17d4007953d 100644 --- a/src/sentry/snuba/metrics/fields/snql.py +++ b/src/sentry/snuba/metrics/fields/snql.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Sequence -from typing import Any +from typing import int, Any from snuba_sdk import Column, Function diff --git a/src/sentry/snuba/metrics/mqb_query_transformer.py b/src/sentry/snuba/metrics/mqb_query_transformer.py index 81b2d6101a112a..65b5b4f6993bde 100644 --- a/src/sentry/snuba/metrics/mqb_query_transformer.py +++ b/src/sentry/snuba/metrics/mqb_query_transformer.py @@ -1,3 +1,4 @@ +from typing import int import inspect from snuba_sdk import AliasedExpression, BooleanCondition, Column, Function, Granularity, Op diff --git a/src/sentry/snuba/metrics/naming_layer/__init__.py b/src/sentry/snuba/metrics/naming_layer/__init__.py index 71bcc6fd2580f6..157c6584ad27d1 100644 --- a/src/sentry/snuba/metrics/naming_layer/__init__.py +++ b/src/sentry/snuba/metrics/naming_layer/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .mapping import * # NOQA from .mri import * # NOQA from .public import * # NOQA diff --git a/src/sentry/snuba/metrics/naming_layer/mapping.py b/src/sentry/snuba/metrics/naming_layer/mapping.py index 5e3cbf86cd0155..bc8031d9630a43 100644 --- a/src/sentry/snuba/metrics/naming_layer/mapping.py +++ b/src/sentry/snuba/metrics/naming_layer/mapping.py @@ -7,7 +7,7 @@ ) from enum import Enum -from typing import cast +from typing import int, cast from sentry.exceptions import InvalidParams from sentry.snuba.metrics.naming_layer.mri import ( diff --git a/src/sentry/snuba/metrics/naming_layer/mri.py b/src/sentry/snuba/metrics/naming_layer/mri.py index 1db04f6f9fd170..9d369ce3148871 100644 --- a/src/sentry/snuba/metrics/naming_layer/mri.py +++ b/src/sentry/snuba/metrics/naming_layer/mri.py @@ -20,7 +20,7 @@ import re from dataclasses import dataclass from enum import Enum -from typing import cast +from typing import int, cast from sentry_kafka_schemas.codecs import ValidationError diff --git a/src/sentry/snuba/metrics/naming_layer/public.py b/src/sentry/snuba/metrics/naming_layer/public.py index e1f2c4c8751bdb..abee30ac1140fd 100644 --- a/src/sentry/snuba/metrics/naming_layer/public.py +++ b/src/sentry/snuba/metrics/naming_layer/public.py @@ -1,3 +1,4 @@ +from typing import int """ Module that contains all the public field names queryable from the API. Any time a new Enum is introduced here, a corresponding MRI needs to be introduced in the corresponding MRI Enum. As an diff --git a/src/sentry/snuba/metrics/query.py b/src/sentry/snuba/metrics/query.py index 6e53f491d6d151..be784adb1fe6f4 100644 --- a/src/sentry/snuba/metrics/query.py +++ b/src/sentry/snuba/metrics/query.py @@ -6,7 +6,7 @@ from dataclasses import dataclass from datetime import datetime, timedelta from functools import cached_property -from typing import Literal, Union +from typing import Literal, Union, int from django.db.models import QuerySet from snuba_sdk import Column, Direction, Granularity, Limit, Offset, Op diff --git a/src/sentry/snuba/metrics/query_builder.py b/src/sentry/snuba/metrics/query_builder.py index 11c68e2dd0273a..94e5dc6cc1f783 100644 --- a/src/sentry/snuba/metrics/query_builder.py +++ b/src/sentry/snuba/metrics/query_builder.py @@ -3,7 +3,7 @@ from collections.abc import Mapping, Sequence from datetime import datetime, timedelta from enum import Enum -from typing import Any, TypedDict, overload +from typing import Any, TypedDict, overload, int import sentry_sdk from snuba_sdk import ( diff --git a/src/sentry/snuba/metrics/units.py b/src/sentry/snuba/metrics/units.py index f7e9b7550bd795..7034fcfd402369 100644 --- a/src/sentry/snuba/metrics/units.py +++ b/src/sentry/snuba/metrics/units.py @@ -1,3 +1,4 @@ +from typing import int from sentry.snuba.metrics.utils import MetricOperationType from sentry.utils.numbers import format_bytes diff --git a/src/sentry/snuba/metrics/utils.py b/src/sentry/snuba/metrics/utils.py index 8c50500b9af3d2..0355ea5652e07a 100644 --- a/src/sentry/snuba/metrics/utils.py +++ b/src/sentry/snuba/metrics/utils.py @@ -4,7 +4,7 @@ from abc import ABC from collections.abc import Collection, Generator, Mapping, Sequence from datetime import datetime, timedelta, timezone -from typing import Literal, NotRequired, TypedDict, TypeIs, overload +from typing import Literal, NotRequired, TypedDict, TypeIs, overload, int from sentry.sentry_metrics.use_case_id_registry import UseCaseID from sentry.snuba.dataset import EntityKey diff --git a/src/sentry/snuba/metrics_enhanced_performance.py b/src/sentry/snuba/metrics_enhanced_performance.py index 52b11ffbbcf027..3f17064f86d67f 100644 --- a/src/sentry/snuba/metrics_enhanced_performance.py +++ b/src/sentry/snuba/metrics_enhanced_performance.py @@ -3,7 +3,7 @@ import types from collections.abc import Sequence from datetime import timedelta -from typing import Any +from typing import int, Any import sentry_sdk from snuba_sdk import Column, Condition diff --git a/src/sentry/snuba/metrics_layer/query.py b/src/sentry/snuba/metrics_layer/query.py index b9aa03197378f4..87ec42f8fdcea3 100644 --- a/src/sentry/snuba/metrics_layer/query.py +++ b/src/sentry/snuba/metrics_layer/query.py @@ -4,7 +4,7 @@ from collections.abc import Mapping from dataclasses import replace from datetime import UTC, datetime, timedelta -from typing import Any, Union, cast +from typing import Any, Union, cast, int from snuba_sdk import ( And, diff --git a/src/sentry/snuba/metrics_performance.py b/src/sentry/snuba/metrics_performance.py index bd4cc910fa57bf..476504f419dba0 100644 --- a/src/sentry/snuba/metrics_performance.py +++ b/src/sentry/snuba/metrics_performance.py @@ -3,7 +3,7 @@ import logging from collections.abc import Sequence from datetime import timedelta -from typing import Any, Literal, overload +from typing import Any, Literal, overload, int import sentry_sdk from snuba_sdk import Column, Condition diff --git a/src/sentry/snuba/models.py b/src/sentry/snuba/models.py index 03fa3989a8c433..b52152d0572c20 100644 --- a/src/sentry/snuba/models.py +++ b/src/sentry/snuba/models.py @@ -3,7 +3,7 @@ import logging from datetime import timedelta from enum import Enum -from typing import TYPE_CHECKING, ClassVar, Self, override +from typing import TYPE_CHECKING, ClassVar, Self, override, int from django.conf import settings from django.contrib.postgres.fields import ArrayField diff --git a/src/sentry/snuba/ourlogs.py b/src/sentry/snuba/ourlogs.py index b984f2f79b23f0..b90b207c035c29 100644 --- a/src/sentry/snuba/ourlogs.py +++ b/src/sentry/snuba/ourlogs.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import timedelta diff --git a/src/sentry/snuba/outcomes.py b/src/sentry/snuba/outcomes.py index aad0d907301608..896ac50b5e82aa 100644 --- a/src/sentry/snuba/outcomes.py +++ b/src/sentry/snuba/outcomes.py @@ -2,7 +2,7 @@ from abc import ABC, abstractmethod from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any, Generic, TypeVar +from typing import Any, Generic, TypeVar, int from django.http import QueryDict from snuba_sdk import Request diff --git a/src/sentry/snuba/profile_functions.py b/src/sentry/snuba/profile_functions.py index d7f7ba99ead307..0e3b6259bfcc7a 100644 --- a/src/sentry/snuba/profile_functions.py +++ b/src/sentry/snuba/profile_functions.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import timedelta diff --git a/src/sentry/snuba/profiles.py b/src/sentry/snuba/profiles.py index 13c7cf2ec57149..88ef4ad9c9ca2e 100644 --- a/src/sentry/snuba/profiles.py +++ b/src/sentry/snuba/profiles.py @@ -1,5 +1,5 @@ from datetime import timedelta -from typing import Any +from typing import int, Any from sentry.exceptions import InvalidSearchQuery from sentry.search.events.builder.profiles import ( diff --git a/src/sentry/snuba/query_sources.py b/src/sentry/snuba/query_sources.py index 54ad73671633bd..402747ee622841 100644 --- a/src/sentry/snuba/query_sources.py +++ b/src/sentry/snuba/query_sources.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum diff --git a/src/sentry/snuba/query_subscriptions/constants.py b/src/sentry/snuba/query_subscriptions/constants.py index 1e3263bcce6600..f73d033b3aee44 100644 --- a/src/sentry/snuba/query_subscriptions/constants.py +++ b/src/sentry/snuba/query_subscriptions/constants.py @@ -1,3 +1,4 @@ +from typing import int from sentry.conf.types.kafka_definition import Topic from sentry.snuba.dataset import Dataset from sentry.utils.kafka_config import get_topic_definition diff --git a/src/sentry/snuba/query_subscriptions/consumer.py b/src/sentry/snuba/query_subscriptions/consumer.py index f05291ede2262a..7f4a8d39edcfc3 100644 --- a/src/sentry/snuba/query_subscriptions/consumer.py +++ b/src/sentry/snuba/query_subscriptions/consumer.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Callable from datetime import timezone diff --git a/src/sentry/snuba/query_subscriptions/run.py b/src/sentry/snuba/query_subscriptions/run.py index a2e157a26fbdca..6e31f5bd8d0b40 100644 --- a/src/sentry/snuba/query_subscriptions/run.py +++ b/src/sentry/snuba/query_subscriptions/run.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Mapping from functools import partial diff --git a/src/sentry/snuba/referrer.py b/src/sentry/snuba/referrer.py index 47f680878b46d1..b462fc34c0cae2 100644 --- a/src/sentry/snuba/referrer.py +++ b/src/sentry/snuba/referrer.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from enum import StrEnum, unique diff --git a/src/sentry/snuba/rpc_dataset_common.py b/src/sentry/snuba/rpc_dataset_common.py index 7897a4c18002d5..68112e5c14e43f 100644 --- a/src/sentry/snuba/rpc_dataset_common.py +++ b/src/sentry/snuba/rpc_dataset_common.py @@ -3,7 +3,7 @@ from collections import defaultdict from dataclasses import dataclass, field, replace from datetime import datetime, timedelta -from typing import Any +from typing import int, Any import sentry_sdk from google.protobuf.json_format import MessageToJson diff --git a/src/sentry/snuba/sessions.py b/src/sentry/snuba/sessions.py index 59cbd7dde24053..8e701b7f0dedff 100644 --- a/src/sentry/snuba/sessions.py +++ b/src/sentry/snuba/sessions.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone diff --git a/src/sentry/snuba/sessions_v2.py b/src/sentry/snuba/sessions_v2.py index 239cb08bfb59c4..1b55d6d0798962 100644 --- a/src/sentry/snuba/sessions_v2.py +++ b/src/sentry/snuba/sessions_v2.py @@ -4,7 +4,7 @@ import logging import math from datetime import datetime, timedelta, timezone -from typing import Any, NotRequired, Protocol, TypedDict +from typing import Any, NotRequired, Protocol, TypedDict, int from snuba_sdk import BooleanCondition, Column, Condition, Function diff --git a/src/sentry/snuba/snuba_query_validator.py b/src/sentry/snuba/snuba_query_validator.py index c5bc55d8d036e9..8836f63308f32a 100644 --- a/src/sentry/snuba/snuba_query_validator.py +++ b/src/sentry/snuba/snuba_query_validator.py @@ -1,7 +1,7 @@ import logging from collections.abc import Sequence from datetime import timedelta -from typing import override +from typing import int, override from django.utils import timezone from django.utils.translation import gettext_lazy as _ diff --git a/src/sentry/snuba/spans_indexed.py b/src/sentry/snuba/spans_indexed.py index c464f94dbc5f3e..397cdbeadbbb3c 100644 --- a/src/sentry/snuba/spans_indexed.py +++ b/src/sentry/snuba/spans_indexed.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Sequence from datetime import timedelta diff --git a/src/sentry/snuba/spans_metrics.py b/src/sentry/snuba/spans_metrics.py index bac4ca14029634..b946fdeaf55729 100644 --- a/src/sentry/snuba/spans_metrics.py +++ b/src/sentry/snuba/spans_metrics.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import timedelta diff --git a/src/sentry/snuba/spans_rpc.py b/src/sentry/snuba/spans_rpc.py index 8138616463b659..0366aca3d23a94 100644 --- a/src/sentry/snuba/spans_rpc.py +++ b/src/sentry/snuba/spans_rpc.py @@ -1,7 +1,7 @@ import logging from collections import defaultdict from datetime import timedelta -from typing import Any +from typing import int, Any import sentry_sdk from sentry_protos.snuba.v1.endpoint_get_trace_pb2 import GetTraceRequest diff --git a/src/sentry/snuba/subscriptions.py b/src/sentry/snuba/subscriptions.py index 271c593a6d45e1..fc10517672533d 100644 --- a/src/sentry/snuba/subscriptions.py +++ b/src/sentry/snuba/subscriptions.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Collection, Iterable, Sequence from datetime import timedelta diff --git a/src/sentry/snuba/tasks.py b/src/sentry/snuba/tasks.py index 7fa6420fec5bfb..c2d0d96df71a78 100644 --- a/src/sentry/snuba/tasks.py +++ b/src/sentry/snuba/tasks.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from datetime import timedelta diff --git a/src/sentry/snuba/trace.py b/src/sentry/snuba/trace.py index 44708bc0eca8e2..a3185bd394bd04 100644 --- a/src/sentry/snuba/trace.py +++ b/src/sentry/snuba/trace.py @@ -2,7 +2,7 @@ from collections import defaultdict from concurrent.futures import ThreadPoolExecutor from datetime import datetime -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int from sentry.uptime.subscriptions.regions import get_region_config diff --git a/src/sentry/snuba/trace_metrics.py b/src/sentry/snuba/trace_metrics.py index 0356b98ff3fa79..f1f6ab85f9621f 100644 --- a/src/sentry/snuba/trace_metrics.py +++ b/src/sentry/snuba/trace_metrics.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import timedelta diff --git a/src/sentry/snuba/transactions.py b/src/sentry/snuba/transactions.py index 664d4c9b1ef317..b944790784a26c 100644 --- a/src/sentry/snuba/transactions.py +++ b/src/sentry/snuba/transactions.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Sequence from datetime import timedelta diff --git a/src/sentry/snuba/types.py b/src/sentry/snuba/types.py index 23bd8eaa153df8..7e4c37a058bfa1 100644 --- a/src/sentry/snuba/types.py +++ b/src/sentry/snuba/types.py @@ -1,4 +1,4 @@ -from typing import Protocol +from typing import int, Protocol from snuba_sdk import Column, Condition diff --git a/src/sentry/snuba/uptime_results.py b/src/sentry/snuba/uptime_results.py index 0a170868b84acc..90bcb2baa0de98 100644 --- a/src/sentry/snuba/uptime_results.py +++ b/src/sentry/snuba/uptime_results.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/snuba/utils.py b/src/sentry/snuba/utils.py index 6449bb9f1cc336..740df86a31f734 100644 --- a/src/sentry/snuba/utils.py +++ b/src/sentry/snuba/utils.py @@ -1,6 +1,6 @@ import logging from dataclasses import dataclass -from typing import Any +from typing import int, Any from sentry.discover.models import DiscoverSavedQueryTypes from sentry.snuba import ( diff --git a/src/sentry/spans/buffer.py b/src/sentry/spans/buffer.py index 57b2683775c6f7..ede7e1dfc916de 100644 --- a/src/sentry/spans/buffer.py +++ b/src/sentry/spans/buffer.py @@ -67,7 +67,7 @@ import logging import math from collections.abc import Generator, MutableMapping, Sequence -from typing import Any, NamedTuple +from typing import Any, NamedTuple, int import orjson import zstandard diff --git a/src/sentry/spans/consumers/process/factory.py b/src/sentry/spans/consumers/process/factory.py index 6cba8f491aaf12..6410ceca32ea41 100644 --- a/src/sentry/spans/consumers/process/factory.py +++ b/src/sentry/spans/consumers/process/factory.py @@ -2,7 +2,7 @@ import time from collections.abc import Callable, Mapping from functools import partial -from typing import cast +from typing import int, cast import orjson import sentry_sdk diff --git a/src/sentry/spans/consumers/process/flusher.py b/src/sentry/spans/consumers/process/flusher.py index 3e7a0154bebd87..059353aeecc0b2 100644 --- a/src/sentry/spans/consumers/process/flusher.py +++ b/src/sentry/spans/consumers/process/flusher.py @@ -1,3 +1,4 @@ +from typing import int import logging import multiprocessing import multiprocessing.context diff --git a/src/sentry/spans/consumers/process_segments/convert.py b/src/sentry/spans/consumers/process_segments/convert.py index de9fb10c58816e..7f3103d7aa3657 100644 --- a/src/sentry/spans/consumers/process_segments/convert.py +++ b/src/sentry/spans/consumers/process_segments/convert.py @@ -1,4 +1,4 @@ -from typing import Any, cast +from typing import Any, cast, int import orjson import sentry_sdk diff --git a/src/sentry/spans/consumers/process_segments/enrichment.py b/src/sentry/spans/consumers/process_segments/enrichment.py index fda3ee1819d8a2..df248f69b56d6c 100644 --- a/src/sentry/spans/consumers/process_segments/enrichment.py +++ b/src/sentry/spans/consumers/process_segments/enrichment.py @@ -1,6 +1,6 @@ from collections import defaultdict from collections.abc import Iterator, Sequence -from typing import Any +from typing import int, Any from sentry_kafka_schemas.schema_types.ingest_spans_v1 import SpanEvent diff --git a/src/sentry/spans/consumers/process_segments/factory.py b/src/sentry/spans/consumers/process_segments/factory.py index 808ad9441035f6..b1d4366551af0a 100644 --- a/src/sentry/spans/consumers/process_segments/factory.py +++ b/src/sentry/spans/consumers/process_segments/factory.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Mapping from datetime import datetime diff --git a/src/sentry/spans/consumers/process_segments/message.py b/src/sentry/spans/consumers/process_segments/message.py index 705a94850eb504..47094e4985f159 100644 --- a/src/sentry/spans/consumers/process_segments/message.py +++ b/src/sentry/spans/consumers/process_segments/message.py @@ -2,7 +2,7 @@ import types import uuid from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any import sentry_sdk from django.core.exceptions import ValidationError diff --git a/src/sentry/spans/consumers/process_segments/shim.py b/src/sentry/spans/consumers/process_segments/shim.py index 42b76d3b5dffc2..2f1fac3c4c2b69 100644 --- a/src/sentry/spans/consumers/process_segments/shim.py +++ b/src/sentry/spans/consumers/process_segments/shim.py @@ -6,7 +6,7 @@ import uuid from copy import deepcopy -from typing import Any, cast +from typing import Any, cast, int import sentry_sdk from sentry_kafka_schemas.schema_types.ingest_spans_v1 import SpanEvent diff --git a/src/sentry/spans/consumers/process_segments/types.py b/src/sentry/spans/consumers/process_segments/types.py index 4e277fe64a6929..853e083558c4d0 100644 --- a/src/sentry/spans/consumers/process_segments/types.py +++ b/src/sentry/spans/consumers/process_segments/types.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any, NotRequired +from typing import Any, NotRequired, int from sentry_kafka_schemas.schema_types.ingest_spans_v1 import ( SpanEvent, diff --git a/src/sentry/spans/grouping/api.py b/src/sentry/spans/grouping/api.py index d1e0d02f775e1d..ac9553d9bd9a74 100644 --- a/src/sentry/spans/grouping/api.py +++ b/src/sentry/spans/grouping/api.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.spans.grouping.strategy.config import ( CONFIGURATIONS, diff --git a/src/sentry/spans/grouping/result.py b/src/sentry/spans/grouping/result.py index 572228d43fa33f..658c70602e3978 100644 --- a/src/sentry/spans/grouping/result.py +++ b/src/sentry/spans/grouping/result.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import Any, Optional +from typing import Any, Optional, int @dataclass(frozen=True) diff --git a/src/sentry/spans/grouping/strategy/base.py b/src/sentry/spans/grouping/strategy/base.py index cf1ae185faef56..bf145392e89b38 100644 --- a/src/sentry/spans/grouping/strategy/base.py +++ b/src/sentry/spans/grouping/strategy/base.py @@ -1,7 +1,7 @@ import re from collections.abc import Callable, Sequence from dataclasses import dataclass -from typing import Any, NotRequired, Optional, TypedDict +from typing import Any, NotRequired, Optional, TypedDict, int from sentry.spans.consumers.process_segments.types import attribute_value from sentry.spans.grouping.utils import Hash, parse_fingerprint_var diff --git a/src/sentry/spans/grouping/strategy/config.py b/src/sentry/spans/grouping/strategy/config.py index fe96a628ea63c2..44489e2718e6e2 100644 --- a/src/sentry/spans/grouping/strategy/config.py +++ b/src/sentry/spans/grouping/strategy/config.py @@ -1,6 +1,6 @@ from collections.abc import Sequence from dataclasses import dataclass -from typing import Any +from typing import int, Any from sentry.spans.grouping.result import SpanGroupingResults from sentry.spans.grouping.strategy.base import ( diff --git a/src/sentry/spans/grouping/utils.py b/src/sentry/spans/grouping/utils.py index 628675e11fd069..d2dc56bccd8652 100644 --- a/src/sentry/spans/grouping/utils.py +++ b/src/sentry/spans/grouping/utils.py @@ -1,3 +1,4 @@ +from typing import int import re from collections.abc import Sequence from hashlib import md5 diff --git a/src/sentry/stacktraces/functions.py b/src/sentry/stacktraces/functions.py index e92a62cc1ba2de..b6ee64f9c8f7c5 100644 --- a/src/sentry/stacktraces/functions.py +++ b/src/sentry/stacktraces/functions.py @@ -2,7 +2,7 @@ import re from collections.abc import Callable -from typing import Any +from typing import int, Any from urllib.parse import urlparse from django.core.exceptions import ValidationError diff --git a/src/sentry/stacktraces/platform.py b/src/sentry/stacktraces/platform.py index 94a50a38e1d48a..07dda5b0825220 100644 --- a/src/sentry/stacktraces/platform.py +++ b/src/sentry/stacktraces/platform.py @@ -1,3 +1,4 @@ +from typing import int NATIVE_PLATFORMS = frozenset(("objc", "cocoa", "swift", "native", "c")) JAVASCRIPT_PLATFORMS = frozenset(("javascript", "node")) diff --git a/src/sentry/stacktraces/processing.py b/src/sentry/stacktraces/processing.py index ebdc7c8024dea6..3017b5c86b6319 100644 --- a/src/sentry/stacktraces/processing.py +++ b/src/sentry/stacktraces/processing.py @@ -3,7 +3,7 @@ import logging from collections.abc import Callable, Mapping, MutableMapping, Sequence from datetime import datetime, timezone -from typing import TYPE_CHECKING, Any, NamedTuple +from typing import TYPE_CHECKING, Any, NamedTuple, int from urllib.parse import urlparse import sentry_sdk diff --git a/src/sentry/statistical_detectors/algorithm.py b/src/sentry/statistical_detectors/algorithm.py index 124ea6c8c84eb2..a4c2338b86dc1c 100644 --- a/src/sentry/statistical_detectors/algorithm.py +++ b/src/sentry/statistical_detectors/algorithm.py @@ -5,7 +5,7 @@ from collections.abc import Callable, Mapping, MutableMapping from dataclasses import dataclass from datetime import datetime, timezone -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/statistical_detectors/base.py b/src/sentry/statistical_detectors/base.py index 392827e3801fd5..8b924c473de74a 100644 --- a/src/sentry/statistical_detectors/base.py +++ b/src/sentry/statistical_detectors/base.py @@ -5,7 +5,7 @@ from dataclasses import dataclass from datetime import datetime from enum import Enum -from typing import Any +from typing import int, Any class TrendType(Enum): diff --git a/src/sentry/statistical_detectors/detector.py b/src/sentry/statistical_detectors/detector.py index 4de17833ebfca9..dc481db105a8ad 100644 --- a/src/sentry/statistical_detectors/detector.py +++ b/src/sentry/statistical_detectors/detector.py @@ -7,7 +7,7 @@ from collections.abc import Generator, Iterable from dataclasses import dataclass from datetime import datetime, timedelta, timezone -from typing import DefaultDict +from typing import int, DefaultDict import sentry_sdk diff --git a/src/sentry/statistical_detectors/issue_platform_adapter.py b/src/sentry/statistical_detectors/issue_platform_adapter.py index 30c937ae50f545..361403a847f370 100644 --- a/src/sentry/statistical_detectors/issue_platform_adapter.py +++ b/src/sentry/statistical_detectors/issue_platform_adapter.py @@ -1,3 +1,4 @@ +from typing import int import hashlib import uuid from datetime import datetime, timezone diff --git a/src/sentry/statistical_detectors/redis.py b/src/sentry/statistical_detectors/redis.py index c0db5504e626ca..c82b544fc318f4 100644 --- a/src/sentry/statistical_detectors/redis.py +++ b/src/sentry/statistical_detectors/redis.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Mapping diff --git a/src/sentry/statistical_detectors/store.py b/src/sentry/statistical_detectors/store.py index 12499bae2878ca..249e9ccc12e8d5 100644 --- a/src/sentry/statistical_detectors/store.py +++ b/src/sentry/statistical_detectors/store.py @@ -1,5 +1,5 @@ from abc import ABC, abstractmethod -from typing import Generic, TypeVar +from typing import Generic, TypeVar, int from sentry.statistical_detectors.base import DetectorPayload diff --git a/src/sentry/status_checks/__init__.py b/src/sentry/status_checks/__init__.py index 72b728a5b0a7aa..9b227ee053ebf4 100644 --- a/src/sentry/status_checks/__init__.py +++ b/src/sentry/status_checks/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.warnings import seen_warnings from .base import Problem, StatusCheck, sort_by_severity diff --git a/src/sentry/status_checks/base.py b/src/sentry/status_checks/base.py index 2a7596cee29326..b0dc3c5f3962c6 100644 --- a/src/sentry/status_checks/base.py +++ b/src/sentry/status_checks/base.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Iterable -from typing import Final, Literal +from typing import Final, Literal, int def sort_by_severity(problems: Iterable[Problem]) -> list[Problem]: diff --git a/src/sentry/status_checks/warnings.py b/src/sentry/status_checks/warnings.py index 34b5cf0b52676e..8687646a120b6e 100644 --- a/src/sentry/status_checks/warnings.py +++ b/src/sentry/status_checks/warnings.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from urllib.parse import urljoin diff --git a/src/sentry/tagstore/__init__.py b/src/sentry/tagstore/__init__.py index 241ade3a11560b..f13ab1c5ffdfbf 100644 --- a/src/sentry/tagstore/__init__.py +++ b/src/sentry/tagstore/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/tagstore/base.py b/src/sentry/tagstore/base.py index 6285167479c5d8..26c5a5ef33593f 100644 --- a/src/sentry/tagstore/base.py +++ b/src/sentry/tagstore/base.py @@ -3,7 +3,7 @@ import re from collections.abc import Sequence from datetime import datetime -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.constants import TAG_LABELS from sentry.snuba.dataset import Dataset diff --git a/src/sentry/tagstore/exceptions.py b/src/sentry/tagstore/exceptions.py index fe8759fcc90213..dc0f904578b6a7 100644 --- a/src/sentry/tagstore/exceptions.py +++ b/src/sentry/tagstore/exceptions.py @@ -1,3 +1,4 @@ +from typing import int class TagKeyNotFound(Exception): pass diff --git a/src/sentry/tagstore/snuba/__init__.py b/src/sentry/tagstore/snuba/__init__.py index deb0f28bc9825a..f93b5a60bf9db6 100644 --- a/src/sentry/tagstore/snuba/__init__.py +++ b/src/sentry/tagstore/snuba/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .backend import SnubaFlagStorage # NOQA from .backend import SnubaTagStorage # NOQA diff --git a/src/sentry/tagstore/snuba/backend.py b/src/sentry/tagstore/snuba/backend.py index e3f6c737af8a92..f09a03975c84fa 100644 --- a/src/sentry/tagstore/snuba/backend.py +++ b/src/sentry/tagstore/snuba/backend.py @@ -6,7 +6,7 @@ from collections import defaultdict from collections.abc import Iterable, Sequence from datetime import datetime, timedelta, timezone -from typing import Any, Never, Protocol, TypedDict +from typing import Any, Never, Protocol, TypedDict, int import sentry_sdk from dateutil.parser import parse as parse_datetime diff --git a/src/sentry/tagstore/types.py b/src/sentry/tagstore/types.py index 1b14cbe1f8d166..6306d158a92eda 100644 --- a/src/sentry/tagstore/types.py +++ b/src/sentry/tagstore/types.py @@ -1,7 +1,7 @@ from __future__ import annotations import functools -from typing import Any, ClassVar, TypedDict +from typing import Any, ClassVar, TypedDict, int from sentry.api.serializers import Serializer, register, serialize from sentry.search.utils import convert_user_tag_to_query diff --git a/src/sentry/tasks/__init__.py b/src/sentry/tasks/__init__.py index 45ec1796dde0cc..33aade13c0e45e 100644 --- a/src/sentry/tasks/__init__.py +++ b/src/sentry/tasks/__init__.py @@ -1,3 +1,4 @@ +from typing import int """Tasks Async tasks are used to create asynchronous workers which communicate their tasks via kafka diff --git a/src/sentry/tasks/activity.py b/src/sentry/tasks/activity.py index 88a4ebe16fc540..28989310f1efdc 100644 --- a/src/sentry/tasks/activity.py +++ b/src/sentry/tasks/activity.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.silo.base import SiloMode diff --git a/src/sentry/tasks/ai_agent_monitoring.py b/src/sentry/tasks/ai_agent_monitoring.py index c0a6a5adc90891..4026b06e993c80 100644 --- a/src/sentry/tasks/ai_agent_monitoring.py +++ b/src/sentry/tasks/ai_agent_monitoring.py @@ -1,6 +1,6 @@ import logging import re -from typing import Any +from typing import int, Any from django.conf import settings diff --git a/src/sentry/tasks/assemble.py b/src/sentry/tasks/assemble.py index c2c77bbafb7bae..8914fb868943fb 100644 --- a/src/sentry/tasks/assemble.py +++ b/src/sentry/tasks/assemble.py @@ -4,7 +4,7 @@ import logging import uuid from datetime import datetime -from typing import IO, TYPE_CHECKING, NamedTuple +from typing import IO, TYPE_CHECKING, NamedTuple, int import orjson import sentry_sdk diff --git a/src/sentry/tasks/auth/auth.py b/src/sentry/tasks/auth/auth.py index cef8646d094736..1fc4da9ee7f49b 100644 --- a/src/sentry/tasks/auth/auth.py +++ b/src/sentry/tasks/auth/auth.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import abc import logging diff --git a/src/sentry/tasks/auth/check_auth.py b/src/sentry/tasks/auth/check_auth.py index 68ee8a08554b05..bc4191dea2cbd5 100644 --- a/src/sentry/tasks/auth/check_auth.py +++ b/src/sentry/tasks/auth/check_auth.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from datetime import timedelta diff --git a/src/sentry/tasks/auto_enable_codecov.py b/src/sentry/tasks/auto_enable_codecov.py index 5cd5e5d1753bc9..443bf864482cc7 100644 --- a/src/sentry/tasks/auto_enable_codecov.py +++ b/src/sentry/tasks/auto_enable_codecov.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry import audit_log, features diff --git a/src/sentry/tasks/auto_ongoing_issues.py b/src/sentry/tasks/auto_ongoing_issues.py index c79a7868bd6470..66dc4c21a5525b 100644 --- a/src/sentry/tasks/auto_ongoing_issues.py +++ b/src/sentry/tasks/auto_ongoing_issues.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import datetime, timedelta, timezone diff --git a/src/sentry/tasks/auto_remove_inbox.py b/src/sentry/tasks/auto_remove_inbox.py index e87c498df9f838..748150aa027314 100644 --- a/src/sentry/tasks/auto_remove_inbox.py +++ b/src/sentry/tasks/auto_remove_inbox.py @@ -1,3 +1,4 @@ +from typing import int from sentry.db.deletion import BulkDeleteQuery from sentry.models.groupinbox import GroupInbox from sentry.silo.base import SiloMode diff --git a/src/sentry/tasks/auto_resolve_issues.py b/src/sentry/tasks/auto_resolve_issues.py index 76ee7234659597..22ee63ae69640c 100644 --- a/src/sentry/tasks/auto_resolve_issues.py +++ b/src/sentry/tasks/auto_resolve_issues.py @@ -3,7 +3,7 @@ from collections import defaultdict from datetime import datetime, timedelta, timezone from time import time -from typing import Any +from typing import int, Any from django.utils import timezone as django_timezone diff --git a/src/sentry/tasks/auto_source_code_config.py b/src/sentry/tasks/auto_source_code_config.py index aee229db55bb1e..e7a38cf18edcee 100644 --- a/src/sentry/tasks/auto_source_code_config.py +++ b/src/sentry/tasks/auto_source_code_config.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.issues.auto_source_code_config.task import process_event from sentry.tasks.base import instrumented_task diff --git a/src/sentry/tasks/autofix.py b/src/sentry/tasks/autofix.py index c69ccf372da269..53ae1d1ac5d18c 100644 --- a/src/sentry/tasks/autofix.py +++ b/src/sentry/tasks/autofix.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import datetime, timedelta diff --git a/src/sentry/tasks/base.py b/src/sentry/tasks/base.py index b130b90f70ce0d..314890c8a3d3d1 100644 --- a/src/sentry/tasks/base.py +++ b/src/sentry/tasks/base.py @@ -4,7 +4,7 @@ import functools import logging from collections.abc import Callable -from typing import Any, TypeVar +from typing import Any, TypeVar, int import sentry_sdk from django.db.models import Model diff --git a/src/sentry/tasks/beacon.py b/src/sentry/tasks/beacon.py index ead19ead170e91..1321358765a605 100644 --- a/src/sentry/tasks/beacon.py +++ b/src/sentry/tasks/beacon.py @@ -4,7 +4,7 @@ import platform from datetime import timedelta from hashlib import sha1 -from typing import Any +from typing import int, Any from uuid import uuid4 import psutil diff --git a/src/sentry/tasks/check_am2_compatibility.py b/src/sentry/tasks/check_am2_compatibility.py index de106f008dd7c0..105bf7dc1dc5d4 100644 --- a/src/sentry/tasks/check_am2_compatibility.py +++ b/src/sentry/tasks/check_am2_compatibility.py @@ -2,7 +2,7 @@ from collections.abc import Mapping from datetime import datetime, timedelta, timezone from enum import Enum -from typing import Any +from typing import int, Any import sentry_sdk from django.db.models import Q diff --git a/src/sentry/tasks/clear_expired_resolutions.py b/src/sentry/tasks/clear_expired_resolutions.py index 96b1e4dc801ab2..e63589cbf06df6 100644 --- a/src/sentry/tasks/clear_expired_resolutions.py +++ b/src/sentry/tasks/clear_expired_resolutions.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Q from sentry.models.activity import Activity diff --git a/src/sentry/tasks/clear_expired_rulesnoozes.py b/src/sentry/tasks/clear_expired_rulesnoozes.py index d8c0ab0cb3c096..33fc9642fe77e3 100644 --- a/src/sentry/tasks/clear_expired_rulesnoozes.py +++ b/src/sentry/tasks/clear_expired_rulesnoozes.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from sentry.models.rulesnooze import RuleSnooze diff --git a/src/sentry/tasks/clear_expired_snoozes.py b/src/sentry/tasks/clear_expired_snoozes.py index b245b852d1961b..89457fa0c202e8 100644 --- a/src/sentry/tasks/clear_expired_snoozes.py +++ b/src/sentry/tasks/clear_expired_snoozes.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from sentry.issues.escalating.escalating import manage_issue_states diff --git a/src/sentry/tasks/codeowners/__init__.py b/src/sentry/tasks/codeowners/__init__.py index 67d3a23245bd7a..89f7a9ff712a8f 100644 --- a/src/sentry/tasks/codeowners/__init__.py +++ b/src/sentry/tasks/codeowners/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ( "code_owners_auto_sync", "update_code_owners_schema", diff --git a/src/sentry/tasks/codeowners/code_owners_auto_sync.py b/src/sentry/tasks/codeowners/code_owners_auto_sync.py index 8e929849511d60..50c5849806f0d9 100644 --- a/src/sentry/tasks/codeowners/code_owners_auto_sync.py +++ b/src/sentry/tasks/codeowners/code_owners_auto_sync.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from rest_framework.exceptions import NotFound diff --git a/src/sentry/tasks/codeowners/update_code_owners_schema.py b/src/sentry/tasks/codeowners/update_code_owners_schema.py index ba2ddb3e782dc2..62964fb5bd7225 100644 --- a/src/sentry/tasks/codeowners/update_code_owners_schema.py +++ b/src/sentry/tasks/codeowners/update_code_owners_schema.py @@ -2,7 +2,7 @@ import logging from collections.abc import Iterable -from typing import Any +from typing import int, Any from sentry import features from sentry.models.organization import Organization, OrganizationStatus diff --git a/src/sentry/tasks/collect_project_platforms.py b/src/sentry/tasks/collect_project_platforms.py index 00000c8eb3df1e..fd7113196389b3 100644 --- a/src/sentry/tasks/collect_project_platforms.py +++ b/src/sentry/tasks/collect_project_platforms.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/src/sentry/tasks/commit_context.py b/src/sentry/tasks/commit_context.py index bf4b8ae031e577..361a9befe95d08 100644 --- a/src/sentry/tasks/commit_context.py +++ b/src/sentry/tasks/commit_context.py @@ -3,7 +3,7 @@ import logging from collections.abc import Mapping, Sequence from datetime import timedelta -from typing import Any +from typing import int, Any import sentry_sdk from django.utils import timezone as django_timezone diff --git a/src/sentry/tasks/commits.py b/src/sentry/tasks/commits.py index ec0c86992b4895..1e4ff1cc43b963 100644 --- a/src/sentry/tasks/commits.py +++ b/src/sentry/tasks/commits.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/tasks/delete_seer_grouping_records.py b/src/sentry/tasks/delete_seer_grouping_records.py index ba0cb2b6fd4833..15bf266fc83eaf 100644 --- a/src/sentry/tasks/delete_seer_grouping_records.py +++ b/src/sentry/tasks/delete_seer_grouping_records.py @@ -1,6 +1,6 @@ import logging from collections.abc import Sequence -from typing import Any +from typing import int, Any from sentry import options from sentry.models.project import Project diff --git a/src/sentry/tasks/digests.py b/src/sentry/tasks/digests.py index 0af96e4bf72b3f..f716e2389a1b50 100644 --- a/src/sentry/tasks/digests.py +++ b/src/sentry/tasks/digests.py @@ -1,3 +1,4 @@ +from typing import int import logging import time diff --git a/src/sentry/tasks/email.py b/src/sentry/tasks/email.py index 9b089962cc710a..f4149d5ef694a8 100644 --- a/src/sentry/tasks/email.py +++ b/src/sentry/tasks/email.py @@ -1,6 +1,6 @@ import logging from smtplib import SMTPDataError -from typing import Any +from typing import int, Any from sentry.auth import access from sentry.models.group import Group diff --git a/src/sentry/tasks/embeddings_grouping/constants.py b/src/sentry/tasks/embeddings_grouping/constants.py index 63daa30448de87..15430eb92fbede 100644 --- a/src/sentry/tasks/embeddings_grouping/constants.py +++ b/src/sentry/tasks/embeddings_grouping/constants.py @@ -1,3 +1,4 @@ +from typing import int BACKFILL_NAME = "backfill_grouping_records" BACKFILL_BULK_DELETE_METADATA_CHUNK_SIZE = 100 PROJECT_BACKFILL_COMPLETED = "sentry:similarity_backfill_completed" diff --git a/src/sentry/tasks/embeddings_grouping/utils.py b/src/sentry/tasks/embeddings_grouping/utils.py index 1be313bb4e75ab..f434501abe014b 100644 --- a/src/sentry/tasks/embeddings_grouping/utils.py +++ b/src/sentry/tasks/embeddings_grouping/utils.py @@ -3,7 +3,7 @@ from collections import Counter from concurrent.futures import ThreadPoolExecutor, as_completed from datetime import UTC, datetime, timedelta -from typing import TypedDict +from typing import int, TypedDict import sentry_sdk from django.db.models import Q diff --git a/src/sentry/tasks/files.py b/src/sentry/tasks/files.py index 3774882a90f1ea..b4092055bceec6 100644 --- a/src/sentry/tasks/files.py +++ b/src/sentry/tasks/files.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.db import DatabaseError, IntegrityError, router diff --git a/src/sentry/tasks/groupowner.py b/src/sentry/tasks/groupowner.py index 3517839420c9b4..6d202d1462cbcb 100644 --- a/src/sentry/tasks/groupowner.py +++ b/src/sentry/tasks/groupowner.py @@ -1,7 +1,7 @@ import logging from collections.abc import Mapping, Sequence from datetime import timedelta -from typing import Any, cast +from typing import Any, cast, int import sentry_sdk from django.utils import timezone diff --git a/src/sentry/tasks/llm_issue_detection.py b/src/sentry/tasks/llm_issue_detection.py index 7cda02dc94295a..ad0923cb654329 100644 --- a/src/sentry/tasks/llm_issue_detection.py +++ b/src/sentry/tasks/llm_issue_detection.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import random diff --git a/src/sentry/tasks/merge.py b/src/sentry/tasks/merge.py index d0f0f9ae3ee868..825b8094f30b88 100644 --- a/src/sentry/tasks/merge.py +++ b/src/sentry/tasks/merge.py @@ -1,6 +1,6 @@ import logging from collections.abc import Mapping -from typing import Any +from typing import int, Any import sentry_sdk from django.db import DataError, IntegrityError, router, transaction diff --git a/src/sentry/tasks/on_demand_metrics.py b/src/sentry/tasks/on_demand_metrics.py index 4cb0bf08fdc3ef..759ec4e90a1c6d 100644 --- a/src/sentry/tasks/on_demand_metrics.py +++ b/src/sentry/tasks/on_demand_metrics.py @@ -2,7 +2,7 @@ import logging from collections.abc import Sequence -from typing import Any +from typing import int, Any import sentry_sdk from django.utils import timezone diff --git a/src/sentry/tasks/options.py b/src/sentry/tasks/options.py index dfc0b71cbb0fc8..99aac07efb220c 100644 --- a/src/sentry/tasks/options.py +++ b/src/sentry/tasks/options.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import timedelta diff --git a/src/sentry/tasks/ping.py b/src/sentry/tasks/ping.py index 30465dee8e9545..992fa8e7b65da2 100644 --- a/src/sentry/tasks/ping.py +++ b/src/sentry/tasks/ping.py @@ -1,3 +1,4 @@ +from typing import int from time import time import sentry diff --git a/src/sentry/tasks/post_process.py b/src/sentry/tasks/post_process.py index cc64c249c51892..506f30aeaf821a 100644 --- a/src/sentry/tasks/post_process.py +++ b/src/sentry/tasks/post_process.py @@ -6,7 +6,7 @@ from collections.abc import MutableMapping, Sequence from datetime import datetime from time import time -from typing import TYPE_CHECKING, Any, TypedDict +from typing import TYPE_CHECKING, Any, TypedDict, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/tasks/process_buffer.py b/src/sentry/tasks/process_buffer.py index 52bbd34ea8fb31..efd1ddcc54a701 100644 --- a/src/sentry/tasks/process_buffer.py +++ b/src/sentry/tasks/process_buffer.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any import sentry_sdk from django.apps import apps diff --git a/src/sentry/tasks/relay.py b/src/sentry/tasks/relay.py index 2f615861f59425..22cb78dbcdce4a 100644 --- a/src/sentry/tasks/relay.py +++ b/src/sentry/tasks/relay.py @@ -1,3 +1,4 @@ +from typing import int import logging import time diff --git a/src/sentry/tasks/release_registry.py b/src/sentry/tasks/release_registry.py index 75b1c3f4ca3f8d..8924ca5b4316ab 100644 --- a/src/sentry/tasks/release_registry.py +++ b/src/sentry/tasks/release_registry.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.conf import settings diff --git a/src/sentry/tasks/repository.py b/src/sentry/tasks/repository.py index d1b04861e76885..7c85fbf0516437 100644 --- a/src/sentry/tasks/repository.py +++ b/src/sentry/tasks/repository.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions import get_manager from sentry.deletions.base import _delete_children from sentry.deletions.defaults.repository import _get_repository_child_relations diff --git a/src/sentry/tasks/reprocessing2.py b/src/sentry/tasks/reprocessing2.py index dcb9d0ff34434a..a4ddcd12d30a30 100644 --- a/src/sentry/tasks/reprocessing2.py +++ b/src/sentry/tasks/reprocessing2.py @@ -1,5 +1,5 @@ import time -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING import sentry_sdk from django.conf import settings diff --git a/src/sentry/tasks/seer.py b/src/sentry/tasks/seer.py index a93ec28235ebed..ffb83e6dce0ea8 100644 --- a/src/sentry/tasks/seer.py +++ b/src/sentry/tasks/seer.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/tasks/statistical_detectors.py b/src/sentry/tasks/statistical_detectors.py index 9cbb1f26f1c877..eb82b149609946 100644 --- a/src/sentry/tasks/statistical_detectors.py +++ b/src/sentry/tasks/statistical_detectors.py @@ -3,7 +3,7 @@ import logging from collections.abc import Generator, Iterable from datetime import UTC, datetime, timedelta -from typing import Any +from typing import int, Any import sentry_sdk from django.utils import timezone as django_timezone diff --git a/src/sentry/tasks/store.py b/src/sentry/tasks/store.py index 05638d83d0dad6..3886a0747b8019 100644 --- a/src/sentry/tasks/store.py +++ b/src/sentry/tasks/store.py @@ -5,7 +5,7 @@ from collections.abc import Mapping, MutableMapping from dataclasses import dataclass from time import time -from typing import Any +from typing import int, Any import orjson import sentry_sdk diff --git a/src/sentry/tasks/summaries/daily_summary.py b/src/sentry/tasks/summaries/daily_summary.py index 3deb1f85d993ef..05e960a771415f 100644 --- a/src/sentry/tasks/summaries/daily_summary.py +++ b/src/sentry/tasks/summaries/daily_summary.py @@ -3,7 +3,7 @@ import zoneinfo from collections import defaultdict from datetime import datetime -from typing import cast +from typing import int, cast import sentry_sdk from django.utils import timezone diff --git a/src/sentry/tasks/summaries/metrics.py b/src/sentry/tasks/summaries/metrics.py index 586f713c16fa13..98720fe9169c05 100644 --- a/src/sentry/tasks/summaries/metrics.py +++ b/src/sentry/tasks/summaries/metrics.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping from dataclasses import dataclass from enum import StrEnum diff --git a/src/sentry/tasks/summaries/organization_report_context_factory.py b/src/sentry/tasks/summaries/organization_report_context_factory.py index 7acaf31f69b168..1d7ded2ce0d975 100644 --- a/src/sentry/tasks/summaries/organization_report_context_factory.py +++ b/src/sentry/tasks/summaries/organization_report_context_factory.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from sentry.constants import DataCategory diff --git a/src/sentry/tasks/summaries/utils.py b/src/sentry/tasks/summaries/utils.py index 1d7aa7c0c21b91..c5da62307db809 100644 --- a/src/sentry/tasks/summaries/utils.py +++ b/src/sentry/tasks/summaries/utils.py @@ -1,5 +1,5 @@ from datetime import timedelta -from typing import Any, cast +from typing import Any, cast, int import sentry_sdk from django.db.models import Count diff --git a/src/sentry/tasks/summaries/weekly_reports.py b/src/sentry/tasks/summaries/weekly_reports.py index 746ce43d0e095b..48292f102af2c7 100644 --- a/src/sentry/tasks/summaries/weekly_reports.py +++ b/src/sentry/tasks/summaries/weekly_reports.py @@ -8,7 +8,7 @@ from dataclasses import dataclass from datetime import datetime, timedelta from functools import partial -from typing import Any, Final +from typing import Any, Final, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/tasks/symbolication.py b/src/sentry/tasks/symbolication.py index ee53b0480c477a..6573f9cf9b69ee 100644 --- a/src/sentry/tasks/symbolication.py +++ b/src/sentry/tasks/symbolication.py @@ -1,7 +1,7 @@ import logging from collections.abc import Callable, Mapping from time import time -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/tasks/unmerge.py b/src/sentry/tasks/unmerge.py index c51abd0b2a506f..b55001ef6eb9d4 100644 --- a/src/sentry/tasks/unmerge.py +++ b/src/sentry/tasks/unmerge.py @@ -5,7 +5,7 @@ from collections.abc import Callable, Mapping, Sequence from datetime import datetime from functools import reduce -from typing import Any +from typing import int, Any from django.db import router, transaction from django.db.models.base import Model diff --git a/src/sentry/tasks/user_report.py b/src/sentry/tasks/user_report.py index 76055d1b712c6d..6c38cb53b7574c 100644 --- a/src/sentry/tasks/user_report.py +++ b/src/sentry/tasks/user_report.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.silo.base import SiloMode from sentry.tasks.base import instrumented_task diff --git a/src/sentry/tasks/web_vitals_issue_detection.py b/src/sentry/tasks/web_vitals_issue_detection.py index ec61d56fd866e6..3a5149d43a7ffa 100644 --- a/src/sentry/tasks/web_vitals_issue_detection.py +++ b/src/sentry/tasks/web_vitals_issue_detection.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from datetime import UTC, datetime, timedelta diff --git a/src/sentry/tasks/weekly_escalating_forecast.py b/src/sentry/tasks/weekly_escalating_forecast.py index 4db7675510c719..be94a46a2284d9 100644 --- a/src/sentry/tasks/weekly_escalating_forecast.py +++ b/src/sentry/tasks/weekly_escalating_forecast.py @@ -1,6 +1,6 @@ import logging from datetime import UTC, datetime, timedelta -from typing import TypedDict +from typing import int, TypedDict from sentry.constants import ObjectStatus from sentry.issues.escalating.forecasts import generate_and_save_forecasts diff --git a/src/sentry/taskworker/app.py b/src/sentry/taskworker/app.py index 54ed7f7d7db832..ee79e35b32cf84 100644 --- a/src/sentry/taskworker/app.py +++ b/src/sentry/taskworker/app.py @@ -1,6 +1,6 @@ import importlib from collections.abc import Iterable -from typing import Any, Protocol +from typing import Any, Protocol, int from sentry_protos.taskbroker.v1.taskbroker_pb2 import TaskActivation diff --git a/src/sentry/taskworker/client/client.py b/src/sentry/taskworker/client/client.py index dd34684d473e79..ec846b32a59d57 100644 --- a/src/sentry/taskworker/client/client.py +++ b/src/sentry/taskworker/client/client.py @@ -7,7 +7,7 @@ from collections.abc import Callable from dataclasses import dataclass from pathlib import Path -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int import grpc from google.protobuf.message import Message diff --git a/src/sentry/taskworker/client/inflight_task_activation.py b/src/sentry/taskworker/client/inflight_task_activation.py index 523a32576fe756..05a20c04a701f2 100644 --- a/src/sentry/taskworker/client/inflight_task_activation.py +++ b/src/sentry/taskworker/client/inflight_task_activation.py @@ -1,3 +1,4 @@ +from typing import int import dataclasses from sentry_protos.taskbroker.v1.taskbroker_pb2 import TaskActivation diff --git a/src/sentry/taskworker/client/processing_result.py b/src/sentry/taskworker/client/processing_result.py index 8cdbb2b4ab3d69..6b04b206ee1b33 100644 --- a/src/sentry/taskworker/client/processing_result.py +++ b/src/sentry/taskworker/client/processing_result.py @@ -1,3 +1,4 @@ +from typing import int import dataclasses from sentry_protos.taskbroker.v1.taskbroker_pb2 import TaskActivationStatus diff --git a/src/sentry/taskworker/constants.py b/src/sentry/taskworker/constants.py index 817e25ada87b0d..68194d722cd682 100644 --- a/src/sentry/taskworker/constants.py +++ b/src/sentry/taskworker/constants.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum DEFAULT_PROCESSING_DEADLINE = 10 diff --git a/src/sentry/taskworker/namespaces.py b/src/sentry/taskworker/namespaces.py index 739ad8938b63f0..4c2e4dc610d6be 100644 --- a/src/sentry/taskworker/namespaces.py +++ b/src/sentry/taskworker/namespaces.py @@ -1,3 +1,4 @@ +from typing import int from sentry.taskworker.runtime import app # Namespaces for taskworker tasks diff --git a/src/sentry/taskworker/registry.py b/src/sentry/taskworker/registry.py index 9cca426baf46bf..ef4850e63133e7 100644 --- a/src/sentry/taskworker/registry.py +++ b/src/sentry/taskworker/registry.py @@ -4,7 +4,7 @@ import logging from collections.abc import Callable from concurrent import futures -from typing import Any +from typing import int, Any import sentry_sdk from arroyo.backends.kafka import KafkaPayload, KafkaProducer diff --git a/src/sentry/taskworker/retry.py b/src/sentry/taskworker/retry.py index 020bd59c906393..c3b4913c7ab009 100644 --- a/src/sentry/taskworker/retry.py +++ b/src/sentry/taskworker/retry.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from enum import Enum from multiprocessing.context import TimeoutError diff --git a/src/sentry/taskworker/router.py b/src/sentry/taskworker/router.py index cdbd5bcf6afea1..98e04f838eb27f 100644 --- a/src/sentry/taskworker/router.py +++ b/src/sentry/taskworker/router.py @@ -1,4 +1,4 @@ -from typing import Protocol +from typing import int, Protocol from django.conf import settings from sentry_sdk import capture_exception diff --git a/src/sentry/taskworker/runtime.py b/src/sentry/taskworker/runtime.py index 985d4fd31f880a..fde510039b0b2e 100644 --- a/src/sentry/taskworker/runtime.py +++ b/src/sentry/taskworker/runtime.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.core.cache import cache diff --git a/src/sentry/taskworker/scheduler/runner.py b/src/sentry/taskworker/scheduler/runner.py index a42159ce12df80..ae58d933b8ead2 100644 --- a/src/sentry/taskworker/scheduler/runner.py +++ b/src/sentry/taskworker/scheduler/runner.py @@ -4,7 +4,7 @@ import logging from collections.abc import Mapping from datetime import datetime, timedelta -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.utils import timezone from redis.client import StrictRedis diff --git a/src/sentry/taskworker/scheduler/schedules.py b/src/sentry/taskworker/scheduler/schedules.py index 62c5d37aa430c6..6f6f27bbe55fd2 100644 --- a/src/sentry/taskworker/scheduler/schedules.py +++ b/src/sentry/taskworker/scheduler/schedules.py @@ -3,7 +3,7 @@ import abc import logging from datetime import datetime, timedelta -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from cronsim import CronSim, CronSimError from django.utils import timezone diff --git a/src/sentry/taskworker/silolimiter.py b/src/sentry/taskworker/silolimiter.py index 097be77a920d3c..91c5d441cfd308 100644 --- a/src/sentry/taskworker/silolimiter.py +++ b/src/sentry/taskworker/silolimiter.py @@ -1,5 +1,5 @@ from collections.abc import Callable, Iterable -from typing import Any, cast +from typing import Any, cast, int from sentry.silo.base import SiloLimit, SiloMode from sentry.taskworker.task import P, R, Task diff --git a/src/sentry/taskworker/state.py b/src/sentry/taskworker/state.py index 9217262cc29074..bd59acbe2266a1 100644 --- a/src/sentry/taskworker/state.py +++ b/src/sentry/taskworker/state.py @@ -1,3 +1,4 @@ +from typing import int import dataclasses import threading diff --git a/src/sentry/taskworker/task.py b/src/sentry/taskworker/task.py index 38e6a7acb7da27..c06b47fcbc2231 100644 --- a/src/sentry/taskworker/task.py +++ b/src/sentry/taskworker/task.py @@ -5,7 +5,7 @@ import time from collections.abc import Callable, Collection, Mapping, MutableMapping from functools import update_wrapper -from typing import TYPE_CHECKING, Any, Generic, ParamSpec, TypeVar +from typing import TYPE_CHECKING, Any, Generic, ParamSpec, TypeVar, int from uuid import uuid4 import orjson diff --git a/src/sentry/taskworker/tasks/examples.py b/src/sentry/taskworker/tasks/examples.py index 3113c1b0bc9cb1..43c804937d3df7 100644 --- a/src/sentry/taskworker/tasks/examples.py +++ b/src/sentry/taskworker/tasks/examples.py @@ -2,7 +2,7 @@ import logging from time import sleep -from typing import Any +from typing import int, Any from sentry.taskworker.constants import CompressionType from sentry.taskworker.namespaces import exampletasks diff --git a/src/sentry/taskworker/worker.py b/src/sentry/taskworker/worker.py index 16e13255e21610..adb2aa3a29db82 100644 --- a/src/sentry/taskworker/worker.py +++ b/src/sentry/taskworker/worker.py @@ -10,7 +10,7 @@ from multiprocessing.context import ForkContext, SpawnContext from multiprocessing.process import BaseProcess from pathlib import Path -from typing import Any +from typing import int, Any import grpc from sentry_protos.taskbroker.v1.taskbroker_pb2 import FetchNextTask diff --git a/src/sentry/taskworker/workerchild.py b/src/sentry/taskworker/workerchild.py index f274bb9bea4d3d..d64d0235dd2d52 100644 --- a/src/sentry/taskworker/workerchild.py +++ b/src/sentry/taskworker/workerchild.py @@ -9,7 +9,7 @@ from collections.abc import Callable, Generator from multiprocessing.synchronize import Event from types import FrameType -from typing import Any +from typing import int, Any # XXX: Don't import any modules that will import django here, do those within child_process import orjson diff --git a/src/sentry/tempest/apps.py b/src/sentry/tempest/apps.py index 9dbe005be9753f..b9174c142bdaca 100644 --- a/src/sentry/tempest/apps.py +++ b/src/sentry/tempest/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/tempest/endpoints/tempest_credentials.py b/src/sentry/tempest/endpoints/tempest_credentials.py index 48282a3f5fbfcc..c0ecb7afc73369 100644 --- a/src/sentry/tempest/endpoints/tempest_credentials.py +++ b/src/sentry/tempest/endpoints/tempest_credentials.py @@ -1,3 +1,4 @@ +from typing import int from django.db import IntegrityError from rest_framework.exceptions import NotFound from rest_framework.request import Request diff --git a/src/sentry/tempest/endpoints/tempest_credentials_details.py b/src/sentry/tempest/endpoints/tempest_credentials_details.py index 51cd72f7dbb7fe..6a76bce96f3c9a 100644 --- a/src/sentry/tempest/endpoints/tempest_credentials_details.py +++ b/src/sentry/tempest/endpoints/tempest_credentials_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.exceptions import NotFound from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/tempest/endpoints/tempest_ips.py b/src/sentry/tempest/endpoints/tempest_ips.py index 75a4364b35ddcf..710461ce663727 100644 --- a/src/sentry/tempest/endpoints/tempest_ips.py +++ b/src/sentry/tempest/endpoints/tempest_ips.py @@ -1,3 +1,4 @@ +from typing import int from django.http.response import HttpResponse from rest_framework.request import Request diff --git a/src/sentry/tempest/migrations/0001_squashed_0002_make_message_type_nullable.py b/src/sentry/tempest/migrations/0001_squashed_0002_make_message_type_nullable.py index 6dedf9c41b2a59..51c158c4c4349f 100644 --- a/src/sentry/tempest/migrations/0001_squashed_0002_make_message_type_nullable.py +++ b/src/sentry/tempest/migrations/0001_squashed_0002_make_message_type_nullable.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 16:30 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/tempest/models.py b/src/sentry/tempest/models.py index 7e9b059b966399..7db009d7a926f1 100644 --- a/src/sentry/tempest/models.py +++ b/src/sentry/tempest/models.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.conf import settings from django.db import models diff --git a/src/sentry/tempest/permissions.py b/src/sentry/tempest/permissions.py index 81e97aaf98d431..5dbf9ec59ec9c9 100644 --- a/src/sentry/tempest/permissions.py +++ b/src/sentry/tempest/permissions.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.bases.project import ProjectPermission diff --git a/src/sentry/tempest/serializers.py b/src/sentry/tempest/serializers.py index 625e636be2de86..63492914a3b179 100644 --- a/src/sentry/tempest/serializers.py +++ b/src/sentry/tempest/serializers.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from sentry.api.serializers.base import Serializer, register diff --git a/src/sentry/tempest/tasks.py b/src/sentry/tempest/tasks.py index e2c4bcb07b31d6..909131e41b1f68 100644 --- a/src/sentry/tempest/tasks.py +++ b/src/sentry/tempest/tasks.py @@ -1,3 +1,4 @@ +from typing import int import logging import requests diff --git a/src/sentry/tempest/utils.py b/src/sentry/tempest/utils.py index 24f7cc3ff0d168..49d43418e936cd 100644 --- a/src/sentry/tempest/utils.py +++ b/src/sentry/tempest/utils.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.organization import Organization diff --git a/src/sentry/templatetags/sentry_admin_helpers.py b/src/sentry/templatetags/sentry_admin_helpers.py index a68be0c80260d8..9b96041194f259 100644 --- a/src/sentry/templatetags/sentry_admin_helpers.py +++ b/src/sentry/templatetags/sentry_admin_helpers.py @@ -1,3 +1,4 @@ +from typing import int import datetime from django import template diff --git a/src/sentry/templatetags/sentry_api.py b/src/sentry/templatetags/sentry_api.py index a615f76175f5e4..70604ef7269bf1 100644 --- a/src/sentry/templatetags/sentry_api.py +++ b/src/sentry/templatetags/sentry_api.py @@ -1,3 +1,4 @@ +from typing import int from django import template from django.http import HttpRequest diff --git a/src/sentry/templatetags/sentry_assets.py b/src/sentry/templatetags/sentry_assets.py index b0cf53a651e5ae..9817a6f37f4440 100644 --- a/src/sentry/templatetags/sentry_assets.py +++ b/src/sentry/templatetags/sentry_assets.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import re diff --git a/src/sentry/templatetags/sentry_avatars.py b/src/sentry/templatetags/sentry_avatars.py index aaa7090773e3cb..ec07b0a14e0684 100644 --- a/src/sentry/templatetags/sentry_avatars.py +++ b/src/sentry/templatetags/sentry_avatars.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import urlencode from django import template diff --git a/src/sentry/templatetags/sentry_features.py b/src/sentry/templatetags/sentry_features.py index cf18a2343b2d85..a0a7a96d31efab 100644 --- a/src/sentry/templatetags/sentry_features.py +++ b/src/sentry/templatetags/sentry_features.py @@ -1,3 +1,4 @@ +from typing import int from django import template from sentry import features diff --git a/src/sentry/templatetags/sentry_helpers.py b/src/sentry/templatetags/sentry_helpers.py index d5764aa210111d..bc83e5bf143134 100644 --- a/src/sentry/templatetags/sentry_helpers.py +++ b/src/sentry/templatetags/sentry_helpers.py @@ -1,3 +1,4 @@ +from typing import int import functools import os.path import random diff --git a/src/sentry/templatetags/sentry_platforms.py b/src/sentry/templatetags/sentry_platforms.py index 0cb90a2489a2af..d92b2baf2caea3 100644 --- a/src/sentry/templatetags/sentry_platforms.py +++ b/src/sentry/templatetags/sentry_platforms.py @@ -1,3 +1,4 @@ +from typing import int from django import template from sentry.utils.avatar import get_letter_avatar, get_platform_avatar diff --git a/src/sentry/templatetags/sentry_react.py b/src/sentry/templatetags/sentry_react.py index a1f91609b5e2bc..87ab964596125a 100644 --- a/src/sentry/templatetags/sentry_react.py +++ b/src/sentry/templatetags/sentry_react.py @@ -1,3 +1,4 @@ +from typing import int from django import template from sentry.utils import json diff --git a/src/sentry/templatetags/sentry_status.py b/src/sentry/templatetags/sentry_status.py index 06aabe79c485b9..e2577e6b63fb97 100644 --- a/src/sentry/templatetags/sentry_status.py +++ b/src/sentry/templatetags/sentry_status.py @@ -1,3 +1,4 @@ +from typing import int import itertools from django import template diff --git a/src/sentry/templatetags/sentry_trace.py b/src/sentry/templatetags/sentry_trace.py index dbb3feda9ee20d..61bfe13c5cdfcf 100644 --- a/src/sentry/templatetags/sentry_trace.py +++ b/src/sentry/templatetags/sentry_trace.py @@ -1,3 +1,4 @@ +from typing import int import sentry_sdk from django import template diff --git a/src/sentry/testutils/abstract.py b/src/sentry/testutils/abstract.py index 952c6af27336fc..3afe8b09a47066 100644 --- a/src/sentry/testutils/abstract.py +++ b/src/sentry/testutils/abstract.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any class Abstract: diff --git a/src/sentry/testutils/asserts.py b/src/sentry/testutils/asserts.py index e8c07edd4832ee..575518d57a8c0a 100644 --- a/src/sentry/testutils/asserts.py +++ b/src/sentry/testutils/asserts.py @@ -1,3 +1,4 @@ +from typing import int from functools import reduce from django.db import models diff --git a/src/sentry/testutils/auth.py b/src/sentry/testutils/auth.py index c2aa595c6c0321..c10ff2ae0dd325 100644 --- a/src/sentry/testutils/auth.py +++ b/src/sentry/testutils/auth.py @@ -1,3 +1,4 @@ +from typing import int import hashlib import hmac diff --git a/src/sentry/testutils/cases.py b/src/sentry/testutils/cases.py index 8744df314d087c..ce646369cfcbf5 100644 --- a/src/sentry/testutils/cases.py +++ b/src/sentry/testutils/cases.py @@ -11,7 +11,7 @@ from datetime import UTC, datetime, timedelta from enum import Enum from io import BytesIO -from typing import Any, Literal, TypedDict, Union +from typing import Any, Literal, TypedDict, Union, int from unittest import mock from urllib.parse import urlencode from uuid import UUID, uuid4 diff --git a/src/sentry/testutils/factories.py b/src/sentry/testutils/factories.py index 588564f7fb1609..2ea9515f07e3d2 100644 --- a/src/sentry/testutils/factories.py +++ b/src/sentry/testutils/factories.py @@ -13,7 +13,7 @@ from enum import Enum from hashlib import sha1 from importlib import import_module -from typing import Any +from typing import int, Any from unittest import mock from uuid import uuid4 diff --git a/src/sentry/testutils/fixtures.py b/src/sentry/testutils/fixtures.py index e6473046dea64b..4c905ec37411aa 100644 --- a/src/sentry/testutils/fixtures.py +++ b/src/sentry/testutils/fixtures.py @@ -2,7 +2,7 @@ from collections.abc import Mapping from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from uuid import uuid4 import pytest diff --git a/src/sentry/testutils/helpers/__init__.py b/src/sentry/testutils/helpers/__init__.py index 15042ac8a669f3..1583fc60e6701f 100644 --- a/src/sentry/testutils/helpers/__init__.py +++ b/src/sentry/testutils/helpers/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .auth_header import * # NOQA from .features import * # NOQA from .link_header import * # NOQA diff --git a/src/sentry/testutils/helpers/alert_rule.py b/src/sentry/testutils/helpers/alert_rule.py index 3ba4ce3bb3fa7c..304bd2e3b6bc50 100644 --- a/src/sentry/testutils/helpers/alert_rule.py +++ b/src/sentry/testutils/helpers/alert_rule.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from contextlib import contextmanager from dataclasses import dataclass diff --git a/src/sentry/testutils/helpers/analytics.py b/src/sentry/testutils/helpers/analytics.py index e90099b8be8bea..ff0f669eb0bb63 100644 --- a/src/sentry/testutils/helpers/analytics.py +++ b/src/sentry/testutils/helpers/analytics.py @@ -1,3 +1,4 @@ +from typing import int import contextlib from collections.abc import Generator from dataclasses import fields diff --git a/src/sentry/testutils/helpers/apigateway.py b/src/sentry/testutils/helpers/apigateway.py index f9e768d931dcaf..a5c44719e752e7 100644 --- a/src/sentry/testutils/helpers/apigateway.py +++ b/src/sentry/testutils/helpers/apigateway.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from urllib.parse import parse_qs diff --git a/src/sentry/testutils/helpers/auth_header.py b/src/sentry/testutils/helpers/auth_header.py index 18208bd2e4376d..1c0c98ccce0764 100644 --- a/src/sentry/testutils/helpers/auth_header.py +++ b/src/sentry/testutils/helpers/auth_header.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ("get_auth_header",) diff --git a/src/sentry/testutils/helpers/backups.py b/src/sentry/testutils/helpers/backups.py index 9e3993638a436b..cec0bdbf8600e7 100644 --- a/src/sentry/testutils/helpers/backups.py +++ b/src/sentry/testutils/helpers/backups.py @@ -6,7 +6,7 @@ from datetime import UTC, datetime, timedelta from functools import cached_property, cmp_to_key from pathlib import Path -from typing import Any +from typing import int, Any from uuid import uuid4 from cryptography.hazmat.backends import default_backend diff --git a/src/sentry/testutils/helpers/data_blobs.py b/src/sentry/testutils/helpers/data_blobs.py index ec5715e69d3c21..94373523b83600 100644 --- a/src/sentry/testutils/helpers/data_blobs.py +++ b/src/sentry/testutils/helpers/data_blobs.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any """ Contains data blobs that we store in the Rule.action json field. diff --git a/src/sentry/testutils/helpers/datetime.py b/src/sentry/testutils/helpers/datetime.py index 2d2df1b73e6b02..dbc8ae46b8bcea 100644 --- a/src/sentry/testutils/helpers/datetime.py +++ b/src/sentry/testutils/helpers/datetime.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import UTC, datetime, timedelta diff --git a/src/sentry/testutils/helpers/discover.py b/src/sentry/testutils/helpers/discover.py index f1a3dee68237fb..7d49431dfa73d7 100644 --- a/src/sentry/testutils/helpers/discover.py +++ b/src/sentry/testutils/helpers/discover.py @@ -1,3 +1,4 @@ +from typing import int from sentry.search.events import constants diff --git a/src/sentry/testutils/helpers/eventprocessing.py b/src/sentry/testutils/helpers/eventprocessing.py index 83a063e8280fd9..11616908b444e4 100644 --- a/src/sentry/testutils/helpers/eventprocessing.py +++ b/src/sentry/testutils/helpers/eventprocessing.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.event_manager import EventManager from sentry.models.project import Project diff --git a/src/sentry/testutils/helpers/features.py b/src/sentry/testutils/helpers/features.py index 1485734568ba3d..2b59f72595eb61 100644 --- a/src/sentry/testutils/helpers/features.py +++ b/src/sentry/testutils/helpers/features.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Generator, Iterable, Mapping, Sequence from contextlib import contextmanager diff --git a/src/sentry/testutils/helpers/integrations.py b/src/sentry/testutils/helpers/integrations.py index 4049ade45fb675..bc06531f59b664 100644 --- a/src/sentry/testutils/helpers/integrations.py +++ b/src/sentry/testutils/helpers/integrations.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TypeVar +from typing import int, TypeVar from sentry.integrations.base import IntegrationInstallation from sentry.integrations.models.integration import Integration diff --git a/src/sentry/testutils/helpers/link_header.py b/src/sentry/testutils/helpers/link_header.py index 78417f03d4a7c9..436eb21912be9a 100644 --- a/src/sentry/testutils/helpers/link_header.py +++ b/src/sentry/testutils/helpers/link_header.py @@ -1,3 +1,4 @@ +from typing import int """ Copyright (c) 2015 Sentry Team Copyright (c) 2009 Mark Nottingham diff --git a/src/sentry/testutils/helpers/notifications.py b/src/sentry/testutils/helpers/notifications.py index 42a758faa395b5..74dbfd7877de01 100644 --- a/src/sentry/testutils/helpers/notifications.py +++ b/src/sentry/testutils/helpers/notifications.py @@ -3,7 +3,7 @@ import uuid from collections.abc import Mapping, Sequence from datetime import UTC, datetime -from typing import Any +from typing import int, Any from sentry.integrations.types import ExternalProviders from sentry.issues.grouptype import ( diff --git a/src/sentry/testutils/helpers/on_demand.py b/src/sentry/testutils/helpers/on_demand.py index 31e677d7338314..dd1854df0c095d 100644 --- a/src/sentry/testutils/helpers/on_demand.py +++ b/src/sentry/testutils/helpers/on_demand.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from sentry.models.dashboard import Dashboard diff --git a/src/sentry/testutils/helpers/options.py b/src/sentry/testutils/helpers/options.py index 3bbfb6cc999233..dcc088a86b881a 100644 --- a/src/sentry/testutils/helpers/options.py +++ b/src/sentry/testutils/helpers/options.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ["override_options"] from contextlib import contextmanager diff --git a/src/sentry/testutils/helpers/pagination.py b/src/sentry/testutils/helpers/pagination.py index c5c3ff59852433..d512f17ee5f04c 100644 --- a/src/sentry/testutils/helpers/pagination.py +++ b/src/sentry/testutils/helpers/pagination.py @@ -1,3 +1,4 @@ +from typing import int import contextlib from collections.abc import Generator from unittest import mock diff --git a/src/sentry/testutils/helpers/redis.py b/src/sentry/testutils/helpers/redis.py index 6bdf79eba09ad6..d0b820aa1776d2 100644 --- a/src/sentry/testutils/helpers/redis.py +++ b/src/sentry/testutils/helpers/redis.py @@ -1,6 +1,6 @@ from collections.abc import Generator from contextlib import contextmanager -from typing import Any +from typing import int, Any from unittest.mock import patch from django.test.utils import override_settings diff --git a/src/sentry/testutils/helpers/response.py b/src/sentry/testutils/helpers/response.py index d6681e93c6f884..4d1754c9bbf911 100644 --- a/src/sentry/testutils/helpers/response.py +++ b/src/sentry/testutils/helpers/response.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TypeGuard +from typing import int, TypeGuard from django.http.response import HttpResponseBase, StreamingHttpResponse from rest_framework.response import Response diff --git a/src/sentry/testutils/helpers/slack.py b/src/sentry/testutils/helpers/slack.py index bb5d3458c242c0..1b893b606fe0ab 100644 --- a/src/sentry/testutils/helpers/slack.py +++ b/src/sentry/testutils/helpers/slack.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import parse_qs, quote import responses diff --git a/src/sentry/testutils/helpers/socket.py b/src/sentry/testutils/helpers/socket.py index fab35d564ecb30..18d6c3085ce515 100644 --- a/src/sentry/testutils/helpers/socket.py +++ b/src/sentry/testutils/helpers/socket.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import contextlib import ipaddress diff --git a/src/sentry/testutils/helpers/task_runner.py b/src/sentry/testutils/helpers/task_runner.py index ba9ef83bbb0552..bfb77a31d56ad1 100644 --- a/src/sentry/testutils/helpers/task_runner.py +++ b/src/sentry/testutils/helpers/task_runner.py @@ -2,7 +2,7 @@ import contextlib from collections.abc import Generator -from typing import Any, ContextManager, Self +from typing import Any, ContextManager, Self, int from unittest import mock from django.conf import settings diff --git a/src/sentry/testutils/helpers/usage_accountant.py b/src/sentry/testutils/helpers/usage_accountant.py index 85ef4f1ceabea9..7be7222b4dc40e 100644 --- a/src/sentry/testutils/helpers/usage_accountant.py +++ b/src/sentry/testutils/helpers/usage_accountant.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import contextlib from collections.abc import Generator diff --git a/src/sentry/testutils/hybrid_cloud.py b/src/sentry/testutils/hybrid_cloud.py index 0b2b1bc2ffa216..10fc59c6480751 100644 --- a/src/sentry/testutils/hybrid_cloud.py +++ b/src/sentry/testutils/hybrid_cloud.py @@ -7,7 +7,7 @@ import threading from collections.abc import Callable, Iterator from contextlib import contextmanager -from typing import Any, TypedDict +from typing import Any, TypedDict, int from unittest.mock import patch from django.db import connections, transaction diff --git a/src/sentry/testutils/issue_detection/event_generators.py b/src/sentry/testutils/issue_detection/event_generators.py index a487c02198f305..ad4d9cc6a21227 100644 --- a/src/sentry/testutils/issue_detection/event_generators.py +++ b/src/sentry/testutils/issue_detection/event_generators.py @@ -2,7 +2,7 @@ import os from copy import deepcopy -from typing import Any +from typing import int, Any from sentry.testutils.factories import get_fixture_path from sentry.utils import json diff --git a/src/sentry/testutils/issue_detection/experiments.py b/src/sentry/testutils/issue_detection/experiments.py index 601a9c23d6d59c..e2ea5a5b29a8b2 100644 --- a/src/sentry/testutils/issue_detection/experiments.py +++ b/src/sentry/testutils/issue_detection/experiments.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from sentry.issue_detection.performance_detection import DETECTOR_CLASSES diff --git a/src/sentry/testutils/issue_detection/span_builder.py b/src/sentry/testutils/issue_detection/span_builder.py index 00e58efa646507..3140c35c0d9c4c 100644 --- a/src/sentry/testutils/issue_detection/span_builder.py +++ b/src/sentry/testutils/issue_detection/span_builder.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.spans.grouping.strategy.base import Span diff --git a/src/sentry/testutils/issue_detection/store_transaction.py b/src/sentry/testutils/issue_detection/store_transaction.py index 80258e3951c98b..e2e1287f1865ba 100644 --- a/src/sentry/testutils/issue_detection/store_transaction.py +++ b/src/sentry/testutils/issue_detection/store_transaction.py @@ -1,3 +1,4 @@ +from typing import int import random from collections.abc import Sequence from datetime import datetime, timedelta diff --git a/src/sentry/testutils/metrics_backend.py b/src/sentry/testutils/metrics_backend.py index 0f90ed61977fc3..0f53ca9a59a10b 100644 --- a/src/sentry/testutils/metrics_backend.py +++ b/src/sentry/testutils/metrics_backend.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_metrics.client.kafka import build_mri from sentry.sentry_metrics.use_case_id_registry import UseCaseID diff --git a/src/sentry/testutils/middleware.py b/src/sentry/testutils/middleware.py index dbae72c9bce2ae..192fe680bb75d3 100644 --- a/src/sentry/testutils/middleware.py +++ b/src/sentry/testutils/middleware.py @@ -1,3 +1,4 @@ +from typing import int from django.http.request import HttpRequest from sentry.middleware.sudo import SudoMiddleware as BaseSudoMiddleware diff --git a/src/sentry/testutils/notifications/platform.py b/src/sentry/testutils/notifications/platform.py index b7ca6efdc048e8..c5da0034246520 100644 --- a/src/sentry/testutils/notifications/platform.py +++ b/src/sentry/testutils/notifications/platform.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass from sentry.notifications.platform.registry import template_registry diff --git a/src/sentry/testutils/outbox.py b/src/sentry/testutils/outbox.py index 5615e96e23c31e..d1abafdd4b4f84 100644 --- a/src/sentry/testutils/outbox.py +++ b/src/sentry/testutils/outbox.py @@ -2,7 +2,7 @@ import contextlib import functools -from typing import Any +from typing import int, Any from django.conf import settings from django.core.handlers.wsgi import WSGIRequest diff --git a/src/sentry/testutils/pytest/__init__.py b/src/sentry/testutils/pytest/__init__.py index da16a70eb2156e..6bef01a38b6b2a 100644 --- a/src/sentry/testutils/pytest/__init__.py +++ b/src/sentry/testutils/pytest/__init__.py @@ -1,3 +1,4 @@ +from typing import int pytest_plugins = [ "sentry.testutils.skips", "sentry.testutils.pytest.sentry", diff --git a/src/sentry/testutils/pytest/fixtures.py b/src/sentry/testutils/pytest/fixtures.py index 05e777a45c5dc1..f13e8142e3cbdd 100644 --- a/src/sentry/testutils/pytest/fixtures.py +++ b/src/sentry/testutils/pytest/fixtures.py @@ -12,7 +12,7 @@ from collections.abc import Callable, Generator from concurrent.futures import ThreadPoolExecutor from string import Template -from typing import Any, ContextManager, Protocol, overload +from typing import Any, ContextManager, Protocol, overload, int import pytest import requests diff --git a/src/sentry/testutils/pytest/json_report_reruns.py b/src/sentry/testutils/pytest/json_report_reruns.py index 386e611847f693..58cb7dd57402a4 100644 --- a/src/sentry/testutils/pytest/json_report_reruns.py +++ b/src/sentry/testutils/pytest/json_report_reruns.py @@ -1,3 +1,4 @@ +from typing import int """Extend the pytest-json-report plugin with a new "reruns" attribute. Each test will (if it's run more than once) store its prior results in a diff --git a/src/sentry/testutils/pytest/kafka.py b/src/sentry/testutils/pytest/kafka.py index d05a68526cad11..2d3c1bdba3ea9b 100644 --- a/src/sentry/testutils/pytest/kafka.py +++ b/src/sentry/testutils/pytest/kafka.py @@ -1,3 +1,4 @@ +from typing import int import logging import time from collections.abc import MutableMapping diff --git a/src/sentry/testutils/pytest/metrics.py b/src/sentry/testutils/pytest/metrics.py index f6f945c7eb7a90..0eac55f930e08f 100644 --- a/src/sentry/testutils/pytest/metrics.py +++ b/src/sentry/testutils/pytest/metrics.py @@ -1,3 +1,4 @@ +from typing import int import contextlib import dataclasses import functools diff --git a/src/sentry/testutils/pytest/mocking.py b/src/sentry/testutils/pytest/mocking.py index b8f3c3471e8f2f..2d9e8bfe4e69e0 100644 --- a/src/sentry/testutils/pytest/mocking.py +++ b/src/sentry/testutils/pytest/mocking.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable -from typing import ParamSpec, TypeVar +from typing import ParamSpec, TypeVar, int # TODO: Once we're on python 3.12, we can get rid of these and change the first line of the # signature of `capture_results` to diff --git a/src/sentry/testutils/pytest/relay.py b/src/sentry/testutils/pytest/relay.py index f1551226ca6024..9843a3ea5fc030 100644 --- a/src/sentry/testutils/pytest/relay.py +++ b/src/sentry/testutils/pytest/relay.py @@ -1,6 +1,7 @@ # Fixtures used to interact with a test Relay server +from typing import int import datetime import logging import shutil diff --git a/src/sentry/testutils/pytest/selenium.py b/src/sentry/testutils/pytest/selenium.py index 9d9398bc01ff8f..4d97cfefb9215f 100644 --- a/src/sentry/testutils/pytest/selenium.py +++ b/src/sentry/testutils/pytest/selenium.py @@ -1,5 +1,6 @@ # TODO(dcramer): this heavily inspired by pytest-selenium, and it's possible # we could simply inherit from the plugin at this point +from typing import int import logging import os import sys diff --git a/src/sentry/testutils/pytest/sentry.py b/src/sentry/testutils/pytest/sentry.py index e37839850fca68..d6a9b552b29045 100644 --- a/src/sentry/testutils/pytest/sentry.py +++ b/src/sentry/testutils/pytest/sentry.py @@ -9,7 +9,7 @@ import time from datetime import datetime from hashlib import sha256 -from typing import TypeVar +from typing import int, TypeVar from unittest import mock import pytest diff --git a/src/sentry/testutils/pytest/show_flaky_failures.py b/src/sentry/testutils/pytest/show_flaky_failures.py index 9b4217a9bf74ec..b2667ea13a3402 100644 --- a/src/sentry/testutils/pytest/show_flaky_failures.py +++ b/src/sentry/testutils/pytest/show_flaky_failures.py @@ -1,3 +1,4 @@ +from typing import int from _pytest.reports import BaseReport from _pytest.terminal import TerminalReporter diff --git a/src/sentry/testutils/pytest/stale_database_reads.py b/src/sentry/testutils/pytest/stale_database_reads.py index bb75cd1750d2ac..26c258029cfc29 100644 --- a/src/sentry/testutils/pytest/stale_database_reads.py +++ b/src/sentry/testutils/pytest/stale_database_reads.py @@ -1,6 +1,6 @@ import dataclasses from threading import local -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/src/sentry/testutils/pytest/unittest.py b/src/sentry/testutils/pytest/unittest.py index 4928255f87a83f..ebc69b621b72d5 100644 --- a/src/sentry/testutils/pytest/unittest.py +++ b/src/sentry/testutils/pytest/unittest.py @@ -1,3 +1,4 @@ +from typing import int import pytest diff --git a/src/sentry/testutils/region.py b/src/sentry/testutils/region.py index b551f892b014ab..86359cb6d8b905 100644 --- a/src/sentry/testutils/region.py +++ b/src/sentry/testutils/region.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Collection, Generator, Sequence from contextlib import contextmanager diff --git a/src/sentry/testutils/relay.py b/src/sentry/testutils/relay.py index bd2fb83a52b0db..f817318dba021c 100644 --- a/src/sentry/testutils/relay.py +++ b/src/sentry/testutils/relay.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int import pytest import requests diff --git a/src/sentry/testutils/requests.py b/src/sentry/testutils/requests.py index e97b73fbe7aa47..e2980da31ce4d1 100644 --- a/src/sentry/testutils/requests.py +++ b/src/sentry/testutils/requests.py @@ -2,7 +2,7 @@ import functools from collections.abc import Callable -from typing import Optional +from typing import int, Optional from django.contrib.auth.models import AnonymousUser from django.core.cache import cache diff --git a/src/sentry/testutils/silo.py b/src/sentry/testutils/silo.py index 49d96572c09bbd..242e42e4f1f425 100644 --- a/src/sentry/testutils/silo.py +++ b/src/sentry/testutils/silo.py @@ -11,7 +11,7 @@ from collections.abc import Callable, Collection, Generator, Iterable, Mapping, MutableSet, Sequence from contextlib import contextmanager, nullcontext from dataclasses import dataclass -from typing import Any, Literal, cast, overload +from typing import Any, Literal, cast, overload, int from unittest import TestCase import pytest diff --git a/src/sentry/testutils/skips.py b/src/sentry/testutils/skips.py index 58c8a98857f995..37dd15d02ed194 100644 --- a/src/sentry/testutils/skips.py +++ b/src/sentry/testutils/skips.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import socket diff --git a/src/sentry/testutils/thread_leaks/_constants.py b/src/sentry/testutils/thread_leaks/_constants.py index 164532f6c74bec..91e0292eae0fcb 100644 --- a/src/sentry/testutils/thread_leaks/_constants.py +++ b/src/sentry/testutils/thread_leaks/_constants.py @@ -1,3 +1,4 @@ +from typing import int """Shared constants for thread leak detection.""" import os diff --git a/src/sentry/testutils/thread_leaks/_threading.py b/src/sentry/testutils/thread_leaks/_threading.py index 22870cafe93784..a042f30c47b972 100644 --- a/src/sentry/testutils/thread_leaks/_threading.py +++ b/src/sentry/testutils/thread_leaks/_threading.py @@ -1,3 +1,4 @@ +from typing import int """Utility functions for thread operations.""" from threading import Thread diff --git a/src/sentry/testutils/thread_leaks/assertion.py b/src/sentry/testutils/thread_leaks/assertion.py index fc393253aa0827..0a6deb205204f8 100644 --- a/src/sentry/testutils/thread_leaks/assertion.py +++ b/src/sentry/testutils/thread_leaks/assertion.py @@ -12,7 +12,7 @@ from contextlib import contextmanager from threading import Thread from traceback import StackSummary -from typing import Any +from typing import int, Any from unittest import mock from ._constants import CWD diff --git a/src/sentry/testutils/thread_leaks/diff.py b/src/sentry/testutils/thread_leaks/diff.py index 93340758fd92a7..7f40d81cfafe70 100644 --- a/src/sentry/testutils/thread_leaks/diff.py +++ b/src/sentry/testutils/thread_leaks/diff.py @@ -1,3 +1,4 @@ +from typing import int """Generate readable diffs showing thread creation locations for debugging leaks.""" import sys diff --git a/src/sentry/testutils/thread_leaks/pytest.py b/src/sentry/testutils/thread_leaks/pytest.py index 2616d1ea274d8b..63768ae4e72ca2 100644 --- a/src/sentry/testutils/thread_leaks/pytest.py +++ b/src/sentry/testutils/thread_leaks/pytest.py @@ -3,7 +3,7 @@ from collections.abc import Generator from os import environ from threading import Thread -from typing import Any +from typing import int, Any import pytest diff --git a/src/sentry/testutils/thread_leaks/sentry.py b/src/sentry/testutils/thread_leaks/sentry.py index d22231ca2e9041..4d6aa4e0c51ef4 100644 --- a/src/sentry/testutils/thread_leaks/sentry.py +++ b/src/sentry/testutils/thread_leaks/sentry.py @@ -6,7 +6,7 @@ from collections.abc import Iterable from threading import Thread from traceback import FrameSummary -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int import pytest import sentry_sdk.scope diff --git a/src/sentry/toolbar/utils/url.py b/src/sentry/toolbar/utils/url.py index abd27de0227fbf..d06f8259752c4a 100644 --- a/src/sentry/toolbar/utils/url.py +++ b/src/sentry/toolbar/utils/url.py @@ -1,3 +1,4 @@ +from typing import int import re from urllib.parse import ParseResult, urlparse diff --git a/src/sentry/toolbar/views/iframe_view.py b/src/sentry/toolbar/views/iframe_view.py index f12366921f301d..7d1b1bdfe04f28 100644 --- a/src/sentry/toolbar/views/iframe_view.py +++ b/src/sentry/toolbar/views/iframe_view.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.http import HttpRequest, HttpResponse from django.http.response import HttpResponseBase diff --git a/src/sentry/toolbar/views/login_success_view.py b/src/sentry/toolbar/views/login_success_view.py index c4d4c256017796..20fbe3eb08722f 100644 --- a/src/sentry/toolbar/views/login_success_view.py +++ b/src/sentry/toolbar/views/login_success_view.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.http import HttpRequest diff --git a/src/sentry/tsdb/__init__.py b/src/sentry/tsdb/__init__.py index 847cf864aa0f7a..e8c3b694653394 100644 --- a/src/sentry/tsdb/__init__.py +++ b/src/sentry/tsdb/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.utils.services import LazyServiceWrapper diff --git a/src/sentry/tsdb/base.py b/src/sentry/tsdb/base.py index 93d69f4e5f73b4..686710fd5fb8a9 100644 --- a/src/sentry/tsdb/base.py +++ b/src/sentry/tsdb/base.py @@ -1,7 +1,7 @@ from collections.abc import Iterable, Mapping, Sequence from datetime import datetime, timedelta from enum import Enum -from typing import Any, TypedDict, TypeVar +from typing import Any, TypedDict, TypeVar, int from django.conf import settings from django.utils import timezone diff --git a/src/sentry/tsdb/dummy.py b/src/sentry/tsdb/dummy.py index a26c74fded0028..1bb843721a8ff8 100644 --- a/src/sentry/tsdb/dummy.py +++ b/src/sentry/tsdb/dummy.py @@ -2,7 +2,7 @@ from collections.abc import Iterable, Mapping, Sequence from datetime import datetime -from typing import Any +from typing import int, Any from sentry.tsdb.base import BaseTSDB, TSDBItem, TSDBKey, TSDBModel diff --git a/src/sentry/tsdb/redis.py b/src/sentry/tsdb/redis.py index a7f4b86ab63466..63830d83d14244 100644 --- a/src/sentry/tsdb/redis.py +++ b/src/sentry/tsdb/redis.py @@ -6,7 +6,7 @@ from collections.abc import Callable, Iterable, Mapping, Sequence from datetime import datetime from hashlib import md5 -from typing import Any, ContextManager, Generic, TypeVar +from typing import Any, ContextManager, Generic, TypeVar, int import rb from django.utils import timezone diff --git a/src/sentry/tsdb/redissnuba.py b/src/sentry/tsdb/redissnuba.py index 1b61f1419858a2..ab37c5cbda23af 100644 --- a/src/sentry/tsdb/redissnuba.py +++ b/src/sentry/tsdb/redissnuba.py @@ -1,3 +1,4 @@ +from typing import int import inspect import time diff --git a/src/sentry/tsdb/snuba.py b/src/sentry/tsdb/snuba.py index cfa0e6c49e6c69..7e10fc90b596db 100644 --- a/src/sentry/tsdb/snuba.py +++ b/src/sentry/tsdb/snuba.py @@ -6,7 +6,7 @@ from collections.abc import Mapping, Sequence, Set from copy import deepcopy from datetime import datetime -from typing import Any +from typing import int, Any from snuba_sdk import ( Column, diff --git a/src/sentry/types/__init__.py b/src/sentry/types/__init__.py index 681a40afc7eee0..ec806df2ab263d 100644 --- a/src/sentry/types/__init__.py +++ b/src/sentry/types/__init__.py @@ -1,3 +1,4 @@ +from typing import int """ Types Directory - a place to keep types and enums. diff --git a/src/sentry/types/activity.py b/src/sentry/types/activity.py index 1dd4a3c2373ad7..5c31895c5a4759 100644 --- a/src/sentry/types/activity.py +++ b/src/sentry/types/activity.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum diff --git a/src/sentry/types/actor.py b/src/sentry/types/actor.py index 80ae20f22c853a..2b52d2f9225e24 100644 --- a/src/sentry/types/actor.py +++ b/src/sentry/types/actor.py @@ -1,7 +1,7 @@ from collections import defaultdict from collections.abc import Iterable, MutableMapping, Sequence from enum import Enum -from typing import TYPE_CHECKING, Any, Protocol, Union, overload +from typing import TYPE_CHECKING, Any, Protocol, Union, overload, int from django.core.exceptions import ObjectDoesNotExist from rest_framework import serializers diff --git a/src/sentry/types/condition_activity.py b/src/sentry/types/condition_activity.py index 3246bad95d9df7..bfdd9f7c07418b 100644 --- a/src/sentry/types/condition_activity.py +++ b/src/sentry/types/condition_activity.py @@ -3,7 +3,7 @@ from dataclasses import dataclass, field from datetime import datetime, timedelta from enum import Enum -from typing import Any +from typing import int, Any FREQUENCY_CONDITION_BUCKET_SIZE = timedelta(minutes=5) diff --git a/src/sentry/types/group.py b/src/sentry/types/group.py index 5893e9f85a5d1e..b5b464cb174b2e 100644 --- a/src/sentry/types/group.py +++ b/src/sentry/types/group.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping from enum import IntEnum diff --git a/src/sentry/types/grouphash_metadata.py b/src/sentry/types/grouphash_metadata.py index fe40c32acf4ab8..0b30044e2fc665 100644 --- a/src/sentry/types/grouphash_metadata.py +++ b/src/sentry/types/grouphash_metadata.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import NotRequired, TypedDict, TypeIs +from typing import NotRequired, TypedDict, TypeIs, int # NOTE: The structure in these metadata types is intentionaly flat, to make it easier to query in # Redash or BigQuery, and they are all merged into a single flat JSON blob (which is then stored in diff --git a/src/sentry/types/ratelimit.py b/src/sentry/types/ratelimit.py index 360bd4228ba265..90ec4b7340b4b1 100644 --- a/src/sentry/types/ratelimit.py +++ b/src/sentry/types/ratelimit.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from dataclasses import dataclass, field from enum import Enum diff --git a/src/sentry/types/region.py b/src/sentry/types/region.py index 0a52709cfabac3..3c57673a8300c8 100644 --- a/src/sentry/types/region.py +++ b/src/sentry/types/region.py @@ -2,7 +2,7 @@ from collections.abc import Collection, Iterable from enum import Enum -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from urllib.parse import urljoin import sentry_sdk diff --git a/src/sentry/types/releaseactivity.py b/src/sentry/types/releaseactivity.py index 21bf46649c0d5f..3e30b1664835c2 100644 --- a/src/sentry/types/releaseactivity.py +++ b/src/sentry/types/releaseactivity.py @@ -1,3 +1,4 @@ +from typing import int from enum import Enum diff --git a/src/sentry/types/request.py b/src/sentry/types/request.py index 3b27c9095a9937..5af997ed47eb1a 100644 --- a/src/sentry/types/request.py +++ b/src/sentry/types/request.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.http.request import HttpRequest from rest_framework.request import Request diff --git a/src/sentry/types/rules.py b/src/sentry/types/rules.py index b8999ff3b2ec7d..26078c93eee32d 100644 --- a/src/sentry/types/rules.py +++ b/src/sentry/types/rules.py @@ -1,3 +1,4 @@ +from typing import int from collections import namedtuple from dataclasses import dataclass diff --git a/src/sentry/types/token.py b/src/sentry/types/token.py index bc9968f282a6c2..3999c0a581b290 100644 --- a/src/sentry/types/token.py +++ b/src/sentry/types/token.py @@ -1,3 +1,4 @@ +from typing import int import enum diff --git a/src/sentry/unmerge.py b/src/sentry/unmerge.py index 9a0eb91f09c7d4..4e1e2769b693c4 100644 --- a/src/sentry/unmerge.py +++ b/src/sentry/unmerge.py @@ -2,7 +2,7 @@ import dataclasses from collections.abc import Collection, Mapping, Sequence from dataclasses import dataclass -from typing import Any, Union +from typing import Any, Union, int from sentry import eventstream from sentry.models.grouphash import GroupHash diff --git a/src/sentry/uptime/apps.py b/src/sentry/uptime/apps.py index 3abce2eb9c7d11..853a30b48afeb2 100644 --- a/src/sentry/uptime/apps.py +++ b/src/sentry/uptime/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/uptime/autodetect/detector.py b/src/sentry/uptime/autodetect/detector.py index 106c060ce28b64..ac3aeb67e78692 100644 --- a/src/sentry/uptime/autodetect/detector.py +++ b/src/sentry/uptime/autodetect/detector.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry import options from sentry.uptime.autodetect.ranking import ( diff --git a/src/sentry/uptime/autodetect/notifications.py b/src/sentry/uptime/autodetect/notifications.py index 219e00dca54501..cdd91f18b331a9 100644 --- a/src/sentry/uptime/autodetect/notifications.py +++ b/src/sentry/uptime/autodetect/notifications.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/uptime/autodetect/ranking.py b/src/sentry/uptime/autodetect/ranking.py index 0ba7466439231c..2982f5701253d4 100644 --- a/src/sentry/uptime/autodetect/ranking.py +++ b/src/sentry/uptime/autodetect/ranking.py @@ -2,7 +2,7 @@ import random from datetime import datetime, timedelta -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.constants import UPTIME_AUTODETECTION from sentry.uptime.models import get_active_auto_monitor_count_for_org diff --git a/src/sentry/uptime/autodetect/result_handler.py b/src/sentry/uptime/autodetect/result_handler.py index 736af143927beb..9345a24bbb01c6 100644 --- a/src/sentry/uptime/autodetect/result_handler.py +++ b/src/sentry/uptime/autodetect/result_handler.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from datetime import datetime, timedelta, timezone diff --git a/src/sentry/uptime/autodetect/tasks.py b/src/sentry/uptime/autodetect/tasks.py index d2f4038d8d01ed..ad8f64c364f628 100644 --- a/src/sentry/uptime/autodetect/tasks.py +++ b/src/sentry/uptime/autodetect/tasks.py @@ -1,3 +1,4 @@ +from typing import int import datetime import logging from datetime import timedelta diff --git a/src/sentry/uptime/autodetect/url_extraction.py b/src/sentry/uptime/autodetect/url_extraction.py index ec6705c69186f9..d1a3e5c0a480dc 100644 --- a/src/sentry/uptime/autodetect/url_extraction.py +++ b/src/sentry/uptime/autodetect/url_extraction.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from urllib.parse import urlsplit from django.core.exceptions import ValidationError diff --git a/src/sentry/uptime/config_producer.py b/src/sentry/uptime/config_producer.py index 3b64657fe739fb..1ae83cf95909e8 100644 --- a/src/sentry/uptime/config_producer.py +++ b/src/sentry/uptime/config_producer.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from uuid import UUID diff --git a/src/sentry/uptime/config_schema.py b/src/sentry/uptime/config_schema.py index 5bf0887f5646ae..dc6448a123e941 100644 --- a/src/sentry/uptime/config_schema.py +++ b/src/sentry/uptime/config_schema.py @@ -1,3 +1,4 @@ +from typing import int CHECK_CONFIG_SCHEMA = { "$schema": "http://json-schema.org/draft-07/schema#", "title": "uptime_config", diff --git a/src/sentry/uptime/consumers/eap_converter.py b/src/sentry/uptime/consumers/eap_converter.py index b6ac099adc53ea..c6c586607af62e 100644 --- a/src/sentry/uptime/consumers/eap_converter.py +++ b/src/sentry/uptime/consumers/eap_converter.py @@ -1,3 +1,4 @@ +from typing import int """ Converts uptime results to EAP TraceItem format. diff --git a/src/sentry/uptime/consumers/eap_producer.py b/src/sentry/uptime/consumers/eap_producer.py index f63341a6d73858..d4f7e12fbea904 100644 --- a/src/sentry/uptime/consumers/eap_producer.py +++ b/src/sentry/uptime/consumers/eap_producer.py @@ -1,3 +1,4 @@ +from typing import int import logging from arroyo import Topic as ArroyoTopic diff --git a/src/sentry/uptime/consumers/results_consumer.py b/src/sentry/uptime/consumers/results_consumer.py index 48da1408c5fb08..bdf85ce7741993 100644 --- a/src/sentry/uptime/consumers/results_consumer.py +++ b/src/sentry/uptime/consumers/results_consumer.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import random diff --git a/src/sentry/uptime/eap_utils.py b/src/sentry/uptime/eap_utils.py index b028542471c127..ddd091d7a1e8cf 100644 --- a/src/sentry/uptime/eap_utils.py +++ b/src/sentry/uptime/eap_utils.py @@ -1,3 +1,4 @@ +from typing import int from sentry_protos.snuba.v1.endpoint_trace_item_table_pb2 import Column from sentry_protos.snuba.v1.request_common_pb2 import TraceItemType diff --git a/src/sentry/uptime/endpoints/bases.py b/src/sentry/uptime/endpoints/bases.py index a425f3a63138bb..3e3377bcf340ef 100644 --- a/src/sentry/uptime/endpoints/bases.py +++ b/src/sentry/uptime/endpoints/bases.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from sentry.api.api_owners import ApiOwner diff --git a/src/sentry/uptime/endpoints/organiation_uptime_alert_index.py b/src/sentry/uptime/endpoints/organiation_uptime_alert_index.py index 1682a31f903c36..fd6f0366f55062 100644 --- a/src/sentry/uptime/endpoints/organiation_uptime_alert_index.py +++ b/src/sentry/uptime/endpoints/organiation_uptime_alert_index.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Q from django.db.models.fields import BigIntegerField, CharField from django.db.models.functions import Cast diff --git a/src/sentry/uptime/endpoints/organization_uptime_alert_index_count.py b/src/sentry/uptime/endpoints/organization_uptime_alert_index_count.py index 5e497a1d0edeaa..6a0f9286ef826a 100644 --- a/src/sentry/uptime/endpoints/organization_uptime_alert_index_count.py +++ b/src/sentry/uptime/endpoints/organization_uptime_alert_index_count.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.response import Response diff --git a/src/sentry/uptime/endpoints/organization_uptime_stats.py b/src/sentry/uptime/endpoints/organization_uptime_stats.py index 6dcbdf65a1aa68..0efd97cdba4967 100644 --- a/src/sentry/uptime/endpoints/organization_uptime_stats.py +++ b/src/sentry/uptime/endpoints/organization_uptime_stats.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections import defaultdict diff --git a/src/sentry/uptime/endpoints/organization_uptime_summary.py b/src/sentry/uptime/endpoints/organization_uptime_summary.py index 4b30dadecbcfe1..6c6f193f791b94 100644 --- a/src/sentry/uptime/endpoints/organization_uptime_summary.py +++ b/src/sentry/uptime/endpoints/organization_uptime_summary.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import datetime diff --git a/src/sentry/uptime/endpoints/project_uptime_alert_checks_index.py b/src/sentry/uptime/endpoints/project_uptime_alert_checks_index.py index 5bcf63c311b136..12d144d5f3514a 100644 --- a/src/sentry/uptime/endpoints/project_uptime_alert_checks_index.py +++ b/src/sentry/uptime/endpoints/project_uptime_alert_checks_index.py @@ -1,7 +1,7 @@ import logging import uuid from datetime import datetime -from typing import Any, cast +from typing import Any, cast, int from google.protobuf.timestamp_pb2 import Timestamp from rest_framework.request import Request diff --git a/src/sentry/uptime/endpoints/project_uptime_alert_details.py b/src/sentry/uptime/endpoints/project_uptime_alert_details.py index c0afcb97e10b02..82dd18324c731f 100644 --- a/src/sentry/uptime/endpoints/project_uptime_alert_details.py +++ b/src/sentry/uptime/endpoints/project_uptime_alert_details.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/uptime/endpoints/project_uptime_alert_index.py b/src/sentry/uptime/endpoints/project_uptime_alert_index.py index 722fac87bb6f8e..e1a28a3470c03b 100644 --- a/src/sentry/uptime/endpoints/project_uptime_alert_index.py +++ b/src/sentry/uptime/endpoints/project_uptime_alert_index.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/uptime/endpoints/serializers.py b/src/sentry/uptime/endpoints/serializers.py index 5a7b8793726643..53d451e657d9a9 100644 --- a/src/sentry/uptime/endpoints/serializers.py +++ b/src/sentry/uptime/endpoints/serializers.py @@ -1,5 +1,5 @@ from collections.abc import MutableMapping, Sequence -from typing import Any, Literal, TypedDict, cast, override +from typing import Any, Literal, TypedDict, cast, override, int from sentry_kafka_schemas.schema_types.snuba_uptime_results_v1 import ( CheckStatus, diff --git a/src/sentry/uptime/endpoints/uptime_ips.py b/src/sentry/uptime/endpoints/uptime_ips.py index ad3ddbe5b12acc..507ad1f07d68ee 100644 --- a/src/sentry/uptime/endpoints/uptime_ips.py +++ b/src/sentry/uptime/endpoints/uptime_ips.py @@ -1,3 +1,4 @@ +from typing import int from django.http.response import HttpResponse from rest_framework.request import Request diff --git a/src/sentry/uptime/endpoints/utils.py b/src/sentry/uptime/endpoints/utils.py index f1a5d8b02e1252..2be66b7c2ab9fc 100644 --- a/src/sentry/uptime/endpoints/utils.py +++ b/src/sentry/uptime/endpoints/utils.py @@ -1,3 +1,4 @@ +from typing import int import uuid from sentry.constants import ObjectStatus diff --git a/src/sentry/uptime/endpoints/validators.py b/src/sentry/uptime/endpoints/validators.py index 2a0dabd996d6cb..32d0fcfa45010b 100644 --- a/src/sentry/uptime/endpoints/validators.py +++ b/src/sentry/uptime/endpoints/validators.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import Any, override +from typing import Any, override, int import jsonschema from django.db import router diff --git a/src/sentry/uptime/grouptype.py b/src/sentry/uptime/grouptype.py index ec9528e957fba2..0d5d7bfbb9ef1e 100644 --- a/src/sentry/uptime/grouptype.py +++ b/src/sentry/uptime/grouptype.py @@ -3,7 +3,7 @@ import logging from dataclasses import dataclass from datetime import datetime -from typing import override +from typing import int, override from sentry_kafka_schemas.schema_types.uptime_results_v1 import CheckResult, CheckStatus diff --git a/src/sentry/uptime/migrations/0001_squashed_0042_extra_uptime_indexes.py b/src/sentry/uptime/migrations/0001_squashed_0042_extra_uptime_indexes.py index f572d21b7d87b1..d4180e9db18a9c 100644 --- a/src/sentry/uptime/migrations/0001_squashed_0042_extra_uptime_indexes.py +++ b/src/sentry/uptime/migrations/0001_squashed_0042_extra_uptime_indexes.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 16:30 +from typing import int import django.db.models.deletion import django.db.models.functions.datetime import django.utils.timezone diff --git a/src/sentry/uptime/migrations/0043_uptime_django_json_field.py b/src/sentry/uptime/migrations/0043_uptime_django_json_field.py index c934359e9f0f40..ed22077e6a1170 100644 --- a/src/sentry/uptime/migrations/0043_uptime_django_json_field.py +++ b/src/sentry/uptime/migrations/0043_uptime_django_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-06 16:59 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/uptime/migrations/0044_remove_project_uptime_subscription.py b/src/sentry/uptime/migrations/0044_remove_project_uptime_subscription.py index bf8af845fba95b..505bc87a9dbd01 100644 --- a/src/sentry/uptime/migrations/0044_remove_project_uptime_subscription.py +++ b/src/sentry/uptime/migrations/0044_remove_project_uptime_subscription.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-12 23:27 +from typing import int from django.db.migrations import AlterField from django.db.models import deletion diff --git a/src/sentry/uptime/migrations/0045_backfill_detector_thresholds.py b/src/sentry/uptime/migrations/0045_backfill_detector_thresholds.py index 63b4c3f7ca374b..76b0b1e6247949 100644 --- a/src/sentry/uptime/migrations/0045_backfill_detector_thresholds.py +++ b/src/sentry/uptime/migrations/0045_backfill_detector_thresholds.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-17 17:50 +from typing import int from django.db import migrations from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/src/sentry/uptime/migrations/0046_delete_project_uptime_subscription_table.py b/src/sentry/uptime/migrations/0046_delete_project_uptime_subscription_table.py index a078374042243e..6f4d717386551c 100644 --- a/src/sentry/uptime/migrations/0046_delete_project_uptime_subscription_table.py +++ b/src/sentry/uptime/migrations/0046_delete_project_uptime_subscription_table.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-22 19:44 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/uptime/migrations/0047_remove_uptime_status_columns.py b/src/sentry/uptime/migrations/0047_remove_uptime_status_columns.py index 26b51b9109b140..a2e0b22c21f545 100644 --- a/src/sentry/uptime/migrations/0047_remove_uptime_status_columns.py +++ b/src/sentry/uptime/migrations/0047_remove_uptime_status_columns.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-10-08 16:26 +from typing import int from django.db import migrations from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/uptime/migrations/0048_delete_uptime_status_columns.py b/src/sentry/uptime/migrations/0048_delete_uptime_status_columns.py index be8f9350c61e8d..993950aaebf8c7 100644 --- a/src/sentry/uptime/migrations/0048_delete_uptime_status_columns.py +++ b/src/sentry/uptime/migrations/0048_delete_uptime_status_columns.py @@ -1,6 +1,7 @@ # Generated by Django 5.2.1 on 2025-10-22 18:59 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.fields import SafeRemoveField from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/uptime/models.py b/src/sentry/uptime/models.py index 94084292380bdc..3b6d0d29672f6d 100644 --- a/src/sentry/uptime/models.py +++ b/src/sentry/uptime/models.py @@ -1,7 +1,7 @@ import enum import logging from datetime import timedelta -from typing import ClassVar, Literal, Self, cast, override +from typing import ClassVar, Literal, Self, cast, override, int from django.db import models from django.db.models import Count diff --git a/src/sentry/uptime/rdap/query.py b/src/sentry/uptime/rdap/query.py index 070438e452d233..5377883ed37673 100644 --- a/src/sentry/uptime/rdap/query.py +++ b/src/sentry/uptime/rdap/query.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping, MutableMapping, Sequence from socket import gethostbyname -from typing import Any, TypedDict +from typing import Any, TypedDict, int import requests from django.core.cache import cache diff --git a/src/sentry/uptime/rdap/tasks.py b/src/sentry/uptime/rdap/tasks.py index 359fa4d0423ad9..a13e884bbb1875 100644 --- a/src/sentry/uptime/rdap/tasks.py +++ b/src/sentry/uptime/rdap/tasks.py @@ -1,3 +1,4 @@ +from typing import int import logging from urllib.parse import urlparse diff --git a/src/sentry/uptime/subscriptions/regions.py b/src/sentry/uptime/subscriptions/regions.py index 08746d1d5cfa7e..084a576a3648f4 100644 --- a/src/sentry/uptime/subscriptions/regions.py +++ b/src/sentry/uptime/subscriptions/regions.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import dataclasses from collections.abc import Mapping, Sequence diff --git a/src/sentry/uptime/subscriptions/subscriptions.py b/src/sentry/uptime/subscriptions/subscriptions.py index 99ba87ad060da4..3b627f0a5a93e2 100644 --- a/src/sentry/uptime/subscriptions/subscriptions.py +++ b/src/sentry/uptime/subscriptions/subscriptions.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Sequence diff --git a/src/sentry/uptime/subscriptions/tasks.py b/src/sentry/uptime/subscriptions/tasks.py index 4103c4836868c8..791b93d756b452 100644 --- a/src/sentry/uptime/subscriptions/tasks.py +++ b/src/sentry/uptime/subscriptions/tasks.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from datetime import timedelta diff --git a/src/sentry/uptime/types.py b/src/sentry/uptime/types.py index 4ae50f35104715..ece38d597925ae 100644 --- a/src/sentry/uptime/types.py +++ b/src/sentry/uptime/types.py @@ -3,7 +3,7 @@ from dataclasses import dataclass from datetime import datetime from enum import IntEnum -from typing import Literal, Required, TypedDict +from typing import Literal, Required, TypedDict, int from sentry_kafka_schemas.schema_types.uptime_results_v1 import CheckStatus, CheckStatusReasonType diff --git a/src/sentry/uptime/utils.py b/src/sentry/uptime/utils.py index 1e06291c73ec98..b495e46c6c4f45 100644 --- a/src/sentry/uptime/utils.py +++ b/src/sentry/uptime/utils.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from redis.client import StrictRedis from rediscluster import RedisCluster diff --git a/src/sentry/usage_accountant/__init__.py b/src/sentry/usage_accountant/__init__.py index 9de092d7787fbd..e2c5254f2ef2b9 100644 --- a/src/sentry/usage_accountant/__init__.py +++ b/src/sentry/usage_accountant/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.usage_accountant.accountant import record # NOQA __all__ = ["record"] diff --git a/src/sentry/usage_accountant/accountant.py b/src/sentry/usage_accountant/accountant.py index 56123b5f00ad00..3e68b09b41b4cd 100644 --- a/src/sentry/usage_accountant/accountant.py +++ b/src/sentry/usage_accountant/accountant.py @@ -1,3 +1,4 @@ +from typing import int """ This module is meant to manage the lifecycle of the UsageAccumulator to record shared resource usage amount. diff --git a/src/sentry/users/api/bases/user.py b/src/sentry/users/api/bases/user.py index 1536ef010daef9..6eca47e97db115 100644 --- a/src/sentry/users/api/bases/user.py +++ b/src/sentry/users/api/bases/user.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.contrib.auth.models import AnonymousUser from rest_framework.permissions import BasePermission diff --git a/src/sentry/users/api/endpoints/authenticator_index.py b/src/sentry/users/api/endpoints/authenticator_index.py index cb227d7ef6b94a..d3f127b734e43a 100644 --- a/src/sentry/users/api/endpoints/authenticator_index.py +++ b/src/sentry/users/api/endpoints/authenticator_index.py @@ -1,3 +1,4 @@ +from typing import int from base64 import b64encode from rest_framework.permissions import IsAuthenticated # noqa S012 diff --git a/src/sentry/users/api/endpoints/user_authenticator_details.py b/src/sentry/users/api/endpoints/user_authenticator_details.py index 731ce1a8118026..08b6f9daada107 100644 --- a/src/sentry/users/api/endpoints/user_authenticator_details.py +++ b/src/sentry/users/api/endpoints/user_authenticator_details.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db import router, transaction from fido2.ctap2 import AuthenticatorData diff --git a/src/sentry/users/api/endpoints/user_authenticator_enroll.py b/src/sentry/users/api/endpoints/user_authenticator_enroll.py index f6f65c56ccd8d5..08baeaae0042b8 100644 --- a/src/sentry/users/api/endpoints/user_authenticator_enroll.py +++ b/src/sentry/users/api/endpoints/user_authenticator_enroll.py @@ -1,6 +1,6 @@ import logging from base64 import b64encode -from typing import Any +from typing import int, Any import petname from django.http import HttpResponse diff --git a/src/sentry/users/api/endpoints/user_authenticator_index.py b/src/sentry/users/api/endpoints/user_authenticator_index.py index 0e254f38b138ed..8bde3aafb9f163 100644 --- a/src/sentry/users/api/endpoints/user_authenticator_index.py +++ b/src/sentry/users/api/endpoints/user_authenticator_index.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/users/api/endpoints/user_avatar.py b/src/sentry/users/api/endpoints/user_avatar.py index 53d2eddf50636a..38158075498e06 100644 --- a/src/sentry/users/api/endpoints/user_avatar.py +++ b/src/sentry/users/api/endpoints/user_avatar.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from rest_framework import status from rest_framework.request import Request diff --git a/src/sentry/users/api/endpoints/user_details.py b/src/sentry/users/api/endpoints/user_details.py index 0f31908de9d33e..bbae64db82a96a 100644 --- a/src/sentry/users/api/endpoints/user_details.py +++ b/src/sentry/users/api/endpoints/user_details.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from django.conf import settings from django.contrib.auth import logout diff --git a/src/sentry/users/api/endpoints/user_emails.py b/src/sentry/users/api/endpoints/user_emails.py index 3267acee45af6f..b67cff9250079f 100644 --- a/src/sentry/users/api/endpoints/user_emails.py +++ b/src/sentry/users/api/endpoints/user_emails.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db import IntegrityError, router, transaction diff --git a/src/sentry/users/api/endpoints/user_emails_confirm.py b/src/sentry/users/api/endpoints/user_emails_confirm.py index 6ef154c5dab3f2..c907f87caf93e0 100644 --- a/src/sentry/users/api/endpoints/user_emails_confirm.py +++ b/src/sentry/users/api/endpoints/user_emails_confirm.py @@ -1,3 +1,4 @@ +from typing import int import logging from rest_framework import serializers, status diff --git a/src/sentry/users/api/endpoints/user_identity.py b/src/sentry/users/api/endpoints/user_identity.py index 0e9a44abebc89a..bdffaf3555c519 100644 --- a/src/sentry/users/api/endpoints/user_identity.py +++ b/src/sentry/users/api/endpoints/user_identity.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/users/api/endpoints/user_identity_config.py b/src/sentry/users/api/endpoints/user_identity_config.py index 8ed231d9205e9d..3597190177c3c7 100644 --- a/src/sentry/users/api/endpoints/user_identity_config.py +++ b/src/sentry/users/api/endpoints/user_identity_config.py @@ -1,3 +1,4 @@ +from typing import int import itertools from collections.abc import Iterable diff --git a/src/sentry/users/api/endpoints/user_identity_details.py b/src/sentry/users/api/endpoints/user_identity_details.py index 838c5157d752c6..e964cf68440847 100644 --- a/src/sentry/users/api/endpoints/user_identity_details.py +++ b/src/sentry/users/api/endpoints/user_identity_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/users/api/endpoints/user_index.py b/src/sentry/users/api/endpoints/user_index.py index bd6c03bbe3e000..53b3d48d749723 100644 --- a/src/sentry/users/api/endpoints/user_index.py +++ b/src/sentry/users/api/endpoints/user_index.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Q from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/users/api/endpoints/user_ips.py b/src/sentry/users/api/endpoints/user_ips.py index ada92d09e2355d..1c9c58df34adc8 100644 --- a/src/sentry/users/api/endpoints/user_ips.py +++ b/src/sentry/users/api/endpoints/user_ips.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/users/api/endpoints/user_password.py b/src/sentry/users/api/endpoints/user_password.py index d1a262782fd5bc..4bd1547344c088 100644 --- a/src/sentry/users/api/endpoints/user_password.py +++ b/src/sentry/users/api/endpoints/user_password.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.utils.crypto import constant_time_compare from rest_framework import serializers, status diff --git a/src/sentry/users/api/endpoints/user_permission_details.py b/src/sentry/users/api/endpoints/user_permission_details.py index beb55d042d718c..a7d0c70d2a6a84 100644 --- a/src/sentry/users/api/endpoints/user_permission_details.py +++ b/src/sentry/users/api/endpoints/user_permission_details.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.conf import settings diff --git a/src/sentry/users/api/endpoints/user_permissions.py b/src/sentry/users/api/endpoints/user_permissions.py index 7ed1142daf0c3b..c08116f324c491 100644 --- a/src/sentry/users/api/endpoints/user_permissions.py +++ b/src/sentry/users/api/endpoints/user_permissions.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/users/api/endpoints/user_permissions_config.py b/src/sentry/users/api/endpoints/user_permissions_config.py index e15190352671ee..aae76782c4054a 100644 --- a/src/sentry/users/api/endpoints/user_permissions_config.py +++ b/src/sentry/users/api/endpoints/user_permissions_config.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/users/api/endpoints/user_regions.py b/src/sentry/users/api/endpoints/user_regions.py index 54a4fe6c200493..0c5aef6cf909ee 100644 --- a/src/sentry/users/api/endpoints/user_regions.py +++ b/src/sentry/users/api/endpoints/user_regions.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/users/api/endpoints/user_role_details.py b/src/sentry/users/api/endpoints/user_role_details.py index 928f1a2b95de03..26f8eb9268d52c 100644 --- a/src/sentry/users/api/endpoints/user_role_details.py +++ b/src/sentry/users/api/endpoints/user_role_details.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db import router, transaction diff --git a/src/sentry/users/api/endpoints/user_roles.py b/src/sentry/users/api/endpoints/user_roles.py index 82139274b0d8ba..3b7c6803d23f75 100644 --- a/src/sentry/users/api/endpoints/user_roles.py +++ b/src/sentry/users/api/endpoints/user_roles.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from rest_framework.response import Response diff --git a/src/sentry/users/api/endpoints/userroles_details.py b/src/sentry/users/api/endpoints/userroles_details.py index 39ff0f7125fb94..29efe6fcf419cd 100644 --- a/src/sentry/users/api/endpoints/userroles_details.py +++ b/src/sentry/users/api/endpoints/userroles_details.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db import IntegrityError, router, transaction diff --git a/src/sentry/users/api/endpoints/userroles_index.py b/src/sentry/users/api/endpoints/userroles_index.py index 6dcd8421fca023..c3bfa1aca7a4bd 100644 --- a/src/sentry/users/api/endpoints/userroles_index.py +++ b/src/sentry/users/api/endpoints/userroles_index.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db import IntegrityError, router, transaction diff --git a/src/sentry/users/api/parsers/email.py b/src/sentry/users/api/parsers/email.py index e24906deb665b7..d463681d96e1ec 100644 --- a/src/sentry/users/api/parsers/email.py +++ b/src/sentry/users/api/parsers/email.py @@ -1,3 +1,4 @@ +from typing import int from django.utils.translation import gettext_lazy as _ from rest_framework import serializers diff --git a/src/sentry/users/api/parsers/userrole.py b/src/sentry/users/api/parsers/userrole.py index 7b96e9319d42cb..624d30268575e9 100644 --- a/src/sentry/users/api/parsers/userrole.py +++ b/src/sentry/users/api/parsers/userrole.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from rest_framework import serializers diff --git a/src/sentry/users/api/serializers/authenticator.py b/src/sentry/users/api/serializers/authenticator.py index b402a539b6082e..8259f27b83e652 100644 --- a/src/sentry/users/api/serializers/authenticator.py +++ b/src/sentry/users/api/serializers/authenticator.py @@ -2,7 +2,7 @@ from collections.abc import Mapping from datetime import datetime -from typing import TYPE_CHECKING, Any, NotRequired, TypedDict, cast +from typing import TYPE_CHECKING, Any, NotRequired, TypedDict, cast, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/users/api/serializers/identity.py b/src/sentry/users/api/serializers/identity.py index 53b1137796364f..17e47808739c4a 100644 --- a/src/sentry/users/api/serializers/identity.py +++ b/src/sentry/users/api/serializers/identity.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/users/api/serializers/identityprovider.py b/src/sentry/users/api/serializers/identityprovider.py index 77c4164e00739c..bdcef19fc283af 100644 --- a/src/sentry/users/api/serializers/identityprovider.py +++ b/src/sentry/users/api/serializers/identityprovider.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/users/api/serializers/user.py b/src/sentry/users/api/serializers/user.py index 78e2f03240a13e..5af08f36a58108 100644 --- a/src/sentry/users/api/serializers/user.py +++ b/src/sentry/users/api/serializers/user.py @@ -6,7 +6,7 @@ from collections.abc import Mapping, MutableMapping, Sequence from datetime import datetime from enum import Enum -from typing import Any, DefaultDict, TypedDict, cast +from typing import Any, DefaultDict, TypedDict, cast, int from django.conf import settings from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/users/api/serializers/user_identity_config.py b/src/sentry/users/api/serializers/user_identity_config.py index 6d42d74f5815fd..d9d928b4ca7678 100644 --- a/src/sentry/users/api/serializers/user_identity_config.py +++ b/src/sentry/users/api/serializers/user_identity_config.py @@ -4,7 +4,7 @@ from dataclasses import dataclass from datetime import datetime from enum import Enum -from typing import TYPE_CHECKING, Any, Self, TypedDict, Union +from typing import TYPE_CHECKING, Any, Self, TypedDict, Union, int from django.contrib.auth.models import AnonymousUser from django.db.models.base import Model diff --git a/src/sentry/users/api/serializers/useremail.py b/src/sentry/users/api/serializers/useremail.py index e7f3a1d36b401c..aefedae03e15cc 100644 --- a/src/sentry/users/api/serializers/useremail.py +++ b/src/sentry/users/api/serializers/useremail.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/users/api/serializers/userip.py b/src/sentry/users/api/serializers/userip.py index 9871f1fdbf053f..3037a8812e1e0a 100644 --- a/src/sentry/users/api/serializers/userip.py +++ b/src/sentry/users/api/serializers/userip.py @@ -1,6 +1,6 @@ from collections.abc import Mapping from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/users/api/serializers/userrole.py b/src/sentry/users/api/serializers/userrole.py index 2e4f09d7a6a94e..65e53c82e2b6bc 100644 --- a/src/sentry/users/api/serializers/userrole.py +++ b/src/sentry/users/api/serializers/userrole.py @@ -1,6 +1,6 @@ from collections.abc import Mapping from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/users/models/__init__.py b/src/sentry/users/models/__init__.py index 03db9e11812b97..b174cecdf7a3c2 100644 --- a/src/sentry/users/models/__init__.py +++ b/src/sentry/users/models/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.users.models.authenticator import Authenticator from sentry.users.models.email import Email from sentry.users.models.identity import Identity diff --git a/src/sentry/users/models/authenticator.py b/src/sentry/users/models/authenticator.py index 3259739d0dfa84..de524d27c0388b 100644 --- a/src/sentry/users/models/authenticator.py +++ b/src/sentry/users/models/authenticator.py @@ -2,7 +2,7 @@ import base64 import copy -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django.db import models from django.db.backends.base.base import BaseDatabaseWrapper diff --git a/src/sentry/users/models/email.py b/src/sentry/users/models/email.py index 51ab802fe57167..2b3775ff32334c 100644 --- a/src/sentry/users/models/email.py +++ b/src/sentry/users/models/email.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import models from django.forms import model_to_dict diff --git a/src/sentry/users/models/identity.py b/src/sentry/users/models/identity.py index e5fb728b072554..66810221c74451 100644 --- a/src/sentry/users/models/identity.py +++ b/src/sentry/users/models/identity.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django.conf import settings from django.contrib.postgres.fields.array import ArrayField diff --git a/src/sentry/users/models/lostpasswordhash.py b/src/sentry/users/models/lostpasswordhash.py index 5d07da83c86f56..f2c5f9188b87be 100644 --- a/src/sentry/users/models/lostpasswordhash.py +++ b/src/sentry/users/models/lostpasswordhash.py @@ -2,7 +2,7 @@ from collections.abc import Iterable from datetime import timedelta -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from django.conf import settings from django.db import models diff --git a/src/sentry/users/models/user.py b/src/sentry/users/models/user.py index 482e7a4005374b..5315ecf29c4b73 100644 --- a/src/sentry/users/models/user.py +++ b/src/sentry/users/models/user.py @@ -4,7 +4,7 @@ import secrets from collections.abc import Mapping from string import ascii_letters, digits -from typing import Any, ClassVar +from typing import Any, ClassVar, int from django.contrib.auth.models import AbstractBaseUser from django.contrib.auth.models import UserManager as DjangoUserManager diff --git a/src/sentry/users/models/user_avatar.py b/src/sentry/users/models/user_avatar.py index db2e86e4faf621..0668a6a34e60e6 100644 --- a/src/sentry/users/models/user_avatar.py +++ b/src/sentry/users/models/user_avatar.py @@ -3,7 +3,7 @@ import contextlib from collections.abc import Generator from enum import IntEnum -from typing import Any, ClassVar, Self +from typing import Any, ClassVar, Self, int from django.db import models, router, transaction diff --git a/src/sentry/users/models/user_merge_verification_code.py b/src/sentry/users/models/user_merge_verification_code.py index 4147b978143402..fe65e70b96d5cf 100644 --- a/src/sentry/users/models/user_merge_verification_code.py +++ b/src/sentry/users/models/user_merge_verification_code.py @@ -1,3 +1,4 @@ +from typing import int import secrets from datetime import datetime, timedelta diff --git a/src/sentry/users/models/user_option.py b/src/sentry/users/models/user_option.py index 56e3a02134b763..69156d1a2e581f 100644 --- a/src/sentry/users/models/user_option.py +++ b/src/sentry/users/models/user_option.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django.conf import settings from django.db import models diff --git a/src/sentry/users/models/useremail.py b/src/sentry/users/models/useremail.py index c2eeda323cd127..f61fa05a122ca5 100644 --- a/src/sentry/users/models/useremail.py +++ b/src/sentry/users/models/useremail.py @@ -3,7 +3,7 @@ from collections import defaultdict from collections.abc import Iterable, Mapping from datetime import timedelta -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django.conf import settings from django.db import models diff --git a/src/sentry/users/models/userip.py b/src/sentry/users/models/userip.py index 5682e42a467862..8ced227c57e7e3 100644 --- a/src/sentry/users/models/userip.py +++ b/src/sentry/users/models/userip.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.conf import settings from django.core.cache import cache diff --git a/src/sentry/users/models/userpermission.py b/src/sentry/users/models/userpermission.py index 7e143ce95acddb..db8d97717e4e69 100644 --- a/src/sentry/users/models/userpermission.py +++ b/src/sentry/users/models/userpermission.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db import models diff --git a/src/sentry/users/models/userrole.py b/src/sentry/users/models/userrole.py index 9dd79ae570f446..b13ad50f7b22bf 100644 --- a/src/sentry/users/models/userrole.py +++ b/src/sentry/users/models/userrole.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.conf import settings from django.contrib.postgres.fields.array import ArrayField diff --git a/src/sentry/users/services/lost_password_hash/__init__.py b/src/sentry/users/services/lost_password_hash/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/users/services/lost_password_hash/__init__.py +++ b/src/sentry/users/services/lost_password_hash/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/users/services/lost_password_hash/impl.py b/src/sentry/users/services/lost_password_hash/impl.py index 2a72df3319f42e..a06e145bb3256f 100644 --- a/src/sentry/users/services/lost_password_hash/impl.py +++ b/src/sentry/users/services/lost_password_hash/impl.py @@ -1,3 +1,4 @@ +from typing import int import datetime from sentry.users.models.lostpasswordhash import LostPasswordHash diff --git a/src/sentry/users/services/lost_password_hash/model.py b/src/sentry/users/services/lost_password_hash/model.py index 53a6ef0a572ae5..8e4d6162bffb25 100644 --- a/src/sentry/users/services/lost_password_hash/model.py +++ b/src/sentry/users/services/lost_password_hash/model.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from datetime import datetime from django.utils import timezone diff --git a/src/sentry/users/services/lost_password_hash/serial.py b/src/sentry/users/services/lost_password_hash/serial.py index 4aa9bda39b1c91..0c123d2d723fa9 100644 --- a/src/sentry/users/services/lost_password_hash/serial.py +++ b/src/sentry/users/services/lost_password_hash/serial.py @@ -1,3 +1,4 @@ +from typing import int from sentry.users.models.lostpasswordhash import LostPasswordHash from sentry.users.services.lost_password_hash import RpcLostPasswordHash diff --git a/src/sentry/users/services/lost_password_hash/service.py b/src/sentry/users/services/lost_password_hash/service.py index 8de375fcf6121a..bb16e716a23ca5 100644 --- a/src/sentry/users/services/lost_password_hash/service.py +++ b/src/sentry/users/services/lost_password_hash/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from abc import abstractmethod from sentry.hybridcloud.rpc.service import RpcService, rpc_method diff --git a/src/sentry/users/services/user/__init__.py b/src/sentry/users/services/user/__init__.py index 94cd79c8a21b67..27e5539168f3bd 100644 --- a/src/sentry/users/services/user/__init__.py +++ b/src/sentry/users/services/user/__init__.py @@ -1 +1,2 @@ +from typing import int from .model import * # noqa diff --git a/src/sentry/users/services/user/impl.py b/src/sentry/users/services/user/impl.py index 3ffb87acdb256e..e889b84b4dc899 100644 --- a/src/sentry/users/services/user/impl.py +++ b/src/sentry/users/services/user/impl.py @@ -2,7 +2,7 @@ import logging from collections.abc import Callable, MutableMapping -from typing import Any +from typing import int, Any from uuid import uuid4 from django.db import router, transaction diff --git a/src/sentry/users/services/user/model.py b/src/sentry/users/services/user/model.py index 6c0705e37bfacb..bf9980fc2ed983 100644 --- a/src/sentry/users/services/user/model.py +++ b/src/sentry/users/services/user/model.py @@ -5,7 +5,7 @@ import datetime from enum import IntEnum -from typing import Any, TypedDict +from typing import Any, TypedDict, int from pydantic.fields import Field diff --git a/src/sentry/users/services/user/serial.py b/src/sentry/users/services/user/serial.py index bedfeef5db89c6..bd4107f5ac1da3 100644 --- a/src/sentry/users/services/user/serial.py +++ b/src/sentry/users/services/user/serial.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Iterable -from typing import Any +from typing import int, Any from django.utils.functional import LazyObject diff --git a/src/sentry/users/services/user/service.py b/src/sentry/users/services/user/service.py index b2aa4f35ce21fd..8907a63375f619 100644 --- a/src/sentry/users/services/user/service.py +++ b/src/sentry/users/services/user/service.py @@ -4,7 +4,7 @@ # defined, because we want to reflect on type annotations and avoid forward references. from abc import abstractmethod -from typing import Any +from typing import int, Any from sentry.auth.services.auth import AuthenticationContext from sentry.hybridcloud.rpc.caching import back_with_silo_cache, back_with_silo_cache_many diff --git a/src/sentry/users/services/user_option/__init__.py b/src/sentry/users/services/user_option/__init__.py index 2a9746c30ef42c..a4608eee5ace9e 100644 --- a/src/sentry/users/services/user_option/__init__.py +++ b/src/sentry/users/services/user_option/__init__.py @@ -1,2 +1,3 @@ +from typing import int from .model import * # noqa from .service import * # noqa diff --git a/src/sentry/users/services/user_option/impl.py b/src/sentry/users/services/user_option/impl.py index c4cf48d724ac93..334d9917a250e4 100644 --- a/src/sentry/users/services/user_option/impl.py +++ b/src/sentry/users/services/user_option/impl.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable -from typing import Any +from typing import int, Any from django.db.models import QuerySet diff --git a/src/sentry/users/services/user_option/model.py b/src/sentry/users/services/user_option/model.py index f3e92ec155b996..fab054a148ec0a 100644 --- a/src/sentry/users/services/user_option/model.py +++ b/src/sentry/users/services/user_option/model.py @@ -3,7 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. -from typing import Any, TypedDict +from typing import Any, TypedDict, int from sentry.hybridcloud.rpc import RpcModel diff --git a/src/sentry/users/services/user_option/service.py b/src/sentry/users/services/user_option/service.py index d7fca7b188529d..f1ba8d28141548 100644 --- a/src/sentry/users/services/user_option/service.py +++ b/src/sentry/users/services/user_option/service.py @@ -4,7 +4,7 @@ # defined, because we want to reflect on type annotations and avoid forward references. from abc import abstractmethod -from typing import Any +from typing import int, Any from sentry.auth.services.auth import AuthenticationContext from sentry.hybridcloud.rpc.filter_query import OpaqueSerializedResponse diff --git a/src/sentry/users/services/usersocialauth/impl.py b/src/sentry/users/services/usersocialauth/impl.py index f06bfe54d91555..5c8bd10cfb53b7 100644 --- a/src/sentry/users/services/usersocialauth/impl.py +++ b/src/sentry/users/services/usersocialauth/impl.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from collections.abc import Callable import sentry_sdk diff --git a/src/sentry/users/services/usersocialauth/model.py b/src/sentry/users/services/usersocialauth/model.py index c40e22ab362ce8..714960aa69b651 100644 --- a/src/sentry/users/services/usersocialauth/model.py +++ b/src/sentry/users/services/usersocialauth/model.py @@ -3,7 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. -from typing import Any, TypedDict +from typing import Any, TypedDict, int from sentry.hybridcloud.rpc import RpcModel from social_auth.backends import BaseAuth diff --git a/src/sentry/users/services/usersocialauth/serial.py b/src/sentry/users/services/usersocialauth/serial.py index fbf3c760d49e3f..1eecfaf2bf736e 100644 --- a/src/sentry/users/services/usersocialauth/serial.py +++ b/src/sentry/users/services/usersocialauth/serial.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.users.services.usersocialauth.model import RpcUserSocialAuth diff --git a/src/sentry/users/services/usersocialauth/service.py b/src/sentry/users/services/usersocialauth/service.py index 3ca7e7e13654d1..1677c29f0ca509 100644 --- a/src/sentry/users/services/usersocialauth/service.py +++ b/src/sentry/users/services/usersocialauth/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int from abc import abstractmethod from sentry.hybridcloud.rpc.service import RpcService, rpc_method diff --git a/src/sentry/users/web/account_identity.py b/src/sentry/users/web/account_identity.py index e8cd023ee599a4..03fa0294d58dca 100644 --- a/src/sentry/users/web/account_identity.py +++ b/src/sentry/users/web/account_identity.py @@ -1,3 +1,4 @@ +from typing import int from django.http.request import HttpRequest from django.http.response import HttpResponseBase from django.urls import reverse diff --git a/src/sentry/users/web/accounts.py b/src/sentry/users/web/accounts.py index 6773aaa1b35147..c69b6cab43eb03 100644 --- a/src/sentry/users/web/accounts.py +++ b/src/sentry/users/web/accounts.py @@ -1,3 +1,4 @@ +from typing import int import logging from functools import partial diff --git a/src/sentry/users/web/accounts_form.py b/src/sentry/users/web/accounts_form.py index 5d8433b292c7dc..5f4b809d07e8c0 100644 --- a/src/sentry/users/web/accounts_form.py +++ b/src/sentry/users/web/accounts_form.py @@ -1,7 +1,7 @@ from __future__ import annotations import re -from typing import Any +from typing import int, Any from django import forms from django.conf import settings diff --git a/src/sentry/users/web/user_avatar.py b/src/sentry/users/web/user_avatar.py index 24875a13d071c6..6e08592391d8f0 100644 --- a/src/sentry/users/web/user_avatar.py +++ b/src/sentry/users/web/user_avatar.py @@ -1,3 +1,4 @@ +from typing import int from sentry.users.models.user_avatar import UserAvatar from sentry.web.frontend.base import AvatarPhotoView, control_silo_view diff --git a/src/sentry/utils/__init__.py b/src/sentry/utils/__init__.py index 8991d0704cbf49..4ae21b796420f5 100644 --- a/src/sentry/utils/__init__.py +++ b/src/sentry/utils/__init__.py @@ -1,3 +1,4 @@ +from typing import int """ This is the Utilities Module. It is the home to small, self-contained classes and functions that do useful things. This description is intentionally general because there are basically no limits to diff --git a/src/sentry/utils/arroyo.py b/src/sentry/utils/arroyo.py index 5391eccc8ffb58..80361f844c00cf 100644 --- a/src/sentry/utils/arroyo.py +++ b/src/sentry/utils/arroyo.py @@ -3,7 +3,7 @@ import pickle from collections.abc import Callable, Mapping from functools import partial -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from arroyo.processing.strategies.abstract import ProcessingStrategy from arroyo.processing.strategies.run_task import RunTask diff --git a/src/sentry/utils/arroyo_producer.py b/src/sentry/utils/arroyo_producer.py index da894d85a9709f..92145fe9387958 100644 --- a/src/sentry/utils/arroyo_producer.py +++ b/src/sentry/utils/arroyo_producer.py @@ -3,7 +3,7 @@ import atexit from collections import deque from collections.abc import Callable -from typing import Deque +from typing import int, Deque from arroyo.backends.abstract import ProducerFuture from arroyo.backends.kafka import KafkaPayload, KafkaProducer, build_kafka_producer_configuration diff --git a/src/sentry/utils/assets.py b/src/sentry/utils/assets.py index 6d7685265ad808..bb7162f4e354fd 100644 --- a/src/sentry/utils/assets.py +++ b/src/sentry/utils/assets.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import os.path from dataclasses import dataclass diff --git a/src/sentry/utils/audit.py b/src/sentry/utils/audit.py index 4d0d2e37048c9b..dfece645656577 100644 --- a/src/sentry/utils/audit.py +++ b/src/sentry/utils/audit.py @@ -1,7 +1,7 @@ from __future__ import annotations from logging import Logger -from typing import Any +from typing import int, Any from django.http.request import HttpRequest diff --git a/src/sentry/utils/auth.py b/src/sentry/utils/auth.py index df3849dfdefc75..dd1790c31d69da 100644 --- a/src/sentry/utils/auth.py +++ b/src/sentry/utils/auth.py @@ -4,7 +4,7 @@ from collections.abc import Collection, Iterable, Mapping from datetime import datetime, timedelta, timezone from time import time -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from urllib.parse import urlencode, urlparse from django.conf import settings diff --git a/src/sentry/utils/avatar.py b/src/sentry/utils/avatar.py index 7e1e524a18bfd6..5faefb77e0dc21 100644 --- a/src/sentry/utils/avatar.py +++ b/src/sentry/utils/avatar.py @@ -6,7 +6,7 @@ from __future__ import annotations from collections.abc import MutableMapping -from typing import IO +from typing import int, IO from urllib.parse import urlencode from django.conf import settings diff --git a/src/sentry/utils/batching_kafka_consumer.py b/src/sentry/utils/batching_kafka_consumer.py index 47f0530e32b42c..47ee0188bb9f1e 100644 --- a/src/sentry/utils/batching_kafka_consumer.py +++ b/src/sentry/utils/batching_kafka_consumer.py @@ -1,3 +1,4 @@ +from typing import int import logging import time diff --git a/src/sentry/utils/cache.py b/src/sentry/utils/cache.py index 8945ebd320dc54..c5a3e380de6afc 100644 --- a/src/sentry/utils/cache.py +++ b/src/sentry/utils/cache.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, int from django.core.cache import cache diff --git a/src/sentry/utils/circuit_breaker.py b/src/sentry/utils/circuit_breaker.py index b8676856263691..0720907a043d34 100644 --- a/src/sentry/utils/circuit_breaker.py +++ b/src/sentry/utils/circuit_breaker.py @@ -3,7 +3,7 @@ the `CircuitBreaker` class found in `circuit_breaker2.py` instead. """ -from typing import TypedDict +from typing import int, TypedDict from django.core.cache import cache diff --git a/src/sentry/utils/circuit_breaker2.py b/src/sentry/utils/circuit_breaker2.py index a14ff782914b57..21b59f9457d5be 100644 --- a/src/sentry/utils/circuit_breaker2.py +++ b/src/sentry/utils/circuit_breaker2.py @@ -8,7 +8,7 @@ import logging import time from enum import Enum -from typing import Any, Literal, NotRequired, TypedDict, overload +from typing import Any, Literal, NotRequired, TypedDict, overload, int from django.conf import settings diff --git a/src/sentry/utils/codecs.py b/src/sentry/utils/codecs.py index dd821aae17b7cf..8cb01bc92dcd51 100644 --- a/src/sentry/utils/codecs.py +++ b/src/sentry/utils/codecs.py @@ -1,6 +1,6 @@ import zlib from abc import ABC, abstractmethod -from typing import Any, Generic, TypeVar +from typing import Any, Generic, TypeVar, int import zstandard diff --git a/src/sentry/utils/codeowners.py b/src/sentry/utils/codeowners.py index fee91fba88f3f4..69741927026ffb 100644 --- a/src/sentry/utils/codeowners.py +++ b/src/sentry/utils/codeowners.py @@ -1,3 +1,4 @@ +from typing import int from sentry_relay.processing import is_codeowners_path_match # Max accepted string length of the CODEOWNERS file diff --git a/src/sentry/utils/colors.py b/src/sentry/utils/colors.py index e4d66679adefaf..808f6325f1ebba 100644 --- a/src/sentry/utils/colors.py +++ b/src/sentry/utils/colors.py @@ -1,3 +1,4 @@ +from typing import int import colorsys import hashlib diff --git a/src/sentry/utils/committers.py b/src/sentry/utils/committers.py index 7ac7b3d8b4c687..57d4ca97c8b0cb 100644 --- a/src/sentry/utils/committers.py +++ b/src/sentry/utils/committers.py @@ -5,7 +5,7 @@ from collections.abc import Iterator, Mapping, MutableMapping, Sequence from enum import Enum from functools import reduce -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.core.cache import cache from django.db.models import Q diff --git a/src/sentry/utils/concurrent.py b/src/sentry/utils/concurrent.py index e6c63e0ef19ab6..4d57f5cf0fa8ad 100644 --- a/src/sentry/utils/concurrent.py +++ b/src/sentry/utils/concurrent.py @@ -9,7 +9,7 @@ from contextlib import contextmanager from queue import Full, PriorityQueue from time import time -from typing import Any, NamedTuple +from typing import Any, NamedTuple, int import sentry_sdk import sentry_sdk.scope diff --git a/src/sentry/utils/confluent_producer.py b/src/sentry/utils/confluent_producer.py index 0153660fec3b22..b93da7b4d3d265 100644 --- a/src/sentry/utils/confluent_producer.py +++ b/src/sentry/utils/confluent_producer.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from arroyo.backends.kafka import ConfluentProducer from confluent_kafka import Producer diff --git a/src/sentry/utils/cursors.py b/src/sentry/utils/cursors.py index e5b0bb0c401046..75a795f6d39d09 100644 --- a/src/sentry/utils/cursors.py +++ b/src/sentry/utils/cursors.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable, Iterator, Sequence -from typing import Any, Protocol, TypeVar, Union +from typing import Any, Protocol, TypeVar, Union, int T = TypeVar("T") CursorValue = Union[float, int, str] diff --git a/src/sentry/utils/datastructures.py b/src/sentry/utils/datastructures.py index eac2a2394b8650..fd8ffdd1e6f999 100644 --- a/src/sentry/utils/datastructures.py +++ b/src/sentry/utils/datastructures.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Hashable, MutableMapping __unset__ = object() diff --git a/src/sentry/utils/dates.py b/src/sentry/utils/dates.py index 51a1f696e83874..eb618bf1dfbdb7 100644 --- a/src/sentry/utils/dates.py +++ b/src/sentry/utils/dates.py @@ -2,7 +2,7 @@ import re import zoneinfo from datetime import UTC, date, datetime, timedelta -from typing import Any, overload +from typing import Any, overload, int from dateutil.parser import parse from django.http.request import HttpRequest diff --git a/src/sentry/utils/db.py b/src/sentry/utils/db.py index e6035f46b5acfe..bc5d80acaf0e95 100644 --- a/src/sentry/utils/db.py +++ b/src/sentry/utils/db.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import Sequence from contextlib import ExitStack diff --git a/src/sentry/utils/email/__init__.py b/src/sentry/utils/email/__init__.py index bda83fbea9285c..20fbd2436aeb20 100644 --- a/src/sentry/utils/email/__init__.py +++ b/src/sentry/utils/email/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ( "_CaseInsensitiveSigner", "create_fake_email", diff --git a/src/sentry/utils/email/address.py b/src/sentry/utils/email/address.py index 1a7368cfb4c01f..f00f9e3f37ad5a 100644 --- a/src/sentry/utils/email/address.py +++ b/src/sentry/utils/email/address.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import re from email.utils import parseaddr diff --git a/src/sentry/utils/email/backend.py b/src/sentry/utils/email/backend.py index 2a2e495a8274bc..e919506bbdb157 100644 --- a/src/sentry/utils/email/backend.py +++ b/src/sentry/utils/email/backend.py @@ -3,7 +3,7 @@ import subprocess import tempfile from collections.abc import Sequence -from typing import Any +from typing import int, Any from django.conf import settings from django.core.mail import EmailMessage diff --git a/src/sentry/utils/email/faker.py b/src/sentry/utils/email/faker.py index 4eb4e83d83281b..5768bfc1e09c13 100644 --- a/src/sentry/utils/email/faker.py +++ b/src/sentry/utils/email/faker.py @@ -1,5 +1,6 @@ # The fake TLD used to construct email addresses when one is required, # for example by automatically generated SSO accounts. +from typing import int FAKE_EMAIL_TLD = ".sentry-fake" diff --git a/src/sentry/utils/email/list_resolver.py b/src/sentry/utils/email/list_resolver.py index 10a8dd527f2fa6..2612ddc5acb4f3 100644 --- a/src/sentry/utils/email/list_resolver.py +++ b/src/sentry/utils/email/list_resolver.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Callable, Iterable, Mapping diff --git a/src/sentry/utils/email/manager.py b/src/sentry/utils/email/manager.py index addf0ae2f63b71..3fc403542bfdb5 100644 --- a/src/sentry/utils/email/manager.py +++ b/src/sentry/utils/email/manager.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from collections.abc import Iterable, Mapping diff --git a/src/sentry/utils/email/message_builder.py b/src/sentry/utils/email/message_builder.py index e296d74f1b67a0..f04769175a0720 100644 --- a/src/sentry/utils/email/message_builder.py +++ b/src/sentry/utils/email/message_builder.py @@ -7,7 +7,7 @@ from functools import partial from operator import attrgetter from random import randrange -from typing import Any +from typing import int, Any import lxml.html import toronado diff --git a/src/sentry/utils/email/send.py b/src/sentry/utils/email/send.py index 748e848995d772..82e3289397a815 100644 --- a/src/sentry/utils/email/send.py +++ b/src/sentry/utils/email/send.py @@ -1,6 +1,6 @@ import logging from collections.abc import Sequence -from typing import Any +from typing import int, Any from django.core import mail from django.core.mail import EmailMultiAlternatives diff --git a/src/sentry/utils/email/signer.py b/src/sentry/utils/email/signer.py index a4686d25d9df49..8eda3d556fd2a8 100644 --- a/src/sentry/utils/email/signer.py +++ b/src/sentry/utils/email/signer.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.core.signing import BadSignature, Signer from django.utils.crypto import constant_time_compare diff --git a/src/sentry/utils/env.py b/src/sentry/utils/env.py index 2f3bac7c204739..b3e20ff2457c3c 100644 --- a/src/sentry/utils/env.py +++ b/src/sentry/utils/env.py @@ -1,3 +1,4 @@ +from typing import int import logging import os import sys diff --git a/src/sentry/utils/event.py b/src/sentry/utils/event.py index 31b9456862e978..d747871ebc5def 100644 --- a/src/sentry/utils/event.py +++ b/src/sentry/utils/event.py @@ -2,7 +2,7 @@ from collections.abc import Mapping, MutableMapping from time import time -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from sentry.utils import metrics from sentry.utils.safe import get_path diff --git a/src/sentry/utils/event_frames.py b/src/sentry/utils/event_frames.py index ab2562a5570648..0854033f2cfec5 100644 --- a/src/sentry/utils/event_frames.py +++ b/src/sentry/utils/event_frames.py @@ -5,7 +5,7 @@ from collections.abc import Callable, Mapping, MutableMapping, Sequence from copy import deepcopy from dataclasses import dataclass, field -from typing import Any, Protocol, cast +from typing import Any, Protocol, cast, int from sentry.utils import metrics from sentry.utils.safe import PathSearchable, get_path diff --git a/src/sentry/utils/event_tracker.py b/src/sentry/utils/event_tracker.py index 327ce65afda768..64a933101f05ce 100644 --- a/src/sentry/utils/event_tracker.py +++ b/src/sentry/utils/event_tracker.py @@ -1,3 +1,4 @@ +from typing import int import logging from enum import StrEnum diff --git a/src/sentry/utils/eventuser.py b/src/sentry/utils/eventuser.py index 08650162179523..4047a9d0084ce9 100644 --- a/src/sentry/utils/eventuser.py +++ b/src/sentry/utils/eventuser.py @@ -7,7 +7,7 @@ from datetime import datetime from functools import cached_property from ipaddress import IPv4Address, IPv6Address, ip_address -from typing import Any, TypedDict +from typing import Any, TypedDict, int import sentry_sdk from django.db.models import QuerySet diff --git a/src/sentry/utils/exceptions.py b/src/sentry/utils/exceptions.py index 78e9ae45d56507..bcd84511022bee 100644 --- a/src/sentry/utils/exceptions.py +++ b/src/sentry/utils/exceptions.py @@ -1,7 +1,7 @@ import logging from collections.abc import Generator, Mapping from contextlib import contextmanager -from typing import Any, Literal +from typing import Any, Literal, int import sentry_sdk diff --git a/src/sentry/utils/flag.py b/src/sentry/utils/flag.py index 92f6a34880bc43..34eff88d892b19 100644 --- a/src/sentry/utils/flag.py +++ b/src/sentry/utils/flag.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/utils/forms.py b/src/sentry/utils/forms.py index 65bf02e7ec5597..1d7a514ccbc2c3 100644 --- a/src/sentry/utils/forms.py +++ b/src/sentry/utils/forms.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Sequence -from typing import TYPE_CHECKING, NotRequired, TypedDict +from typing import TYPE_CHECKING, NotRequired, TypedDict, int from django import forms from django.forms import ChoiceField diff --git a/src/sentry/utils/function_cache.py b/src/sentry/utils/function_cache.py index aba9c3ea63f492..e1e8f5e7cc7093 100644 --- a/src/sentry/utils/function_cache.py +++ b/src/sentry/utils/function_cache.py @@ -6,7 +6,7 @@ from datetime import timedelta from decimal import Decimal from functools import partial, update_wrapper -from typing import Generic, TypeVar, TypeVarTuple +from typing import Generic, TypeVar, TypeVarTuple, int from django.core.cache import cache from django.db import models diff --git a/src/sentry/utils/geo.py b/src/sentry/utils/geo.py index 6461c84a0e587e..6dce5f9126116d 100644 --- a/src/sentry/utils/geo.py +++ b/src/sentry/utils/geo.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any +from typing import int, Any from django.conf import settings from sentry_relay.processing import GeoIpLookup diff --git a/src/sentry/utils/github.py b/src/sentry/utils/github.py index 81e64b48897169..4a956af7677976 100644 --- a/src/sentry/utils/github.py +++ b/src/sentry/utils/github.py @@ -1,6 +1,6 @@ import base64 import binascii -from typing import Any +from typing import int, Any from cryptography.exceptions import InvalidSignature from cryptography.hazmat.primitives import hashes, serialization diff --git a/src/sentry/utils/glob.py b/src/sentry/utils/glob.py index 68972b757b0a2b..5867f0bcafd62d 100644 --- a/src/sentry/utils/glob.py +++ b/src/sentry/utils/glob.py @@ -1,3 +1,4 @@ +from typing import int from sentry_relay.processing import is_glob_match diff --git a/src/sentry/utils/groupreference.py b/src/sentry/utils/groupreference.py index 64bcdb8c9b7442..292639bb075343 100644 --- a/src/sentry/utils/groupreference.py +++ b/src/sentry/utils/groupreference.py @@ -1,7 +1,7 @@ from __future__ import annotations import re -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING if TYPE_CHECKING: from sentry.models.group import Group diff --git a/src/sentry/utils/hashlib.py b/src/sentry/utils/hashlib.py index 72371bedc81fa8..e412f82bc6a211 100644 --- a/src/sentry/utils/hashlib.py +++ b/src/sentry/utils/hashlib.py @@ -6,7 +6,7 @@ from hashlib import md5 as _md5 from hashlib import sha1 as _sha1 from hashlib import sha256 as _sha256 -from typing import Any +from typing import int, Any from django.utils.encoding import force_bytes diff --git a/src/sentry/utils/http.py b/src/sentry/utils/http.py index 3c3f425fe85641..e8d15dd8d8cff7 100644 --- a/src/sentry/utils/http.py +++ b/src/sentry/utils/http.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Collection -from typing import TYPE_CHECKING, NamedTuple, TypeGuard, overload +from typing import TYPE_CHECKING, NamedTuple, TypeGuard, overload, int from urllib.parse import quote, urljoin, urlparse from django.conf import settings diff --git a/src/sentry/utils/imports.py b/src/sentry/utils/imports.py index 590266d9680e94..39ca51273d1e42 100644 --- a/src/sentry/utils/imports.py +++ b/src/sentry/utils/imports.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any class ModuleProxyCache(dict[str, object]): diff --git a/src/sentry/utils/in_app.py b/src/sentry/utils/in_app.py index c1d79b941597bf..fde725fbc910c8 100644 --- a/src/sentry/utils/in_app.py +++ b/src/sentry/utils/in_app.py @@ -1,3 +1,4 @@ +from typing import int import re # Absolute paths where iOS mounts application files. diff --git a/src/sentry/utils/integrationdocs.py b/src/sentry/utils/integrationdocs.py index eef240f92f4585..0a2e6a47bb60a2 100644 --- a/src/sentry/utils/integrationdocs.py +++ b/src/sentry/utils/integrationdocs.py @@ -1,7 +1,7 @@ from __future__ import annotations import os -from typing import Any +from typing import int, Any import orjson diff --git a/src/sentry/utils/iterators.py b/src/sentry/utils/iterators.py index 9f18ec7cd8199b..e423a3c921d853 100644 --- a/src/sentry/utils/iterators.py +++ b/src/sentry/utils/iterators.py @@ -1,6 +1,6 @@ import itertools from collections.abc import Generator, Iterable -from typing import TypeVar +from typing import int, TypeVar T = TypeVar("T") diff --git a/src/sentry/utils/javascript.py b/src/sentry/utils/javascript.py index e8dad32af8d169..fa903e7e0d63e8 100644 --- a/src/sentry/utils/javascript.py +++ b/src/sentry/utils/javascript.py @@ -1,7 +1,7 @@ from __future__ import annotations import re -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.utils.safe import get_path diff --git a/src/sentry/utils/json.py b/src/sentry/utils/json.py index 8c60f811162d97..050718cfb3b8ac 100644 --- a/src/sentry/utils/json.py +++ b/src/sentry/utils/json.py @@ -7,7 +7,7 @@ import uuid from collections.abc import Generator, Mapping from enum import Enum -from typing import IO, Any, NoReturn, TypeVar, overload +from typing import IO, Any, NoReturn, TypeVar, overload, int import orjson import rapidjson diff --git a/src/sentry/utils/jwt.py b/src/sentry/utils/jwt.py index 3c6a25c8d5ea69..fda11b17bcc048 100644 --- a/src/sentry/utils/jwt.py +++ b/src/sentry/utils/jwt.py @@ -7,7 +7,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any import jwt as pyjwt from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey, RSAPublicKey diff --git a/src/sentry/utils/kafka.py b/src/sentry/utils/kafka.py index ba4926eaeb1a12..9d3702bb3e152e 100644 --- a/src/sentry/utils/kafka.py +++ b/src/sentry/utils/kafka.py @@ -4,7 +4,7 @@ import sys import time from threading import Thread -from typing import Any +from typing import int, Any from arroyo.processing.processor import StreamProcessor diff --git a/src/sentry/utils/kafka_config.py b/src/sentry/utils/kafka_config.py index 0defbe6cde6857..95658c2c236fca 100644 --- a/src/sentry/utils/kafka_config.py +++ b/src/sentry/utils/kafka_config.py @@ -1,5 +1,5 @@ from collections.abc import MutableMapping -from typing import Any +from typing import int, Any from django.conf import settings diff --git a/src/sentry/utils/kvstore/abstract.py b/src/sentry/utils/kvstore/abstract.py index dd7da19b893b43..45513b69750967 100644 --- a/src/sentry/utils/kvstore/abstract.py +++ b/src/sentry/utils/kvstore/abstract.py @@ -1,7 +1,7 @@ from abc import ABC, abstractmethod from collections.abc import Iterator, Sequence from datetime import timedelta -from typing import Generic, TypeVar +from typing import Generic, TypeVar, int K = TypeVar("K") V = TypeVar("V") diff --git a/src/sentry/utils/kvstore/bigtable.py b/src/sentry/utils/kvstore/bigtable.py index 96b24fb60ec2c6..3cdd6f3294aeb6 100644 --- a/src/sentry/utils/kvstore/bigtable.py +++ b/src/sentry/utils/kvstore/bigtable.py @@ -4,7 +4,7 @@ from collections.abc import Iterator, Mapping, Sequence from datetime import timedelta from threading import Lock -from typing import Any +from typing import int, Any import sentry_sdk from django.utils import timezone diff --git a/src/sentry/utils/kvstore/cache.py b/src/sentry/utils/kvstore/cache.py index 827e88e38d1a7e..221968f772e024 100644 --- a/src/sentry/utils/kvstore/cache.py +++ b/src/sentry/utils/kvstore/cache.py @@ -1,6 +1,6 @@ from collections.abc import Iterator, Sequence from datetime import timedelta -from typing import Any +from typing import int, Any from django.conf import settings diff --git a/src/sentry/utils/kvstore/encoding.py b/src/sentry/utils/kvstore/encoding.py index e697fed4a1866f..47e5bbba9e11f2 100644 --- a/src/sentry/utils/kvstore/encoding.py +++ b/src/sentry/utils/kvstore/encoding.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Iterator, Sequence from datetime import timedelta diff --git a/src/sentry/utils/kvstore/memory.py b/src/sentry/utils/kvstore/memory.py index c4c775aa99d3ec..18536e541f9e25 100644 --- a/src/sentry/utils/kvstore/memory.py +++ b/src/sentry/utils/kvstore/memory.py @@ -1,7 +1,7 @@ from collections.abc import MutableMapping from dataclasses import dataclass from datetime import datetime, timedelta -from typing import Generic +from typing import int, Generic from sentry.utils.kvstore.abstract import K, KVStorage, V diff --git a/src/sentry/utils/kvstore/redis.py b/src/sentry/utils/kvstore/redis.py index b8e0ac3e1e4bc1..4181ebfd33405e 100644 --- a/src/sentry/utils/kvstore/redis.py +++ b/src/sentry/utils/kvstore/redis.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import timedelta -from typing import TypeVar +from typing import int, TypeVar from redis import StrictRedis from rediscluster import RedisCluster diff --git a/src/sentry/utils/lazy_service_wrapper.py b/src/sentry/utils/lazy_service_wrapper.py index 547d410ea5f78b..df60ff88b8c501 100644 --- a/src/sentry/utils/lazy_service_wrapper.py +++ b/src/sentry/utils/lazy_service_wrapper.py @@ -6,7 +6,7 @@ import inspect import itertools from collections.abc import Iterable, Mapping, MutableMapping, Sequence -from typing import Any, Final, Generic, TypeVar +from typing import Any, Final, Generic, TypeVar, int from sentry.utils import metrics, warnings from sentry.utils.imports import import_string diff --git a/src/sentry/utils/linksign.py b/src/sentry/utils/linksign.py index 4c6709b05b925d..555e8557ae3036 100644 --- a/src/sentry/utils/linksign.py +++ b/src/sentry/utils/linksign.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from urllib.parse import urlencode from django.core import signing diff --git a/src/sentry/utils/locking/__init__.py b/src/sentry/utils/locking/__init__.py index 6c1f05051c4d8d..b056f0447283c9 100644 --- a/src/sentry/utils/locking/__init__.py +++ b/src/sentry/utils/locking/__init__.py @@ -1,2 +1,3 @@ +from typing import int class UnableToAcquireLock(Exception): """Exception raised when a lock cannot be acquired.""" diff --git a/src/sentry/utils/locking/backends/__init__.py b/src/sentry/utils/locking/backends/__init__.py index 0ac9660c144795..754534d44c3e81 100644 --- a/src/sentry/utils/locking/backends/__init__.py +++ b/src/sentry/utils/locking/backends/__init__.py @@ -1,3 +1,4 @@ +from typing import int class LockBackend: """ Interface for providing lock behavior that is used by the diff --git a/src/sentry/utils/locking/backends/migration.py b/src/sentry/utils/locking/backends/migration.py index 10fa6329c38460..6de92a1f58a07c 100644 --- a/src/sentry/utils/locking/backends/migration.py +++ b/src/sentry/utils/locking/backends/migration.py @@ -1,5 +1,5 @@ from collections.abc import Callable -from typing import Optional, Union +from typing import Optional, Union, int from sentry.conf.types.service_options import ServiceOptions from sentry.utils.locking.backends import LockBackend diff --git a/src/sentry/utils/locking/backends/redis.py b/src/sentry/utils/locking/backends/redis.py index 9269191ca6b837..d50bf095f39e70 100644 --- a/src/sentry/utils/locking/backends/redis.py +++ b/src/sentry/utils/locking/backends/redis.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from uuid import uuid4 import rb diff --git a/src/sentry/utils/locking/lock.py b/src/sentry/utils/locking/lock.py index 001b0b4298f5d1..11f172624d1a74 100644 --- a/src/sentry/utils/locking/lock.py +++ b/src/sentry/utils/locking/lock.py @@ -5,7 +5,7 @@ import time from collections.abc import Generator from contextlib import contextmanager -from typing import ContextManager +from typing import int, ContextManager from sentry.utils.locking import UnableToAcquireLock from sentry.utils.locking.backends import LockBackend diff --git a/src/sentry/utils/locking/manager.py b/src/sentry/utils/locking/manager.py index fb077a2dd8774d..4ecbf8d449330e 100644 --- a/src/sentry/utils/locking/manager.py +++ b/src/sentry/utils/locking/manager.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils import metrics from sentry.utils.locking.backends import LockBackend from sentry.utils.locking.lock import Lock diff --git a/src/sentry/utils/loremipsum.py b/src/sentry/utils/loremipsum.py index 65428482f86948..3b834c45189859 100644 --- a/src/sentry/utils/loremipsum.py +++ b/src/sentry/utils/loremipsum.py @@ -1,3 +1,4 @@ +from typing import int from petname.english import adjectives, adverbs, names words = adjectives + adverbs + names diff --git a/src/sentry/utils/managers.py b/src/sentry/utils/managers.py index 676c828100b72b..23aeaf20da1331 100644 --- a/src/sentry/utils/managers.py +++ b/src/sentry/utils/managers.py @@ -1,3 +1,4 @@ +from typing import int import logging diff --git a/src/sentry/utils/marketo_client.py b/src/sentry/utils/marketo_client.py index 52a403bb32f125..01efacd6696f0a 100644 --- a/src/sentry/utils/marketo_client.py +++ b/src/sentry/utils/marketo_client.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from django.conf import settings diff --git a/src/sentry/utils/math.py b/src/sentry/utils/math.py index 776432b6f21a9b..b5c0dc3e56436a 100644 --- a/src/sentry/utils/math.py +++ b/src/sentry/utils/math.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import math from abc import ABC, abstractmethod diff --git a/src/sentry/utils/memory.py b/src/sentry/utils/memory.py index 07a8aa206b1522..a8908a4f48ac1a 100644 --- a/src/sentry/utils/memory.py +++ b/src/sentry/utils/memory.py @@ -3,7 +3,7 @@ import resource from collections.abc import Generator from contextlib import contextmanager -from typing import Any +from typing import int, Any from sentry.utils import metrics diff --git a/src/sentry/utils/meta.py b/src/sentry/utils/meta.py index 113bda0d2cb44d..7cd0732623b7ba 100644 --- a/src/sentry/utils/meta.py +++ b/src/sentry/utils/meta.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Literal, NotRequired, TypedDict +from typing import Literal, NotRequired, TypedDict, int RemarkType = Literal["a", "x", "s", "m", "p", "e"] diff --git a/src/sentry/utils/metrics.py b/src/sentry/utils/metrics.py index a3ae892d59c2c8..10bb149ca9c10e 100644 --- a/src/sentry/utils/metrics.py +++ b/src/sentry/utils/metrics.py @@ -8,7 +8,7 @@ from queue import Queue from random import random from threading import Thread -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/utils/mockdata/__init__.py b/src/sentry/utils/mockdata/__init__.py index 151ee188f84aa3..2c34b249da9d37 100644 --- a/src/sentry/utils/mockdata/__init__.py +++ b/src/sentry/utils/mockdata/__init__.py @@ -1 +1,2 @@ +from typing import int from .core import * # noqa diff --git a/src/sentry/utils/mockdata/core.py b/src/sentry/utils/mockdata/core.py index 79cb4b0f0b34fe..6722c2fa98f056 100644 --- a/src/sentry/utils/mockdata/core.py +++ b/src/sentry/utils/mockdata/core.py @@ -9,7 +9,7 @@ from datetime import datetime, timedelta, timezone from hashlib import sha1 from random import randint -from typing import Any +from typing import int, Any from uuid import uuid4 import click diff --git a/src/sentry/utils/not_set.py b/src/sentry/utils/not_set.py index 332cf0a6ec7485..398c214ec73b68 100644 --- a/src/sentry/utils/not_set.py +++ b/src/sentry/utils/not_set.py @@ -1,7 +1,7 @@ from __future__ import annotations from enum import Enum, auto -from typing import TypeVar +from typing import int, TypeVar class NotSet(Enum): diff --git a/src/sentry/utils/numbers.py b/src/sentry/utils/numbers.py index 399cf364b97402..5a4a9b9abf5344 100644 --- a/src/sentry/utils/numbers.py +++ b/src/sentry/utils/numbers.py @@ -1,3 +1,4 @@ +from typing import int BASE36_ALPHABET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" BASE32_ALPHABET = "0123456789ABCDEFGHJKMNPQRSTVWXYZ" diff --git a/src/sentry/utils/options.py b/src/sentry/utils/options.py index c25c92ac7bda74..24ec8981bb5af6 100644 --- a/src/sentry/utils/options.py +++ b/src/sentry/utils/options.py @@ -1,3 +1,4 @@ +from typing import int """Helper functions for sentry.options""" import logging diff --git a/src/sentry/utils/otp.py b/src/sentry/utils/otp.py index 058631d3e91a06..71a194e1a366fa 100644 --- a/src/sentry/utils/otp.py +++ b/src/sentry/utils/otp.py @@ -1,3 +1,4 @@ +from typing import int import base64 import hashlib import hmac diff --git a/src/sentry/utils/outcomes.py b/src/sentry/utils/outcomes.py index 7b9c957c0b6453..2962635f5c6953 100644 --- a/src/sentry/utils/outcomes.py +++ b/src/sentry/utils/outcomes.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import atexit import random diff --git a/src/sentry/utils/pagination_factory.py b/src/sentry/utils/pagination_factory.py index 7c59c0a96546bf..338be88baf4c6b 100644 --- a/src/sentry/utils/pagination_factory.py +++ b/src/sentry/utils/pagination_factory.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, Protocol +from typing import Any, Protocol, int import sentry_sdk from sentry_sdk.tracing import Span diff --git a/src/sentry/utils/patch_set.py b/src/sentry/utils/patch_set.py index 8c1bbc0a388c31..89220c59d44ff6 100644 --- a/src/sentry/utils/patch_set.py +++ b/src/sentry/utils/patch_set.py @@ -1,7 +1,7 @@ from __future__ import annotations from dataclasses import dataclass -from typing import Literal, TypedDict +from typing import Literal, TypedDict, int import unidiff from unidiff.errors import UnidiffParseError diff --git a/src/sentry/utils/platform_categories.py b/src/sentry/utils/platform_categories.py index abdd1e1939a838..0eae1663e9ec9a 100644 --- a/src/sentry/utils/platform_categories.py +++ b/src/sentry/utils/platform_categories.py @@ -1,3 +1,4 @@ +from typing import int from django.utils.translation import gettext_lazy as _ # Mirrors `const frontend` in sentry/static/app/data/platformCategories.tsx diff --git a/src/sentry/utils/projectflags.py b/src/sentry/utils/projectflags.py index 2c42ef082f2612..3e2d5a12ed0f8e 100644 --- a/src/sentry/utils/projectflags.py +++ b/src/sentry/utils/projectflags.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.db.models import F from django.dispatch import Signal diff --git a/src/sentry/utils/prompts.py b/src/sentry/utils/prompts.py index 51f854d920c9bf..0de66fe691490c 100644 --- a/src/sentry/utils/prompts.py +++ b/src/sentry/utils/prompts.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import TypedDict +from typing import int, TypedDict from django.db.models.query import QuerySet diff --git a/src/sentry/utils/pubsub.py b/src/sentry/utils/pubsub.py index 05d8b4f3b5e78b..a172fc37bda63c 100644 --- a/src/sentry/utils/pubsub.py +++ b/src/sentry/utils/pubsub.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from arroyo.backends.kafka import build_kafka_producer_configuration diff --git a/src/sentry/utils/query.py b/src/sentry/utils/query.py index 05884729ce1745..4b5493ca2a0963 100644 --- a/src/sentry/utils/query.py +++ b/src/sentry/utils/query.py @@ -3,7 +3,7 @@ import logging import re from collections.abc import Callable, Iterable, Iterator, Sequence -from typing import TYPE_CHECKING, Any, TypedDict +from typing import TYPE_CHECKING, Any, TypedDict, int import click from django.db import connections, router diff --git a/src/sentry/utils/redis.py b/src/sentry/utils/redis.py index 3a56aac2e44ffe..b11aff68cb763b 100644 --- a/src/sentry/utils/redis.py +++ b/src/sentry/utils/redis.py @@ -4,7 +4,7 @@ import logging from copy import deepcopy from threading import Lock -from typing import Any, Literal, TypeGuard, TypeVar, overload +from typing import Any, Literal, TypeGuard, TypeVar, overload, int import rb from django.utils.functional import SimpleLazyObject diff --git a/src/sentry/utils/redis_metrics.py b/src/sentry/utils/redis_metrics.py index 09a78c076240e3..5cd8d5d88dcd85 100644 --- a/src/sentry/utils/redis_metrics.py +++ b/src/sentry/utils/redis_metrics.py @@ -1,3 +1,4 @@ +from typing import int from sentry_redis_tools.metrics import Metrics, Tags from sentry.metrics.base import MetricsBackend diff --git a/src/sentry/utils/registry.py b/src/sentry/utils/registry.py index d5667e26c858c2..3ab25f6316cb5d 100644 --- a/src/sentry/utils/registry.py +++ b/src/sentry/utils/registry.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Callable diff --git a/src/sentry/utils/retries.py b/src/sentry/utils/retries.py index 183860f677665a..9938b5b6f5da0a 100644 --- a/src/sentry/utils/retries.py +++ b/src/sentry/utils/retries.py @@ -6,7 +6,7 @@ import time from abc import ABC, abstractmethod from collections.abc import Callable -from typing import TypeVar +from typing import int, TypeVar from django.utils.encoding import force_bytes diff --git a/src/sentry/utils/rust.py b/src/sentry/utils/rust.py index 3ad83a04434ae0..049730b91f7508 100644 --- a/src/sentry/utils/rust.py +++ b/src/sentry/utils/rust.py @@ -1,3 +1,4 @@ +from typing import int import re import sentry_sdk diff --git a/src/sentry/utils/safe.py b/src/sentry/utils/safe.py index 7a179e93124b09..73bee3e3fcd031 100644 --- a/src/sentry/utils/safe.py +++ b/src/sentry/utils/safe.py @@ -1,6 +1,6 @@ import logging from collections.abc import Callable, Mapping, MutableMapping, Sequence -from typing import Any, ParamSpec, TypeVar, Union +from typing import Any, ParamSpec, TypeVar, Union, int from django.conf import settings from django.utils.encoding import force_str diff --git a/src/sentry/utils/samples.py b/src/sentry/utils/samples.py index 5927e34e6ae9c3..baf425dd24d03d 100644 --- a/src/sentry/utils/samples.py +++ b/src/sentry/utils/samples.py @@ -1,3 +1,4 @@ +from typing import int import logging import os.path import random diff --git a/src/sentry/utils/sdk.py b/src/sentry/utils/sdk.py index 3fa06b49a868b1..cb9ffb15f53aa8 100644 --- a/src/sentry/utils/sdk.py +++ b/src/sentry/utils/sdk.py @@ -6,7 +6,7 @@ import typing from collections.abc import Generator, Mapping, Sequence, Sized from types import FrameType -from typing import TYPE_CHECKING, Any, NamedTuple +from typing import TYPE_CHECKING, Any, NamedTuple, int import sentry_sdk from django.conf import settings diff --git a/src/sentry/utils/sdk_crashes/event_stripper.py b/src/sentry/utils/sdk_crashes/event_stripper.py index c227a4ad6d2c98..18818c641de8ad 100644 --- a/src/sentry/utils/sdk_crashes/event_stripper.py +++ b/src/sentry/utils/sdk_crashes/event_stripper.py @@ -1,6 +1,6 @@ from collections.abc import Mapping, MutableMapping, Sequence from enum import Enum, auto -from typing import Any +from typing import int, Any from sentry.db.models import NodeData from sentry.utils.safe import get_path diff --git a/src/sentry/utils/sdk_crashes/path_replacer.py b/src/sentry/utils/sdk_crashes/path_replacer.py index 97cfed7d38b2f2..e79aaeab1017c0 100644 --- a/src/sentry/utils/sdk_crashes/path_replacer.py +++ b/src/sentry/utils/sdk_crashes/path_replacer.py @@ -1,3 +1,4 @@ +from typing import int import re from abc import ABC, abstractmethod diff --git a/src/sentry/utils/sdk_crashes/sdk_crash_detection.py b/src/sentry/utils/sdk_crashes/sdk_crash_detection.py index 93b76d762cf396..8db43fd92ec607 100644 --- a/src/sentry/utils/sdk_crashes/sdk_crash_detection.py +++ b/src/sentry/utils/sdk_crashes/sdk_crash_detection.py @@ -2,7 +2,7 @@ import random from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from sentry.issues.grouptype import GroupCategory from sentry.services.eventstore.models import Event, GroupEvent diff --git a/src/sentry/utils/sdk_crashes/sdk_crash_detection_config.py b/src/sentry/utils/sdk_crashes/sdk_crash_detection_config.py index 797447a05f61ec..366a5da972d6b1 100644 --- a/src/sentry/utils/sdk_crashes/sdk_crash_detection_config.py +++ b/src/sentry/utils/sdk_crashes/sdk_crash_detection_config.py @@ -1,7 +1,7 @@ from collections.abc import Sequence from dataclasses import dataclass, field from enum import Enum, unique -from typing import TypedDict +from typing import int, TypedDict from sentry import options from sentry.utils.sdk_crashes.path_replacer import ( diff --git a/src/sentry/utils/sdk_crashes/sdk_crash_detector.py b/src/sentry/utils/sdk_crashes/sdk_crash_detector.py index 07c495b149a03b..0cb6e064f57b06 100644 --- a/src/sentry/utils/sdk_crashes/sdk_crash_detector.py +++ b/src/sentry/utils/sdk_crashes/sdk_crash_detector.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from packaging.version import InvalidVersion, Version diff --git a/src/sentry/utils/security/__init__.py b/src/sentry/utils/security/__init__.py index f7fd08afe3cf86..80c6bff88bbcb5 100644 --- a/src/sentry/utils/security/__init__.py +++ b/src/sentry/utils/security/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ("get_secure_token",) from .hash import get_secure_token diff --git a/src/sentry/utils/security/hash.py b/src/sentry/utils/security/hash.py index ddf1e34055fc14..07861afeba6115 100644 --- a/src/sentry/utils/security/hash.py +++ b/src/sentry/utils/security/hash.py @@ -1,3 +1,4 @@ +from typing import int import string from django.utils.crypto import get_random_string diff --git a/src/sentry/utils/security/orgauthtoken_token.py b/src/sentry/utils/security/orgauthtoken_token.py index f5149cf56b6580..c845ede4341334 100644 --- a/src/sentry/utils/security/orgauthtoken_token.py +++ b/src/sentry/utils/security/orgauthtoken_token.py @@ -1,7 +1,7 @@ import secrets from base64 import b64decode, b64encode from datetime import datetime -from typing import Any +from typing import int, Any from sentry import options from sentry.utils import hashlib, json diff --git a/src/sentry/utils/sentry_apps/__init__.py b/src/sentry/utils/sentry_apps/__init__.py index 813187d7ed23f5..56a814bb61e0cf 100644 --- a/src/sentry/utils/sentry_apps/__init__.py +++ b/src/sentry/utils/sentry_apps/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .request_buffer import EXTENDED_VALID_EVENTS, SentryAppWebhookRequestsBuffer from .webhooks import send_and_save_webhook_request diff --git a/src/sentry/utils/sentry_apps/request_buffer.py b/src/sentry/utils/sentry_apps/request_buffer.py index 848c11a9260fff..ffdfdbfd7f9220 100644 --- a/src/sentry/utils/sentry_apps/request_buffer.py +++ b/src/sentry/utils/sentry_apps/request_buffer.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import TYPE_CHECKING, NotRequired, TypedDict, overload +from typing import TYPE_CHECKING, NotRequired, TypedDict, overload, int from dateutil.parser import parse as parse_date from django.conf import settings diff --git a/src/sentry/utils/sentry_apps/service_hook_manager.py b/src/sentry/utils/sentry_apps/service_hook_manager.py index 2e07e405ef83bf..5c1db9c885c9aa 100644 --- a/src/sentry/utils/sentry_apps/service_hook_manager.py +++ b/src/sentry/utils/sentry_apps/service_hook_manager.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.models.sentry_app_installation import SentryAppInstallation from sentry.sentry_apps.services.app.model import RpcSentryAppInstallation from sentry.sentry_apps.services.hook import hook_service diff --git a/src/sentry/utils/sentry_apps/webhooks.py b/src/sentry/utils/sentry_apps/webhooks.py index 97399851e0306a..c1e398bed67511 100644 --- a/src/sentry/utils/sentry_apps/webhooks.py +++ b/src/sentry/utils/sentry_apps/webhooks.py @@ -2,7 +2,7 @@ import logging from collections.abc import Callable, Mapping -from typing import TYPE_CHECKING, Any, Concatenate, ParamSpec, TypeVar +from typing import TYPE_CHECKING, Any, Concatenate, ParamSpec, TypeVar, int import sentry_sdk from requests import RequestException, Response diff --git a/src/sentry/utils/serializers.py b/src/sentry/utils/serializers.py index 2a2467d69ed4b4..ed75af3d1529ec 100644 --- a/src/sentry/utils/serializers.py +++ b/src/sentry/utils/serializers.py @@ -1,6 +1,6 @@ from collections import defaultdict from collections.abc import Callable, MutableMapping -from typing import Any, TypeVar +from typing import Any, TypeVar, int from django.db.models import Model, QuerySet diff --git a/src/sentry/utils/services.py b/src/sentry/utils/services.py index e35e80c38b23e5..ac8b968ac8941b 100644 --- a/src/sentry/utils/services.py +++ b/src/sentry/utils/services.py @@ -6,7 +6,7 @@ import logging import threading from collections.abc import Callable, Mapping, Sequence -from typing import Any +from typing import int, Any from sentry import options from sentry.conf.types.service_options import ServiceOptions diff --git a/src/sentry/utils/session_store.py b/src/sentry/utils/session_store.py index 1c0965ded955d5..afdc0a1697f771 100644 --- a/src/sentry/utils/session_store.py +++ b/src/sentry/utils/session_store.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 import sentry_sdk diff --git a/src/sentry/utils/settings.py b/src/sentry/utils/settings.py index 438be554e83a21..7614d9e8c4176d 100644 --- a/src/sentry/utils/settings.py +++ b/src/sentry/utils/settings.py @@ -1,3 +1,4 @@ +from typing import int def is_self_hosted() -> bool: # Backcompat for rename to support old consumers, particularly single-tenant. from django.conf import settings diff --git a/src/sentry/utils/signing.py b/src/sentry/utils/signing.py index ae6667991585e8..f025b051dfdcec 100644 --- a/src/sentry/utils/signing.py +++ b/src/sentry/utils/signing.py @@ -3,7 +3,7 @@ """ import base64 -from typing import Any +from typing import int, Any from django.core.signing import TimestampSigner diff --git a/src/sentry/utils/slug.py b/src/sentry/utils/slug.py index 37fbee52f1f862..b71861780b72cd 100644 --- a/src/sentry/utils/slug.py +++ b/src/sentry/utils/slug.py @@ -1,3 +1,4 @@ +from typing import int import re from django.core.validators import RegexValidator diff --git a/src/sentry/utils/sms.py b/src/sentry/utils/sms.py index 8158b880215106..be7c434e5bc0f2 100644 --- a/src/sentry/utils/sms.py +++ b/src/sentry/utils/sms.py @@ -1,3 +1,4 @@ +from typing import int import logging from urllib.parse import quote diff --git a/src/sentry/utils/snowflake.py b/src/sentry/utils/snowflake.py index 0f1036c528dd96..bb5999e318d7f4 100644 --- a/src/sentry/utils/snowflake.py +++ b/src/sentry/utils/snowflake.py @@ -3,7 +3,7 @@ from collections.abc import Callable from dataclasses import dataclass from datetime import datetime, timedelta -from typing import TYPE_CHECKING, TypeVar +from typing import TYPE_CHECKING, TypeVar, int from django.conf import settings from django.db import IntegrityError, router, transaction diff --git a/src/sentry/utils/snuba.py b/src/sentry/utils/snuba.py index 48785b7a7b2373..c09d51a1be6b90 100644 --- a/src/sentry/utils/snuba.py +++ b/src/sentry/utils/snuba.py @@ -14,7 +14,7 @@ from copy import deepcopy from datetime import datetime, timedelta, timezone from hashlib import sha1 -from typing import Any +from typing import int, Any from urllib.parse import urlparse import sentry_sdk diff --git a/src/sentry/utils/snuba_rpc.py b/src/sentry/utils/snuba_rpc.py index 26f8c1b3e9ad4c..4d306515de0598 100644 --- a/src/sentry/utils/snuba_rpc.py +++ b/src/sentry/utils/snuba_rpc.py @@ -4,7 +4,7 @@ from concurrent.futures import ThreadPoolExecutor from dataclasses import dataclass from functools import partial -from typing import Protocol, TypeVar +from typing import Protocol, TypeVar, int import sentry_protos.snuba.v1alpha.request_common_pb2 import sentry_sdk diff --git a/src/sentry/utils/strings.py b/src/sentry/utils/strings.py index b9da4f573b7b8d..cb4d8bd478a068 100644 --- a/src/sentry/utils/strings.py +++ b/src/sentry/utils/strings.py @@ -7,7 +7,7 @@ import string import zlib from collections.abc import Callable -from typing import overload +from typing import int, overload _sprintf_placeholder_re = re.compile( r"%(?:\d+\$)?[+-]?(?:[ 0]|\'.{1})?-?\d*(?:\.\d+)?[bcdeEufFgGosxX]" diff --git a/src/sentry/utils/tag_normalization.py b/src/sentry/utils/tag_normalization.py index bce6efa1b9047d..1eb66ea9d1a8cd 100644 --- a/src/sentry/utils/tag_normalization.py +++ b/src/sentry/utils/tag_normalization.py @@ -4,7 +4,7 @@ import logging import re from collections.abc import Mapping -from typing import Any +from typing import int, Any logger = logging.getLogger(__name__) diff --git a/src/sentry/utils/time_window.py b/src/sentry/utils/time_window.py index 13545b3b892ea9..f8477b25d12d93 100644 --- a/src/sentry/utils/time_window.py +++ b/src/sentry/utils/time_window.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import Optional +from typing import int, Optional @dataclass(frozen=True) diff --git a/src/sentry/utils/types.py b/src/sentry/utils/types.py index d2e0e80652a9a2..8b4f788c856d12 100644 --- a/src/sentry/utils/types.py +++ b/src/sentry/utils/types.py @@ -1,7 +1,7 @@ from __future__ import annotations import typing -from typing import TypeGuard +from typing import int, TypeGuard from yaml.parser import ParserError from yaml.scanner import ScannerError diff --git a/src/sentry/utils/urls.py b/src/sentry/utils/urls.py index b222bdfe68b13a..b2d6771f1ae132 100644 --- a/src/sentry/utils/urls.py +++ b/src/sentry/utils/urls.py @@ -1,3 +1,4 @@ +from typing import int import re from collections.abc import Mapping, MutableMapping, Sequence from urllib.parse import parse_qs, parse_qsl, urlencode, urljoin, urlparse, urlsplit, urlunparse diff --git a/src/sentry/utils/uwsgi.py b/src/sentry/utils/uwsgi.py index 602f7c2865914b..985f07fcc33115 100644 --- a/src/sentry/utils/uwsgi.py +++ b/src/sentry/utils/uwsgi.py @@ -1,3 +1,4 @@ +from typing import int import os diff --git a/src/sentry/utils/validators.py b/src/sentry/utils/validators.py index fe3999ad87be75..5056f07a2fad01 100644 --- a/src/sentry/utils/validators.py +++ b/src/sentry/utils/validators.py @@ -1,6 +1,6 @@ import re import uuid -from typing import TypeGuard +from typing import int, TypeGuard from django.utils.encoding import force_str diff --git a/src/sentry/utils/versioning.py b/src/sentry/utils/versioning.py index d5316ee788c157..17811a39124788 100644 --- a/src/sentry/utils/versioning.py +++ b/src/sentry/utils/versioning.py @@ -1,3 +1,4 @@ +from typing import int from sentry.exceptions import InvalidConfiguration from sentry.utils import warnings diff --git a/src/sentry/utils/warnings.py b/src/sentry/utils/warnings.py index 8a66bcb8043265..5f171e315ead97 100644 --- a/src/sentry/utils/warnings.py +++ b/src/sentry/utils/warnings.py @@ -2,7 +2,7 @@ import warnings from collections.abc import Iterator -from typing import Protocol +from typing import int, Protocol class UnsupportedBackend(RuntimeWarning): diff --git a/src/sentry/utils/yaml.py b/src/sentry/utils/yaml.py index 9f605af19aa849..b044ed3fdbb099 100644 --- a/src/sentry/utils/yaml.py +++ b/src/sentry/utils/yaml.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from functools import partial diff --git a/src/sentry/utils/zip.py b/src/sentry/utils/zip.py index 6651e48ed607eb..a68a48b121b1c1 100644 --- a/src/sentry/utils/zip.py +++ b/src/sentry/utils/zip.py @@ -4,7 +4,7 @@ import os import shutil import zipfile -from typing import IO +from typing import int, IO def is_unsafe_path(path: str) -> bool: diff --git a/src/sentry/web/api.py b/src/sentry/web/api.py index 072e26453e4912..1fa42bcdca770e 100644 --- a/src/sentry/web/api.py +++ b/src/sentry/web/api.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.http import HttpResponse from django.views.decorators.cache import cache_control diff --git a/src/sentry/web/client_config.py b/src/sentry/web/client_config.py index 7aaf54cc6305e4..197a90925c6a93 100644 --- a/src/sentry/web/client_config.py +++ b/src/sentry/web/client_config.py @@ -2,7 +2,7 @@ from collections.abc import Callable, Iterable, Mapping from functools import cached_property -from typing import Any +from typing import int, Any import sentry_sdk from django.conf import settings diff --git a/src/sentry/web/debug_urls.py b/src/sentry/web/debug_urls.py index 59ff5620148799..ef82b9249f5746 100644 --- a/src/sentry/web/debug_urls.py +++ b/src/sentry/web/debug_urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from django.views.generic import TemplateView diff --git a/src/sentry/web/decorators.py b/src/sentry/web/decorators.py index e48127180fb5ea..76b039d6f62717 100644 --- a/src/sentry/web/decorators.py +++ b/src/sentry/web/decorators.py @@ -1,6 +1,6 @@ from collections.abc import Callable from functools import wraps -from typing import Any +from typing import int, Any from django.http import HttpResponse, HttpResponseRedirect from django.urls import reverse diff --git a/src/sentry/web/forms/__init__.py b/src/sentry/web/forms/__init__.py index 5cd84e991779a4..596ddab15cd890 100644 --- a/src/sentry/web/forms/__init__.py +++ b/src/sentry/web/forms/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django import forms from sentry.models.activity import Activity diff --git a/src/sentry/web/forms/accounts.py b/src/sentry/web/forms/accounts.py index 8e841241a120fc..63e264e5c72037 100644 --- a/src/sentry/web/forms/accounts.py +++ b/src/sentry/web/forms/accounts.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django import forms from django.conf import settings diff --git a/src/sentry/web/forms/fields.py b/src/sentry/web/forms/fields.py index 4dd62077a99b8e..df466436320f04 100644 --- a/src/sentry/web/forms/fields.py +++ b/src/sentry/web/forms/fields.py @@ -1,3 +1,4 @@ +from typing import int from django.forms import CharField, EmailField, Field, TypedChoiceField, ValidationError from django.forms.utils import flatatt from django.forms.widgets import TextInput, Widget diff --git a/src/sentry/web/frontend/__init__.py b/src/sentry/web/frontend/__init__.py index 32860f7f1574f9..379829baf7633e 100644 --- a/src/sentry/web/frontend/__init__.py +++ b/src/sentry/web/frontend/__init__.py @@ -1 +1,2 @@ +from typing import int from .analytics import * # NOQA diff --git a/src/sentry/web/frontend/analytics.py b/src/sentry/web/frontend/analytics.py index a01c7b25fa1890..2f04501a28e75e 100644 --- a/src/sentry/web/frontend/analytics.py +++ b/src/sentry/web/frontend/analytics.py @@ -1,3 +1,4 @@ +from typing import int from sentry import analytics diff --git a/src/sentry/web/frontend/auth_channel_login.py b/src/sentry/web/frontend/auth_channel_login.py index f8a035cfb81931..036addfa2100b3 100644 --- a/src/sentry/web/frontend/auth_channel_login.py +++ b/src/sentry/web/frontend/auth_channel_login.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from django.utils.decorators import method_decorator from django.views.decorators.cache import never_cache diff --git a/src/sentry/web/frontend/auth_close.py b/src/sentry/web/frontend/auth_close.py index 91b363ba5542a0..a74e4926cef15e 100644 --- a/src/sentry/web/frontend/auth_close.py +++ b/src/sentry/web/frontend/auth_close.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from sentry.web.frontend.base import BaseView, control_silo_view diff --git a/src/sentry/web/frontend/auth_login.py b/src/sentry/web/frontend/auth_login.py index 2efa305d4a8d3f..c8ad41c6190b1a 100644 --- a/src/sentry/web/frontend/auth_login.py +++ b/src/sentry/web/frontend/auth_login.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging import urllib diff --git a/src/sentry/web/frontend/auth_logout.py b/src/sentry/web/frontend/auth_logout.py index e3fbfcddabd6e1..59a1713ae2a4e6 100644 --- a/src/sentry/web/frontend/auth_logout.py +++ b/src/sentry/web/frontend/auth_logout.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.auth import REDIRECT_FIELD_NAME, logout from django.contrib.auth.models import AnonymousUser from django.http import HttpRequest diff --git a/src/sentry/web/frontend/auth_organization_login.py b/src/sentry/web/frontend/auth_organization_login.py index 4346190a205e5d..b315b74ef39b07 100644 --- a/src/sentry/web/frontend/auth_organization_login.py +++ b/src/sentry/web/frontend/auth_organization_login.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.contrib import messages diff --git a/src/sentry/web/frontend/auth_provider_login.py b/src/sentry/web/frontend/auth_provider_login.py index 21fd0b93ce150e..50aabca67ef88d 100644 --- a/src/sentry/web/frontend/auth_provider_login.py +++ b/src/sentry/web/frontend/auth_provider_login.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.http.request import HttpRequest diff --git a/src/sentry/web/frontend/base.py b/src/sentry/web/frontend/base.py index 1bb445f7a4d49a..2159d631269b54 100644 --- a/src/sentry/web/frontend/base.py +++ b/src/sentry/web/frontend/base.py @@ -4,7 +4,7 @@ import inspect import logging from collections.abc import Callable, Iterable, Mapping -from typing import Any, Protocol +from typing import Any, Protocol, int from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME diff --git a/src/sentry/web/frontend/cli.py b/src/sentry/web/frontend/cli.py index 597d9b7f037ebd..8f2bfafdcc2218 100644 --- a/src/sentry/web/frontend/cli.py +++ b/src/sentry/web/frontend/cli.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import quote_plus from django.http import HttpRequest, HttpResponse, HttpResponseRedirect diff --git a/src/sentry/web/frontend/csrf_failure.py b/src/sentry/web/frontend/csrf_failure.py index 0dd0d53007bfaa..22dae149bc1426 100644 --- a/src/sentry/web/frontend/csrf_failure.py +++ b/src/sentry/web/frontend/csrf_failure.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/web/frontend/csv.py b/src/sentry/web/frontend/csv.py index 231e155bccb714..556fa2a4d5b249 100644 --- a/src/sentry/web/frontend/csv.py +++ b/src/sentry/web/frontend/csv.py @@ -2,7 +2,7 @@ import csv from collections.abc import Generator, Iterable -from typing import Generic, TypeVar +from typing import Generic, TypeVar, int from django.http import StreamingHttpResponse diff --git a/src/sentry/web/frontend/debug/charts/debug_chart_renderer.py b/src/sentry/web/frontend/debug/charts/debug_chart_renderer.py index e57b0b648e38c5..272472d4791a42 100644 --- a/src/sentry/web/frontend/debug/charts/debug_chart_renderer.py +++ b/src/sentry/web/frontend/debug/charts/debug_chart_renderer.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/charts/metric_alert_charts.py b/src/sentry/web/frontend/debug/charts/metric_alert_charts.py index 9612ebde06dc39..3cd65a448062f8 100644 --- a/src/sentry/web/frontend/debug/charts/metric_alert_charts.py +++ b/src/sentry/web/frontend/debug/charts/metric_alert_charts.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_assigned_email.py b/src/sentry/web/frontend/debug/debug_assigned_email.py index 0db79c335e34d3..2827e51827dbfa 100644 --- a/src/sentry/web/frontend/debug/debug_assigned_email.py +++ b/src/sentry/web/frontend/debug/debug_assigned_email.py @@ -1,3 +1,4 @@ +from typing import int from sentry.types.activity import ActivityType from sentry.utils.auth import AuthenticatedHttpRequest diff --git a/src/sentry/web/frontend/debug/debug_auth_views.py b/src/sentry/web/frontend/debug/debug_auth_views.py index 5de8010b1afc7f..b0e9b0c98bc20d 100644 --- a/src/sentry/web/frontend/debug/debug_auth_views.py +++ b/src/sentry/web/frontend/debug/debug_auth_views.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_codeowners_auto_sync_failure_email.py b/src/sentry/web/frontend/debug/debug_codeowners_auto_sync_failure_email.py index d7ea9c9000b6f4..eebb29e9525a5e 100644 --- a/src/sentry/web/frontend/debug/debug_codeowners_auto_sync_failure_email.py +++ b/src/sentry/web/frontend/debug/debug_codeowners_auto_sync_failure_email.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_cron_broken_monitor_email.py b/src/sentry/web/frontend/debug/debug_cron_broken_monitor_email.py index 284dfdf2ccd525..14cc3d8c3eedce 100644 --- a/src/sentry/web/frontend/debug/debug_cron_broken_monitor_email.py +++ b/src/sentry/web/frontend/debug/debug_cron_broken_monitor_email.py @@ -1,3 +1,4 @@ +from typing import int import datetime from django.http import HttpRequest, HttpResponse diff --git a/src/sentry/web/frontend/debug/debug_cron_muted_monitor_email.py b/src/sentry/web/frontend/debug/debug_cron_muted_monitor_email.py index 28a0aa427f5079..39b143703a1976 100644 --- a/src/sentry/web/frontend/debug/debug_cron_muted_monitor_email.py +++ b/src/sentry/web/frontend/debug/debug_cron_muted_monitor_email.py @@ -1,3 +1,4 @@ +from typing import int import datetime from django.http import HttpRequest, HttpResponse diff --git a/src/sentry/web/frontend/debug/debug_error_embed.py b/src/sentry/web/frontend/debug/debug_error_embed.py index c292ff96af7317..5b3766c4bece4d 100644 --- a/src/sentry/web/frontend/debug/debug_error_embed.py +++ b/src/sentry/web/frontend/debug/debug_error_embed.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import urlencode from django.conf import settings diff --git a/src/sentry/web/frontend/debug/debug_feedback_issue.py b/src/sentry/web/frontend/debug/debug_feedback_issue.py index f3052324165d7d..16e751e2486cf2 100644 --- a/src/sentry/web/frontend/debug/debug_feedback_issue.py +++ b/src/sentry/web/frontend/debug/debug_feedback_issue.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.utils.safestring import mark_safe from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_generic_issue.py b/src/sentry/web/frontend/debug/debug_generic_issue.py index 5df29d9b0475de..a307363dcdeebd 100644 --- a/src/sentry/web/frontend/debug/debug_generic_issue.py +++ b/src/sentry/web/frontend/debug/debug_generic_issue.py @@ -1,3 +1,4 @@ +from typing import int import zoneinfo from django.utils.safestring import mark_safe diff --git a/src/sentry/web/frontend/debug/debug_incident_trigger_email.py b/src/sentry/web/frontend/debug/debug_incident_trigger_email.py index ef536d12211c41..d63687c85d7233 100644 --- a/src/sentry/web/frontend/debug/debug_incident_trigger_email.py +++ b/src/sentry/web/frontend/debug/debug_incident_trigger_email.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from uuid import uuid4 diff --git a/src/sentry/web/frontend/debug/debug_invalid_identity_email.py b/src/sentry/web/frontend/debug/debug_invalid_identity_email.py index 1f3596e926c77b..b3067a4bc5092e 100644 --- a/src/sentry/web/frontend/debug/debug_invalid_identity_email.py +++ b/src/sentry/web/frontend/debug/debug_invalid_identity_email.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_mfa_added_email.py b/src/sentry/web/frontend/debug/debug_mfa_added_email.py index 6853396103ca03..530c7846f3d207 100644 --- a/src/sentry/web/frontend/debug/debug_mfa_added_email.py +++ b/src/sentry/web/frontend/debug/debug_mfa_added_email.py @@ -1,3 +1,4 @@ +from typing import int import datetime from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/web/frontend/debug/debug_mfa_removed_email.py b/src/sentry/web/frontend/debug/debug_mfa_removed_email.py index 03cb98317c83cb..64f0b57f9ffeba 100644 --- a/src/sentry/web/frontend/debug/debug_mfa_removed_email.py +++ b/src/sentry/web/frontend/debug/debug_mfa_removed_email.py @@ -1,3 +1,4 @@ +from typing import int import datetime from django.contrib.auth.models import AnonymousUser diff --git a/src/sentry/web/frontend/debug/debug_missing_member_nudge_email.py b/src/sentry/web/frontend/debug/debug_missing_member_nudge_email.py index 766416435ee74b..e512ede2255e4d 100644 --- a/src/sentry/web/frontend/debug/debug_missing_member_nudge_email.py +++ b/src/sentry/web/frontend/debug/debug_missing_member_nudge_email.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_new_release_email.py b/src/sentry/web/frontend/debug/debug_new_release_email.py index 43d53c7563b3ae..fe341b233e843f 100644 --- a/src/sentry/web/frontend/debug/debug_new_release_email.py +++ b/src/sentry/web/frontend/debug/debug_new_release_email.py @@ -1,3 +1,4 @@ +from typing import int import datetime from datetime import timezone diff --git a/src/sentry/web/frontend/debug/debug_new_user_feedback_email.py b/src/sentry/web/frontend/debug/debug_new_user_feedback_email.py index 7699b3da3ebd07..2564d21a40db6d 100644 --- a/src/sentry/web/frontend/debug/debug_new_user_feedback_email.py +++ b/src/sentry/web/frontend/debug/debug_new_user_feedback_email.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_note_email.py b/src/sentry/web/frontend/debug/debug_note_email.py index 09e3d39dec359c..53c147e9eec45b 100644 --- a/src/sentry/web/frontend/debug/debug_note_email.py +++ b/src/sentry/web/frontend/debug/debug_note_email.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest from sentry.types.activity import ActivityType diff --git a/src/sentry/web/frontend/debug/debug_oauth_authorize.py b/src/sentry/web/frontend/debug/debug_oauth_authorize.py index 0968abee97e90c..fbe4bd83923669 100644 --- a/src/sentry/web/frontend/debug/debug_oauth_authorize.py +++ b/src/sentry/web/frontend/debug/debug_oauth_authorize.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_onboarding_continuation_email.py b/src/sentry/web/frontend/debug/debug_onboarding_continuation_email.py index f837ba16ccd1e2..f00f83c7a46051 100644 --- a/src/sentry/web/frontend/debug/debug_onboarding_continuation_email.py +++ b/src/sentry/web/frontend/debug/debug_onboarding_continuation_email.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_organization_integration_request.py b/src/sentry/web/frontend/debug/debug_organization_integration_request.py index 0ccc34143ff058..dac92f03594896 100644 --- a/src/sentry/web/frontend/debug/debug_organization_integration_request.py +++ b/src/sentry/web/frontend/debug/debug_organization_integration_request.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_organization_invite_request.py b/src/sentry/web/frontend/debug/debug_organization_invite_request.py index 41005e2ef2f8a9..6893b00012f1d0 100644 --- a/src/sentry/web/frontend/debug/debug_organization_invite_request.py +++ b/src/sentry/web/frontend/debug/debug_organization_invite_request.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_organization_join_request.py b/src/sentry/web/frontend/debug/debug_organization_join_request.py index 6c024130cca598..6da0fddb18351e 100644 --- a/src/sentry/web/frontend/debug/debug_organization_join_request.py +++ b/src/sentry/web/frontend/debug/debug_organization_join_request.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_password_changed_email.py b/src/sentry/web/frontend/debug/debug_password_changed_email.py index 9649ce7c37ec82..70ec04cd8ad0c5 100644 --- a/src/sentry/web/frontend/debug/debug_password_changed_email.py +++ b/src/sentry/web/frontend/debug/debug_password_changed_email.py @@ -1,3 +1,4 @@ +from typing import int import datetime from django.http import HttpResponse diff --git a/src/sentry/web/frontend/debug/debug_performance_issue.py b/src/sentry/web/frontend/debug/debug_performance_issue.py index 65240fdfe7c602..6590923bf8fd31 100644 --- a/src/sentry/web/frontend/debug/debug_performance_issue.py +++ b/src/sentry/web/frontend/debug/debug_performance_issue.py @@ -1,3 +1,4 @@ +from typing import int from django.utils.safestring import mark_safe from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_recovery_codes_regenerated_email.py b/src/sentry/web/frontend/debug/debug_recovery_codes_regenerated_email.py index 4c21edbb188556..0d1371ea55e373 100644 --- a/src/sentry/web/frontend/debug/debug_recovery_codes_regenerated_email.py +++ b/src/sentry/web/frontend/debug/debug_recovery_codes_regenerated_email.py @@ -1,3 +1,4 @@ +from typing import int import datetime from django.http import HttpResponse diff --git a/src/sentry/web/frontend/debug/debug_regression_email.py b/src/sentry/web/frontend/debug/debug_regression_email.py index 1a8cef20002629..2280e0e99c9ac5 100644 --- a/src/sentry/web/frontend/debug/debug_regression_email.py +++ b/src/sentry/web/frontend/debug/debug_regression_email.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest from sentry.types.activity import ActivityType diff --git a/src/sentry/web/frontend/debug/debug_resolved_email.py b/src/sentry/web/frontend/debug/debug_resolved_email.py index 11af58ddbbd035..c3d6682320e557 100644 --- a/src/sentry/web/frontend/debug/debug_resolved_email.py +++ b/src/sentry/web/frontend/debug/debug_resolved_email.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest from sentry.types.activity import ActivityType diff --git a/src/sentry/web/frontend/debug/debug_resolved_in_release_email.py b/src/sentry/web/frontend/debug/debug_resolved_in_release_email.py index d592a43b89bb86..9b05b9dee25b6c 100644 --- a/src/sentry/web/frontend/debug/debug_resolved_in_release_email.py +++ b/src/sentry/web/frontend/debug/debug_resolved_in_release_email.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest from sentry.types.activity import ActivityType diff --git a/src/sentry/web/frontend/debug/debug_setup_2fa_email.py b/src/sentry/web/frontend/debug/debug_setup_2fa_email.py index 5a1e0541bdc528..6bfeb831262efe 100644 --- a/src/sentry/web/frontend/debug/debug_setup_2fa_email.py +++ b/src/sentry/web/frontend/debug/debug_setup_2fa_email.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_sso_link_email.py b/src/sentry/web/frontend/debug/debug_sso_link_email.py index fe3e33578b3bdb..0fb3f19c9ffe0a 100644 --- a/src/sentry/web/frontend/debug/debug_sso_link_email.py +++ b/src/sentry/web/frontend/debug/debug_sso_link_email.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_trigger_error.py b/src/sentry/web/frontend/debug/debug_trigger_error.py index b757c6c06694d1..3622df52261201 100644 --- a/src/sentry/web/frontend/debug/debug_trigger_error.py +++ b/src/sentry/web/frontend/debug/debug_trigger_error.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest from django.http.response import HttpResponseBase from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_unable_to_delete_repository.py b/src/sentry/web/frontend/debug/debug_unable_to_delete_repository.py index f397c12f8a708b..2c8808b2fdebb2 100644 --- a/src/sentry/web/frontend/debug/debug_unable_to_delete_repository.py +++ b/src/sentry/web/frontend/debug/debug_unable_to_delete_repository.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_unable_to_fetch_commits_email.py b/src/sentry/web/frontend/debug/debug_unable_to_fetch_commits_email.py index 7271678e2aa5a0..feba27c97e7a3c 100644 --- a/src/sentry/web/frontend/debug/debug_unable_to_fetch_commits_email.py +++ b/src/sentry/web/frontend/debug/debug_unable_to_fetch_commits_email.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/debug/debug_unassigned_email.py b/src/sentry/web/frontend/debug/debug_unassigned_email.py index b2414ba53466b8..10787c046f7f76 100644 --- a/src/sentry/web/frontend/debug/debug_unassigned_email.py +++ b/src/sentry/web/frontend/debug/debug_unassigned_email.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest from sentry.types.activity import ActivityType diff --git a/src/sentry/web/frontend/debug/debug_uptime_auto_detected_monitor_email.py b/src/sentry/web/frontend/debug/debug_uptime_auto_detected_monitor_email.py index b0dcf2e190fd71..5f401f36c99995 100644 --- a/src/sentry/web/frontend/debug/debug_uptime_auto_detected_monitor_email.py +++ b/src/sentry/web/frontend/debug/debug_uptime_auto_detected_monitor_email.py @@ -1,3 +1,4 @@ +from typing import int import datetime from django.http import HttpRequest, HttpResponse diff --git a/src/sentry/web/frontend/debug/debug_weekly_report.py b/src/sentry/web/frontend/debug/debug_weekly_report.py index de4ca6b517c898..7dfe197f2a76f8 100644 --- a/src/sentry/web/frontend/debug/debug_weekly_report.py +++ b/src/sentry/web/frontend/debug/debug_weekly_report.py @@ -1,3 +1,4 @@ +from typing import int import time from datetime import datetime, timedelta, timezone from random import Random diff --git a/src/sentry/web/frontend/debug/mail.py b/src/sentry/web/frontend/debug/mail.py index 8aaa2b6bcfa943..d014b503846c14 100644 --- a/src/sentry/web/frontend/debug/mail.py +++ b/src/sentry/web/frontend/debug/mail.py @@ -11,7 +11,7 @@ from datetime import datetime, timedelta, timezone from hashlib import md5 from random import Random -from typing import Any +from typing import int, Any from unittest import mock from urllib.parse import urlencode diff --git a/src/sentry/web/frontend/disabled_member_view.py b/src/sentry/web/frontend/disabled_member_view.py index 30270fddc9103c..2e54b344c3b200 100644 --- a/src/sentry/web/frontend/disabled_member_view.py +++ b/src/sentry/web/frontend/disabled_member_view.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.urls import reverse diff --git a/src/sentry/web/frontend/error_404.py b/src/sentry/web/frontend/error_404.py index e39b9114a27786..516d886976905c 100644 --- a/src/sentry/web/frontend/error_404.py +++ b/src/sentry/web/frontend/error_404.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.views.generic import View diff --git a/src/sentry/web/frontend/error_500.py b/src/sentry/web/frontend/error_500.py index 88d204e4f45789..4dee5a304ca812 100644 --- a/src/sentry/web/frontend/error_500.py +++ b/src/sentry/web/frontend/error_500.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.conf import settings diff --git a/src/sentry/web/frontend/generic.py b/src/sentry/web/frontend/generic.py index a440df6db59fde..d5293810b59f3d 100644 --- a/src/sentry/web/frontend/generic.py +++ b/src/sentry/web/frontend/generic.py @@ -1,3 +1,4 @@ +from typing import int import os import posixpath from urllib.parse import unquote diff --git a/src/sentry/web/frontend/group_event_json.py b/src/sentry/web/frontend/group_event_json.py index fcf321ce1111d4..8cffafd9a99f54 100644 --- a/src/sentry/web/frontend/group_event_json.py +++ b/src/sentry/web/frontend/group_event_json.py @@ -1,3 +1,4 @@ +from typing import int from django.http import Http404, HttpRequest, HttpResponse from sentry.models.group import Group, get_group_with_redirect diff --git a/src/sentry/web/frontend/group_plugin_action.py b/src/sentry/web/frontend/group_plugin_action.py index d93c0313911e70..5b81da11ef0e6c 100644 --- a/src/sentry/web/frontend/group_plugin_action.py +++ b/src/sentry/web/frontend/group_plugin_action.py @@ -1,3 +1,4 @@ +from typing import int from django.http import Http404, HttpRequest, HttpResponseRedirect from django.http.response import HttpResponseBase from django.shortcuts import get_object_or_404 diff --git a/src/sentry/web/frontend/group_tag_export.py b/src/sentry/web/frontend/group_tag_export.py index d011d3a3e1f312..539bba30cbcde9 100644 --- a/src/sentry/web/frontend/group_tag_export.py +++ b/src/sentry/web/frontend/group_tag_export.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.http import Http404 from django.http.response import HttpResponseBase diff --git a/src/sentry/web/frontend/home.py b/src/sentry/web/frontend/home.py index 5ea6dfbf6e05cb..082503d399f602 100644 --- a/src/sentry/web/frontend/home.py +++ b/src/sentry/web/frontend/home.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest from django.http.response import HttpResponseBase diff --git a/src/sentry/web/frontend/idp_email_verification.py b/src/sentry/web/frontend/idp_email_verification.py index cdcd24aba2157d..0a99a4b9680284 100644 --- a/src/sentry/web/frontend/idp_email_verification.py +++ b/src/sentry/web/frontend/idp_email_verification.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.http import HttpRequest diff --git a/src/sentry/web/frontend/js_sdk_loader.py b/src/sentry/web/frontend/js_sdk_loader.py index a7b7b81ed4094f..108fdd933eae5b 100644 --- a/src/sentry/web/frontend/js_sdk_loader.py +++ b/src/sentry/web/frontend/js_sdk_loader.py @@ -1,7 +1,7 @@ from __future__ import annotations import time -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int from django.conf import settings from django.http import HttpResponse diff --git a/src/sentry/web/frontend/mailgun_inbound_webhook.py b/src/sentry/web/frontend/mailgun_inbound_webhook.py index 88c144111b70a7..8a7d25f03ac7aa 100644 --- a/src/sentry/web/frontend/mailgun_inbound_webhook.py +++ b/src/sentry/web/frontend/mailgun_inbound_webhook.py @@ -1,7 +1,7 @@ import hmac import logging from hashlib import sha256 -from typing import Any +from typing import int, Any from django.conf import settings from django.http import HttpRequest, HttpResponse diff --git a/src/sentry/web/frontend/oauth_authorize.py b/src/sentry/web/frontend/oauth_authorize.py index ce927c531697f2..2954a8ffc26212 100644 --- a/src/sentry/web/frontend/oauth_authorize.py +++ b/src/sentry/web/frontend/oauth_authorize.py @@ -1,7 +1,7 @@ from __future__ import annotations import logging -from typing import Any, Literal +from typing import Any, Literal, int from urllib.parse import parse_qsl, urlencode, urlparse, urlunparse from django.conf import settings diff --git a/src/sentry/web/frontend/oauth_token.py b/src/sentry/web/frontend/oauth_token.py index dab2345230885b..82b027538d9674 100644 --- a/src/sentry/web/frontend/oauth_token.py +++ b/src/sentry/web/frontend/oauth_token.py @@ -3,7 +3,7 @@ import base64 import logging from datetime import datetime -from typing import Literal, NotRequired, TypedDict +from typing import Literal, NotRequired, TypedDict, int from django.http import HttpRequest, HttpResponse from django.utils import timezone diff --git a/src/sentry/web/frontend/openidtoken.py b/src/sentry/web/frontend/openidtoken.py index 71981e41873658..88db7e31f4346a 100644 --- a/src/sentry/web/frontend/openidtoken.py +++ b/src/sentry/web/frontend/openidtoken.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/src/sentry/web/frontend/organization_auth_settings.py b/src/sentry/web/frontend/organization_auth_settings.py index 6a3b3f71cdc988..0b17fddf423fc0 100644 --- a/src/sentry/web/frontend/organization_auth_settings.py +++ b/src/sentry/web/frontend/organization_auth_settings.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry/web/frontend/organization_avatar.py b/src/sentry/web/frontend/organization_avatar.py index d9089104d7e026..8a206c1eb6d701 100644 --- a/src/sentry/web/frontend/organization_avatar.py +++ b/src/sentry/web/frontend/organization_avatar.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.avatars.organization_avatar import OrganizationAvatar from sentry.web.frontend.base import AvatarPhotoView, region_silo_view diff --git a/src/sentry/web/frontend/out.py b/src/sentry/web/frontend/out.py index 6e3190e367db3c..43f3c9c75b4714 100644 --- a/src/sentry/web/frontend/out.py +++ b/src/sentry/web/frontend/out.py @@ -1,3 +1,4 @@ +from typing import int from django.http import Http404, HttpResponseRedirect from django.http.response import HttpResponseBase from django.views.generic import View diff --git a/src/sentry/web/frontend/pipeline_advancer.py b/src/sentry/web/frontend/pipeline_advancer.py index 8c8f606ab0cb3a..556c593b4e04da 100644 --- a/src/sentry/web/frontend/pipeline_advancer.py +++ b/src/sentry/web/frontend/pipeline_advancer.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib import messages from django.http import HttpRequest, HttpResponseRedirect from django.http.response import HttpResponseBase diff --git a/src/sentry/web/frontend/project_event.py b/src/sentry/web/frontend/project_event.py index d2e215768208e0..bc84a3dcf03fe7 100644 --- a/src/sentry/web/frontend/project_event.py +++ b/src/sentry/web/frontend/project_event.py @@ -1,3 +1,4 @@ +from typing import int from django.http import Http404, HttpRequest, HttpResponseRedirect from django.urls import reverse diff --git a/src/sentry/web/frontend/react_page.py b/src/sentry/web/frontend/react_page.py index 696ac919e1876b..60db9c907a4fa8 100644 --- a/src/sentry/web/frontend/react_page.py +++ b/src/sentry/web/frontend/react_page.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from fnmatch import fnmatch diff --git a/src/sentry/web/frontend/reactivate_account.py b/src/sentry/web/frontend/reactivate_account.py index a2aa8f672fbea9..10df9c434def1d 100644 --- a/src/sentry/web/frontend/reactivate_account.py +++ b/src/sentry/web/frontend/reactivate_account.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest from django.http.response import HttpResponseBase from django.utils.decorators import method_decorator diff --git a/src/sentry/web/frontend/release_webhook.py b/src/sentry/web/frontend/release_webhook.py index 0631890f7e5db4..048015fff6ad9c 100644 --- a/src/sentry/web/frontend/release_webhook.py +++ b/src/sentry/web/frontend/release_webhook.py @@ -1,3 +1,4 @@ +from typing import int import hmac import logging from hashlib import sha256 diff --git a/src/sentry/web/frontend/setup_wizard.py b/src/sentry/web/frontend/setup_wizard.py index 4d4fbb9f678008..23bc60f3e8ccae 100644 --- a/src/sentry/web/frontend/setup_wizard.py +++ b/src/sentry/web/frontend/setup_wizard.py @@ -2,7 +2,7 @@ from collections import defaultdict from datetime import date -from typing import Any +from typing import int, Any from urllib.parse import parse_qsl, urlparse, urlunparse from django.conf import settings diff --git a/src/sentry/web/frontend/shared_group_details.py b/src/sentry/web/frontend/shared_group_details.py index 459c395586452f..e4fff6887c4c97 100644 --- a/src/sentry/web/frontend/shared_group_details.py +++ b/src/sentry/web/frontend/shared_group_details.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.conf import settings from django.http.request import HttpRequest diff --git a/src/sentry/web/frontend/sudo.py b/src/sentry/web/frontend/sudo.py index a9f2c74c368b19..793ed627806d12 100644 --- a/src/sentry/web/frontend/sudo.py +++ b/src/sentry/web/frontend/sudo.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.http.request import HttpRequest diff --git a/src/sentry/web/frontend/twofactor.py b/src/sentry/web/frontend/twofactor.py index a07c041b988ca8..f15c07e3d7082d 100644 --- a/src/sentry/web/frontend/twofactor.py +++ b/src/sentry/web/frontend/twofactor.py @@ -1,3 +1,4 @@ +from typing import int import logging import time from base64 import b64encode diff --git a/src/sentry/web/helpers.py b/src/sentry/web/helpers.py index 3f0e311958381b..289bad11a141ab 100644 --- a/src/sentry/web/helpers.py +++ b/src/sentry/web/helpers.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from django.http import HttpRequest, HttpResponse from django.template import loader diff --git a/src/sentry/web/urls.py b/src/sentry/web/urls.py index d45a6ec3f2ea8b..2eef056f176fc3 100644 --- a/src/sentry/web/urls.py +++ b/src/sentry/web/urls.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import re diff --git a/src/sentry/web_vitals/issue_platform_adapter.py b/src/sentry/web_vitals/issue_platform_adapter.py index 066402193d3d59..20fac95c8f3ae7 100644 --- a/src/sentry/web_vitals/issue_platform_adapter.py +++ b/src/sentry/web_vitals/issue_platform_adapter.py @@ -1,3 +1,4 @@ +from typing import int import hashlib from datetime import UTC, datetime from uuid import uuid4 diff --git a/src/sentry/web_vitals/query.py b/src/sentry/web_vitals/query.py index 5f0195ca420b3e..abd39c8c2c56c9 100644 --- a/src/sentry/web_vitals/query.py +++ b/src/sentry/web_vitals/query.py @@ -1,3 +1,4 @@ +from typing import int import logging import re from datetime import UTC, datetime, timedelta diff --git a/src/sentry/web_vitals/types.py b/src/sentry/web_vitals/types.py index e3487bbacfe35a..28108d36d238e2 100644 --- a/src/sentry/web_vitals/types.py +++ b/src/sentry/web_vitals/types.py @@ -1,4 +1,4 @@ -from typing import Literal, TypedDict +from typing import Literal, TypedDict, int from sentry.models.project import Project diff --git a/src/sentry/workflow_engine/apps.py b/src/sentry/workflow_engine/apps.py index 7c5e897792b356..1a209e85e1498e 100644 --- a/src/sentry/workflow_engine/apps.py +++ b/src/sentry/workflow_engine/apps.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import AppConfig diff --git a/src/sentry/workflow_engine/buffer/__init__.py b/src/sentry/workflow_engine/buffer/__init__.py index dbeb18551c761f..85c989b9284c7c 100644 --- a/src/sentry/workflow_engine/buffer/__init__.py +++ b/src/sentry/workflow_engine/buffer/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.workflow_engine.buffer.redis_hash_sorted_set_buffer import RedisHashSortedSetBuffer diff --git a/src/sentry/workflow_engine/buffer/batch_client.py b/src/sentry/workflow_engine/buffer/batch_client.py index 5f5f02f2ead2a7..e97da44038ce3a 100644 --- a/src/sentry/workflow_engine/buffer/batch_client.py +++ b/src/sentry/workflow_engine/buffer/batch_client.py @@ -2,7 +2,7 @@ import random from collections.abc import Mapping -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING import pydantic diff --git a/src/sentry/workflow_engine/buffer/redis_hash_sorted_set_buffer.py b/src/sentry/workflow_engine/buffer/redis_hash_sorted_set_buffer.py index 33f986f2494fd7..f990155e225d0a 100644 --- a/src/sentry/workflow_engine/buffer/redis_hash_sorted_set_buffer.py +++ b/src/sentry/workflow_engine/buffer/redis_hash_sorted_set_buffer.py @@ -4,7 +4,7 @@ import time from collections import defaultdict from collections.abc import Callable, Iterable, Mapping, Sequence -from typing import Any, TypeAlias, TypeVar +from typing import Any, TypeAlias, TypeVar, int import pydantic import rb diff --git a/src/sentry/workflow_engine/endpoints/organization_alertrule_workflow_index.py b/src/sentry/workflow_engine/endpoints/organization_alertrule_workflow_index.py index 36ab0293075a4a..6640c67afe1f5c 100644 --- a/src/sentry/workflow_engine/endpoints/organization_alertrule_workflow_index.py +++ b/src/sentry/workflow_engine/endpoints/organization_alertrule_workflow_index.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.response import Response diff --git a/src/sentry/workflow_engine/endpoints/organization_available_action_index.py b/src/sentry/workflow_engine/endpoints/organization_available_action_index.py index fdcfb9ebb092b7..d994b4ce42f76c 100644 --- a/src/sentry/workflow_engine/endpoints/organization_available_action_index.py +++ b/src/sentry/workflow_engine/endpoints/organization_available_action_index.py @@ -1,5 +1,5 @@ from collections import defaultdict -from typing import TypedDict +from typing import int, TypedDict from drf_spectacular.utils import extend_schema diff --git a/src/sentry/workflow_engine/endpoints/organization_data_condition_index.py b/src/sentry/workflow_engine/endpoints/organization_data_condition_index.py index 739baf05bb0f7d..9b2883da814442 100644 --- a/src/sentry/workflow_engine/endpoints/organization_data_condition_index.py +++ b/src/sentry/workflow_engine/endpoints/organization_data_condition_index.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework import serializers diff --git a/src/sentry/workflow_engine/endpoints/organization_detector_count.py b/src/sentry/workflow_engine/endpoints/organization_detector_count.py index 79442bcfb892e2..6155b5bace8192 100644 --- a/src/sentry/workflow_engine/endpoints/organization_detector_count.py +++ b/src/sentry/workflow_engine/endpoints/organization_detector_count.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from django.db.models import Case, Count, IntegerField, When from drf_spectacular.utils import extend_schema diff --git a/src/sentry/workflow_engine/endpoints/organization_detector_details.py b/src/sentry/workflow_engine/endpoints/organization_detector_details.py index 63f4a5e02b1162..b8b2c7ed51e49d 100644 --- a/src/sentry/workflow_engine/endpoints/organization_detector_details.py +++ b/src/sentry/workflow_engine/endpoints/organization_detector_details.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from drf_spectacular.utils import PolymorphicProxySerializer, extend_schema from rest_framework import status diff --git a/src/sentry/workflow_engine/endpoints/organization_detector_index.py b/src/sentry/workflow_engine/endpoints/organization_detector_index.py index 4fef0177f7cc8b..28b22cce4e865e 100644 --- a/src/sentry/workflow_engine/endpoints/organization_detector_index.py +++ b/src/sentry/workflow_engine/endpoints/organization_detector_index.py @@ -1,6 +1,6 @@ from collections.abc import Iterable, Sequence from functools import partial -from typing import assert_never +from typing import int, assert_never from django.db import router, transaction from django.db.models import Count, F, OuterRef, Q, Subquery diff --git a/src/sentry/workflow_engine/endpoints/organization_detector_types.py b/src/sentry/workflow_engine/endpoints/organization_detector_types.py index 49dcda0d97ed6f..a68c7066810c14 100644 --- a/src/sentry/workflow_engine/endpoints/organization_detector_types.py +++ b/src/sentry/workflow_engine/endpoints/organization_detector_types.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from sentry.api.api_owners import ApiOwner diff --git a/src/sentry/workflow_engine/endpoints/organization_detector_workflow_details.py b/src/sentry/workflow_engine/endpoints/organization_detector_workflow_details.py index 854c344271e4bf..158020430cb18b 100644 --- a/src/sentry/workflow_engine/endpoints/organization_detector_workflow_details.py +++ b/src/sentry/workflow_engine/endpoints/organization_detector_workflow_details.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework import status from rest_framework.exceptions import PermissionDenied diff --git a/src/sentry/workflow_engine/endpoints/organization_detector_workflow_index.py b/src/sentry/workflow_engine/endpoints/organization_detector_workflow_index.py index 310fc890656f29..9300f6ba67bd3a 100644 --- a/src/sentry/workflow_engine/endpoints/organization_detector_workflow_index.py +++ b/src/sentry/workflow_engine/endpoints/organization_detector_workflow_index.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from rest_framework import serializers, status from rest_framework.exceptions import PermissionDenied diff --git a/src/sentry/workflow_engine/endpoints/organization_open_periods.py b/src/sentry/workflow_engine/endpoints/organization_open_periods.py index 2fb04430ee828b..26fc87add30c88 100644 --- a/src/sentry/workflow_engine/endpoints/organization_open_periods.py +++ b/src/sentry/workflow_engine/endpoints/organization_open_periods.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from drf_spectacular.utils import OpenApiParameter, extend_schema from rest_framework.exceptions import ParseError, ValidationError diff --git a/src/sentry/workflow_engine/endpoints/organization_test_fire_action.py b/src/sentry/workflow_engine/endpoints/organization_test_fire_action.py index e44eaed666b7f0..3fb8db24c9f562 100644 --- a/src/sentry/workflow_engine/endpoints/organization_test_fire_action.py +++ b/src/sentry/workflow_engine/endpoints/organization_test_fire_action.py @@ -1,5 +1,5 @@ import logging -from typing import Any, TypedDict +from typing import Any, TypedDict, int from drf_spectacular.utils import extend_schema from rest_framework import serializers diff --git a/src/sentry/workflow_engine/endpoints/organization_workflow_details.py b/src/sentry/workflow_engine/endpoints/organization_workflow_details.py index 3c4916944fc108..dd15f60c436c80 100644 --- a/src/sentry/workflow_engine/endpoints/organization_workflow_details.py +++ b/src/sentry/workflow_engine/endpoints/organization_workflow_details.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from drf_spectacular.utils import extend_schema from rest_framework.exceptions import ValidationError diff --git a/src/sentry/workflow_engine/endpoints/organization_workflow_group_history.py b/src/sentry/workflow_engine/endpoints/organization_workflow_group_history.py index a22717f2992927..359f34d2436e2a 100644 --- a/src/sentry/workflow_engine/endpoints/organization_workflow_group_history.py +++ b/src/sentry/workflow_engine/endpoints/organization_workflow_group_history.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.exceptions import ParseError diff --git a/src/sentry/workflow_engine/endpoints/organization_workflow_index.py b/src/sentry/workflow_engine/endpoints/organization_workflow_index.py index abb6c05a01d692..35c11ae61c23e8 100644 --- a/src/sentry/workflow_engine/endpoints/organization_workflow_index.py +++ b/src/sentry/workflow_engine/endpoints/organization_workflow_index.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from functools import partial diff --git a/src/sentry/workflow_engine/endpoints/organization_workflow_stats.py b/src/sentry/workflow_engine/endpoints/organization_workflow_stats.py index 6325456504e007..1b0b9e17019733 100644 --- a/src/sentry/workflow_engine/endpoints/organization_workflow_stats.py +++ b/src/sentry/workflow_engine/endpoints/organization_workflow_stats.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from drf_spectacular.utils import extend_schema from rest_framework.exceptions import ParseError diff --git a/src/sentry/workflow_engine/endpoints/serializers/__init__.py b/src/sentry/workflow_engine/endpoints/serializers/__init__.py index a2b9f4e40e6ac3..9b634c9f8e0826 100644 --- a/src/sentry/workflow_engine/endpoints/serializers/__init__.py +++ b/src/sentry/workflow_engine/endpoints/serializers/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = ( "ActionHandlerSerializer", "ActionSerializer", diff --git a/src/sentry/workflow_engine/endpoints/serializers/action_handler_serializer.py b/src/sentry/workflow_engine/endpoints/serializers/action_handler_serializer.py index fb278cde57badf..17b22cd1a69100 100644 --- a/src/sentry/workflow_engine/endpoints/serializers/action_handler_serializer.py +++ b/src/sentry/workflow_engine/endpoints/serializers/action_handler_serializer.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int from sentry.api.serializers import Serializer, register from sentry.rules.actions.notify_event_service import PLUGINS_WITH_FIRST_PARTY_EQUIVALENTS diff --git a/src/sentry/workflow_engine/endpoints/serializers/action_serializer.py b/src/sentry/workflow_engine/endpoints/serializers/action_serializer.py index d70b2a67e28fed..a6b817daa76a10 100644 --- a/src/sentry/workflow_engine/endpoints/serializers/action_serializer.py +++ b/src/sentry/workflow_engine/endpoints/serializers/action_serializer.py @@ -1,4 +1,4 @@ -from typing import TypedDict +from typing import int, TypedDict from sentry.api.serializers import Serializer, register from sentry.api.serializers.rest_framework.base import convert_dict_key_case, snake_to_camel_case diff --git a/src/sentry/workflow_engine/endpoints/serializers/alertrule_workflow_serializer.py b/src/sentry/workflow_engine/endpoints/serializers/alertrule_workflow_serializer.py index a6c5c8205512cd..33c1e6130b8f27 100644 --- a/src/sentry/workflow_engine/endpoints/serializers/alertrule_workflow_serializer.py +++ b/src/sentry/workflow_engine/endpoints/serializers/alertrule_workflow_serializer.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any, TypedDict +from typing import Any, TypedDict, int from sentry.api.serializers import Serializer, register from sentry.workflow_engine.models import AlertRuleWorkflow diff --git a/src/sentry/workflow_engine/endpoints/serializers/data_condition_group_serializer.py b/src/sentry/workflow_engine/endpoints/serializers/data_condition_group_serializer.py index 95f1cff13f22ea..3a6729586045da 100644 --- a/src/sentry/workflow_engine/endpoints/serializers/data_condition_group_serializer.py +++ b/src/sentry/workflow_engine/endpoints/serializers/data_condition_group_serializer.py @@ -1,6 +1,6 @@ from collections import defaultdict from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from sentry.api.serializers import Serializer, register, serialize from sentry.workflow_engine.models import ( diff --git a/src/sentry/workflow_engine/endpoints/serializers/data_condition_handler_serializer.py b/src/sentry/workflow_engine/endpoints/serializers/data_condition_handler_serializer.py index af9bd2a3b9589c..82af84d9e1e3de 100644 --- a/src/sentry/workflow_engine/endpoints/serializers/data_condition_handler_serializer.py +++ b/src/sentry/workflow_engine/endpoints/serializers/data_condition_handler_serializer.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any, NotRequired, TypedDict +from typing import Any, NotRequired, TypedDict, int from sentry.api.serializers import Serializer, register from sentry.workflow_engine.types import DataConditionHandler diff --git a/src/sentry/workflow_engine/endpoints/serializers/data_condition_serializer.py b/src/sentry/workflow_engine/endpoints/serializers/data_condition_serializer.py index eb5a0fc81d8fd0..5c66a77ab422a1 100644 --- a/src/sentry/workflow_engine/endpoints/serializers/data_condition_serializer.py +++ b/src/sentry/workflow_engine/endpoints/serializers/data_condition_serializer.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.api.serializers import Serializer, register from sentry.api.serializers.rest_framework.base import convert_dict_key_case, snake_to_camel_case diff --git a/src/sentry/workflow_engine/endpoints/serializers/data_source_serializer.py b/src/sentry/workflow_engine/endpoints/serializers/data_source_serializer.py index ff4e821ffd314b..d12a39f57c3308 100644 --- a/src/sentry/workflow_engine/endpoints/serializers/data_source_serializer.py +++ b/src/sentry/workflow_engine/endpoints/serializers/data_source_serializer.py @@ -1,6 +1,6 @@ from collections import defaultdict from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from sentry.api.serializers import Serializer, register, serialize from sentry.workflow_engine.models import DataSource diff --git a/src/sentry/workflow_engine/endpoints/serializers/detector_serializer.py b/src/sentry/workflow_engine/endpoints/serializers/detector_serializer.py index 755a42d0549c64..2897df51d8424c 100644 --- a/src/sentry/workflow_engine/endpoints/serializers/detector_serializer.py +++ b/src/sentry/workflow_engine/endpoints/serializers/detector_serializer.py @@ -1,7 +1,7 @@ from collections import defaultdict from collections.abc import Mapping, MutableMapping, Sequence from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.db.models import Count diff --git a/src/sentry/workflow_engine/endpoints/serializers/detector_workflow_serializer.py b/src/sentry/workflow_engine/endpoints/serializers/detector_workflow_serializer.py index eb0f744da0785f..bc11ec04dfe1c7 100644 --- a/src/sentry/workflow_engine/endpoints/serializers/detector_workflow_serializer.py +++ b/src/sentry/workflow_engine/endpoints/serializers/detector_workflow_serializer.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any, TypedDict +from typing import Any, TypedDict, int from sentry.api.serializers import Serializer, register from sentry.workflow_engine.models import DetectorWorkflow diff --git a/src/sentry/workflow_engine/endpoints/serializers/group_open_period_serializer.py b/src/sentry/workflow_engine/endpoints/serializers/group_open_period_serializer.py index 519ddb3dee60b6..db6ba9840df7cb 100644 --- a/src/sentry/workflow_engine/endpoints/serializers/group_open_period_serializer.py +++ b/src/sentry/workflow_engine/endpoints/serializers/group_open_period_serializer.py @@ -1,7 +1,7 @@ from collections import defaultdict from collections.abc import Mapping from datetime import datetime -from typing import Any, TypedDict +from typing import Any, TypedDict, int from sentry.api.serializers import Serializer, register, serialize from sentry.incidents.utils.process_update_helpers import calculate_event_date_from_update_date diff --git a/src/sentry/workflow_engine/endpoints/serializers/timeseries_value_serializer.py b/src/sentry/workflow_engine/endpoints/serializers/timeseries_value_serializer.py index 6513a9d3852520..047195df1462dd 100644 --- a/src/sentry/workflow_engine/endpoints/serializers/timeseries_value_serializer.py +++ b/src/sentry/workflow_engine/endpoints/serializers/timeseries_value_serializer.py @@ -1,6 +1,6 @@ from collections.abc import Mapping, Sequence from datetime import datetime, timedelta, timezone -from typing import Any, TypedDict +from typing import Any, TypedDict, int from django.db.models import Count from django.db.models.functions import TruncHour diff --git a/src/sentry/workflow_engine/endpoints/serializers/workflow_group_history_serializer.py b/src/sentry/workflow_engine/endpoints/serializers/workflow_group_history_serializer.py index 832399e70a5759..8ccff2d777838a 100644 --- a/src/sentry/workflow_engine/endpoints/serializers/workflow_group_history_serializer.py +++ b/src/sentry/workflow_engine/endpoints/serializers/workflow_group_history_serializer.py @@ -1,7 +1,7 @@ from collections.abc import Mapping, MutableMapping, Sequence from dataclasses import dataclass from datetime import datetime -from typing import Any, NotRequired, TypedDict, cast +from typing import Any, NotRequired, TypedDict, cast, int from django.db.models import Count, Max, OuterRef, Subquery diff --git a/src/sentry/workflow_engine/endpoints/serializers/workflow_serializer.py b/src/sentry/workflow_engine/endpoints/serializers/workflow_serializer.py index 083198f80bebcf..22fe99b26b121b 100644 --- a/src/sentry/workflow_engine/endpoints/serializers/workflow_serializer.py +++ b/src/sentry/workflow_engine/endpoints/serializers/workflow_serializer.py @@ -1,7 +1,7 @@ from collections import defaultdict from collections.abc import Mapping, MutableMapping, Sequence from datetime import datetime -from typing import Any +from typing import int, Any from django.db.models import Max diff --git a/src/sentry/workflow_engine/endpoints/urls.py b/src/sentry/workflow_engine/endpoints/urls.py index 3cccb0bca6e12d..551778b7beb37c 100644 --- a/src/sentry/workflow_engine/endpoints/urls.py +++ b/src/sentry/workflow_engine/endpoints/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from sentry.workflow_engine.endpoints.organization_alertrule_workflow_index import ( diff --git a/src/sentry/workflow_engine/endpoints/utils/filters.py b/src/sentry/workflow_engine/endpoints/utils/filters.py index ce51fec5034d40..0413c0aa085cb3 100644 --- a/src/sentry/workflow_engine/endpoints/utils/filters.py +++ b/src/sentry/workflow_engine/endpoints/utils/filters.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Model, Q, QuerySet from sentry.api.event_search import SearchFilter diff --git a/src/sentry/workflow_engine/endpoints/utils/sortby.py b/src/sentry/workflow_engine/endpoints/utils/sortby.py index 98525a58971405..52c50a65d3eab1 100644 --- a/src/sentry/workflow_engine/endpoints/utils/sortby.py +++ b/src/sentry/workflow_engine/endpoints/utils/sortby.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping, Sequence from dataclasses import dataclass diff --git a/src/sentry/workflow_engine/endpoints/utils/test_fire_action.py b/src/sentry/workflow_engine/endpoints/utils/test_fire_action.py index e47c4d6bf16de8..5bb8df3e9c2ebb 100644 --- a/src/sentry/workflow_engine/endpoints/utils/test_fire_action.py +++ b/src/sentry/workflow_engine/endpoints/utils/test_fire_action.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/workflow_engine/endpoints/validators/alertrule_workflow.py b/src/sentry/workflow_engine/endpoints/validators/alertrule_workflow.py index ea761f52ae0a21..057342df5a6a04 100644 --- a/src/sentry/workflow_engine/endpoints/validators/alertrule_workflow.py +++ b/src/sentry/workflow_engine/endpoints/validators/alertrule_workflow.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers diff --git a/src/sentry/workflow_engine/endpoints/validators/base/__init__.py b/src/sentry/workflow_engine/endpoints/validators/base/__init__.py index b0fcb52de57373..bbcf080e9462b2 100644 --- a/src/sentry/workflow_engine/endpoints/validators/base/__init__.py +++ b/src/sentry/workflow_engine/endpoints/validators/base/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "AbstractDataConditionValidator", "BaseActionValidator", diff --git a/src/sentry/workflow_engine/endpoints/validators/base/action.py b/src/sentry/workflow_engine/endpoints/validators/base/action.py index bc026b9752e201..ad246c2f62b69b 100644 --- a/src/sentry/workflow_engine/endpoints/validators/base/action.py +++ b/src/sentry/workflow_engine/endpoints/validators/base/action.py @@ -1,5 +1,5 @@ import builtins -from typing import Any +from typing import int, Any from rest_framework import serializers diff --git a/src/sentry/workflow_engine/endpoints/validators/base/data_condition.py b/src/sentry/workflow_engine/endpoints/validators/base/data_condition.py index 6e7abcd55b792b..7a7da5df23a6a4 100644 --- a/src/sentry/workflow_engine/endpoints/validators/base/data_condition.py +++ b/src/sentry/workflow_engine/endpoints/validators/base/data_condition.py @@ -1,5 +1,5 @@ from abc import abstractmethod -from typing import Any, Generic, TypeVar +from typing import Any, Generic, TypeVar, int from jsonschema import ValidationError as JsonValidationError from rest_framework import serializers diff --git a/src/sentry/workflow_engine/endpoints/validators/base/data_condition_group.py b/src/sentry/workflow_engine/endpoints/validators/base/data_condition_group.py index 0d05a31dd10fdf..448b4a38344aaa 100644 --- a/src/sentry/workflow_engine/endpoints/validators/base/data_condition_group.py +++ b/src/sentry/workflow_engine/endpoints/validators/base/data_condition_group.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db import router, transaction from rest_framework import serializers diff --git a/src/sentry/workflow_engine/endpoints/validators/base/data_source.py b/src/sentry/workflow_engine/endpoints/validators/base/data_source.py index 9e1405b0b6269b..9da3f226ba78f4 100644 --- a/src/sentry/workflow_engine/endpoints/validators/base/data_source.py +++ b/src/sentry/workflow_engine/endpoints/validators/base/data_source.py @@ -1,5 +1,5 @@ from collections.abc import Callable -from typing import Generic, TypeVar +from typing import Generic, TypeVar, int from rest_framework import serializers diff --git a/src/sentry/workflow_engine/endpoints/validators/base/detector.py b/src/sentry/workflow_engine/endpoints/validators/base/detector.py index dbf76f670d107e..c307059b838bcb 100644 --- a/src/sentry/workflow_engine/endpoints/validators/base/detector.py +++ b/src/sentry/workflow_engine/endpoints/validators/base/detector.py @@ -1,6 +1,6 @@ import builtins from dataclasses import dataclass -from typing import Any +from typing import int, Any from django.db import router, transaction from jsonschema import ValidationError as JSONSchemaValidationError diff --git a/src/sentry/workflow_engine/endpoints/validators/base/workflow.py b/src/sentry/workflow_engine/endpoints/validators/base/workflow.py index 247cb6a06e4228..1495b46795aaf9 100644 --- a/src/sentry/workflow_engine/endpoints/validators/base/workflow.py +++ b/src/sentry/workflow_engine/endpoints/validators/base/workflow.py @@ -1,4 +1,4 @@ -from typing import Any, TypeVar +from typing import Any, TypeVar, int from django.conf import settings from django.db import router, transaction diff --git a/src/sentry/workflow_engine/endpoints/validators/detector_workflow.py b/src/sentry/workflow_engine/endpoints/validators/detector_workflow.py index 7104a44768005a..1f0cfc17361dbc 100644 --- a/src/sentry/workflow_engine/endpoints/validators/detector_workflow.py +++ b/src/sentry/workflow_engine/endpoints/validators/detector_workflow.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import Literal +from typing import int, Literal from django.db import IntegrityError, router, transaction from django.db.models import QuerySet diff --git a/src/sentry/workflow_engine/endpoints/validators/detector_workflow_mutation.py b/src/sentry/workflow_engine/endpoints/validators/detector_workflow_mutation.py index 519b49001555a3..e3048fe2e78d9c 100644 --- a/src/sentry/workflow_engine/endpoints/validators/detector_workflow_mutation.py +++ b/src/sentry/workflow_engine/endpoints/validators/detector_workflow_mutation.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers diff --git a/src/sentry/workflow_engine/endpoints/validators/error_detector.py b/src/sentry/workflow_engine/endpoints/validators/error_detector.py index a4380f673dd84a..a75b7f50f0a0a2 100644 --- a/src/sentry/workflow_engine/endpoints/validators/error_detector.py +++ b/src/sentry/workflow_engine/endpoints/validators/error_detector.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from rest_framework import serializers diff --git a/src/sentry/workflow_engine/endpoints/validators/utils.py b/src/sentry/workflow_engine/endpoints/validators/utils.py index 5c7b1eb23a7ec0..600e125d639b74 100644 --- a/src/sentry/workflow_engine/endpoints/validators/utils.py +++ b/src/sentry/workflow_engine/endpoints/validators/utils.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.forms import ValidationError from jsonschema import ValidationError as JsonValidationError diff --git a/src/sentry/workflow_engine/handlers/__init__.py b/src/sentry/workflow_engine/handlers/__init__.py index 083a78b487003a..2013b767724dcc 100644 --- a/src/sentry/workflow_engine/handlers/__init__.py +++ b/src/sentry/workflow_engine/handlers/__init__.py @@ -1,4 +1,5 @@ # Export any handlers we want to include into the registry +from typing import int __all__ = [ "EventCreatedByDetectorConditionHandler", "EventSeenCountConditionHandler", diff --git a/src/sentry/workflow_engine/handlers/condition/__init__.py b/src/sentry/workflow_engine/handlers/condition/__init__.py index 5f79c87f30d0d9..10070fd7430aa7 100644 --- a/src/sentry/workflow_engine/handlers/condition/__init__.py +++ b/src/sentry/workflow_engine/handlers/condition/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "AgeComparisonConditionHandler", "AssignedToConditionHandler", diff --git a/src/sentry/workflow_engine/handlers/condition/age_comparison_handler.py b/src/sentry/workflow_engine/handlers/condition/age_comparison_handler.py index 831e85846b2b9e..b217f4db67a344 100644 --- a/src/sentry/workflow_engine/handlers/condition/age_comparison_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/age_comparison_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.utils import timezone diff --git a/src/sentry/workflow_engine/handlers/condition/assigned_to_handler.py b/src/sentry/workflow_engine/handlers/condition/assigned_to_handler.py index 3ee41580e20816..81eddcdb4339b0 100644 --- a/src/sentry/workflow_engine/handlers/condition/assigned_to_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/assigned_to_handler.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import Any +from typing import int, Any from sentry.models.group import Group from sentry.models.groupassignee import GroupAssignee diff --git a/src/sentry/workflow_engine/handlers/condition/event_attribute_handler.py b/src/sentry/workflow_engine/handlers/condition/event_attribute_handler.py index e26324e7b28ece..4278ff2493f6a9 100644 --- a/src/sentry/workflow_engine/handlers/condition/event_attribute_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/event_attribute_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import sentry_sdk diff --git a/src/sentry/workflow_engine/handlers/condition/event_created_by_detector_handler.py b/src/sentry/workflow_engine/handlers/condition/event_created_by_detector_handler.py index 7f94992facc116..aa4f255ede6593 100644 --- a/src/sentry/workflow_engine/handlers/condition/event_created_by_detector_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/event_created_by_detector_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.services.eventstore.models import GroupEvent from sentry.workflow_engine.models.data_condition import Condition diff --git a/src/sentry/workflow_engine/handlers/condition/event_frequency_handlers.py b/src/sentry/workflow_engine/handlers/condition/event_frequency_handlers.py index 4ecbb8e488d019..8b3c6e1d06baa4 100644 --- a/src/sentry/workflow_engine/handlers/condition/event_frequency_handlers.py +++ b/src/sentry/workflow_engine/handlers/condition/event_frequency_handlers.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.rules.conditions.event_frequency import ( COMPARISON_INTERVALS, diff --git a/src/sentry/workflow_engine/handlers/condition/event_frequency_query_handlers.py b/src/sentry/workflow_engine/handlers/condition/event_frequency_query_handlers.py index d7f140c4f0b5fd..f9457dbe0de3ca 100644 --- a/src/sentry/workflow_engine/handlers/condition/event_frequency_query_handlers.py +++ b/src/sentry/workflow_engine/handlers/condition/event_frequency_query_handlers.py @@ -3,7 +3,7 @@ from collections import defaultdict from collections.abc import Mapping from datetime import datetime, timedelta -from typing import Any, ClassVar, Literal, Protocol, TypedDict +from typing import Any, ClassVar, Literal, Protocol, TypedDict, int from django.core.cache import cache from snuba_sdk import Op diff --git a/src/sentry/workflow_engine/handlers/condition/event_seen_count_handler.py b/src/sentry/workflow_engine/handlers/condition/event_seen_count_handler.py index 4579025615b738..1ca2568c039b89 100644 --- a/src/sentry/workflow_engine/handlers/condition/event_seen_count_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/event_seen_count_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.workflow_engine.models.data_condition import Condition from sentry.workflow_engine.registry import condition_handler_registry diff --git a/src/sentry/workflow_engine/handlers/condition/existing_high_priority_issue_handler.py b/src/sentry/workflow_engine/handlers/condition/existing_high_priority_issue_handler.py index 5e0c4c06080ec9..731356d0c76539 100644 --- a/src/sentry/workflow_engine/handlers/condition/existing_high_priority_issue_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/existing_high_priority_issue_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.types.group import PriorityLevel from sentry.workflow_engine.models.data_condition import Condition diff --git a/src/sentry/workflow_engine/handlers/condition/first_seen_event_handler.py b/src/sentry/workflow_engine/handlers/condition/first_seen_event_handler.py index 445fddd865c551..1e0bfcdba65a2e 100644 --- a/src/sentry/workflow_engine/handlers/condition/first_seen_event_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/first_seen_event_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.workflow_engine.models.data_condition import Condition from sentry.workflow_engine.registry import condition_handler_registry diff --git a/src/sentry/workflow_engine/handlers/condition/issue_category_handler.py b/src/sentry/workflow_engine/handlers/condition/issue_category_handler.py index 0ded3af2ea23d6..3badfddcd6c090 100644 --- a/src/sentry/workflow_engine/handlers/condition/issue_category_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/issue_category_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.issues.grouptype import GroupCategory from sentry.workflow_engine.models.data_condition import Condition diff --git a/src/sentry/workflow_engine/handlers/condition/issue_occurrences_handler.py b/src/sentry/workflow_engine/handlers/condition/issue_occurrences_handler.py index 87f20a03016884..646c1c136d1599 100644 --- a/src/sentry/workflow_engine/handlers/condition/issue_occurrences_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/issue_occurrences_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.models.group import Group from sentry.workflow_engine.models.data_condition import Condition diff --git a/src/sentry/workflow_engine/handlers/condition/issue_priority_deescalating_handler.py b/src/sentry/workflow_engine/handlers/condition/issue_priority_deescalating_handler.py index f23ca7e409a81d..e693fdcf0afa48 100644 --- a/src/sentry/workflow_engine/handlers/condition/issue_priority_deescalating_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/issue_priority_deescalating_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.models.group import GroupStatus from sentry.models.groupopenperiod import get_latest_open_period diff --git a/src/sentry/workflow_engine/handlers/condition/issue_priority_equals.py b/src/sentry/workflow_engine/handlers/condition/issue_priority_equals.py index a3d1c269383111..43909c9b069748 100644 --- a/src/sentry/workflow_engine/handlers/condition/issue_priority_equals.py +++ b/src/sentry/workflow_engine/handlers/condition/issue_priority_equals.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.workflow_engine.models.data_condition import Condition from sentry.workflow_engine.registry import condition_handler_registry diff --git a/src/sentry/workflow_engine/handlers/condition/issue_priority_greater_or_equal_handler.py b/src/sentry/workflow_engine/handlers/condition/issue_priority_greater_or_equal_handler.py index bf3684c65ab19e..060f268a28707b 100644 --- a/src/sentry/workflow_engine/handlers/condition/issue_priority_greater_or_equal_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/issue_priority_greater_or_equal_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.workflow_engine.models.data_condition import Condition from sentry.workflow_engine.registry import condition_handler_registry diff --git a/src/sentry/workflow_engine/handlers/condition/issue_resolution_condition_handler.py b/src/sentry/workflow_engine/handlers/condition/issue_resolution_condition_handler.py index 195ec02376124e..eb08cbebcb3279 100644 --- a/src/sentry/workflow_engine/handlers/condition/issue_resolution_condition_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/issue_resolution_condition_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.workflow_engine.models.data_condition import Condition from sentry.workflow_engine.registry import condition_handler_registry diff --git a/src/sentry/workflow_engine/handlers/condition/latest_adopted_release_handler.py b/src/sentry/workflow_engine/handlers/condition/latest_adopted_release_handler.py index 52add963c69c7f..0047ad3a76f37e 100644 --- a/src/sentry/workflow_engine/handlers/condition/latest_adopted_release_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/latest_adopted_release_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.models.activity import Activity from sentry.models.environment import Environment diff --git a/src/sentry/workflow_engine/handlers/condition/latest_release_handler.py b/src/sentry/workflow_engine/handlers/condition/latest_release_handler.py index 6fd4afd7c01761..b3a75bedf4efb4 100644 --- a/src/sentry/workflow_engine/handlers/condition/latest_release_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/latest_release_handler.py @@ -1,5 +1,5 @@ from abc import abstractmethod -from typing import Any, Literal +from typing import Any, Literal, int from sentry import tagstore from sentry.models.environment import Environment diff --git a/src/sentry/workflow_engine/handlers/condition/level_handler.py b/src/sentry/workflow_engine/handlers/condition/level_handler.py index ca9597559ff5dc..624c81849c946b 100644 --- a/src/sentry/workflow_engine/handlers/condition/level_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/level_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.constants import LOG_LEVELS_MAP from sentry.rules import MatchType diff --git a/src/sentry/workflow_engine/handlers/condition/new_high_priority_issue_handler.py b/src/sentry/workflow_engine/handlers/condition/new_high_priority_issue_handler.py index b6ab454569cdb1..c2a42e9348186a 100644 --- a/src/sentry/workflow_engine/handlers/condition/new_high_priority_issue_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/new_high_priority_issue_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.types.group import PriorityLevel from sentry.workflow_engine.handlers.condition.first_seen_event_handler import is_new_event diff --git a/src/sentry/workflow_engine/handlers/condition/reappeared_event_handler.py b/src/sentry/workflow_engine/handlers/condition/reappeared_event_handler.py index 4652b4b09142b4..9bd0e980c01762 100644 --- a/src/sentry/workflow_engine/handlers/condition/reappeared_event_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/reappeared_event_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.workflow_engine.models.data_condition import Condition from sentry.workflow_engine.registry import condition_handler_registry diff --git a/src/sentry/workflow_engine/handlers/condition/regression_event_handler.py b/src/sentry/workflow_engine/handlers/condition/regression_event_handler.py index 1594e99f957c27..bf69968d7be72d 100644 --- a/src/sentry/workflow_engine/handlers/condition/regression_event_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/regression_event_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.workflow_engine.models.data_condition import Condition from sentry.workflow_engine.registry import condition_handler_registry diff --git a/src/sentry/workflow_engine/handlers/condition/tagged_event_handler.py b/src/sentry/workflow_engine/handlers/condition/tagged_event_handler.py index 7614a3fe225308..d742134fbea05b 100644 --- a/src/sentry/workflow_engine/handlers/condition/tagged_event_handler.py +++ b/src/sentry/workflow_engine/handlers/condition/tagged_event_handler.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry import tagstore from sentry.rules import MatchType, match_values diff --git a/src/sentry/workflow_engine/handlers/detector/__init__.py b/src/sentry/workflow_engine/handlers/detector/__init__.py index 04d70f4a9e5e5f..e10b52e885c5aa 100644 --- a/src/sentry/workflow_engine/handlers/detector/__init__.py +++ b/src/sentry/workflow_engine/handlers/detector/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "DataPacketEvaluationType", "DataPacketType", diff --git a/src/sentry/workflow_engine/handlers/detector/base.py b/src/sentry/workflow_engine/handlers/detector/base.py index f33787eff12c33..772c1ab4fed4b7 100644 --- a/src/sentry/workflow_engine/handlers/detector/base.py +++ b/src/sentry/workflow_engine/handlers/detector/base.py @@ -4,7 +4,7 @@ from collections.abc import Mapping, Sequence from dataclasses import dataclass from datetime import datetime -from typing import Any, Generic, TypeVar +from typing import Any, Generic, TypeVar, int from django.utils import timezone diff --git a/src/sentry/workflow_engine/handlers/detector/stateful.py b/src/sentry/workflow_engine/handlers/detector/stateful.py index 230e3ccbbc0524..50ee11407eb9c0 100644 --- a/src/sentry/workflow_engine/handlers/detector/stateful.py +++ b/src/sentry/workflow_engine/handlers/detector/stateful.py @@ -2,7 +2,7 @@ import dataclasses import logging from datetime import timedelta -from typing import Any, Generic, cast +from typing import Any, Generic, cast, int from uuid import uuid4 from django.conf import settings diff --git a/src/sentry/workflow_engine/handlers/workflow/__init__.py b/src/sentry/workflow_engine/handlers/workflow/__init__.py index 15ddc82d9f2654..5465758fe85570 100644 --- a/src/sentry/workflow_engine/handlers/workflow/__init__.py +++ b/src/sentry/workflow_engine/handlers/workflow/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .workflow_status_update_handler import workflow_status_update_handler __all__ = ["workflow_status_update_handler"] diff --git a/src/sentry/workflow_engine/handlers/workflow/workflow_status_update_handler.py b/src/sentry/workflow_engine/handlers/workflow/workflow_status_update_handler.py index 819619e21fcfe6..9f450141ce93c5 100644 --- a/src/sentry/workflow_engine/handlers/workflow/workflow_status_update_handler.py +++ b/src/sentry/workflow_engine/handlers/workflow/workflow_status_update_handler.py @@ -1,3 +1,4 @@ +from typing import int import logging from sentry.issues.status_change_consumer import group_status_update_registry diff --git a/src/sentry/workflow_engine/migration_helpers/alert_rule.py b/src/sentry/workflow_engine/migration_helpers/alert_rule.py index 73e65ed0410863..d12dde791b7139 100644 --- a/src/sentry/workflow_engine/migration_helpers/alert_rule.py +++ b/src/sentry/workflow_engine/migration_helpers/alert_rule.py @@ -1,6 +1,6 @@ import dataclasses import logging -from typing import Any +from typing import int, Any from django.db import router, transaction from django.forms import ValidationError diff --git a/src/sentry/workflow_engine/migration_helpers/issue_alert_conditions.py b/src/sentry/workflow_engine/migration_helpers/issue_alert_conditions.py index fee7c1a0b1bb60..7cbaecc21930d4 100644 --- a/src/sentry/workflow_engine/migration_helpers/issue_alert_conditions.py +++ b/src/sentry/workflow_engine/migration_helpers/issue_alert_conditions.py @@ -1,6 +1,6 @@ from collections.abc import Callable from dataclasses import asdict, dataclass -from typing import Any +from typing import int, Any from sentry.notifications.types import AssigneeTargetType from sentry.rules.age import AgeComparisonType diff --git a/src/sentry/workflow_engine/migration_helpers/issue_alert_dual_write.py b/src/sentry/workflow_engine/migration_helpers/issue_alert_dual_write.py index ac4dfc49d2af36..deafd2d4c41c84 100644 --- a/src/sentry/workflow_engine/migration_helpers/issue_alert_dual_write.py +++ b/src/sentry/workflow_engine/migration_helpers/issue_alert_dual_write.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from sentry.models.rule import Rule from sentry.rules.conditions.event_frequency import EventUniqueUserFrequencyConditionWithConditions diff --git a/src/sentry/workflow_engine/migration_helpers/issue_alert_migration.py b/src/sentry/workflow_engine/migration_helpers/issue_alert_migration.py index d615075a9b87d6..94818f96ef4bdc 100644 --- a/src/sentry/workflow_engine/migration_helpers/issue_alert_migration.py +++ b/src/sentry/workflow_engine/migration_helpers/issue_alert_migration.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from sentry.constants import ObjectStatus from sentry.grouping.grouptype import ErrorGroupType diff --git a/src/sentry/workflow_engine/migration_helpers/rule_action.py b/src/sentry/workflow_engine/migration_helpers/rule_action.py index 8d32bca99308d2..2461dec2c1d649 100644 --- a/src/sentry/workflow_engine/migration_helpers/rule_action.py +++ b/src/sentry/workflow_engine/migration_helpers/rule_action.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from sentry.workflow_engine.models.action import Action from sentry.workflow_engine.typings.notification_action import issue_alert_action_translator_mapping diff --git a/src/sentry/workflow_engine/migration_helpers/rule_conditions.py b/src/sentry/workflow_engine/migration_helpers/rule_conditions.py index c49dff84deafec..ad829895b45b44 100644 --- a/src/sentry/workflow_engine/migration_helpers/rule_conditions.py +++ b/src/sentry/workflow_engine/migration_helpers/rule_conditions.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.rules.conditions.event_frequency import ComparisonType from sentry.workflow_engine.models.data_condition import Condition, DataCondition diff --git a/src/sentry/workflow_engine/migration_helpers/utils.py b/src/sentry/workflow_engine/migration_helpers/utils.py index f2bedab1491114..16273d7ca4899c 100644 --- a/src/sentry/workflow_engine/migration_helpers/utils.py +++ b/src/sentry/workflow_engine/migration_helpers/utils.py @@ -1,4 +1,4 @@ -from typing import cast +from typing import int, cast from sentry.incidents.models.alert_rule import AlertRule, AlertRuleTrigger, AlertRuleTriggerAction from sentry.models.organizationmember import OrganizationMember diff --git a/src/sentry/workflow_engine/migrations/0001_squashed_0065_add_status_to_detector_and_workflow.py b/src/sentry/workflow_engine/migrations/0001_squashed_0065_add_status_to_detector_and_workflow.py index e4b75d9613ea7d..4cc9c586f16759 100644 --- a/src/sentry/workflow_engine/migrations/0001_squashed_0065_add_status_to_detector_and_workflow.py +++ b/src/sentry/workflow_engine/migrations/0001_squashed_0065_add_status_to_detector_and_workflow.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 16:30 +from typing import int import django.db.models.deletion import django.db.models.functions.comparison from django.db import migrations, models diff --git a/src/sentry/workflow_engine/migrations/0066_workflow_action_group_status_table.py b/src/sentry/workflow_engine/migrations/0066_workflow_action_group_status_table.py index 6553f9cacf7664..ceba89b8128f61 100644 --- a/src/sentry/workflow_engine/migrations/0066_workflow_action_group_status_table.py +++ b/src/sentry/workflow_engine/migrations/0066_workflow_action_group_status_table.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-29 18:55 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/workflow_engine/migrations/0067_workflow_action_group_status_group_db_constraint.py b/src/sentry/workflow_engine/migrations/0067_workflow_action_group_status_group_db_constraint.py index 3f9d88ac9d62f2..a2fd0e57a64d9a 100644 --- a/src/sentry/workflow_engine/migrations/0067_workflow_action_group_status_group_db_constraint.py +++ b/src/sentry/workflow_engine/migrations/0067_workflow_action_group_status_group_db_constraint.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-30 16:12 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/workflow_engine/migrations/0068_migrate_anomaly_detection_alerts.py b/src/sentry/workflow_engine/migrations/0068_migrate_anomaly_detection_alerts.py index a7e3d9ad52c35a..c0d00c9bc408ee 100644 --- a/src/sentry/workflow_engine/migrations/0068_migrate_anomaly_detection_alerts.py +++ b/src/sentry/workflow_engine/migrations/0068_migrate_anomaly_detection_alerts.py @@ -3,7 +3,7 @@ import dataclasses import logging from enum import Enum, IntEnum, StrEnum -from typing import Any +from typing import int, Any import sentry_sdk from attr import dataclass diff --git a/src/sentry/workflow_engine/migrations/0069_rename_error_detectors.py b/src/sentry/workflow_engine/migrations/0069_rename_error_detectors.py index b9af9456e478e3..4047cfe98dc4f6 100644 --- a/src/sentry/workflow_engine/migrations/0069_rename_error_detectors.py +++ b/src/sentry/workflow_engine/migrations/0069_rename_error_detectors.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db import migrations diff --git a/src/sentry/workflow_engine/migrations/0070_migrate_remaining_anomaly_detection_alerts.py b/src/sentry/workflow_engine/migrations/0070_migrate_remaining_anomaly_detection_alerts.py index a3c0f2f051f993..0645fd4d70ce46 100644 --- a/src/sentry/workflow_engine/migrations/0070_migrate_remaining_anomaly_detection_alerts.py +++ b/src/sentry/workflow_engine/migrations/0070_migrate_remaining_anomaly_detection_alerts.py @@ -3,7 +3,7 @@ import dataclasses import logging from enum import Enum, IntEnum, StrEnum -from typing import Any +from typing import int, Any import sentry_sdk from attr import dataclass diff --git a/src/sentry/workflow_engine/migrations/0071_migrate_remaining_metric_alerts.py b/src/sentry/workflow_engine/migrations/0071_migrate_remaining_metric_alerts.py index 1732be4985b310..a68092aeb61722 100644 --- a/src/sentry/workflow_engine/migrations/0071_migrate_remaining_metric_alerts.py +++ b/src/sentry/workflow_engine/migrations/0071_migrate_remaining_metric_alerts.py @@ -3,7 +3,7 @@ import dataclasses import logging from enum import Enum, IntEnum, StrEnum -from typing import Any +from typing import int, Any import sentry_sdk from attr import dataclass diff --git a/src/sentry/workflow_engine/migrations/0072_add_detector_to_workflowfirehistory.py b/src/sentry/workflow_engine/migrations/0072_add_detector_to_workflowfirehistory.py index 96dec267bbe2dc..a7f13ac490c133 100644 --- a/src/sentry/workflow_engine/migrations/0072_add_detector_to_workflowfirehistory.py +++ b/src/sentry/workflow_engine/migrations/0072_add_detector_to_workflowfirehistory.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-23 20:48 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/workflow_engine/migrations/0073_safe_pending_delete_actiongroupstatus.py b/src/sentry/workflow_engine/migrations/0073_safe_pending_delete_actiongroupstatus.py index 6a1b2b6191a125..5488d446682833 100644 --- a/src/sentry/workflow_engine/migrations/0073_safe_pending_delete_actiongroupstatus.py +++ b/src/sentry/workflow_engine/migrations/0073_safe_pending_delete_actiongroupstatus.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-23 20:13 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/workflow_engine/migrations/0074_safe_delete_actiongroupstatus.py b/src/sentry/workflow_engine/migrations/0074_safe_delete_actiongroupstatus.py index acff14a0468c91..08afa367b56504 100644 --- a/src/sentry/workflow_engine/migrations/0074_safe_delete_actiongroupstatus.py +++ b/src/sentry/workflow_engine/migrations/0074_safe_delete_actiongroupstatus.py @@ -1,6 +1,7 @@ # Generated by Django 5.2.1 on 2025-06-23 20:13 +from typing import int from sentry.new_migrations.migrations import CheckedMigration from sentry.new_migrations.monkey.models import SafeDeleteModel from sentry.new_migrations.monkey.state import DeletionAction diff --git a/src/sentry/workflow_engine/migrations/0075_add_index_to_dcg_action.py b/src/sentry/workflow_engine/migrations/0075_add_index_to_dcg_action.py index ad5f21b58dd996..d8113e555c4bf8 100644 --- a/src/sentry/workflow_engine/migrations/0075_add_index_to_dcg_action.py +++ b/src/sentry/workflow_engine/migrations/0075_add_index_to_dcg_action.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-26 21:04 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/workflow_engine/migrations/0076_add_detector_group_table.py b/src/sentry/workflow_engine/migrations/0076_add_detector_group_table.py index 7d70aa0ea1daca..a22293a30016b5 100644 --- a/src/sentry/workflow_engine/migrations/0076_add_detector_group_table.py +++ b/src/sentry/workflow_engine/migrations/0076_add_detector_group_table.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-09 17:43 +from typing import int import django.db.models.deletion from django.db import migrations, models diff --git a/src/sentry/workflow_engine/migrations/0077_add_wfh_single_write_col.py b/src/sentry/workflow_engine/migrations/0077_add_wfh_single_write_col.py index 3f57a767d75a65..c2ca9734f4ccf8 100644 --- a/src/sentry/workflow_engine/migrations/0077_add_wfh_single_write_col.py +++ b/src/sentry/workflow_engine/migrations/0077_add_wfh_single_write_col.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-15 20:00 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/workflow_engine/migrations/0078_workflow_fire_history_date_index.py b/src/sentry/workflow_engine/migrations/0078_workflow_fire_history_date_index.py index ec99e8bd4f6d3a..a52ae26da93c4b 100644 --- a/src/sentry/workflow_engine/migrations/0078_workflow_fire_history_date_index.py +++ b/src/sentry/workflow_engine/migrations/0078_workflow_fire_history_date_index.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-16 20:50 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/workflow_engine/migrations/0079_add_unique_constraint_to_detector_group.py b/src/sentry/workflow_engine/migrations/0079_add_unique_constraint_to_detector_group.py index c55b63a8bdc8b1..b5fbeed7405a05 100644 --- a/src/sentry/workflow_engine/migrations/0079_add_unique_constraint_to_detector_group.py +++ b/src/sentry/workflow_engine/migrations/0079_add_unique_constraint_to_detector_group.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-17 17:52 +from typing import int from django.db import migrations from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/workflow_engine/migrations/0080_update_metric_detector_config_fields.py b/src/sentry/workflow_engine/migrations/0080_update_metric_detector_config_fields.py index 473bf80257d617..0946841e56cc8c 100644 --- a/src/sentry/workflow_engine/migrations/0080_update_metric_detector_config_fields.py +++ b/src/sentry/workflow_engine/migrations/0080_update_metric_detector_config_fields.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-05 18:39 +from typing import int from django.apps.registry import Apps from django.db import migrations from django.db.backends.base.schema import BaseDatabaseSchemaEditor diff --git a/src/sentry/workflow_engine/migrations/0081_add_unique_constraint_to_detector_group.py b/src/sentry/workflow_engine/migrations/0081_add_unique_constraint_to_detector_group.py index 8cde8de11272ad..7c0658ea0172fd 100644 --- a/src/sentry/workflow_engine/migrations/0081_add_unique_constraint_to_detector_group.py +++ b/src/sentry/workflow_engine/migrations/0081_add_unique_constraint_to_detector_group.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-17 21:07 +from typing import int import django.db.models.deletion from django.db import migrations diff --git a/src/sentry/workflow_engine/migrations/0082_disconnect_error_detector_cron_workflows.py b/src/sentry/workflow_engine/migrations/0082_disconnect_error_detector_cron_workflows.py index ea03049064fe20..64baf663e32c4a 100644 --- a/src/sentry/workflow_engine/migrations/0082_disconnect_error_detector_cron_workflows.py +++ b/src/sentry/workflow_engine/migrations/0082_disconnect_error_detector_cron_workflows.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-07-24 21:44 +from typing import int import logging from django.apps.registry import Apps diff --git a/src/sentry/workflow_engine/migrations/0083_add_status_to_action.py b/src/sentry/workflow_engine/migrations/0083_add_status_to_action.py index a068186f8b959b..3f10874fb3f7be 100644 --- a/src/sentry/workflow_engine/migrations/0083_add_status_to_action.py +++ b/src/sentry/workflow_engine/migrations/0083_add_status_to_action.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-08-07 14:30 +from typing import int from django.db import migrations import sentry.db.models.fields.bounded diff --git a/src/sentry/workflow_engine/migrations/0084_crons_dedupe_workflows.py b/src/sentry/workflow_engine/migrations/0084_crons_dedupe_workflows.py index 2baecd29abfc96..7d49ac407a0e12 100644 --- a/src/sentry/workflow_engine/migrations/0084_crons_dedupe_workflows.py +++ b/src/sentry/workflow_engine/migrations/0084_crons_dedupe_workflows.py @@ -1,4 +1,5 @@ # Generated by Django 5.2.1 on 2025-08-26 17:43 +from typing import int import json # noqa: S003 from collections import defaultdict from copy import deepcopy diff --git a/src/sentry/workflow_engine/migrations/0085_crons_link_detectors_to_all_workflows.py b/src/sentry/workflow_engine/migrations/0085_crons_link_detectors_to_all_workflows.py index e1d3e6405fe255..a711db8339fd70 100644 --- a/src/sentry/workflow_engine/migrations/0085_crons_link_detectors_to_all_workflows.py +++ b/src/sentry/workflow_engine/migrations/0085_crons_link_detectors_to_all_workflows.py @@ -1,4 +1,5 @@ # Generated by Django 5.2.1 +from typing import int from collections import defaultdict from django.db import migrations diff --git a/src/sentry/workflow_engine/migrations/0086_fix_cron_to_cron_workflow_links.py b/src/sentry/workflow_engine/migrations/0086_fix_cron_to_cron_workflow_links.py index 4867c715645cab..6e2459cb1759cb 100644 --- a/src/sentry/workflow_engine/migrations/0086_fix_cron_to_cron_workflow_links.py +++ b/src/sentry/workflow_engine/migrations/0086_fix_cron_to_cron_workflow_links.py @@ -1,4 +1,5 @@ # Generated by Django 5.2.1 on 2025-09-19 17:27 +from typing import int import json # noqa: S003 import logging from collections import defaultdict diff --git a/src/sentry/workflow_engine/migrations/0087_relink_crons_to_compatible_issue_workflows.py b/src/sentry/workflow_engine/migrations/0087_relink_crons_to_compatible_issue_workflows.py index ba574cc84f7572..70debb90c4fd2c 100644 --- a/src/sentry/workflow_engine/migrations/0087_relink_crons_to_compatible_issue_workflows.py +++ b/src/sentry/workflow_engine/migrations/0087_relink_crons_to_compatible_issue_workflows.py @@ -3,7 +3,7 @@ import logging from collections import defaultdict from dataclasses import dataclass, field -from typing import Any +from typing import int, Any from django.db import migrations from django.db.backends.base.schema import BaseDatabaseSchemaEditor diff --git a/src/sentry/workflow_engine/migrations/0088_remove_monitor_slug_conditions.py b/src/sentry/workflow_engine/migrations/0088_remove_monitor_slug_conditions.py index 1b3e34874945f2..dfe6e43f679515 100644 --- a/src/sentry/workflow_engine/migrations/0088_remove_monitor_slug_conditions.py +++ b/src/sentry/workflow_engine/migrations/0088_remove_monitor_slug_conditions.py @@ -1,4 +1,5 @@ # Generated by Django 5.2.1 +from typing import int import logging from django.db import migrations diff --git a/src/sentry/workflow_engine/migrations/0089_update_cron_workflow_names.py b/src/sentry/workflow_engine/migrations/0089_update_cron_workflow_names.py index 960bf9ea5645e0..906c2f3ec69c68 100644 --- a/src/sentry/workflow_engine/migrations/0089_update_cron_workflow_names.py +++ b/src/sentry/workflow_engine/migrations/0089_update_cron_workflow_names.py @@ -1,6 +1,6 @@ # Generated by Django 5.2.1 import logging -from typing import Any +from typing import int, Any from django.db import migrations from django.db.backends.base.schema import BaseDatabaseSchemaEditor diff --git a/src/sentry/workflow_engine/migrations/0090_add_detectorgroup_detector_date_index.py b/src/sentry/workflow_engine/migrations/0090_add_detectorgroup_detector_date_index.py index 272bbfb1b8ba29..c121719078fc8d 100644 --- a/src/sentry/workflow_engine/migrations/0090_add_detectorgroup_detector_date_index.py +++ b/src/sentry/workflow_engine/migrations/0090_add_detectorgroup_detector_date_index.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-29 19:59 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/workflow_engine/migrations/0091_fix_email_notification_names.py b/src/sentry/workflow_engine/migrations/0091_fix_email_notification_names.py index 7a7ff985d22f11..54286f206642e3 100644 --- a/src/sentry/workflow_engine/migrations/0091_fix_email_notification_names.py +++ b/src/sentry/workflow_engine/migrations/0091_fix_email_notification_names.py @@ -1,6 +1,6 @@ # Generated by Django 5.2.1 on 2025-09-29 20:28 import logging -from typing import Any +from typing import int, Any from django.db import migrations from django.db.backends.base.schema import BaseDatabaseSchemaEditor diff --git a/src/sentry/workflow_engine/migrations/0092_repair_workflow_cron_conditions.py b/src/sentry/workflow_engine/migrations/0092_repair_workflow_cron_conditions.py index 64b79c786d9731..2ba00650474498 100644 --- a/src/sentry/workflow_engine/migrations/0092_repair_workflow_cron_conditions.py +++ b/src/sentry/workflow_engine/migrations/0092_repair_workflow_cron_conditions.py @@ -1,4 +1,5 @@ # Generated by Django 5.2.1 +from typing import int import logging from django.db import migrations diff --git a/src/sentry/workflow_engine/migrations/0093_add_action_config_index.py b/src/sentry/workflow_engine/migrations/0093_add_action_config_index.py index 267bac3e0748f9..6f4efe7e59ab4c 100644 --- a/src/sentry/workflow_engine/migrations/0093_add_action_config_index.py +++ b/src/sentry/workflow_engine/migrations/0093_add_action_config_index.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-10-02 22:55 +from typing import int import django.db.models.expressions from django.db import migrations, models diff --git a/src/sentry/workflow_engine/migrations/0094_backfill_issue_stream_detector_workflows.py b/src/sentry/workflow_engine/migrations/0094_backfill_issue_stream_detector_workflows.py index e2e4cc1183511b..5493eb32c2fbe2 100644 --- a/src/sentry/workflow_engine/migrations/0094_backfill_issue_stream_detector_workflows.py +++ b/src/sentry/workflow_engine/migrations/0094_backfill_issue_stream_detector_workflows.py @@ -1,4 +1,5 @@ # Generated by Django 5.2.1 +from typing import int import logging from django.conf import settings diff --git a/src/sentry/workflow_engine/migrations/0095_unique_detectorgroup_group.py b/src/sentry/workflow_engine/migrations/0095_unique_detectorgroup_group.py index 9f567d7b6f30b5..933e750e94a78f 100644 --- a/src/sentry/workflow_engine/migrations/0095_unique_detectorgroup_group.py +++ b/src/sentry/workflow_engine/migrations/0095_unique_detectorgroup_group.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-11-10 23:25 +from typing import int from django.db import migrations from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/sentry/workflow_engine/migrations/0096_delete_non_single_written_fire_history.py b/src/sentry/workflow_engine/migrations/0096_delete_non_single_written_fire_history.py index ab2afe051f96e8..b8e433852424ae 100644 --- a/src/sentry/workflow_engine/migrations/0096_delete_non_single_written_fire_history.py +++ b/src/sentry/workflow_engine/migrations/0096_delete_non_single_written_fire_history.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-01-13 +from typing import int import logging from django.db import migrations diff --git a/src/sentry/workflow_engine/models/__init__.py b/src/sentry/workflow_engine/models/__init__.py index 76ef000bd7cb5d..55f5520707d681 100644 --- a/src/sentry/workflow_engine/models/__init__.py +++ b/src/sentry/workflow_engine/models/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "Action", "ActionAlertRuleTriggerAction", diff --git a/src/sentry/workflow_engine/models/action.py b/src/sentry/workflow_engine/models/action.py index 01f776126b4872..2fdbcac757331e 100644 --- a/src/sentry/workflow_engine/models/action.py +++ b/src/sentry/workflow_engine/models/action.py @@ -3,7 +3,7 @@ import builtins import logging from enum import StrEnum -from typing import TYPE_CHECKING, ClassVar +from typing import TYPE_CHECKING, ClassVar, int from django.db import models from django.db.models import Q diff --git a/src/sentry/workflow_engine/models/action_alertruletriggeraction.py b/src/sentry/workflow_engine/models/action_alertruletriggeraction.py index aaf43d09c7f03d..a0fe03893d1e39 100644 --- a/src/sentry/workflow_engine/models/action_alertruletriggeraction.py +++ b/src/sentry/workflow_engine/models/action_alertruletriggeraction.py @@ -1,3 +1,4 @@ +from typing import int from sentry.backup.scopes import RelocationScope from sentry.db.models import ( BoundedBigIntegerField, diff --git a/src/sentry/workflow_engine/models/alertrule_detector.py b/src/sentry/workflow_engine/models/alertrule_detector.py index 5d93e28369006f..616ed18f334904 100644 --- a/src/sentry/workflow_engine/models/alertrule_detector.py +++ b/src/sentry/workflow_engine/models/alertrule_detector.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import CheckConstraint, Q, UniqueConstraint from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/workflow_engine/models/alertrule_workflow.py b/src/sentry/workflow_engine/models/alertrule_workflow.py index e516170696d4cc..6c033ff847373a 100644 --- a/src/sentry/workflow_engine/models/alertrule_workflow.py +++ b/src/sentry/workflow_engine/models/alertrule_workflow.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.db.models import CheckConstraint, Q diff --git a/src/sentry/workflow_engine/models/data_condition.py b/src/sentry/workflow_engine/models/data_condition.py index 8b1f6d4b6f8f26..46f5158d7e9c62 100644 --- a/src/sentry/workflow_engine/models/data_condition.py +++ b/src/sentry/workflow_engine/models/data_condition.py @@ -3,7 +3,7 @@ import time from datetime import timedelta from enum import StrEnum -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, cast, int from django.db import models from django.db.models.signals import pre_save diff --git a/src/sentry/workflow_engine/models/data_condition_group.py b/src/sentry/workflow_engine/models/data_condition_group.py index bb09ed2c9695f6..fb2e972e9dbcb9 100644 --- a/src/sentry/workflow_engine/models/data_condition_group.py +++ b/src/sentry/workflow_engine/models/data_condition_group.py @@ -1,5 +1,5 @@ from enum import StrEnum -from typing import ClassVar, Self +from typing import ClassVar, Self, int from django.db import models diff --git a/src/sentry/workflow_engine/models/data_condition_group_action.py b/src/sentry/workflow_engine/models/data_condition_group_action.py index 3657f55b3c9f5f..4fde67209ddfd2 100644 --- a/src/sentry/workflow_engine/models/data_condition_group_action.py +++ b/src/sentry/workflow_engine/models/data_condition_group_action.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import Index from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/workflow_engine/models/data_source.py b/src/sentry/workflow_engine/models/data_source.py index 4d1c4e6cc4e88c..1e692ae3c60fb6 100644 --- a/src/sentry/workflow_engine/models/data_source.py +++ b/src/sentry/workflow_engine/models/data_source.py @@ -1,7 +1,7 @@ import builtins import dataclasses import logging -from typing import Generic, TypeVar +from typing import Generic, TypeVar, int from django.db import models from django.db.models.signals import pre_save diff --git a/src/sentry/workflow_engine/models/data_source_detector.py b/src/sentry/workflow_engine/models/data_source_detector.py index 7eccb469240383..e577523305540c 100644 --- a/src/sentry/workflow_engine/models/data_source_detector.py +++ b/src/sentry/workflow_engine/models/data_source_detector.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/workflow_engine/models/datacondition_alertruletrigger.py b/src/sentry/workflow_engine/models/datacondition_alertruletrigger.py index 6017e104647e3b..bc6218128268d8 100644 --- a/src/sentry/workflow_engine/models/datacondition_alertruletrigger.py +++ b/src/sentry/workflow_engine/models/datacondition_alertruletrigger.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import UniqueConstraint from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/workflow_engine/models/detector.py b/src/sentry/workflow_engine/models/detector.py index 3ffefe92f3a033..65f8ed8b081f3e 100644 --- a/src/sentry/workflow_engine/models/detector.py +++ b/src/sentry/workflow_engine/models/detector.py @@ -3,7 +3,7 @@ import builtins import logging from collections.abc import Callable -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, Any, ClassVar, int from django.conf import settings from django.db import models diff --git a/src/sentry/workflow_engine/models/detector_group.py b/src/sentry/workflow_engine/models/detector_group.py index 38c3851235a7fd..5b83fc7da73230 100644 --- a/src/sentry/workflow_engine/models/detector_group.py +++ b/src/sentry/workflow_engine/models/detector_group.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/workflow_engine/models/detector_state.py b/src/sentry/workflow_engine/models/detector_state.py index 54a8366d3873ac..0ead9a8708b6ec 100644 --- a/src/sentry/workflow_engine/models/detector_state.py +++ b/src/sentry/workflow_engine/models/detector_state.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.db.models import F, Value from django.db.models.functions import Coalesce diff --git a/src/sentry/workflow_engine/models/detector_workflow.py b/src/sentry/workflow_engine/models/detector_workflow.py index 3d021ebdc8dce0..84b4c251fc170a 100644 --- a/src/sentry/workflow_engine/models/detector_workflow.py +++ b/src/sentry/workflow_engine/models/detector_workflow.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db import models diff --git a/src/sentry/workflow_engine/models/incident_groupopenperiod.py b/src/sentry/workflow_engine/models/incident_groupopenperiod.py index 4b9599947b95c0..362398ccfb79b7 100644 --- a/src/sentry/workflow_engine/models/incident_groupopenperiod.py +++ b/src/sentry/workflow_engine/models/incident_groupopenperiod.py @@ -1,3 +1,4 @@ +from typing import int import logging from django.db import IntegrityError, models diff --git a/src/sentry/workflow_engine/models/json_config.py b/src/sentry/workflow_engine/models/json_config.py index 522e90e66b88da..6527e50e48d9d7 100644 --- a/src/sentry/workflow_engine/models/json_config.py +++ b/src/sentry/workflow_engine/models/json_config.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from django.db import models from jsonschema import ValidationError, validate diff --git a/src/sentry/workflow_engine/models/workflow.py b/src/sentry/workflow_engine/models/workflow.py index c55bff06579289..e72a40bd37dd2d 100644 --- a/src/sentry/workflow_engine/models/workflow.py +++ b/src/sentry/workflow_engine/models/workflow.py @@ -2,7 +2,7 @@ import logging from dataclasses import replace -from typing import Any, ClassVar +from typing import Any, ClassVar, int from django.conf import settings from django.db import models diff --git a/src/sentry/workflow_engine/models/workflow_action_group_status.py b/src/sentry/workflow_engine/models/workflow_action_group_status.py index 4b0707db879c33..c26dfb28448f3b 100644 --- a/src/sentry/workflow_engine/models/workflow_action_group_status.py +++ b/src/sentry/workflow_engine/models/workflow_action_group_status.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/workflow_engine/models/workflow_data_condition_group.py b/src/sentry/workflow_engine/models/workflow_data_condition_group.py index 905a78d7d77e7f..a2608e0967bf0a 100644 --- a/src/sentry/workflow_engine/models/workflow_data_condition_group.py +++ b/src/sentry/workflow_engine/models/workflow_data_condition_group.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from sentry.backup.scopes import RelocationScope diff --git a/src/sentry/workflow_engine/models/workflow_fire_history.py b/src/sentry/workflow_engine/models/workflow_fire_history.py index 28690f00a88336..61924666f2585b 100644 --- a/src/sentry/workflow_engine/models/workflow_fire_history.py +++ b/src/sentry/workflow_engine/models/workflow_fire_history.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.db.models import Index diff --git a/src/sentry/workflow_engine/processors/action.py b/src/sentry/workflow_engine/processors/action.py index 95650d91eaf7f6..ed448220c02596 100644 --- a/src/sentry/workflow_engine/processors/action.py +++ b/src/sentry/workflow_engine/processors/action.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections import defaultdict from datetime import datetime, timedelta diff --git a/src/sentry/workflow_engine/processors/contexts/workflow_event_context.py b/src/sentry/workflow_engine/processors/contexts/workflow_event_context.py index 48e327d18004c2..a9e228aec051a3 100644 --- a/src/sentry/workflow_engine/processors/contexts/workflow_event_context.py +++ b/src/sentry/workflow_engine/processors/contexts/workflow_event_context.py @@ -2,7 +2,7 @@ import dataclasses from contextvars import ContextVar -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING if TYPE_CHECKING: from sentry.models.environment import Environment diff --git a/src/sentry/workflow_engine/processors/data_condition.py b/src/sentry/workflow_engine/processors/data_condition.py index 3211c09bcc4c79..c75b1c7160f6ec 100644 --- a/src/sentry/workflow_engine/processors/data_condition.py +++ b/src/sentry/workflow_engine/processors/data_condition.py @@ -1,4 +1,4 @@ -from typing import NamedTuple +from typing import int, NamedTuple from sentry.workflow_engine.models.data_condition import DataCondition, is_slow_condition diff --git a/src/sentry/workflow_engine/processors/data_condition_group.py b/src/sentry/workflow_engine/processors/data_condition_group.py index ae8cd5a97b34f6..65d5cee3ace817 100644 --- a/src/sentry/workflow_engine/processors/data_condition_group.py +++ b/src/sentry/workflow_engine/processors/data_condition_group.py @@ -1,7 +1,7 @@ import dataclasses import logging from collections.abc import Callable, Iterable -from typing import ClassVar, NoReturn, TypeVar +from typing import ClassVar, NoReturn, TypeVar, int import sentry_sdk diff --git a/src/sentry/workflow_engine/processors/data_packet.py b/src/sentry/workflow_engine/processors/data_packet.py index 038080e818eb11..3099030fb5398f 100644 --- a/src/sentry/workflow_engine/processors/data_packet.py +++ b/src/sentry/workflow_engine/processors/data_packet.py @@ -1,3 +1,4 @@ +from typing import int from sentry.workflow_engine.models import DataPacket, Detector from sentry.workflow_engine.processors.data_source import process_data_source from sentry.workflow_engine.processors.detector import process_detectors diff --git a/src/sentry/workflow_engine/processors/data_source.py b/src/sentry/workflow_engine/processors/data_source.py index a5981b0356b338..85b694239b3c33 100644 --- a/src/sentry/workflow_engine/processors/data_source.py +++ b/src/sentry/workflow_engine/processors/data_source.py @@ -1,3 +1,4 @@ +from typing import int import logging import sentry_sdk diff --git a/src/sentry/workflow_engine/processors/delayed_workflow.py b/src/sentry/workflow_engine/processors/delayed_workflow.py index c29978266befe1..16b9698a0ccb2a 100644 --- a/src/sentry/workflow_engine/processors/delayed_workflow.py +++ b/src/sentry/workflow_engine/processors/delayed_workflow.py @@ -5,7 +5,7 @@ from dataclasses import dataclass, field from datetime import datetime, timedelta from functools import cached_property -from typing import Any, TypeAlias +from typing import Any, TypeAlias, int import sentry_sdk from django.utils import timezone diff --git a/src/sentry/workflow_engine/processors/detector.py b/src/sentry/workflow_engine/processors/detector.py index 864a4cea018314..29ac260818bd3c 100644 --- a/src/sentry/workflow_engine/processors/detector.py +++ b/src/sentry/workflow_engine/processors/detector.py @@ -3,7 +3,7 @@ import logging from collections import defaultdict from collections.abc import Callable, Mapping -from typing import NamedTuple +from typing import int, NamedTuple import sentry_sdk from django.db import router, transaction diff --git a/src/sentry/workflow_engine/processors/log_util.py b/src/sentry/workflow_engine/processors/log_util.py index 1826d8cfc7dcf0..681197cb0100b0 100644 --- a/src/sentry/workflow_engine/processors/log_util.py +++ b/src/sentry/workflow_engine/processors/log_util.py @@ -4,7 +4,7 @@ from collections.abc import Callable, Generator, Mapping from contextlib import contextmanager from datetime import timedelta -from typing import Any +from typing import int, Any def top_n_slowest(durations: dict[str, float], n: int) -> dict[str, float]: diff --git a/src/sentry/workflow_engine/processors/schedule.py b/src/sentry/workflow_engine/processors/schedule.py index 44bb875e4c1179..b8ef29004163a4 100644 --- a/src/sentry/workflow_engine/processors/schedule.py +++ b/src/sentry/workflow_engine/processors/schedule.py @@ -1,3 +1,4 @@ +from typing import int import hashlib import logging import math diff --git a/src/sentry/workflow_engine/processors/workflow.py b/src/sentry/workflow_engine/processors/workflow.py index 831be818cdd373..a8d4aaf973d18f 100644 --- a/src/sentry/workflow_engine/processors/workflow.py +++ b/src/sentry/workflow_engine/processors/workflow.py @@ -2,7 +2,7 @@ from dataclasses import asdict, dataclass, replace from datetime import datetime from enum import StrEnum -from typing import DefaultDict +from typing import int, DefaultDict import sentry_sdk from django.db import router, transaction diff --git a/src/sentry/workflow_engine/processors/workflow_fire_history.py b/src/sentry/workflow_engine/processors/workflow_fire_history.py index b47d515e7425f8..8daed70d0de068 100644 --- a/src/sentry/workflow_engine/processors/workflow_fire_history.py +++ b/src/sentry/workflow_engine/processors/workflow_fire_history.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from datetime import datetime, timezone diff --git a/src/sentry/workflow_engine/registry.py b/src/sentry/workflow_engine/registry.py index 032eca3e8f4960..c8b9a94e0a6fdc 100644 --- a/src/sentry/workflow_engine/registry.py +++ b/src/sentry/workflow_engine/registry.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.registry import Registry from sentry.workflow_engine.types import ActionHandler, DataConditionHandler, DataSourceTypeHandler diff --git a/src/sentry/workflow_engine/service/action/__init__.py b/src/sentry/workflow_engine/service/action/__init__.py index 8404f443605b9c..853ba1a02ab19d 100644 --- a/src/sentry/workflow_engine/service/action/__init__.py +++ b/src/sentry/workflow_engine/service/action/__init__.py @@ -1 +1,2 @@ +from typing import int from .service import * # noqa diff --git a/src/sentry/workflow_engine/service/action/impl.py b/src/sentry/workflow_engine/service/action/impl.py index a54dbfc4c6a812..854e4a69efb1de 100644 --- a/src/sentry/workflow_engine/service/action/impl.py +++ b/src/sentry/workflow_engine/service/action/impl.py @@ -1,3 +1,4 @@ +from typing import int from sentry.workflow_engine.models import Action from sentry.workflow_engine.service.action.service import ActionService from sentry.workflow_engine.typings.notification_action import SentryAppIdentifier diff --git a/src/sentry/workflow_engine/service/action/service.py b/src/sentry/workflow_engine/service/action/service.py index a9b06d823fd1cb..2f211185feefca 100644 --- a/src/sentry/workflow_engine/service/action/service.py +++ b/src/sentry/workflow_engine/service/action/service.py @@ -3,6 +3,7 @@ # in modules such as this one where hybrid cloud data models or service classes are # defined, because we want to reflect on type annotations and avoid forward references. +from typing import int import abc from sentry.hybridcloud.rpc.resolvers import ByOrganizationId, ByRegionName diff --git a/src/sentry/workflow_engine/tasks/__init__.py b/src/sentry/workflow_engine/tasks/__init__.py index fd9b146f8366fc..bbf517ead6abf1 100644 --- a/src/sentry/workflow_engine/tasks/__init__.py +++ b/src/sentry/workflow_engine/tasks/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "process_delayed_workflows", "process_workflow_activity", diff --git a/src/sentry/workflow_engine/tasks/actions.py b/src/sentry/workflow_engine/tasks/actions.py index 47d930d084acf2..7ef17cef5b3dc6 100644 --- a/src/sentry/workflow_engine/tasks/actions.py +++ b/src/sentry/workflow_engine/tasks/actions.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import asdict from django.db.models import Value diff --git a/src/sentry/workflow_engine/tasks/delayed_workflows.py b/src/sentry/workflow_engine/tasks/delayed_workflows.py index 0eaa3e64848e12..adc8fc558b3a8e 100644 --- a/src/sentry/workflow_engine/tasks/delayed_workflows.py +++ b/src/sentry/workflow_engine/tasks/delayed_workflows.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.silo.base import SiloMode from sentry.tasks.base import instrumented_task, retry diff --git a/src/sentry/workflow_engine/tasks/utils.py b/src/sentry/workflow_engine/tasks/utils.py index 8a0de630535810..7a91a9d7393d91 100644 --- a/src/sentry/workflow_engine/tasks/utils.py +++ b/src/sentry/workflow_engine/tasks/utils.py @@ -1,3 +1,4 @@ +from typing import int from google.api_core.exceptions import DeadlineExceeded, RetryError, ServiceUnavailable from sentry import nodestore diff --git a/src/sentry/workflow_engine/tasks/workflows.py b/src/sentry/workflow_engine/tasks/workflows.py index da507826f2735b..48623713d1950a 100644 --- a/src/sentry/workflow_engine/tasks/workflows.py +++ b/src/sentry/workflow_engine/tasks/workflows.py @@ -1,7 +1,7 @@ import random import time from datetime import UTC, datetime -from typing import Any +from typing import int, Any from django.db import router, transaction from google.api_core.exceptions import RetryError diff --git a/src/sentry/workflow_engine/transformers.py b/src/sentry/workflow_engine/transformers.py index ca0df78e8b87a3..363312edbe4aad 100644 --- a/src/sentry/workflow_engine/transformers.py +++ b/src/sentry/workflow_engine/transformers.py @@ -1,7 +1,7 @@ from __future__ import annotations import copy -from typing import Any +from typing import int, Any from sentry.notifications.models.notificationaction import ActionTarget from sentry.workflow_engine.endpoints.validators.utils import validate_json_schema diff --git a/src/sentry/workflow_engine/types.py b/src/sentry/workflow_engine/types.py index a3b19363a68c2f..ced17cde4fee47 100644 --- a/src/sentry/workflow_engine/types.py +++ b/src/sentry/workflow_engine/types.py @@ -4,7 +4,7 @@ from dataclasses import asdict, dataclass, field from enum import IntEnum, StrEnum from logging import Logger -from typing import TYPE_CHECKING, Any, ClassVar, Generic, TypedDict, TypeVar +from typing import TYPE_CHECKING, Any, ClassVar, Generic, TypedDict, TypeVar, int from sentry.types.group import PriorityLevel diff --git a/src/sentry/workflow_engine/typings/__init__.py b/src/sentry/workflow_engine/typings/__init__.py index 9d72b885610876..6a5c29b756e810 100644 --- a/src/sentry/workflow_engine/typings/__init__.py +++ b/src/sentry/workflow_engine/typings/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .grouptype import IssueStreamGroupType __all__ = ["IssueStreamGroupType"] diff --git a/src/sentry/workflow_engine/typings/grouptype.py b/src/sentry/workflow_engine/typings/grouptype.py index dd4f2107243384..e8293138b77272 100644 --- a/src/sentry/workflow_engine/typings/grouptype.py +++ b/src/sentry/workflow_engine/typings/grouptype.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass from sentry.issues.grouptype import GroupCategory, GroupType diff --git a/src/sentry/workflow_engine/typings/notification_action.py b/src/sentry/workflow_engine/typings/notification_action.py index b4d08d96fb30e6..0017e7710262d7 100644 --- a/src/sentry/workflow_engine/typings/notification_action.py +++ b/src/sentry/workflow_engine/typings/notification_action.py @@ -4,7 +4,7 @@ from abc import ABC, abstractmethod from dataclasses import dataclass, field from enum import Enum, IntEnum, StrEnum -from typing import Any, ClassVar, NotRequired, TypedDict +from typing import Any, ClassVar, NotRequired, TypedDict, int OPSGENIE_DEFAULT_PRIORITY = "P3" PAGERDUTY_DEFAULT_SEVERITY = "default" diff --git a/src/sentry/workflow_engine/utils/__init__.py b/src/sentry/workflow_engine/utils/__init__.py index 53625d8a162d31..aeb9b92e6bbfa0 100644 --- a/src/sentry/workflow_engine/utils/__init__.py +++ b/src/sentry/workflow_engine/utils/__init__.py @@ -1,3 +1,4 @@ +from typing import int __all__ = [ "metrics_incr", "MetricTags", diff --git a/src/sentry/workflow_engine/utils/dictpath.py b/src/sentry/workflow_engine/utils/dictpath.py index da8d37ac79f9d8..3570760c95b13b 100644 --- a/src/sentry/workflow_engine/utils/dictpath.py +++ b/src/sentry/workflow_engine/utils/dictpath.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Protocol, cast +from typing import Protocol, cast, int def _tname(t: type | tuple[type, ...]) -> str: diff --git a/src/sentry/workflow_engine/utils/legacy_metric_tracking.py b/src/sentry/workflow_engine/utils/legacy_metric_tracking.py index 6fad983023b58e..0335e78a32a14c 100644 --- a/src/sentry/workflow_engine/utils/legacy_metric_tracking.py +++ b/src/sentry/workflow_engine/utils/legacy_metric_tracking.py @@ -11,7 +11,7 @@ import functools from collections.abc import Callable from contextvars import ContextVar -from typing import Any, Literal, TypeVar +from typing import Any, Literal, TypeVar, int from django.http import HttpResponseBase diff --git a/src/sentry/workflow_engine/utils/log_context.py b/src/sentry/workflow_engine/utils/log_context.py index d26f8422d1c392..68a2917fabfcf6 100644 --- a/src/sentry/workflow_engine/utils/log_context.py +++ b/src/sentry/workflow_engine/utils/log_context.py @@ -31,7 +31,7 @@ def defrog_worfklow(workflow_id: int) -> None: from contextlib import contextmanager from dataclasses import dataclass, field from functools import wraps -from typing import Any, TypeVar, override +from typing import Any, TypeVar, override, int @dataclass diff --git a/src/sentry/workflow_engine/utils/metrics.py b/src/sentry/workflow_engine/utils/metrics.py index e2cdbcf853f1df..b543ce78c48e7b 100644 --- a/src/sentry/workflow_engine/utils/metrics.py +++ b/src/sentry/workflow_engine/utils/metrics.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.utils import metrics from sentry.workflow_engine.processors.contexts.workflow_event_context import WorkflowEventContext diff --git a/src/sentry/workflow_engine/utils/scopedstats.py b/src/sentry/workflow_engine/utils/scopedstats.py index b8828df378821c..c214823a5847db 100644 --- a/src/sentry/workflow_engine/utils/scopedstats.py +++ b/src/sentry/workflow_engine/utils/scopedstats.py @@ -12,7 +12,7 @@ from collections.abc import Callable, Generator from contextlib import contextmanager from contextvars import ContextVar -from typing import ParamSpec, TypeVar +from typing import ParamSpec, TypeVar, int _current_collector: ContextVar[_StatsCollector | None] = ContextVar( "current_collector", default=None diff --git a/src/sentry/wsgi.py b/src/sentry/wsgi.py index 98deebd9e95ca5..9bcbc96740ceca 100644 --- a/src/sentry/wsgi.py +++ b/src/sentry/wsgi.py @@ -1,3 +1,4 @@ +from typing import int import io import os.path import sys diff --git a/src/sentry_plugins/__init__.py b/src/sentry_plugins/__init__.py index 2c8e003bce50e1..83091d21f0dd12 100644 --- a/src/sentry_plugins/__init__.py +++ b/src/sentry_plugins/__init__.py @@ -1,3 +1,4 @@ +from typing import int import sentry VERSION = sentry.VERSION diff --git a/src/sentry_plugins/amazon_sqs/plugin.py b/src/sentry_plugins/amazon_sqs/plugin.py index f6026f4bdc33d7..b1701b78ec3361 100644 --- a/src/sentry_plugins/amazon_sqs/plugin.py +++ b/src/sentry_plugins/amazon_sqs/plugin.py @@ -1,3 +1,4 @@ +from typing import int import logging import boto3 diff --git a/src/sentry_plugins/anonymizeip.py b/src/sentry_plugins/anonymizeip.py index b8fcb57f75d469..c92d42f73c97b0 100644 --- a/src/sentry_plugins/anonymizeip.py +++ b/src/sentry_plugins/anonymizeip.py @@ -1,4 +1,5 @@ # Port of https://github.com/samuelmeuli/anonymize-ip to Python 2 +from typing import int """ MIT License diff --git a/src/sentry_plugins/asana/client.py b/src/sentry_plugins/asana/client.py index 7be692267340a6..aab6330135ff39 100644 --- a/src/sentry_plugins/asana/client.py +++ b/src/sentry_plugins/asana/client.py @@ -1,3 +1,4 @@ +from typing import int from sentry_plugins.client import AuthApiClient diff --git a/src/sentry_plugins/asana/plugin.py b/src/sentry_plugins/asana/plugin.py index 6e5cf39857b744..3b6d8faa8b0405 100644 --- a/src/sentry_plugins/asana/plugin.py +++ b/src/sentry_plugins/asana/plugin.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from requests.exceptions import HTTPError from rest_framework.request import Request diff --git a/src/sentry_plugins/base.py b/src/sentry_plugins/base.py index e9fed6b72624d8..4b1aca477bba4d 100644 --- a/src/sentry_plugins/base.py +++ b/src/sentry_plugins/base.py @@ -3,7 +3,7 @@ import logging import sys from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, NoReturn +from typing import TYPE_CHECKING, Any, NoReturn, int import sentry_plugins from sentry.exceptions import InvalidIdentity, PluginError diff --git a/src/sentry_plugins/bitbucket/client.py b/src/sentry_plugins/bitbucket/client.py index aee3bdbf929983..4b995178e8a6ae 100644 --- a/src/sentry_plugins/bitbucket/client.py +++ b/src/sentry_plugins/bitbucket/client.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.conf import settings from requests_oauthlib import OAuth1 diff --git a/src/sentry_plugins/bitbucket/endpoints/webhook.py b/src/sentry_plugins/bitbucket/endpoints/webhook.py index 0f118be67c2178..d895fc82c4e514 100644 --- a/src/sentry_plugins/bitbucket/endpoints/webhook.py +++ b/src/sentry_plugins/bitbucket/endpoints/webhook.py @@ -1,3 +1,4 @@ +from typing import int import ipaddress import logging from datetime import timezone diff --git a/src/sentry_plugins/bitbucket/plugin.py b/src/sentry_plugins/bitbucket/plugin.py index 87961a280d9eb3..b86ea499dde534 100644 --- a/src/sentry_plugins/bitbucket/plugin.py +++ b/src/sentry_plugins/bitbucket/plugin.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from django.urls import re_path from rest_framework.request import Request diff --git a/src/sentry_plugins/bitbucket/repository_provider.py b/src/sentry_plugins/bitbucket/repository_provider.py index d9b1f12df75d1b..95f8de937e0239 100644 --- a/src/sentry_plugins/bitbucket/repository_provider.py +++ b/src/sentry_plugins/bitbucket/repository_provider.py @@ -1,7 +1,7 @@ from __future__ import annotations import secrets -from typing import TYPE_CHECKING +from typing import int, TYPE_CHECKING from sentry.exceptions import PluginError from sentry.locks import locks diff --git a/src/sentry_plugins/bitbucket/testutils.py b/src/sentry_plugins/bitbucket/testutils.py index 5258dd2728b7c7..0bddb48f8c113f 100644 --- a/src/sentry_plugins/bitbucket/testutils.py +++ b/src/sentry_plugins/bitbucket/testutils.py @@ -1,3 +1,4 @@ +from typing import int PUSH_EVENT_EXAMPLE = b"""{ "push": { "changes": [ diff --git a/src/sentry_plugins/bitbucket/urls.py b/src/sentry_plugins/bitbucket/urls.py index aaa36a349a4174..89f98bb158663b 100644 --- a/src/sentry_plugins/bitbucket/urls.py +++ b/src/sentry_plugins/bitbucket/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from .endpoints.webhook import BitbucketPluginWebhookEndpoint diff --git a/src/sentry_plugins/client.py b/src/sentry_plugins/client.py index cd06002af0481c..9b5e0e7f3f47a5 100644 --- a/src/sentry_plugins/client.py +++ b/src/sentry_plugins/client.py @@ -2,7 +2,7 @@ import logging from collections.abc import Mapping -from typing import Any, Literal, overload +from typing import Any, Literal, overload, int from requests import PreparedRequest, Response diff --git a/src/sentry_plugins/github/__init__.py b/src/sentry_plugins/github/__init__.py index 6cfa3750f10ecd..f7608aaa61cf71 100644 --- a/src/sentry_plugins/github/__init__.py +++ b/src/sentry_plugins/github/__init__.py @@ -1 +1,2 @@ +from typing import int from sentry_plugins.github import options # NOQA diff --git a/src/sentry_plugins/github/client.py b/src/sentry_plugins/github/client.py index 68e09ffc1f93ed..6295d52b435c07 100644 --- a/src/sentry_plugins/github/client.py +++ b/src/sentry_plugins/github/client.py @@ -1,3 +1,4 @@ +from typing import int import calendar import datetime import time diff --git a/src/sentry_plugins/github/options.py b/src/sentry_plugins/github/options.py index 6f3e524f8df490..a4c454ce7a86a9 100644 --- a/src/sentry_plugins/github/options.py +++ b/src/sentry_plugins/github/options.py @@ -1,3 +1,4 @@ +from typing import int from sentry.options import FLAG_PRIORITIZE_DISK, register register("github.integration-private-key", default="", flags=FLAG_PRIORITIZE_DISK) diff --git a/src/sentry_plugins/github/plugin.py b/src/sentry_plugins/github/plugin.py index 43dc9ea42e6f11..b39a4daccd7af0 100644 --- a/src/sentry_plugins/github/plugin.py +++ b/src/sentry_plugins/github/plugin.py @@ -1,3 +1,4 @@ +from typing import int import logging from uuid import uuid4 diff --git a/src/sentry_plugins/github/testutils.py b/src/sentry_plugins/github/testutils.py index b55d46418fbfde..9e1cbed2210bf9 100644 --- a/src/sentry_plugins/github/testutils.py +++ b/src/sentry_plugins/github/testutils.py @@ -1,4 +1,5 @@ # we keep this as a raw string as order matters for hmac signing +from typing import int PUSH_EVENT_EXAMPLE = r"""{ "ref": "refs/heads/changes", "before": "9049f1265b7d61be4a8904a9a27120d2064dab3b", diff --git a/src/sentry_plugins/github/urls.py b/src/sentry_plugins/github/urls.py index aaa8129a5bbee7..772441a7a88867 100644 --- a/src/sentry_plugins/github/urls.py +++ b/src/sentry_plugins/github/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from .webhooks import GithubPluginIntegrationsWebhookEndpoint, GithubPluginWebhookEndpoint diff --git a/src/sentry_plugins/github/webhooks/__init__.py b/src/sentry_plugins/github/webhooks/__init__.py index e5bf6b2bf8b6f7..476e296920fbe1 100644 --- a/src/sentry_plugins/github/webhooks/__init__.py +++ b/src/sentry_plugins/github/webhooks/__init__.py @@ -1,3 +1,4 @@ +from typing import int from .integration import GithubPluginIntegrationsWebhookEndpoint from .non_integration import GithubPluginWebhookEndpoint diff --git a/src/sentry_plugins/github/webhooks/base.py b/src/sentry_plugins/github/webhooks/base.py index b603581955fb2e..25f48de1c872b7 100644 --- a/src/sentry_plugins/github/webhooks/base.py +++ b/src/sentry_plugins/github/webhooks/base.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import abc import hashlib diff --git a/src/sentry_plugins/github/webhooks/events/__init__.py b/src/sentry_plugins/github/webhooks/events/__init__.py index d68346f56997ef..b647628f59c036 100644 --- a/src/sentry_plugins/github/webhooks/events/__init__.py +++ b/src/sentry_plugins/github/webhooks/events/__init__.py @@ -1,3 +1,4 @@ +from typing import int class Webhook: def __call__(self, event, organization): raise NotImplementedError diff --git a/src/sentry_plugins/github/webhooks/events/installation.py b/src/sentry_plugins/github/webhooks/events/installation.py index 39559b0292e6e4..ff0793e789d3b0 100644 --- a/src/sentry_plugins/github/webhooks/events/installation.py +++ b/src/sentry_plugins/github/webhooks/events/installation.py @@ -1,3 +1,4 @@ +from typing import int from django.db import IntegrityError, router, transaction from sentry.integrations.models.integration import Integration diff --git a/src/sentry_plugins/github/webhooks/events/installation_repository.py b/src/sentry_plugins/github/webhooks/events/installation_repository.py index 19b3cd81cce8b7..588e2f230cd066 100644 --- a/src/sentry_plugins/github/webhooks/events/installation_repository.py +++ b/src/sentry_plugins/github/webhooks/events/installation_repository.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.models.integration import Integration from sentry.integrations.services.integration import integration_service from sentry.models.repository import Repository diff --git a/src/sentry_plugins/github/webhooks/events/pull_request.py b/src/sentry_plugins/github/webhooks/events/pull_request.py index 2a4eb1633825b6..826a54c16c63f3 100644 --- a/src/sentry_plugins/github/webhooks/events/pull_request.py +++ b/src/sentry_plugins/github/webhooks/events/pull_request.py @@ -1,3 +1,4 @@ +from typing import int from django.db import IntegrityError from django.http import Http404 diff --git a/src/sentry_plugins/github/webhooks/events/push.py b/src/sentry_plugins/github/webhooks/events/push.py index 5d15608695af2f..11c06b8852dc11 100644 --- a/src/sentry_plugins/github/webhooks/events/push.py +++ b/src/sentry_plugins/github/webhooks/events/push.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from datetime import timezone diff --git a/src/sentry_plugins/github/webhooks/integration.py b/src/sentry_plugins/github/webhooks/integration.py index a16ce37dee6acb..e3232982c91018 100644 --- a/src/sentry_plugins/github/webhooks/integration.py +++ b/src/sentry_plugins/github/webhooks/integration.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry_plugins/github/webhooks/non_integration.py b/src/sentry_plugins/github/webhooks/non_integration.py index f44a2cdf026ea5..9a9a525c90f79d 100644 --- a/src/sentry_plugins/github/webhooks/non_integration.py +++ b/src/sentry_plugins/github/webhooks/non_integration.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging diff --git a/src/sentry_plugins/gitlab/client.py b/src/sentry_plugins/gitlab/client.py index 94da81431e9ba3..a492f06dca8cc1 100644 --- a/src/sentry_plugins/gitlab/client.py +++ b/src/sentry_plugins/gitlab/client.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import quote from sentry.shared_integrations.exceptions import ApiError diff --git a/src/sentry_plugins/gitlab/plugin.py b/src/sentry_plugins/gitlab/plugin.py index b9490a186a9614..47c3b03cdf4a68 100644 --- a/src/sentry_plugins/gitlab/plugin.py +++ b/src/sentry_plugins/gitlab/plugin.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.request import Request from sentry.integrations.base import FeatureDescription, IntegrationFeatures diff --git a/src/sentry_plugins/heroku/plugin.py b/src/sentry_plugins/heroku/plugin.py index 8b08d9ff3f66d8..f1fb65c010b8d3 100644 --- a/src/sentry_plugins/heroku/plugin.py +++ b/src/sentry_plugins/heroku/plugin.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import base64 import hmac diff --git a/src/sentry_plugins/jira/client.py b/src/sentry_plugins/jira/client.py index a89d18254c8455..83480f861e5ed4 100644 --- a/src/sentry_plugins/jira/client.py +++ b/src/sentry_plugins/jira/client.py @@ -1,3 +1,4 @@ +from typing import int import logging import re from hashlib import md5 as _md5 diff --git a/src/sentry_plugins/jira/plugin.py b/src/sentry_plugins/jira/plugin.py index 4f872da2cb4d39..30e1529adbc1b3 100644 --- a/src/sentry_plugins/jira/plugin.py +++ b/src/sentry_plugins/jira/plugin.py @@ -1,3 +1,4 @@ +from typing import int import logging import re from urllib.parse import parse_qs, quote_plus, unquote_plus, urlencode, urlsplit, urlunsplit diff --git a/src/sentry_plugins/opsgenie/client.py b/src/sentry_plugins/opsgenie/client.py index 8e8747ee62418f..10ca052033ec6e 100644 --- a/src/sentry_plugins/opsgenie/client.py +++ b/src/sentry_plugins/opsgenie/client.py @@ -1,3 +1,4 @@ +from typing import int from sentry_plugins.client import ApiClient diff --git a/src/sentry_plugins/opsgenie/plugin.py b/src/sentry_plugins/opsgenie/plugin.py index 37c9fb7d18d8fd..6b54a38fe85d9c 100644 --- a/src/sentry_plugins/opsgenie/plugin.py +++ b/src/sentry_plugins/opsgenie/plugin.py @@ -1,3 +1,4 @@ +from typing import int import logging from django import forms diff --git a/src/sentry_plugins/pagerduty/client.py b/src/sentry_plugins/pagerduty/client.py index 4b698da86d6eb7..8e0e593c91a4b0 100644 --- a/src/sentry_plugins/pagerduty/client.py +++ b/src/sentry_plugins/pagerduty/client.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.http import absolute_uri from sentry_plugins.client import ApiClient diff --git a/src/sentry_plugins/pagerduty/plugin.py b/src/sentry_plugins/pagerduty/plugin.py index 09976b7ed3e305..fbd6067123bfb4 100644 --- a/src/sentry_plugins/pagerduty/plugin.py +++ b/src/sentry_plugins/pagerduty/plugin.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.base import FeatureDescription, IntegrationFeatures from sentry.plugins.bases.notify import NotificationPlugin from sentry.utils.http import absolute_uri diff --git a/src/sentry_plugins/pivotal/plugin.py b/src/sentry_plugins/pivotal/plugin.py index 8620cb3c4d3e88..e1ebb3920b57f7 100644 --- a/src/sentry_plugins/pivotal/plugin.py +++ b/src/sentry_plugins/pivotal/plugin.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import urlencode import requests diff --git a/src/sentry_plugins/pushover/client.py b/src/sentry_plugins/pushover/client.py index 11e182c99b98cf..81aebc666b0b26 100644 --- a/src/sentry_plugins/pushover/client.py +++ b/src/sentry_plugins/pushover/client.py @@ -1,3 +1,4 @@ +from typing import int from sentry_plugins.client import ApiClient diff --git a/src/sentry_plugins/pushover/plugin.py b/src/sentry_plugins/pushover/plugin.py index b704e613d2deb4..26048d52d47b1a 100644 --- a/src/sentry_plugins/pushover/plugin.py +++ b/src/sentry_plugins/pushover/plugin.py @@ -1,3 +1,4 @@ +from typing import int from sentry.exceptions import PluginError from sentry.integrations.base import FeatureDescription, IntegrationFeatures from sentry.plugins.base.structs import Notification diff --git a/src/sentry_plugins/redmine/client.py b/src/sentry_plugins/redmine/client.py index 52dfb516dda614..063c1e46d9ea2e 100644 --- a/src/sentry_plugins/redmine/client.py +++ b/src/sentry_plugins/redmine/client.py @@ -1,3 +1,4 @@ +from typing import int from sentry import http from sentry.utils import json diff --git a/src/sentry_plugins/redmine/forms.py b/src/sentry_plugins/redmine/forms.py index 438355a22dd0f0..e9a2c413ee1dec 100644 --- a/src/sentry_plugins/redmine/forms.py +++ b/src/sentry_plugins/redmine/forms.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django import forms diff --git a/src/sentry_plugins/redmine/plugin.py b/src/sentry_plugins/redmine/plugin.py index afed96ea48bcaa..a11c6d3093726b 100644 --- a/src/sentry_plugins/redmine/plugin.py +++ b/src/sentry_plugins/redmine/plugin.py @@ -1,3 +1,4 @@ +from typing import int from django.utils.translation import gettext_lazy as _ from rest_framework.request import Request diff --git a/src/sentry_plugins/segment/plugin.py b/src/sentry_plugins/segment/plugin.py index 08ae7d27c949ee..a7e0dc44bcdfff 100644 --- a/src/sentry_plugins/segment/plugin.py +++ b/src/sentry_plugins/segment/plugin.py @@ -1,3 +1,4 @@ +from typing import int from sentry import http from sentry.integrations.base import FeatureDescription, IntegrationFeatures from sentry.plugins.bases.data_forwarding import DataForwardingPlugin diff --git a/src/sentry_plugins/sessionstack/client.py b/src/sentry_plugins/sessionstack/client.py index 2c50f1bafe960b..703aae77433816 100644 --- a/src/sentry_plugins/sessionstack/client.py +++ b/src/sentry_plugins/sessionstack/client.py @@ -1,3 +1,4 @@ +from typing import int import requests from sentry.http import safe_urlopen diff --git a/src/sentry_plugins/sessionstack/plugin.py b/src/sentry_plugins/sessionstack/plugin.py index 8185cd7341e3b7..c250b71a09f122 100644 --- a/src/sentry_plugins/sessionstack/plugin.py +++ b/src/sentry_plugins/sessionstack/plugin.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping, MutableMapping, Sequence -from typing import Any +from typing import int, Any from sentry.exceptions import PluginError from sentry.integrations.base import FeatureDescription, IntegrationFeatures diff --git a/src/sentry_plugins/sessionstack/utils.py b/src/sentry_plugins/sessionstack/utils.py index ef4ffe0e6bea0c..55f6bf7404af01 100644 --- a/src/sentry_plugins/sessionstack/utils.py +++ b/src/sentry_plugins/sessionstack/utils.py @@ -1,3 +1,4 @@ +from typing import int from base64 import b64encode from urllib.parse import urlencode diff --git a/src/sentry_plugins/slack/client.py b/src/sentry_plugins/slack/client.py index a3df858fd0932d..45f963109c61d7 100644 --- a/src/sentry_plugins/slack/client.py +++ b/src/sentry_plugins/slack/client.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry_plugins.client import ApiClient diff --git a/src/sentry_plugins/slack/plugin.py b/src/sentry_plugins/slack/plugin.py index 8c08c79e8fcd78..28ede8aca3c833 100644 --- a/src/sentry_plugins/slack/plugin.py +++ b/src/sentry_plugins/slack/plugin.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from sentry import tagstore diff --git a/src/sentry_plugins/splunk/client.py b/src/sentry_plugins/splunk/client.py index ba20e1720482af..5f69d972c8db94 100644 --- a/src/sentry_plugins/splunk/client.py +++ b/src/sentry_plugins/splunk/client.py @@ -1,3 +1,4 @@ +from typing import int from sentry_plugins.client import ApiClient diff --git a/src/sentry_plugins/splunk/plugin.py b/src/sentry_plugins/splunk/plugin.py index 154c9ce871216e..66bce35f4c9ab1 100644 --- a/src/sentry_plugins/splunk/plugin.py +++ b/src/sentry_plugins/splunk/plugin.py @@ -1,6 +1,6 @@ import logging from collections.abc import MutableMapping -from typing import Any +from typing import int, Any from sentry import tagstore from sentry.integrations.base import FeatureDescription, IntegrationFeatures diff --git a/src/sentry_plugins/trello/client.py b/src/sentry_plugins/trello/client.py index 10da31e4a1f764..0b4ff698248fbb 100644 --- a/src/sentry_plugins/trello/client.py +++ b/src/sentry_plugins/trello/client.py @@ -1,3 +1,4 @@ +from typing import int from sentry_plugins.client import ApiClient ORG_BOARD_PATH = "/organizations/%s/boards" diff --git a/src/sentry_plugins/trello/plugin.py b/src/sentry_plugins/trello/plugin.py index 5b4dd2582098aa..6d4cbba68b112f 100644 --- a/src/sentry_plugins/trello/plugin.py +++ b/src/sentry_plugins/trello/plugin.py @@ -1,3 +1,4 @@ +from typing import int import re from django.urls import re_path diff --git a/src/sentry_plugins/twilio/client.py b/src/sentry_plugins/twilio/client.py index 4d5cf4cc4be6c8..1b9bac7739feec 100644 --- a/src/sentry_plugins/twilio/client.py +++ b/src/sentry_plugins/twilio/client.py @@ -1,3 +1,4 @@ +from typing import int from base64 import b64encode from django.utils.encoding import force_bytes diff --git a/src/sentry_plugins/twilio/plugin.py b/src/sentry_plugins/twilio/plugin.py index e9adbb2c3b93cc..c105ed902e3b96 100644 --- a/src/sentry_plugins/twilio/plugin.py +++ b/src/sentry_plugins/twilio/plugin.py @@ -1,7 +1,7 @@ from __future__ import annotations import re -from typing import Any +from typing import int, Any import phonenumbers from django import forms diff --git a/src/sentry_plugins/utils.py b/src/sentry_plugins/utils.py index 667dddb05eeab7..b4cf27a1be0353 100644 --- a/src/sentry_plugins/utils.py +++ b/src/sentry_plugins/utils.py @@ -1,3 +1,4 @@ +from typing import int def get_secret_field_config(secret, help_text=None, include_prefix=False, **kwargs): has_saved_value = bool(secret) saved_text = "Only enter a new value if you wish to update the existing one. " diff --git a/src/sentry_plugins/victorops/client.py b/src/sentry_plugins/victorops/client.py index eb998659f3b216..197989a3a03157 100644 --- a/src/sentry_plugins/victorops/client.py +++ b/src/sentry_plugins/victorops/client.py @@ -1,3 +1,4 @@ +from typing import int from sentry_plugins.client import ApiClient diff --git a/src/sentry_plugins/victorops/plugin.py b/src/sentry_plugins/victorops/plugin.py index e9b466af5e4ff4..07293fd42ebf7f 100644 --- a/src/sentry_plugins/victorops/plugin.py +++ b/src/sentry_plugins/victorops/plugin.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.base import FeatureDescription, IntegrationFeatures from sentry.plugins.bases.notify import NotificationPlugin from sentry.shared_integrations.exceptions import ApiError diff --git a/src/social_auth/__init__.py b/src/social_auth/__init__.py index dad3c416895732..db6e3c937537fe 100644 --- a/src/social_auth/__init__.py +++ b/src/social_auth/__init__.py @@ -1,3 +1,4 @@ +from typing import int version = (0, 7, 28) __version__ = ".".join(map(str, version)) diff --git a/src/social_auth/admin.py b/src/social_auth/admin.py index 0f574d364e9f86..5a15dc901156c4 100644 --- a/src/social_auth/admin.py +++ b/src/social_auth/admin.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib import admin from social_auth.django_compat import get_all_field_names diff --git a/src/social_auth/backends/__init__.py b/src/social_auth/backends/__init__.py index 9074504d755233..e47c4413547a9b 100644 --- a/src/social_auth/backends/__init__.py +++ b/src/social_auth/backends/__init__.py @@ -14,7 +14,7 @@ import logging import threading -from typing import Any +from typing import int, Any from urllib.error import HTTPError from urllib.parse import parse_qsl, urlencode from urllib.request import Request diff --git a/src/social_auth/backends/asana.py b/src/social_auth/backends/asana.py index a0cf282a4cdafa..11712ba36c4213 100644 --- a/src/social_auth/backends/asana.py +++ b/src/social_auth/backends/asana.py @@ -1,3 +1,4 @@ +from typing import int """ Obtain ASANA_CLIENT_ID & ASANA_CLIENT_SECRET diff --git a/src/social_auth/backends/bitbucket.py b/src/social_auth/backends/bitbucket.py index 54407f09f3e61b..7ed9b026ec1fcc 100644 --- a/src/social_auth/backends/bitbucket.py +++ b/src/social_auth/backends/bitbucket.py @@ -1,3 +1,4 @@ +from typing import int """ Bitbucket OAuth support. diff --git a/src/social_auth/backends/github.py b/src/social_auth/backends/github.py index 175ca556d3d5d2..084fd62e6d367a 100644 --- a/src/social_auth/backends/github.py +++ b/src/social_auth/backends/github.py @@ -1,3 +1,4 @@ +from typing import int """ GitHub OAuth support. This contribution adds support for GitHub OAuth service. The settings diff --git a/src/social_auth/backends/pipeline/__init__.py b/src/social_auth/backends/pipeline/__init__.py index 8f39bdb893ba98..7856d0ba912acc 100644 --- a/src/social_auth/backends/pipeline/__init__.py +++ b/src/social_auth/backends/pipeline/__init__.py @@ -1,3 +1,4 @@ +from typing import int """Django-Social-Auth Pipeline. Pipelines must return a dictionary with values that will be passed as parameter diff --git a/src/social_auth/backends/pipeline/associate.py b/src/social_auth/backends/pipeline/associate.py index 5642901754394f..e2b60b7546c040 100644 --- a/src/social_auth/backends/pipeline/associate.py +++ b/src/social_auth/backends/pipeline/associate.py @@ -1,3 +1,4 @@ +from typing import int from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist from social_auth.exceptions import AuthException diff --git a/src/social_auth/backends/pipeline/misc.py b/src/social_auth/backends/pipeline/misc.py index fe974ac37d6ed3..56eb43ab2e0a9f 100644 --- a/src/social_auth/backends/pipeline/misc.py +++ b/src/social_auth/backends/pipeline/misc.py @@ -1,3 +1,4 @@ +from typing import int from social_auth.backends import PIPELINE from social_auth.utils import setting diff --git a/src/social_auth/backends/pipeline/social.py b/src/social_auth/backends/pipeline/social.py index f23ed1151a8927..2825ba63525eff 100644 --- a/src/social_auth/backends/pipeline/social.py +++ b/src/social_auth/backends/pipeline/social.py @@ -1,3 +1,4 @@ +from typing import int from django.db import IntegrityError from social_auth.models import UserSocialAuth diff --git a/src/social_auth/backends/pipeline/user.py b/src/social_auth/backends/pipeline/user.py index f8c9a5b1f4be1c..f60e35a34eac52 100644 --- a/src/social_auth/backends/pipeline/user.py +++ b/src/social_auth/backends/pipeline/user.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from social_auth.django_compat import get_all_field_names diff --git a/src/social_auth/backends/visualstudio.py b/src/social_auth/backends/visualstudio.py index 397f9c6562c74c..29f3ddc71a0b6d 100644 --- a/src/social_auth/backends/visualstudio.py +++ b/src/social_auth/backends/visualstudio.py @@ -1,3 +1,4 @@ +from typing import int """ Obtain VISUALSTUDIO_CLIENT_ID & VISUALSTUDIO_CLIENT_SECRET diff --git a/src/social_auth/decorators.py b/src/social_auth/decorators.py index 7451425474ccd6..2f5413257215ee 100644 --- a/src/social_auth/decorators.py +++ b/src/social_auth/decorators.py @@ -1,3 +1,4 @@ +from typing import int from functools import wraps from django.urls import reverse diff --git a/src/social_auth/django_compat.py b/src/social_auth/django_compat.py index 3a4fb30a74f307..8917ae81f9c087 100644 --- a/src/social_auth/django_compat.py +++ b/src/social_auth/django_compat.py @@ -1,3 +1,4 @@ +from typing import int from itertools import chain diff --git a/src/social_auth/exceptions.py b/src/social_auth/exceptions.py index 63d8a72f8dc2b6..4b4ed592846487 100644 --- a/src/social_auth/exceptions.py +++ b/src/social_auth/exceptions.py @@ -1,3 +1,4 @@ +from typing import int from django.utils.translation import gettext diff --git a/src/social_auth/fields.py b/src/social_auth/fields.py index 252a7262d7753b..eae9c7bb111c1e 100644 --- a/src/social_auth/fields.py +++ b/src/social_auth/fields.py @@ -1,3 +1,4 @@ +from typing import int """XXX: this is unused. remove after the next migrations squash!""" from __future__ import annotations diff --git a/src/social_auth/migrations/0001_squashed_0002_default_auto_field.py b/src/social_auth/migrations/0001_squashed_0002_default_auto_field.py index 041aefee1b4ad2..45f15850a11ecd 100644 --- a/src/social_auth/migrations/0001_squashed_0002_default_auto_field.py +++ b/src/social_auth/migrations/0001_squashed_0002_default_auto_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-05-21 16:28 +from typing import int import django.db.models.deletion from django.conf import settings from django.db import migrations, models diff --git a/src/social_auth/migrations/0003_social_auth_json_field.py b/src/social_auth/migrations/0003_social_auth_json_field.py index d3d09f020e8fe7..44c27a2da87a97 100644 --- a/src/social_auth/migrations/0003_social_auth_json_field.py +++ b/src/social_auth/migrations/0003_social_auth_json_field.py @@ -1,5 +1,6 @@ # Generated by Django 5.2.1 on 2025-06-30 17:50 +from typing import int from django.db import migrations, models from sentry.new_migrations.migrations import CheckedMigration diff --git a/src/social_auth/models.py b/src/social_auth/models.py index 248574d55cd941..0d053b4652bdc3 100644 --- a/src/social_auth/models.py +++ b/src/social_auth/models.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import re diff --git a/src/social_auth/urls.py b/src/social_auth/urls.py index a9e631105980a0..5f22b4f43bdcbf 100644 --- a/src/social_auth/urls.py +++ b/src/social_auth/urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import re_path from social_auth.views import auth, complete diff --git a/src/social_auth/utils.py b/src/social_auth/utils.py index 9850b6f5c2a7bf..40dcae127b8c10 100644 --- a/src/social_auth/utils.py +++ b/src/social_auth/utils.py @@ -2,7 +2,7 @@ import logging from importlib import import_module -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, int from urllib.parse import parse_qs as urlparse_parse_qs from urllib.parse import parse_qsl, urlencode, urlparse, urlunparse from urllib.request import urlopen diff --git a/src/social_auth/views.py b/src/social_auth/views.py index 57299992f4ab17..1bf86bf7ee1999 100644 --- a/src/social_auth/views.py +++ b/src/social_auth/views.py @@ -1,3 +1,4 @@ +from typing import int """Views Notes: diff --git a/src/sudo/forms.py b/src/sudo/forms.py index 0fb888ee5121a3..68f5a66bc36a2b 100644 --- a/src/sudo/forms.py +++ b/src/sudo/forms.py @@ -8,7 +8,7 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django import forms from django.contrib import auth diff --git a/src/sudo/middleware.py b/src/sudo/middleware.py index 7b561f60fcb86d..6f1b1f2d7d0c74 100644 --- a/src/sudo/middleware.py +++ b/src/sudo/middleware.py @@ -1,3 +1,4 @@ +from typing import int """ sudo.middleware ~~~~~~~~~~~~~~~ diff --git a/src/sudo/models.py b/src/sudo/models.py index aa3c525ea84ccd..2a8b8ee84445f2 100644 --- a/src/sudo/models.py +++ b/src/sudo/models.py @@ -1,3 +1,4 @@ +from typing import int """ sudo.models ~~~~~~~~~~~ diff --git a/src/sudo/settings.py b/src/sudo/settings.py index 382fb8b79a6914..07d7acce84b893 100644 --- a/src/sudo/settings.py +++ b/src/sudo/settings.py @@ -1,3 +1,4 @@ +from typing import int """ sudo.settings ~~~~~~~~~~~~~ diff --git a/src/sudo/signals.py b/src/sudo/signals.py index af35a87c0f9f05..1dbf123de83ad2 100644 --- a/src/sudo/signals.py +++ b/src/sudo/signals.py @@ -1,3 +1,4 @@ +from typing import int """ sudo.signals ~~~~~~~~~~~~ diff --git a/src/sudo/utils.py b/src/sudo/utils.py index ccc82027f7915c..ecddb4ff50a261 100644 --- a/src/sudo/utils.py +++ b/src/sudo/utils.py @@ -8,7 +8,7 @@ from __future__ import annotations -from typing import cast +from typing import int, cast from django.core.signing import BadSignature from django.http.request import HttpRequest diff --git a/src/sudo/views.py b/src/sudo/views.py index 8e0255fef28edc..d863aabfa0c8c1 100644 --- a/src/sudo/views.py +++ b/src/sudo/views.py @@ -8,7 +8,7 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from urllib.parse import urlparse, urlunparse from django.contrib.auth.decorators import login_required diff --git a/tests/acceptance/__init__.py b/tests/acceptance/__init__.py index fbeb86cf38de9a..0d4141915185a2 100644 --- a/tests/acceptance/__init__.py +++ b/tests/acceptance/__init__.py @@ -1,3 +1,4 @@ +from typing import int """ Acceptance Tests diff --git a/tests/acceptance/chartcuterie/test_chart_renderer.py b/tests/acceptance/chartcuterie/test_chart_renderer.py index cf38b0397ac92b..52ee6b5bc9a444 100644 --- a/tests/acceptance/chartcuterie/test_chart_renderer.py +++ b/tests/acceptance/chartcuterie/test_chart_renderer.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import AcceptanceTestCase from sentry.testutils.helpers.response import close_streaming_response diff --git a/tests/acceptance/chartcuterie/test_image_block_builder.py b/tests/acceptance/chartcuterie/test_image_block_builder.py index 4c94102b0117a6..e39086a070888e 100644 --- a/tests/acceptance/chartcuterie/test_image_block_builder.py +++ b/tests/acceptance/chartcuterie/test_image_block_builder.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/acceptance/conftest.py b/tests/acceptance/conftest.py index ea14f964faaaa4..f6b8a421222628 100644 --- a/tests/acceptance/conftest.py +++ b/tests/acceptance/conftest.py @@ -1,3 +1,4 @@ +from typing import int import os import subprocess import sys diff --git a/tests/acceptance/test_accept_organization_invite.py b/tests/acceptance/test_accept_organization_invite.py index 7ff54f4519655b..94601077b3e89c 100644 --- a/tests/acceptance/test_accept_organization_invite.py +++ b/tests/acceptance/test_accept_organization_invite.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import F from django.test import override_settings from selenium.webdriver.common.by import By diff --git a/tests/acceptance/test_account_settings.py b/tests/acceptance/test_account_settings.py index 042ce780f4a499..32d3593316839e 100644 --- a/tests/acceptance/test_account_settings.py +++ b/tests/acceptance/test_account_settings.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import AcceptanceTestCase from sentry.testutils.silo import no_silo_test diff --git a/tests/acceptance/test_api.py b/tests/acceptance/test_api.py index 0f9bd2d5849e02..254fd61a2e9ed1 100644 --- a/tests/acceptance/test_api.py +++ b/tests/acceptance/test_api.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.apiapplication import ApiApplication from sentry.testutils.cases import AcceptanceTestCase from sentry.testutils.silo import no_silo_test diff --git a/tests/acceptance/test_auth.py b/tests/acceptance/test_auth.py index e32dcdee68bdb1..0c182baa8cdb69 100644 --- a/tests/acceptance/test_auth.py +++ b/tests/acceptance/test_auth.py @@ -1,3 +1,4 @@ +from typing import int from selenium.webdriver.common.by import By from sentry.testutils.cases import AcceptanceTestCase diff --git a/tests/acceptance/test_create_organization.py b/tests/acceptance/test_create_organization.py index cfe209d8dd1709..8442e36addff3e 100644 --- a/tests/acceptance/test_create_organization.py +++ b/tests/acceptance/test_create_organization.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.testutils.cases import AcceptanceTestCase diff --git a/tests/acceptance/test_create_project.py b/tests/acceptance/test_create_project.py index 7cd5dc1e9f7209..f472b5df908536 100644 --- a/tests/acceptance/test_create_project.py +++ b/tests/acceptance/test_create_project.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.project import Project from sentry.testutils.asserts import assert_existing_projects_status from sentry.testutils.cases import AcceptanceTestCase diff --git a/tests/acceptance/test_create_team.py b/tests/acceptance/test_create_team.py index b05338500d1738..5c2e4ca4f9669d 100644 --- a/tests/acceptance/test_create_team.py +++ b/tests/acceptance/test_create_team.py @@ -1,3 +1,4 @@ +from typing import int from selenium.webdriver.common.by import By from sentry.models.team import Team diff --git a/tests/acceptance/test_emails.py b/tests/acceptance/test_emails.py index f1ab8cf1d8e5e0..4ec9331b49c8fc 100644 --- a/tests/acceptance/test_emails.py +++ b/tests/acceptance/test_emails.py @@ -1,3 +1,4 @@ +from typing import int import re from urllib.parse import urlencode diff --git a/tests/acceptance/test_error_page_embed.py b/tests/acceptance/test_error_page_embed.py index 6f741ad7fb4b5b..e14204c6304980 100644 --- a/tests/acceptance/test_error_page_embed.py +++ b/tests/acceptance/test_error_page_embed.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import quote from uuid import uuid4 diff --git a/tests/acceptance/test_explore_logs.py b/tests/acceptance/test_explore_logs.py index e26b3f4d16afb2..20d758043adc96 100644 --- a/tests/acceptance/test_explore_logs.py +++ b/tests/acceptance/test_explore_logs.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/acceptance/test_explore_spans.py b/tests/acceptance/test_explore_spans.py index f18caf8e1b9e60..0e7e6a9fb612b6 100644 --- a/tests/acceptance/test_explore_spans.py +++ b/tests/acceptance/test_explore_spans.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/acceptance/test_incidents.py b/tests/acceptance/test_incidents.py index 5781c46326eca7..cd235f784197ed 100644 --- a/tests/acceptance/test_incidents.py +++ b/tests/acceptance/test_incidents.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from sentry.incidents.logic import update_incident_status diff --git a/tests/acceptance/test_issue_details.py b/tests/acceptance/test_issue_details.py index dfaa0a5d1c636e..2545f70b374dfb 100644 --- a/tests/acceptance/test_issue_details.py +++ b/tests/acceptance/test_issue_details.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from unittest.mock import patch diff --git a/tests/acceptance/test_issue_details_workflow.py b/tests/acceptance/test_issue_details_workflow.py index e6cbab38122f5a..c5035296f74947 100644 --- a/tests/acceptance/test_issue_details_workflow.py +++ b/tests/acceptance/test_issue_details_workflow.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from unittest import mock diff --git a/tests/acceptance/test_issue_tag_values.py b/tests/acceptance/test_issue_tag_values.py index e7c645db5ce6af..0e86c76bffc370 100644 --- a/tests/acceptance/test_issue_tag_values.py +++ b/tests/acceptance/test_issue_tag_values.py @@ -1,3 +1,4 @@ +from typing import int from fixtures.page_objects.issue_details import IssueDetailsPage from sentry.services.eventstore.models import Event from sentry.testutils.cases import AcceptanceTestCase, SnubaTestCase diff --git a/tests/acceptance/test_link_team.py b/tests/acceptance/test_link_team.py index df1f6d6746db70..7d2292c750e19e 100644 --- a/tests/acceptance/test_link_team.py +++ b/tests/acceptance/test_link_team.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import urlparse from selenium.webdriver.common.by import By diff --git a/tests/acceptance/test_member_list.py b/tests/acceptance/test_member_list.py index e3b573c35d27e5..968acbf8590f54 100644 --- a/tests/acceptance/test_member_list.py +++ b/tests/acceptance/test_member_list.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.organizationmember import OrganizationMember from sentry.testutils.cases import AcceptanceTestCase from sentry.testutils.silo import no_silo_test diff --git a/tests/acceptance/test_oauth_authorize.py b/tests/acceptance/test_oauth_authorize.py index 676fc34bdf5dc4..267bfae765b0ed 100644 --- a/tests/acceptance/test_oauth_authorize.py +++ b/tests/acceptance/test_oauth_authorize.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import AcceptanceTestCase from sentry.testutils.silo import no_silo_test diff --git a/tests/acceptance/test_onboarding.py b/tests/acceptance/test_onboarding.py index 767bd448d287af..7e0274382c9263 100644 --- a/tests/acceptance/test_onboarding.py +++ b/tests/acceptance/test_onboarding.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.models.project import Project diff --git a/tests/acceptance/test_organization_alert_rule_details.py b/tests/acceptance/test_organization_alert_rule_details.py index 8640c13bf00fa8..e81664dac3f6b8 100644 --- a/tests/acceptance/test_organization_alert_rule_details.py +++ b/tests/acceptance/test_organization_alert_rule_details.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/acceptance/test_organization_alert_rules.py b/tests/acceptance/test_organization_alert_rules.py index 5f71fd7dae4ed5..6d4be89ed9ea57 100644 --- a/tests/acceptance/test_organization_alert_rules.py +++ b/tests/acceptance/test_organization_alert_rules.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from sentry.incidents.models.alert_rule import AlertRuleThresholdType diff --git a/tests/acceptance/test_organization_dashboards.py b/tests/acceptance/test_organization_dashboards.py index 134807136d5993..5297f85552bdf8 100644 --- a/tests/acceptance/test_organization_dashboards.py +++ b/tests/acceptance/test_organization_dashboards.py @@ -1,3 +1,4 @@ +from typing import int import pytest from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.by import By diff --git a/tests/acceptance/test_organization_developer_settings.py b/tests/acceptance/test_organization_developer_settings.py index d578db5777be3f..02d55e2a9d061c 100644 --- a/tests/acceptance/test_organization_developer_settings.py +++ b/tests/acceptance/test_organization_developer_settings.py @@ -1,3 +1,4 @@ +from typing import int from selenium.webdriver.common.by import By from sentry.testutils.cases import AcceptanceTestCase diff --git a/tests/acceptance/test_organization_document_integration_detailed_view.py b/tests/acceptance/test_organization_document_integration_detailed_view.py index 252e230a12d662..f3d05fc6110860 100644 --- a/tests/acceptance/test_organization_document_integration_detailed_view.py +++ b/tests/acceptance/test_organization_document_integration_detailed_view.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import AcceptanceTestCase from sentry.testutils.silo import no_silo_test diff --git a/tests/acceptance/test_organization_events_v2.py b/tests/acceptance/test_organization_events_v2.py index a00ab71093f8d0..c2c5e4b59f6131 100644 --- a/tests/acceptance/test_organization_events_v2.py +++ b/tests/acceptance/test_organization_events_v2.py @@ -1,6 +1,6 @@ import copy from datetime import timedelta -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch from urllib.parse import urlencode diff --git a/tests/acceptance/test_organization_global_selection_header.py b/tests/acceptance/test_organization_global_selection_header.py index e3d2f11c972f87..63195748ea9917 100644 --- a/tests/acceptance/test_organization_global_selection_header.py +++ b/tests/acceptance/test_organization_global_selection_header.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from unittest.mock import MagicMock, patch diff --git a/tests/acceptance/test_organization_group_index.py b/tests/acceptance/test_organization_group_index.py index 38482062f824cd..7dec2fea91e2ca 100644 --- a/tests/acceptance/test_organization_group_index.py +++ b/tests/acceptance/test_organization_group_index.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from unittest.mock import MagicMock, patch diff --git a/tests/acceptance/test_organization_integration_configuration_tabs.py b/tests/acceptance/test_organization_integration_configuration_tabs.py index f20dda4879b600..1d8d2aa3de2904 100644 --- a/tests/acceptance/test_organization_integration_configuration_tabs.py +++ b/tests/acceptance/test_organization_integration_configuration_tabs.py @@ -1,3 +1,4 @@ +from typing import int from selenium.webdriver.common.by import By from sentry.testutils.cases import AcceptanceTestCase diff --git a/tests/acceptance/test_organization_integration_detail_view.py b/tests/acceptance/test_organization_integration_detail_view.py index 7967cd8a251008..61968e0b0abdb6 100644 --- a/tests/acceptance/test_organization_integration_detail_view.py +++ b/tests/acceptance/test_organization_integration_detail_view.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/acceptance/test_organization_join_request.py b/tests/acceptance/test_organization_join_request.py index bc012372b204c5..d4b5f84df5385a 100644 --- a/tests/acceptance/test_organization_join_request.py +++ b/tests/acceptance/test_organization_join_request.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import AcceptanceTestCase from sentry.testutils.silo import no_silo_test diff --git a/tests/acceptance/test_organization_monitors.py b/tests/acceptance/test_organization_monitors.py index ae920aa90ec6dc..e4ca106ab24717 100644 --- a/tests/acceptance/test_organization_monitors.py +++ b/tests/acceptance/test_organization_monitors.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from unittest import mock diff --git a/tests/acceptance/test_organization_plugin_detail_view.py b/tests/acceptance/test_organization_plugin_detail_view.py index d89e6f297bddc0..7483fe791ad056 100644 --- a/tests/acceptance/test_organization_plugin_detail_view.py +++ b/tests/acceptance/test_organization_plugin_detail_view.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from fixtures.page_objects.organization_integration_settings import ( diff --git a/tests/acceptance/test_organization_releases.py b/tests/acceptance/test_organization_releases.py index 249547e7d897d5..a5876e6c1acb24 100644 --- a/tests/acceptance/test_organization_releases.py +++ b/tests/acceptance/test_organization_releases.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime import pytest diff --git a/tests/acceptance/test_organization_security_privacy.py b/tests/acceptance/test_organization_security_privacy.py index 5a8e9ba3520c04..5284a48c901c5d 100644 --- a/tests/acceptance/test_organization_security_privacy.py +++ b/tests/acceptance/test_organization_security_privacy.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import AcceptanceTestCase from sentry.testutils.silo import no_silo_test from sentry.utils import json diff --git a/tests/acceptance/test_organization_sentry_app_detailed_view.py b/tests/acceptance/test_organization_sentry_app_detailed_view.py index 0b1a20c2deb4bd..5901f58c5dbec4 100644 --- a/tests/acceptance/test_organization_sentry_app_detailed_view.py +++ b/tests/acceptance/test_organization_sentry_app_detailed_view.py @@ -1,3 +1,4 @@ +from typing import int from fixtures.page_objects.organization_integration_settings import ( OrganizationSentryAppDetailViewPage, ) diff --git a/tests/acceptance/test_organization_switch.py b/tests/acceptance/test_organization_switch.py index fd92ad7c5c031f..426812f721cc98 100644 --- a/tests/acceptance/test_organization_switch.py +++ b/tests/acceptance/test_organization_switch.py @@ -1,3 +1,4 @@ +from typing import int import pytest from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.by import By diff --git a/tests/acceptance/test_organization_uptime.py b/tests/acceptance/test_organization_uptime.py index f4efa410475370..3fd82781abc76e 100644 --- a/tests/acceptance/test_organization_uptime.py +++ b/tests/acceptance/test_organization_uptime.py @@ -1,3 +1,4 @@ +from typing import int from selenium.webdriver.common.keys import Keys from sentry.testutils.cases import AcceptanceTestCase diff --git a/tests/acceptance/test_performance_issues.py b/tests/acceptance/test_performance_issues.py index e2dd7f494ddd55..d9babb690c4d79 100644 --- a/tests/acceptance/test_performance_issues.py +++ b/tests/acceptance/test_performance_issues.py @@ -1,7 +1,7 @@ import random import string from datetime import timedelta -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import MagicMock, patch diff --git a/tests/acceptance/test_performance_landing.py b/tests/acceptance/test_performance_landing.py index 1f18e8202597d7..98c3278a697fac 100644 --- a/tests/acceptance/test_performance_landing.py +++ b/tests/acceptance/test_performance_landing.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.db.models import F diff --git a/tests/acceptance/test_performance_overview.py b/tests/acceptance/test_performance_overview.py index 08e0c94a8e53cc..100fc5171192d2 100644 --- a/tests/acceptance/test_performance_overview.py +++ b/tests/acceptance/test_performance_overview.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.db.models import F diff --git a/tests/acceptance/test_performance_summary.py b/tests/acceptance/test_performance_summary.py index 1da3b70ea53aa3..c650f614937ff9 100644 --- a/tests/acceptance/test_performance_summary.py +++ b/tests/acceptance/test_performance_summary.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch from urllib.parse import urlencode diff --git a/tests/acceptance/test_performance_vital_detail.py b/tests/acceptance/test_performance_vital_detail.py index 8cd38b757056c7..b8dd44d8d80192 100644 --- a/tests/acceptance/test_performance_vital_detail.py +++ b/tests/acceptance/test_performance_vital_detail.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from urllib.parse import urlencode diff --git a/tests/acceptance/test_project_alert_settings.py b/tests/acceptance/test_project_alert_settings.py index 2f02fa22448187..20a5728e3e4897 100644 --- a/tests/acceptance/test_project_alert_settings.py +++ b/tests/acceptance/test_project_alert_settings.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.rule import Rule from sentry.testutils.cases import AcceptanceTestCase from sentry.testutils.silo import no_silo_test diff --git a/tests/acceptance/test_project_detail.py b/tests/acceptance/test_project_detail.py index 8747b6f1e4c813..79902ea9f60ab7 100644 --- a/tests/acceptance/test_project_detail.py +++ b/tests/acceptance/test_project_detail.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.utils import timezone diff --git a/tests/acceptance/test_project_general_settings.py b/tests/acceptance/test_project_general_settings.py index 6bf7df48572add..2cd07d657a7aef 100644 --- a/tests/acceptance/test_project_general_settings.py +++ b/tests/acceptance/test_project_general_settings.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import AcceptanceTestCase from sentry.testutils.silo import no_silo_test diff --git a/tests/acceptance/test_project_keys.py b/tests/acceptance/test_project_keys.py index 1373695f1870ef..8e3698bf271331 100644 --- a/tests/acceptance/test_project_keys.py +++ b/tests/acceptance/test_project_keys.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from sentry.models.projectkey import ProjectKey diff --git a/tests/acceptance/test_project_ownership.py b/tests/acceptance/test_project_ownership.py index 881de3dc3408eb..e33bf4ec4eacab 100644 --- a/tests/acceptance/test_project_ownership.py +++ b/tests/acceptance/test_project_ownership.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import AcceptanceTestCase from sentry.testutils.silo import no_silo_test diff --git a/tests/acceptance/test_project_release_tracking_settings.py b/tests/acceptance/test_project_release_tracking_settings.py index b2c0df8af4520c..065615997b45fd 100644 --- a/tests/acceptance/test_project_release_tracking_settings.py +++ b/tests/acceptance/test_project_release_tracking_settings.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import AcceptanceTestCase, SnubaTestCase from sentry.testutils.silo import no_silo_test diff --git a/tests/acceptance/test_project_servicehooks.py b/tests/acceptance/test_project_servicehooks.py index 24dc8b309db960..2cb786814a00ce 100644 --- a/tests/acceptance/test_project_servicehooks.py +++ b/tests/acceptance/test_project_servicehooks.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.models.servicehook import ServiceHook from sentry.testutils.cases import AcceptanceTestCase from sentry.testutils.silo import no_silo_test diff --git a/tests/acceptance/test_project_tags_settings.py b/tests/acceptance/test_project_tags_settings.py index 3b8e3638ef3e60..de3352b439a9c5 100644 --- a/tests/acceptance/test_project_tags_settings.py +++ b/tests/acceptance/test_project_tags_settings.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from unittest.mock import MagicMock, patch diff --git a/tests/acceptance/test_proxy.py b/tests/acceptance/test_proxy.py index 0a80738a10199e..5318a29c3f6586 100644 --- a/tests/acceptance/test_proxy.py +++ b/tests/acceptance/test_proxy.py @@ -1,7 +1,7 @@ from __future__ import annotations from dataclasses import asdict -from typing import Any +from typing import int, Any import pytest from django.http import HttpResponse, StreamingHttpResponse diff --git a/tests/acceptance/test_quick_start.py b/tests/acceptance/test_quick_start.py index 42d0ddafaa2739..b0469b595bef4c 100644 --- a/tests/acceptance/test_quick_start.py +++ b/tests/acceptance/test_quick_start.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from django.conf import settings diff --git a/tests/acceptance/test_replay_details.py b/tests/acceptance/test_replay_details.py index 8898ae00ed0593..ebca83888af862 100644 --- a/tests/acceptance/test_replay_details.py +++ b/tests/acceptance/test_replay_details.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from sentry.replays.testutils import ( diff --git a/tests/acceptance/test_replay_list.py b/tests/acceptance/test_replay_list.py index 0f441cc84eca24..ac8fca7c8a51a9 100644 --- a/tests/acceptance/test_replay_list.py +++ b/tests/acceptance/test_replay_list.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import datetime, timedelta diff --git a/tests/acceptance/test_shared_issue.py b/tests/acceptance/test_shared_issue.py index ad94a23c2bc9e6..e04d3785348d0a 100644 --- a/tests/acceptance/test_shared_issue.py +++ b/tests/acceptance/test_shared_issue.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.groupshare import GroupShare from sentry.testutils.cases import AcceptanceTestCase from sentry.testutils.helpers.datetime import before_now diff --git a/tests/acceptance/test_teams_list.py b/tests/acceptance/test_teams_list.py index 91ec2a9acc4983..96d2a627dab13c 100644 --- a/tests/acceptance/test_teams_list.py +++ b/tests/acceptance/test_teams_list.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from sentry.testutils.cases import AcceptanceTestCase diff --git a/tests/acceptance/test_trace_view_from_explore.py b/tests/acceptance/test_trace_view_from_explore.py index e12e50a2634581..28ca4cbc840c90 100644 --- a/tests/acceptance/test_trace_view_from_explore.py +++ b/tests/acceptance/test_trace_view_from_explore.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/acceptance/test_trace_view_waterfall.py b/tests/acceptance/test_trace_view_waterfall.py index 1841193f13fa2e..5f549ba4cc5607 100644 --- a/tests/acceptance/test_trace_view_waterfall.py +++ b/tests/acceptance/test_trace_view_waterfall.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/apidocs/endpoints/events/test_group_events.py b/tests/apidocs/endpoints/events/test_group_events.py index 5b2a3546a1b712..ec860afbcd14f4 100644 --- a/tests/apidocs/endpoints/events/test_group_events.py +++ b/tests/apidocs/endpoints/events/test_group_events.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from fixtures.apidocs_test_case import APIDocsTestCase diff --git a/tests/apidocs/endpoints/events/test_group_hashes.py b/tests/apidocs/endpoints/events/test_group_hashes.py index 45ae666bac8db0..a9a5eb1083ec76 100644 --- a/tests/apidocs/endpoints/events/test_group_hashes.py +++ b/tests/apidocs/endpoints/events/test_group_hashes.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from fixtures.apidocs_test_case import APIDocsTestCase diff --git a/tests/apidocs/endpoints/events/test_group_issue_details.py b/tests/apidocs/endpoints/events/test_group_issue_details.py index 0216388f2e9a26..e1a9e44a827a1b 100644 --- a/tests/apidocs/endpoints/events/test_group_issue_details.py +++ b/tests/apidocs/endpoints/events/test_group_issue_details.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from fixtures.apidocs_test_case import APIDocsTestCase diff --git a/tests/apidocs/endpoints/events/test_group_tagkey_values.py b/tests/apidocs/endpoints/events/test_group_tagkey_values.py index d33f108bb1e691..5fa980b21805d6 100644 --- a/tests/apidocs/endpoints/events/test_group_tagkey_values.py +++ b/tests/apidocs/endpoints/events/test_group_tagkey_values.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from fixtures.apidocs_test_case import APIDocsTestCase diff --git a/tests/apidocs/endpoints/events/test_project_event_details.py b/tests/apidocs/endpoints/events/test_project_event_details.py index a05c81fc9a2cdf..a7723719b2fff8 100644 --- a/tests/apidocs/endpoints/events/test_project_event_details.py +++ b/tests/apidocs/endpoints/events/test_project_event_details.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/events/test_project_issues.py b/tests/apidocs/endpoints/events/test_project_issues.py index 059ead0745dec5..456987bbeb7bce 100644 --- a/tests/apidocs/endpoints/events/test_project_issues.py +++ b/tests/apidocs/endpoints/events/test_project_issues.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from fixtures.apidocs_test_case import APIDocsTestCase diff --git a/tests/apidocs/endpoints/events/test_project_tagkey_values.py b/tests/apidocs/endpoints/events/test_project_tagkey_values.py index 5f87f1469ba8db..4b05f3b1448168 100644 --- a/tests/apidocs/endpoints/events/test_project_tagkey_values.py +++ b/tests/apidocs/endpoints/events/test_project_tagkey_values.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/integration_platform/test_sentry_app_external_issue_details.py b/tests/apidocs/endpoints/integration_platform/test_sentry_app_external_issue_details.py index 75817c75bf4a31..20940e200a4f16 100644 --- a/tests/apidocs/endpoints/integration_platform/test_sentry_app_external_issue_details.py +++ b/tests/apidocs/endpoints/integration_platform/test_sentry_app_external_issue_details.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/integration_platform/test_sentry_app_external_issues.py b/tests/apidocs/endpoints/integration_platform/test_sentry_app_external_issues.py index a46842e431602f..b100b456ea51a3 100644 --- a/tests/apidocs/endpoints/integration_platform/test_sentry_app_external_issues.py +++ b/tests/apidocs/endpoints/integration_platform/test_sentry_app_external_issues.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/integration_platform/test_sentry_app_installations.py b/tests/apidocs/endpoints/integration_platform/test_sentry_app_installations.py index 4c609d889cb293..9a7806aecabe29 100644 --- a/tests/apidocs/endpoints/integration_platform/test_sentry_app_installations.py +++ b/tests/apidocs/endpoints/integration_platform/test_sentry_app_installations.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/organizations/test_event_id_lookup.py b/tests/apidocs/endpoints/organizations/test_event_id_lookup.py index 332983fd86d922..906c105db29232 100644 --- a/tests/apidocs/endpoints/organizations/test_event_id_lookup.py +++ b/tests/apidocs/endpoints/organizations/test_event_id_lookup.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/organizations/test_org_details.py b/tests/apidocs/endpoints/organizations/test_org_details.py index 5ea3ab56dcc374..f6e78aed6be6ed 100644 --- a/tests/apidocs/endpoints/organizations/test_org_details.py +++ b/tests/apidocs/endpoints/organizations/test_org_details.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/organizations/test_org_index.py b/tests/apidocs/endpoints/organizations/test_org_index.py index 99b8a22f789179..e017b4083ecc14 100644 --- a/tests/apidocs/endpoints/organizations/test_org_index.py +++ b/tests/apidocs/endpoints/organizations/test_org_index.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/organizations/test_org_projects.py b/tests/apidocs/endpoints/organizations/test_org_projects.py index d380a534d47f10..ef575477e99531 100644 --- a/tests/apidocs/endpoints/organizations/test_org_projects.py +++ b/tests/apidocs/endpoints/organizations/test_org_projects.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/organizations/test_org_repos.py b/tests/apidocs/endpoints/organizations/test_org_repos.py index 75b9cd71e78885..fd3dd30a49787e 100644 --- a/tests/apidocs/endpoints/organizations/test_org_repos.py +++ b/tests/apidocs/endpoints/organizations/test_org_repos.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/organizations/test_org_stats_v2.py b/tests/apidocs/endpoints/organizations/test_org_stats_v2.py index 63987c1cc8ae90..1d5234c7d59e65 100644 --- a/tests/apidocs/endpoints/organizations/test_org_stats_v2.py +++ b/tests/apidocs/endpoints/organizations/test_org_stats_v2.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from django.test.client import RequestFactory diff --git a/tests/apidocs/endpoints/organizations/test_repo_commits.py b/tests/apidocs/endpoints/organizations/test_repo_commits.py index 914ab738fc27a3..a276638822aba5 100644 --- a/tests/apidocs/endpoints/organizations/test_repo_commits.py +++ b/tests/apidocs/endpoints/organizations/test_repo_commits.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/projects/test_dsyms.py b/tests/apidocs/endpoints/projects/test_dsyms.py index 1a47eab57b72b7..1e6a0986567540 100644 --- a/tests/apidocs/endpoints/projects/test_dsyms.py +++ b/tests/apidocs/endpoints/projects/test_dsyms.py @@ -1,3 +1,4 @@ +from typing import int import zipfile from io import BytesIO diff --git a/tests/apidocs/endpoints/projects/test_project_index.py b/tests/apidocs/endpoints/projects/test_project_index.py index 6181ffec388a6f..1e2048ad61e84a 100644 --- a/tests/apidocs/endpoints/projects/test_project_index.py +++ b/tests/apidocs/endpoints/projects/test_project_index.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/projects/test_project_stats.py b/tests/apidocs/endpoints/projects/test_project_stats.py index 3d52f5e14c0bfc..87cb32a456a7a9 100644 --- a/tests/apidocs/endpoints/projects/test_project_stats.py +++ b/tests/apidocs/endpoints/projects/test_project_stats.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/projects/test_service_hook_details.py b/tests/apidocs/endpoints/projects/test_service_hook_details.py index 29ff814bc233cf..ce00f5a72f5a4b 100644 --- a/tests/apidocs/endpoints/projects/test_service_hook_details.py +++ b/tests/apidocs/endpoints/projects/test_service_hook_details.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/projects/test_service_hooks.py b/tests/apidocs/endpoints/projects/test_service_hooks.py index 48e65e15b91a1d..83572bd010a9c2 100644 --- a/tests/apidocs/endpoints/projects/test_service_hooks.py +++ b/tests/apidocs/endpoints/projects/test_service_hooks.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/projects/test_tag_values.py b/tests/apidocs/endpoints/projects/test_tag_values.py index 2f7b59c8dac66d..351f8c9c8ecee6 100644 --- a/tests/apidocs/endpoints/projects/test_tag_values.py +++ b/tests/apidocs/endpoints/projects/test_tag_values.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/projects/test_user_feedback.py b/tests/apidocs/endpoints/projects/test_user_feedback.py index 0d0819b8acc814..8e31b7f6bceb38 100644 --- a/tests/apidocs/endpoints/projects/test_user_feedback.py +++ b/tests/apidocs/endpoints/projects/test_user_feedback.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.utils import timezone diff --git a/tests/apidocs/endpoints/projects/test_users.py b/tests/apidocs/endpoints/projects/test_users.py index 8a65919e2976fd..37e10dbb2a6884 100644 --- a/tests/apidocs/endpoints/projects/test_users.py +++ b/tests/apidocs/endpoints/projects/test_users.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.test.client import RequestFactory diff --git a/tests/apidocs/endpoints/releases/test_deploys.py b/tests/apidocs/endpoints/releases/test_deploys.py index 3b452faec6fff9..d51b7dd04523e3 100644 --- a/tests/apidocs/endpoints/releases/test_deploys.py +++ b/tests/apidocs/endpoints/releases/test_deploys.py @@ -1,3 +1,4 @@ +from typing import int import datetime from django.test.client import RequestFactory diff --git a/tests/apidocs/endpoints/releases/test_organization_release_commit_files.py b/tests/apidocs/endpoints/releases/test_organization_release_commit_files.py index ccaeff37f3175f..955bf1c6ec4ecf 100644 --- a/tests/apidocs/endpoints/releases/test_organization_release_commit_files.py +++ b/tests/apidocs/endpoints/releases/test_organization_release_commit_files.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/releases/test_organization_release_commits.py b/tests/apidocs/endpoints/releases/test_organization_release_commits.py index 6ab6e9e13e69c6..023582ff301242 100644 --- a/tests/apidocs/endpoints/releases/test_organization_release_commits.py +++ b/tests/apidocs/endpoints/releases/test_organization_release_commits.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/releases/test_organization_release_details.py b/tests/apidocs/endpoints/releases/test_organization_release_details.py index b539b69a7110b7..aa68eb842809b6 100644 --- a/tests/apidocs/endpoints/releases/test_organization_release_details.py +++ b/tests/apidocs/endpoints/releases/test_organization_release_details.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime from django.test.client import RequestFactory diff --git a/tests/apidocs/endpoints/releases/test_organization_release_file_details.py b/tests/apidocs/endpoints/releases/test_organization_release_file_details.py index 16c01a81435553..8bfe80f205cb6c 100644 --- a/tests/apidocs/endpoints/releases/test_organization_release_file_details.py +++ b/tests/apidocs/endpoints/releases/test_organization_release_file_details.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/releases/test_organization_release_files.py b/tests/apidocs/endpoints/releases/test_organization_release_files.py index 21d1e1a97f84a2..cdb504bc977fe3 100644 --- a/tests/apidocs/endpoints/releases/test_organization_release_files.py +++ b/tests/apidocs/endpoints/releases/test_organization_release_files.py @@ -1,3 +1,4 @@ +from typing import int from django.core.files.uploadedfile import SimpleUploadedFile from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/releases/test_organization_releases.py b/tests/apidocs/endpoints/releases/test_organization_releases.py index 72314af456767a..5dac296a5f40b9 100644 --- a/tests/apidocs/endpoints/releases/test_organization_releases.py +++ b/tests/apidocs/endpoints/releases/test_organization_releases.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime import pytest diff --git a/tests/apidocs/endpoints/releases/test_organization_sessions.py b/tests/apidocs/endpoints/releases/test_organization_sessions.py index ac0151389573aa..9f1d8dd05e402a 100644 --- a/tests/apidocs/endpoints/releases/test_organization_sessions.py +++ b/tests/apidocs/endpoints/releases/test_organization_sessions.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/releases/test_project_release_commits.py b/tests/apidocs/endpoints/releases/test_project_release_commits.py index 5b516b259cc9e7..3e234a2a6acd47 100644 --- a/tests/apidocs/endpoints/releases/test_project_release_commits.py +++ b/tests/apidocs/endpoints/releases/test_project_release_commits.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/releases/test_project_release_file_details.py b/tests/apidocs/endpoints/releases/test_project_release_file_details.py index 67d6dc04bc38f9..5e036a9686a032 100644 --- a/tests/apidocs/endpoints/releases/test_project_release_file_details.py +++ b/tests/apidocs/endpoints/releases/test_project_release_file_details.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/releases/test_project_release_files.py b/tests/apidocs/endpoints/releases/test_project_release_files.py index 71f963ce515131..7eb0fcb8fb5e04 100644 --- a/tests/apidocs/endpoints/releases/test_project_release_files.py +++ b/tests/apidocs/endpoints/releases/test_project_release_files.py @@ -1,3 +1,4 @@ +from typing import int from django.core.files.uploadedfile import SimpleUploadedFile from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/scim/test_group_details.py b/tests/apidocs/endpoints/scim/test_group_details.py index 3c1be929688713..3b939a5034c0a3 100644 --- a/tests/apidocs/endpoints/scim/test_group_details.py +++ b/tests/apidocs/endpoints/scim/test_group_details.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/scim/test_group_index.py b/tests/apidocs/endpoints/scim/test_group_index.py index eb11b48097c13a..f63be3531752d8 100644 --- a/tests/apidocs/endpoints/scim/test_group_index.py +++ b/tests/apidocs/endpoints/scim/test_group_index.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/scim/test_member_details.py b/tests/apidocs/endpoints/scim/test_member_details.py index 914dc4fcd12dfa..97681365c391da 100644 --- a/tests/apidocs/endpoints/scim/test_member_details.py +++ b/tests/apidocs/endpoints/scim/test_member_details.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/scim/test_member_index.py b/tests/apidocs/endpoints/scim/test_member_index.py index 34446b9c9c1bb1..5f14d8c09c517e 100644 --- a/tests/apidocs/endpoints/scim/test_member_index.py +++ b/tests/apidocs/endpoints/scim/test_member_index.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/teams/test_by_slug.py b/tests/apidocs/endpoints/teams/test_by_slug.py index 16fcc46405c0b3..714ed224769b77 100644 --- a/tests/apidocs/endpoints/teams/test_by_slug.py +++ b/tests/apidocs/endpoints/teams/test_by_slug.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/teams/test_index.py b/tests/apidocs/endpoints/teams/test_index.py index f8408d0167c952..0a005700124340 100644 --- a/tests/apidocs/endpoints/teams/test_index.py +++ b/tests/apidocs/endpoints/teams/test_index.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/endpoints/teams/test_projects.py b/tests/apidocs/endpoints/teams/test_projects.py index bdc127fa4f5d3c..404d1c907d14d2 100644 --- a/tests/apidocs/endpoints/teams/test_projects.py +++ b/tests/apidocs/endpoints/teams/test_projects.py @@ -1,3 +1,4 @@ +from typing import int from django.test.client import RequestFactory from django.urls import reverse diff --git a/tests/apidocs/test_hooks.py b/tests/apidocs/test_hooks.py index 68d2193e1482b9..f9d5af3c2e4858 100644 --- a/tests/apidocs/test_hooks.py +++ b/tests/apidocs/test_hooks.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase from sentry.apidocs.hooks import custom_postprocessing_hook diff --git a/tests/conftest.py b/tests/conftest.py index a987646592cf21..b2da9d724f965c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,4 @@ +from typing import int import os import signal import sys diff --git a/tests/flagpole/test_conditions.py b/tests/flagpole/test_conditions.py index 1c4b8331269d5a..fc3f64fcf7e6a3 100644 --- a/tests/flagpole/test_conditions.py +++ b/tests/flagpole/test_conditions.py @@ -1,3 +1,4 @@ +from typing import int import pytest from flagpole import EvaluationContext diff --git a/tests/flagpole/test_evaluation_context.py b/tests/flagpole/test_evaluation_context.py index c8f5b9f36bef68..3ab91449f74c17 100644 --- a/tests/flagpole/test_evaluation_context.py +++ b/tests/flagpole/test_evaluation_context.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import Any +from typing import int, Any import pytest diff --git a/tests/flagpole/test_feature.py b/tests/flagpole/test_feature.py index e82dc2b73daec5..827441fa475f3c 100644 --- a/tests/flagpole/test_feature.py +++ b/tests/flagpole/test_feature.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass import jsonschema diff --git a/tests/flagpole/test_flagpole_eval.py b/tests/flagpole/test_flagpole_eval.py index 4f65bcc0b74aac..9a7a01e37ad81e 100644 --- a/tests/flagpole/test_flagpole_eval.py +++ b/tests/flagpole/test_flagpole_eval.py @@ -1,3 +1,4 @@ +from typing import int import tempfile from pathlib import Path from unittest import mock diff --git a/tests/integration/test_api.py b/tests/integration/test_api.py index 602e62d7ebaa96..4f66f838d83372 100644 --- a/tests/integration/test_api.py +++ b/tests/integration/test_api.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from sentry.models.authidentity import AuthIdentity diff --git a/tests/integration/test_service.py b/tests/integration/test_service.py index 24c59610bda151..883a6746459774 100644 --- a/tests/integration/test_service.py +++ b/tests/integration/test_service.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import mock import responses diff --git a/tests/integration/test_sso.py b/tests/integration/test_sso.py index d98c5bde6c9562..87c363a5b75717 100644 --- a/tests/integration/test_sso.py +++ b/tests/integration/test_sso.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.authidentity import AuthIdentity from sentry.models.authprovider import AuthProvider from sentry.models.organizationmember import OrganizationMember diff --git a/tests/relay_integration/lang/java/test_plugin.py b/tests/relay_integration/lang/java/test_plugin.py index b5146def606560..46d110c330b457 100644 --- a/tests/relay_integration/lang/java/test_plugin.py +++ b/tests/relay_integration/lang/java/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int import zipfile from io import BytesIO from uuid import uuid4 diff --git a/tests/relay_integration/lang/javascript/test_example.py b/tests/relay_integration/lang/javascript/test_example.py index 95c16787166194..964e99f5fa4d1b 100644 --- a/tests/relay_integration/lang/javascript/test_example.py +++ b/tests/relay_integration/lang/javascript/test_example.py @@ -1,3 +1,4 @@ +from typing import int import os import pytest diff --git a/tests/relay_integration/lang/javascript/test_plugin.py b/tests/relay_integration/lang/javascript/test_plugin.py index 29833bbaa0da34..739e8c398038f1 100644 --- a/tests/relay_integration/lang/javascript/test_plugin.py +++ b/tests/relay_integration/lang/javascript/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int import os.path import zipfile from base64 import b64encode diff --git a/tests/relay_integration/test_integration.py b/tests/relay_integration/test_integration.py index 4b7584163ecd1b..52429cfe086eeb 100644 --- a/tests/relay_integration/test_integration.py +++ b/tests/relay_integration/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from io import BytesIO from unittest import mock from uuid import uuid4 diff --git a/tests/relay_integration/test_message_filters.py b/tests/relay_integration/test_message_filters.py index 102c4fec6d8529..3e97942bfbcf29 100644 --- a/tests/relay_integration/test_message_filters.py +++ b/tests/relay_integration/test_message_filters.py @@ -1,3 +1,4 @@ +from typing import int from sentry.ingest.inbound_filters import ( _browser_extensions_filter, _legacy_browsers_filter, diff --git a/tests/relay_integration/test_metrics_extraction.py b/tests/relay_integration/test_metrics_extraction.py index 0ace7d09a6465b..aadfb3b125f883 100644 --- a/tests/relay_integration/test_metrics_extraction.py +++ b/tests/relay_integration/test_metrics_extraction.py @@ -1,3 +1,4 @@ +from typing import int import uuid import confluent_kafka as kafka diff --git a/tests/relay_integration/test_sdk.py b/tests/relay_integration/test_sdk.py index 0143c3dd8d27f8..c128c347aa0078 100644 --- a/tests/relay_integration/test_sdk.py +++ b/tests/relay_integration/test_sdk.py @@ -1,3 +1,4 @@ +from typing import int import uuid from unittest import mock diff --git a/tests/sentry/analytics/test_base.py b/tests/sentry/analytics/test_base.py index 7d4cd20525fa89..a8580130a3a797 100644 --- a/tests/sentry/analytics/test_base.py +++ b/tests/sentry/analytics/test_base.py @@ -1,3 +1,4 @@ +from typing import int from sentry.analytics import Analytics from sentry.analytics.event import EventEnvelope from sentry.analytics.events.organization_created import OrganizationCreatedEvent diff --git a/tests/sentry/analytics/test_event.py b/tests/sentry/analytics/test_event.py index f3bef17de07b6e..6029794671f964 100644 --- a/tests/sentry/analytics/test_event.py +++ b/tests/sentry/analytics/test_event.py @@ -1,3 +1,4 @@ +from typing import int import logging from dataclasses import dataclass from datetime import datetime, timezone diff --git a/tests/sentry/api/bases/test_organization.py b/tests/sentry/api/bases/test_organization.py index 4b59f5d8d6cbab..65d3d0d01c089b 100644 --- a/tests/sentry/api/bases/test_organization.py +++ b/tests/sentry/api/bases/test_organization.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from functools import cached_property from unittest import mock diff --git a/tests/sentry/api/bases/test_organizationmember.py b/tests/sentry/api/bases/test_organizationmember.py index 2b7a77415ad3bd..7751d4ba7ceb3c 100644 --- a/tests/sentry/api/bases/test_organizationmember.py +++ b/tests/sentry/api/bases/test_organizationmember.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.bases.organizationmember import MemberAndStaffPermission, MemberPermission from tests.sentry.api.bases.test_organization import PermissionBaseTestCase diff --git a/tests/sentry/api/bases/test_project.py b/tests/sentry/api/bases/test_project.py index 582d62a7f3d596..c125bf13802291 100644 --- a/tests/sentry/api/bases/test_project.py +++ b/tests/sentry/api/bases/test_project.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.views import APIView from sentry.api.bases.project import ProjectAndStaffPermission, ProjectPermission diff --git a/tests/sentry/api/bases/test_team.py b/tests/sentry/api/bases/test_team.py index 822a8f5d0f6c3d..8552dc31a3bb7b 100644 --- a/tests/sentry/api/bases/test_team.py +++ b/tests/sentry/api/bases/test_team.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.views import APIView from sentry.api.bases.team import TeamPermission diff --git a/tests/sentry/api/endpoints/conftest.py b/tests/sentry/api/endpoints/conftest.py index 346e0eace4873b..a2617f21824a7f 100644 --- a/tests/sentry/api/endpoints/conftest.py +++ b/tests/sentry/api/endpoints/conftest.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 import pytest diff --git a/tests/sentry/api/endpoints/issues/test_organization_derive_code_mappings.py b/tests/sentry/api/endpoints/issues/test_organization_derive_code_mappings.py index 597d4f70873850..39be80bbf14c56 100644 --- a/tests/sentry/api/endpoints/issues/test_organization_derive_code_mappings.py +++ b/tests/sentry/api/endpoints/issues/test_organization_derive_code_mappings.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import patch from django.db import router diff --git a/tests/sentry/api/endpoints/release_thresholds/health_checks/test_fixtures.py b/tests/sentry/api/endpoints/release_thresholds/health_checks/test_fixtures.py index c3c6ec4a3b6c7f..47eb4d3ae9793a 100644 --- a/tests/sentry/api/endpoints/release_thresholds/health_checks/test_fixtures.py +++ b/tests/sentry/api/endpoints/release_thresholds/health_checks/test_fixtures.py @@ -1,3 +1,4 @@ +from typing import int mock_sessions_data = { "groups": [ { diff --git a/tests/sentry/api/endpoints/release_thresholds/health_checks/test_is_crash_free_rate_healthy.py b/tests/sentry/api/endpoints/release_thresholds/health_checks/test_is_crash_free_rate_healthy.py index 4d373634367176..f2922669d06fa6 100644 --- a/tests/sentry/api/endpoints/release_thresholds/health_checks/test_is_crash_free_rate_healthy.py +++ b/tests/sentry/api/endpoints/release_thresholds/health_checks/test_is_crash_free_rate_healthy.py @@ -1,5 +1,5 @@ from datetime import datetime, timedelta -from typing import NoReturn +from typing import int, NoReturn from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/api/endpoints/release_thresholds/health_checks/test_is_error_count_healthy.py b/tests/sentry/api/endpoints/release_thresholds/health_checks/test_is_error_count_healthy.py index db770e093bb34b..24c43b1b40bd2d 100644 --- a/tests/sentry/api/endpoints/release_thresholds/health_checks/test_is_error_count_healthy.py +++ b/tests/sentry/api/endpoints/release_thresholds/health_checks/test_is_error_count_healthy.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/api/endpoints/release_thresholds/health_checks/test_is_new_issue_count_healthy.py b/tests/sentry/api/endpoints/release_thresholds/health_checks/test_is_new_issue_count_healthy.py index 2802979e9576c4..11c27ea6706b56 100644 --- a/tests/sentry/api/endpoints/release_thresholds/health_checks/test_is_new_issue_count_healthy.py +++ b/tests/sentry/api/endpoints/release_thresholds/health_checks/test_is_new_issue_count_healthy.py @@ -1,5 +1,5 @@ from datetime import timedelta -from typing import Any +from typing import int, Any from django.utils import timezone diff --git a/tests/sentry/api/endpoints/release_thresholds/test_release_threshold.py b/tests/sentry/api/endpoints/release_thresholds/test_release_threshold.py index 08798bd4f00dd0..a71c287b04399a 100644 --- a/tests/sentry/api/endpoints/release_thresholds/test_release_threshold.py +++ b/tests/sentry/api/endpoints/release_thresholds/test_release_threshold.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.environment import Environment diff --git a/tests/sentry/api/endpoints/release_thresholds/test_release_threshold_details.py b/tests/sentry/api/endpoints/release_thresholds/test_release_threshold_details.py index 2147cfb6cf5f0b..ad83399559e75c 100644 --- a/tests/sentry/api/endpoints/release_thresholds/test_release_threshold_details.py +++ b/tests/sentry/api/endpoints/release_thresholds/test_release_threshold_details.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.environment import Environment diff --git a/tests/sentry/api/endpoints/release_thresholds/test_release_threshold_status.py b/tests/sentry/api/endpoints/release_thresholds/test_release_threshold_status.py index ff099425c58ab7..91e2f1a841bd2b 100644 --- a/tests/sentry/api/endpoints/release_thresholds/test_release_threshold_status.py +++ b/tests/sentry/api/endpoints/release_thresholds/test_release_threshold_status.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/api/endpoints/release_thresholds/test_release_thresholds_index.py b/tests/sentry/api/endpoints/release_thresholds/test_release_thresholds_index.py index 2e3f75648ae2d7..69873d8f29dac0 100644 --- a/tests/sentry/api/endpoints/release_thresholds/test_release_thresholds_index.py +++ b/tests/sentry/api/endpoints/release_thresholds/test_release_thresholds_index.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.environment import Environment from sentry.models.release_threshold.release_threshold import ReleaseThreshold from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/release_thresholds/utils/test_fetch_sessions_data.py b/tests/sentry/api/endpoints/release_thresholds/utils/test_fetch_sessions_data.py index c6ca6846494e39..925c832165a397 100644 --- a/tests/sentry/api/endpoints/release_thresholds/utils/test_fetch_sessions_data.py +++ b/tests/sentry/api/endpoints/release_thresholds/utils/test_fetch_sessions_data.py @@ -1,4 +1,5 @@ # from sentry.api.endpoints.release_thresholds.utils import fetch_sessions_data +from typing import int from sentry.testutils.cases import TestCase diff --git a/tests/sentry/api/endpoints/release_thresholds/utils/test_get_errors_counts_timeseries.py b/tests/sentry/api/endpoints/release_thresholds/utils/test_get_errors_counts_timeseries.py index b392f2427ac40d..f36ba7013bb1c4 100644 --- a/tests/sentry/api/endpoints/release_thresholds/utils/test_get_errors_counts_timeseries.py +++ b/tests/sentry/api/endpoints/release_thresholds/utils/test_get_errors_counts_timeseries.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.utils import timezone diff --git a/tests/sentry/api/endpoints/release_thresholds/utils/test_get_new_issue_counts.py b/tests/sentry/api/endpoints/release_thresholds/utils/test_get_new_issue_counts.py index 11426e02f816b5..6d0fa00426fa5f 100644 --- a/tests/sentry/api/endpoints/release_thresholds/utils/test_get_new_issue_counts.py +++ b/tests/sentry/api/endpoints/release_thresholds/utils/test_get_new_issue_counts.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from sentry.api.endpoints.release_thresholds.types import EnrichedThreshold diff --git a/tests/sentry/api/endpoints/secret_scanning/test_github.py b/tests/sentry/api/endpoints/secret_scanning/test_github.py index 7c9c477878bdfc..6463d8c45eee0a 100644 --- a/tests/sentry/api/endpoints/secret_scanning/test_github.py +++ b/tests/sentry/api/endpoints/secret_scanning/test_github.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.core import mail diff --git a/tests/sentry/api/endpoints/test_accept_organization_invite.py b/tests/sentry/api/endpoints/test_accept_organization_invite.py index 7a08d01515dee7..275340d062c95a 100644 --- a/tests/sentry/api/endpoints/test_accept_organization_invite.py +++ b/tests/sentry/api/endpoints/test_accept_organization_invite.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.conf import settings diff --git a/tests/sentry/api/endpoints/test_accept_project_transfer.py b/tests/sentry/api/endpoints/test_accept_project_transfer.py index 061941636408c8..ae695daef58c3b 100644 --- a/tests/sentry/api/endpoints/test_accept_project_transfer.py +++ b/tests/sentry/api/endpoints/test_accept_project_transfer.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from urllib.parse import urlencode from uuid import uuid4 diff --git a/tests/sentry/api/endpoints/test_admin_project_configs.py b/tests/sentry/api/endpoints/test_admin_project_configs.py index 4fbf3fa9797d5f..49b568c943ca6e 100644 --- a/tests/sentry/api/endpoints/test_admin_project_configs.py +++ b/tests/sentry/api/endpoints/test_admin_project_configs.py @@ -1,3 +1,4 @@ +from typing import int from urllib import parse from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_api_application_details.py b/tests/sentry/api/endpoints/test_api_application_details.py index 12227be9aabd9d..1c2f47fe15f054 100644 --- a/tests/sentry/api/endpoints/test_api_application_details.py +++ b/tests/sentry/api/endpoints/test_api_application_details.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.deletions.models.scheduleddeletion import ScheduledDeletion diff --git a/tests/sentry/api/endpoints/test_api_application_rotate_secrets.py b/tests/sentry/api/endpoints/test_api_application_rotate_secrets.py index 664aee7fe98121..b19007002bc520 100644 --- a/tests/sentry/api/endpoints/test_api_application_rotate_secrets.py +++ b/tests/sentry/api/endpoints/test_api_application_rotate_secrets.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.apiapplication import ApiApplication diff --git a/tests/sentry/api/endpoints/test_api_applications.py b/tests/sentry/api/endpoints/test_api_applications.py index 78208a9123fb32..bc97d9f8c87241 100644 --- a/tests/sentry/api/endpoints/test_api_applications.py +++ b/tests/sentry/api/endpoints/test_api_applications.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.apiapplication import ApiApplication diff --git a/tests/sentry/api/endpoints/test_api_authorizations.py b/tests/sentry/api/endpoints/test_api_authorizations.py index 52339730a58dc8..7ff0ed45a2ed17 100644 --- a/tests/sentry/api/endpoints/test_api_authorizations.py +++ b/tests/sentry/api/endpoints/test_api_authorizations.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/api/endpoints/test_api_token_details.py b/tests/sentry/api/endpoints/test_api_token_details.py index 618cd34d80ac10..7d07a3c0c92729 100644 --- a/tests/sentry/api/endpoints/test_api_token_details.py +++ b/tests/sentry/api/endpoints/test_api_token_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from sentry.models.apitoken import ApiToken diff --git a/tests/sentry/api/endpoints/test_api_tokens.py b/tests/sentry/api/endpoints/test_api_tokens.py index 7d1103465a9856..0de7e628a8d7fc 100644 --- a/tests/sentry/api/endpoints/test_api_tokens.py +++ b/tests/sentry/api/endpoints/test_api_tokens.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_artifact_bundles.py b/tests/sentry/api/endpoints/test_artifact_bundles.py index 1add86b58ff87f..77edfd3eae1fd0 100644 --- a/tests/sentry/api/endpoints/test_artifact_bundles.py +++ b/tests/sentry/api/endpoints/test_artifact_bundles.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_assistant.py b/tests/sentry/api/endpoints/test_assistant.py index 11444407451ba1..dac9451d8d9815 100644 --- a/tests/sentry/api/endpoints/test_assistant.py +++ b/tests/sentry/api/endpoints/test_assistant.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from django.utils import timezone diff --git a/tests/sentry/api/endpoints/test_auth.py b/tests/sentry/api/endpoints/test_auth.py index 25e44258bfa8d0..b6df5a829b1403 100644 --- a/tests/sentry/api/endpoints/test_auth.py +++ b/tests/sentry/api/endpoints/test_auth.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_auth_config.py b/tests/sentry/api/endpoints/test_auth_config.py index ae51c15f734f9d..1d61f34f8f40d3 100644 --- a/tests/sentry/api/endpoints/test_auth_config.py +++ b/tests/sentry/api/endpoints/test_auth_config.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.conf import settings from django.test.utils import override_settings diff --git a/tests/sentry/api/endpoints/test_auth_login.py b/tests/sentry/api/endpoints/test_auth_login.py index b6cae64d2be453..6a57f2063daae2 100644 --- a/tests/sentry/api/endpoints/test_auth_login.py +++ b/tests/sentry/api/endpoints/test_auth_login.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_auth_validate.py b/tests/sentry/api/endpoints/test_auth_validate.py index 6b64f80e9432f0..ac79d7c1dc6c39 100644 --- a/tests/sentry/api/endpoints/test_auth_validate.py +++ b/tests/sentry/api/endpoints/test_auth_validate.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.apitoken import ApiToken diff --git a/tests/sentry/api/endpoints/test_broadcast_details.py b/tests/sentry/api/endpoints/test_broadcast_details.py index 7ab769e88210c7..1f202e027f9576 100644 --- a/tests/sentry/api/endpoints/test_broadcast_details.py +++ b/tests/sentry/api/endpoints/test_broadcast_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.broadcast import Broadcast, BroadcastSeen from sentry.testutils.cases import APITestCase from sentry.testutils.silo import control_silo_test diff --git a/tests/sentry/api/endpoints/test_broadcast_index.py b/tests/sentry/api/endpoints/test_broadcast_index.py index 44dafef0076b28..ae1f310b6b4dbf 100644 --- a/tests/sentry/api/endpoints/test_broadcast_index.py +++ b/tests/sentry/api/endpoints/test_broadcast_index.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.broadcast import Broadcast, BroadcastSeen diff --git a/tests/sentry/api/endpoints/test_browser_reporting_collector.py b/tests/sentry/api/endpoints/test_browser_reporting_collector.py index 97eb57758e6505..6b5391d48fb855 100644 --- a/tests/sentry/api/endpoints/test_browser_reporting_collector.py +++ b/tests/sentry/api/endpoints/test_browser_reporting_collector.py @@ -1,3 +1,4 @@ +from typing import int from copy import deepcopy from unittest.mock import MagicMock, patch diff --git a/tests/sentry/api/endpoints/test_builtin_symbol_sources.py b/tests/sentry/api/endpoints/test_builtin_symbol_sources.py index 1ebc9a83658062..9f6f184d8f8222 100644 --- a/tests/sentry/api/endpoints/test_builtin_symbol_sources.py +++ b/tests/sentry/api/endpoints/test_builtin_symbol_sources.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_catchall.py b/tests/sentry/api/endpoints/test_catchall.py index cd872a7629ead2..09724bf4184541 100644 --- a/tests/sentry/api/endpoints/test_catchall.py +++ b/tests/sentry/api/endpoints/test_catchall.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from sentry.testutils.asserts import assert_status_code diff --git a/tests/sentry/api/endpoints/test_check_am2_compatibility.py b/tests/sentry/api/endpoints/test_check_am2_compatibility.py index 22254c24b4cb2f..478e67ae232088 100644 --- a/tests/sentry/api/endpoints/test_check_am2_compatibility.py +++ b/tests/sentry/api/endpoints/test_check_am2_compatibility.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_chunk_upload.py b/tests/sentry/api/endpoints/test_chunk_upload.py index a4b1a81b1f9694..349317baaf9720 100644 --- a/tests/sentry/api/endpoints/test_chunk_upload.py +++ b/tests/sentry/api/endpoints/test_chunk_upload.py @@ -1,3 +1,4 @@ +from typing import int import math from hashlib import sha1 diff --git a/tests/sentry/api/endpoints/test_commit_filechange.py b/tests/sentry/api/endpoints/test_commit_filechange.py index e01330a82d2aaa..f29e5c2441cd42 100644 --- a/tests/sentry/api/endpoints/test_commit_filechange.py +++ b/tests/sentry/api/endpoints/test_commit_filechange.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import ObjectStatus from sentry.models.commit import Commit from sentry.models.commitfilechange import CommitFileChange diff --git a/tests/sentry/api/endpoints/test_custom_rules.py b/tests/sentry/api/endpoints/test_custom_rules.py index a4a5ac96b93751..25f4650255ea2d 100644 --- a/tests/sentry/api/endpoints/test_custom_rules.py +++ b/tests/sentry/api/endpoints/test_custom_rules.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from unittest import mock diff --git a/tests/sentry/api/endpoints/test_debug_files.py b/tests/sentry/api/endpoints/test_debug_files.py index 32d51b2c532959..8a62d360e526b1 100644 --- a/tests/sentry/api/endpoints/test_debug_files.py +++ b/tests/sentry/api/endpoints/test_debug_files.py @@ -1,3 +1,4 @@ +from typing import int import zipfile from io import BytesIO from uuid import uuid4 diff --git a/tests/sentry/api/endpoints/test_dif_assemble.py b/tests/sentry/api/endpoints/test_dif_assemble.py index 99385495e496b5..738d98ddff5be6 100644 --- a/tests/sentry/api/endpoints/test_dif_assemble.py +++ b/tests/sentry/api/endpoints/test_dif_assemble.py @@ -1,3 +1,4 @@ +from typing import int from hashlib import sha1 from unittest.mock import MagicMock, patch diff --git a/tests/sentry/api/endpoints/test_email_capture.py b/tests/sentry/api/endpoints/test_email_capture.py index d4529a86658936..fa0bd6ba61ca40 100644 --- a/tests/sentry/api/endpoints/test_email_capture.py +++ b/tests/sentry/api/endpoints/test_email_capture.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_event_attachment_details.py b/tests/sentry/api/endpoints/test_event_attachment_details.py index 8ed840f5abde04..e1363b3ab15864 100644 --- a/tests/sentry/api/endpoints/test_event_attachment_details.py +++ b/tests/sentry/api/endpoints/test_event_attachment_details.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.test import override_settings diff --git a/tests/sentry/api/endpoints/test_event_attachments.py b/tests/sentry/api/endpoints/test_event_attachments.py index df8db085b267ba..16aa14ec479d50 100644 --- a/tests/sentry/api/endpoints/test_event_attachments.py +++ b/tests/sentry/api/endpoints/test_event_attachments.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.eventattachment import EventAttachment from sentry.testutils.cases import APITestCase from sentry.testutils.helpers.datetime import before_now diff --git a/tests/sentry/api/endpoints/test_event_committers.py b/tests/sentry/api/endpoints/test_event_committers.py index 3d20fff15ac723..ad6075e6e916e8 100644 --- a/tests/sentry/api/endpoints/test_event_committers.py +++ b/tests/sentry/api/endpoints/test_event_committers.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.commitauthor import CommitAuthor diff --git a/tests/sentry/api/endpoints/test_frontend_version.py b/tests/sentry/api/endpoints/test_frontend_version.py index f1e323e35ed28c..cb6f8f1aa8d5c9 100644 --- a/tests/sentry/api/endpoints/test_frontend_version.py +++ b/tests/sentry/api/endpoints/test_frontend_version.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_group_external_issues.py b/tests/sentry/api/endpoints/test_group_external_issues.py index 439e659828d8cd..d93d70ce8aeac1 100644 --- a/tests/sentry/api/endpoints/test_group_external_issues.py +++ b/tests/sentry/api/endpoints/test_group_external_issues.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.models.platformexternalissue import PlatformExternalIssue from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_index.py b/tests/sentry/api/endpoints/test_index.py index 0692b3a6085f6c..ee1fbdcb2b78c9 100644 --- a/tests/sentry/api/endpoints/test_index.py +++ b/tests/sentry/api/endpoints/test_index.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.apikey import ApiKey diff --git a/tests/sentry/api/endpoints/test_internal_beacon.py b/tests/sentry/api/endpoints/test_internal_beacon.py index e42e873720bf31..c5354f02e6d726 100644 --- a/tests/sentry/api/endpoints/test_internal_beacon.py +++ b/tests/sentry/api/endpoints/test_internal_beacon.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_internal_ea_features.py b/tests/sentry/api/endpoints/test_internal_ea_features.py index 92bd2521e643ce..a04b1b1c2936ae 100644 --- a/tests/sentry/api/endpoints/test_internal_ea_features.py +++ b/tests/sentry/api/endpoints/test_internal_ea_features.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_oauth_userinfo.py b/tests/sentry/api/endpoints/test_oauth_userinfo.py index 689f54c89dfcf0..14b23277835527 100644 --- a/tests/sentry/api/endpoints/test_oauth_userinfo.py +++ b/tests/sentry/api/endpoints/test_oauth_userinfo.py @@ -1,3 +1,4 @@ +from typing import int import datetime from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_onboarding.py b/tests/sentry/api/endpoints/test_onboarding.py index 571def63330522..34ed7ca6662375 100644 --- a/tests/sentry/api/endpoints/test_onboarding.py +++ b/tests/sentry/api/endpoints/test_onboarding.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.organizationonboardingtask import ( OnboardingTask, OnboardingTaskStatus, diff --git a/tests/sentry/api/endpoints/test_organization_access_request_details.py b/tests/sentry/api/endpoints/test_organization_access_request_details.py index 35178888afc4b2..783011dcdfff67 100644 --- a/tests/sentry/api/endpoints/test_organization_access_request_details.py +++ b/tests/sentry/api/endpoints/test_organization_access_request_details.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.organizationaccessrequest import OrganizationAccessRequest diff --git a/tests/sentry/api/endpoints/test_organization_access_requests.py b/tests/sentry/api/endpoints/test_organization_access_requests.py index ecbe3fe64c6da9..40f855078ff12f 100644 --- a/tests/sentry/api/endpoints/test_organization_access_requests.py +++ b/tests/sentry/api/endpoints/test_organization_access_requests.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.organizationaccessrequest import OrganizationAccessRequest diff --git a/tests/sentry/api/endpoints/test_organization_ai_conversations.py b/tests/sentry/api/endpoints/test_organization_ai_conversations.py index 09e1a3c246804f..d75fbdcdad2614 100644 --- a/tests/sentry/api/endpoints/test_organization_ai_conversations.py +++ b/tests/sentry/api/endpoints/test_organization_ai_conversations.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from uuid import uuid4 diff --git a/tests/sentry/api/endpoints/test_organization_api_key_details.py b/tests/sentry/api/endpoints/test_organization_api_key_details.py index 94286fd41cae57..75fda43bdeb8cb 100644 --- a/tests/sentry/api/endpoints/test_organization_api_key_details.py +++ b/tests/sentry/api/endpoints/test_organization_api_key_details.py @@ -1,3 +1,4 @@ +from typing import int from django.db import connections from sentry.hybridcloud.models import ApiKeyReplica diff --git a/tests/sentry/api/endpoints/test_organization_api_key_index.py b/tests/sentry/api/endpoints/test_organization_api_key_index.py index 02307755d08f6b..8c01cc13226778 100644 --- a/tests/sentry/api/endpoints/test_organization_api_key_index.py +++ b/tests/sentry/api/endpoints/test_organization_api_key_index.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.silo import control_silo_test diff --git a/tests/sentry/api/endpoints/test_organization_artifactbundle_assemble.py b/tests/sentry/api/endpoints/test_organization_artifactbundle_assemble.py index b4d40254f85b98..9b5c7b528f7232 100644 --- a/tests/sentry/api/endpoints/test_organization_artifactbundle_assemble.py +++ b/tests/sentry/api/endpoints/test_organization_artifactbundle_assemble.py @@ -1,3 +1,4 @@ +from typing import int from hashlib import sha1 from unittest.mock import MagicMock, patch diff --git a/tests/sentry/api/endpoints/test_organization_auth_provider_details.py b/tests/sentry/api/endpoints/test_organization_auth_provider_details.py index e34cbcf5a0a435..50fc22e9293537 100644 --- a/tests/sentry/api/endpoints/test_organization_auth_provider_details.py +++ b/tests/sentry/api/endpoints/test_organization_auth_provider_details.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase, PermissionTestCase, SCIMTestCase diff --git a/tests/sentry/api/endpoints/test_organization_auth_providers.py b/tests/sentry/api/endpoints/test_organization_auth_providers.py index 9c64049856d0f6..7d1eacf1de27b5 100644 --- a/tests/sentry/api/endpoints/test_organization_auth_providers.py +++ b/tests/sentry/api/endpoints/test_organization_auth_providers.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.auth.partnership_configs import ChannelName diff --git a/tests/sentry/api/endpoints/test_organization_auth_token_details.py b/tests/sentry/api/endpoints/test_organization_auth_token_details.py index dd06c897151be2..ee53d86d6cadcf 100644 --- a/tests/sentry/api/endpoints/test_organization_auth_token_details.py +++ b/tests/sentry/api/endpoints/test_organization_auth_token_details.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_organization_auth_tokens.py b/tests/sentry/api/endpoints/test_organization_auth_tokens.py index ffebac66af805d..9cb6859cb57d59 100644 --- a/tests/sentry/api/endpoints/test_organization_auth_tokens.py +++ b/tests/sentry/api/endpoints/test_organization_auth_tokens.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from rest_framework import status diff --git a/tests/sentry/api/endpoints/test_organization_code_mapping_codeowners.py b/tests/sentry/api/endpoints/test_organization_code_mapping_codeowners.py index 072f43a459b28d..99b5f181a2f6f0 100644 --- a/tests/sentry/api/endpoints/test_organization_code_mapping_codeowners.py +++ b/tests/sentry/api/endpoints/test_organization_code_mapping_codeowners.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_organization_config_integrations.py b/tests/sentry/api/endpoints/test_organization_config_integrations.py index 67321734e224b0..e6a3b6a3d045be 100644 --- a/tests/sentry/api/endpoints/test_organization_config_integrations.py +++ b/tests/sentry/api/endpoints/test_organization_config_integrations.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_organization_config_repositories.py b/tests/sentry/api/endpoints/test_organization_config_repositories.py index 88946d90c9b4fa..45900b18a672d0 100644 --- a/tests/sentry/api/endpoints/test_organization_config_repositories.py +++ b/tests/sentry/api/endpoints/test_organization_config_repositories.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_organization_events_trends_v2.py b/tests/sentry/api/endpoints/test_organization_events_trends_v2.py index 84c4ebb7175d61..b2329a9faf8cce 100644 --- a/tests/sentry/api/endpoints/test_organization_events_trends_v2.py +++ b/tests/sentry/api/endpoints/test_organization_events_trends_v2.py @@ -1,5 +1,5 @@ from datetime import timedelta -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/api/endpoints/test_organization_fork.py b/tests/sentry/api/endpoints/test_organization_fork.py index 744faaa547eb3e..0bfa4678a87ca8 100644 --- a/tests/sentry/api/endpoints/test_organization_fork.py +++ b/tests/sentry/api/endpoints/test_organization_fork.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock, patch from uuid import UUID diff --git a/tests/sentry/api/endpoints/test_organization_insights_tree.py b/tests/sentry/api/endpoints/test_organization_insights_tree.py index cdc38877dbb684..acc5e84237f518 100644 --- a/tests/sentry/api/endpoints/test_organization_insights_tree.py +++ b/tests/sentry/api/endpoints/test_organization_insights_tree.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_organization_invite_request_details.py b/tests/sentry/api/endpoints/test_organization_invite_request_details.py index 718cd746eca021..eb6c914614750f 100644 --- a/tests/sentry/api/endpoints/test_organization_invite_request_details.py +++ b/tests/sentry/api/endpoints/test_organization_invite_request_details.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import MagicMock, patch diff --git a/tests/sentry/api/endpoints/test_organization_invite_request_index.py b/tests/sentry/api/endpoints/test_organization_invite_request_index.py index 517d818e4e8c6e..2312e09761cf98 100644 --- a/tests/sentry/api/endpoints/test_organization_invite_request_index.py +++ b/tests/sentry/api/endpoints/test_organization_invite_request_index.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from urllib.parse import parse_qs, urlparse diff --git a/tests/sentry/api/endpoints/test_organization_member_reinvite.py b/tests/sentry/api/endpoints/test_organization_member_reinvite.py index bc44fd4f132497..cbd49e8c887c5f 100644 --- a/tests/sentry/api/endpoints/test_organization_member_reinvite.py +++ b/tests/sentry/api/endpoints/test_organization_member_reinvite.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from sentry import audit_log diff --git a/tests/sentry/api/endpoints/test_organization_metrics.py b/tests/sentry/api/endpoints/test_organization_metrics.py index 8ac47387a7f88b..97d7e92f96870c 100644 --- a/tests/sentry/api/endpoints/test_organization_metrics.py +++ b/tests/sentry/api/endpoints/test_organization_metrics.py @@ -1,3 +1,4 @@ +from typing import int import copy import pytest diff --git a/tests/sentry/api/endpoints/test_organization_missing_org_members.py b/tests/sentry/api/endpoints/test_organization_missing_org_members.py index fb9fa09927751f..6f72b1642e7ca1 100644 --- a/tests/sentry/api/endpoints/test_organization_missing_org_members.py +++ b/tests/sentry/api/endpoints/test_organization_missing_org_members.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/api/endpoints/test_organization_on_demand_metrics_estimation_stats.py b/tests/sentry/api/endpoints/test_organization_on_demand_metrics_estimation_stats.py index 73c0b3bd86917d..bc492ed9eae296 100644 --- a/tests/sentry/api/endpoints/test_organization_on_demand_metrics_estimation_stats.py +++ b/tests/sentry/api/endpoints/test_organization_on_demand_metrics_estimation_stats.py @@ -1,6 +1,6 @@ from datetime import timedelta from random import choice -from typing import cast +from typing import int, cast import pytest from django.utils import timezone diff --git a/tests/sentry/api/endpoints/test_organization_onboarding_continuation.py b/tests/sentry/api/endpoints/test_organization_onboarding_continuation.py index 8fefc3d64889be..210617d59ac628 100644 --- a/tests/sentry/api/endpoints/test_organization_onboarding_continuation.py +++ b/tests/sentry/api/endpoints/test_organization_onboarding_continuation.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_organization_onboarding_tasks.py b/tests/sentry/api/endpoints/test_organization_onboarding_tasks.py index 2e07bcd30ad7bc..93ace3827d8986 100644 --- a/tests/sentry/api/endpoints/test_organization_onboarding_tasks.py +++ b/tests/sentry/api/endpoints/test_organization_onboarding_tasks.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.organizationonboardingtask import ( diff --git a/tests/sentry/api/endpoints/test_organization_pinned_searches.py b/tests/sentry/api/endpoints/test_organization_pinned_searches.py index 3da3782a76c397..3aa165c23b571b 100644 --- a/tests/sentry/api/endpoints/test_organization_pinned_searches.py +++ b/tests/sentry/api/endpoints/test_organization_pinned_searches.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from sentry.api.endpoints.organization_pinned_searches import PINNED_SEARCH_NAME diff --git a/tests/sentry/api/endpoints/test_organization_plugin_deprecation_info.py b/tests/sentry/api/endpoints/test_organization_plugin_deprecation_info.py index 451b97fe34d985..69e7f5e6e52f09 100644 --- a/tests/sentry/api/endpoints/test_organization_plugin_deprecation_info.py +++ b/tests/sentry/api/endpoints/test_organization_plugin_deprecation_info.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.groupmeta import GroupMeta diff --git a/tests/sentry/api/endpoints/test_organization_plugins.py b/tests/sentry/api/endpoints/test_organization_plugins.py index 8699666d51e934..ce9bdb4959ced0 100644 --- a/tests/sentry/api/endpoints/test_organization_plugins.py +++ b/tests/sentry/api/endpoints/test_organization_plugins.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.plugins.base import plugins diff --git a/tests/sentry/api/endpoints/test_organization_plugins_configs.py b/tests/sentry/api/endpoints/test_organization_plugins_configs.py index 7c673fa9ba6e81..58fca3aaabf34f 100644 --- a/tests/sentry/api/endpoints/test_organization_plugins_configs.py +++ b/tests/sentry/api/endpoints/test_organization_plugins_configs.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.plugins.base import plugins diff --git a/tests/sentry/api/endpoints/test_organization_profiling_functions.py b/tests/sentry/api/endpoints/test_organization_profiling_functions.py index ba1e81e0cdb9a8..79c43da8907931 100644 --- a/tests/sentry/api/endpoints/test_organization_profiling_functions.py +++ b/tests/sentry/api/endpoints/test_organization_profiling_functions.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/api/endpoints/test_organization_profiling_profiles.py b/tests/sentry/api/endpoints/test_organization_profiling_profiles.py index f6b6b96de40fcf..bdc14a50daafa2 100644 --- a/tests/sentry/api/endpoints/test_organization_profiling_profiles.py +++ b/tests/sentry/api/endpoints/test_organization_profiling_profiles.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from unittest.mock import MagicMock, patch from uuid import uuid4 diff --git a/tests/sentry/api/endpoints/test_organization_projects_sent_first_event.py b/tests/sentry/api/endpoints/test_organization_projects_sent_first_event.py index bb7917b69fad4a..bda80a60f1ac6d 100644 --- a/tests/sentry/api/endpoints/test_organization_projects_sent_first_event.py +++ b/tests/sentry/api/endpoints/test_organization_projects_sent_first_event.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_organization_recent_searches.py b/tests/sentry/api/endpoints/test_organization_recent_searches.py index a2b3ee901c9c9e..ee7879ef7b201a 100644 --- a/tests/sentry/api/endpoints/test_organization_recent_searches.py +++ b/tests/sentry/api/endpoints/test_organization_recent_searches.py @@ -2,7 +2,7 @@ from datetime import UTC, datetime, timedelta from functools import cached_property -from typing import Any +from typing import int, Any from django.utils import timezone diff --git a/tests/sentry/api/endpoints/test_organization_relay_usage.py b/tests/sentry/api/endpoints/test_organization_relay_usage.py index 553ee739c7411e..309cd001666f54 100644 --- a/tests/sentry/api/endpoints/test_organization_relay_usage.py +++ b/tests/sentry/api/endpoints/test_organization_relay_usage.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from functools import cached_property diff --git a/tests/sentry/api/endpoints/test_organization_release_previous_commits.py b/tests/sentry/api/endpoints/test_organization_release_previous_commits.py index 3eaade2ac0fe8b..e7145e31b19adf 100644 --- a/tests/sentry/api/endpoints/test_organization_release_previous_commits.py +++ b/tests/sentry/api/endpoints/test_organization_release_previous_commits.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.commit import Commit diff --git a/tests/sentry/api/endpoints/test_organization_releases.py b/tests/sentry/api/endpoints/test_organization_releases.py index ec8720a1974318..07cedda77bc902 100644 --- a/tests/sentry/api/endpoints/test_organization_releases.py +++ b/tests/sentry/api/endpoints/test_organization_releases.py @@ -1,3 +1,4 @@ +from typing import int import unittest from datetime import UTC, datetime, timedelta from functools import cached_property diff --git a/tests/sentry/api/endpoints/test_organization_root_cause_analysis.py b/tests/sentry/api/endpoints/test_organization_root_cause_analysis.py index 17232d97af6bf6..365e68a05d0f52 100644 --- a/tests/sentry/api/endpoints/test_organization_root_cause_analysis.py +++ b/tests/sentry/api/endpoints/test_organization_root_cause_analysis.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/sentry/api/endpoints/test_organization_sampling_admin_metrics.py b/tests/sentry/api/endpoints/test_organization_sampling_admin_metrics.py index d2e5a398ef16d5..02542e6e76a86a 100644 --- a/tests/sentry/api/endpoints/test_organization_sampling_admin_metrics.py +++ b/tests/sentry/api/endpoints/test_organization_sampling_admin_metrics.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import patch diff --git a/tests/sentry/api/endpoints/test_organization_sampling_effective_sample_rate.py b/tests/sentry/api/endpoints/test_organization_sampling_effective_sample_rate.py index eb15020953cc1d..10d205a216c550 100644 --- a/tests/sentry/api/endpoints/test_organization_sampling_effective_sample_rate.py +++ b/tests/sentry/api/endpoints/test_organization_sampling_effective_sample_rate.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.utils import timezone diff --git a/tests/sentry/api/endpoints/test_organization_sampling_project_rates.py b/tests/sentry/api/endpoints/test_organization_sampling_project_rates.py index 68c9fe6cb4d6b7..1ee59806b249ac 100644 --- a/tests/sentry/api/endpoints/test_organization_sampling_project_rates.py +++ b/tests/sentry/api/endpoints/test_organization_sampling_project_rates.py @@ -1,3 +1,4 @@ +from typing import int from sentry.dynamic_sampling.types import DynamicSamplingMode from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_organization_sampling_project_span_counts.py b/tests/sentry/api/endpoints/test_organization_sampling_project_span_counts.py index 90055cb2f1c53a..9571082612bf7a 100644 --- a/tests/sentry/api/endpoints/test_organization_sampling_project_span_counts.py +++ b/tests/sentry/api/endpoints/test_organization_sampling_project_span_counts.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/sentry/api/endpoints/test_organization_sdk_deprecations.py b/tests/sentry/api/endpoints/test_organization_sdk_deprecations.py index a7a60d981e3201..272c40c91eb636 100644 --- a/tests/sentry/api/endpoints/test_organization_sdk_deprecations.py +++ b/tests/sentry/api/endpoints/test_organization_sdk_deprecations.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from rest_framework.exceptions import ErrorDetail diff --git a/tests/sentry/api/endpoints/test_organization_sdk_updates.py b/tests/sentry/api/endpoints/test_organization_sdk_updates.py index 4b6725e70c4dae..bf7dd8e523c608 100644 --- a/tests/sentry/api/endpoints/test_organization_sdk_updates.py +++ b/tests/sentry/api/endpoints/test_organization_sdk_updates.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_organization_search_details.py b/tests/sentry/api/endpoints/test_organization_search_details.py index e6af3e3a9ae42c..b3c0f62325ba7a 100644 --- a/tests/sentry/api/endpoints/test_organization_search_details.py +++ b/tests/sentry/api/endpoints/test_organization_search_details.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from sentry.models.savedsearch import SavedSearch, Visibility diff --git a/tests/sentry/api/endpoints/test_organization_spans_fields.py b/tests/sentry/api/endpoints/test_organization_spans_fields.py index 4e4d70391e5930..ecd50cda8fcfdf 100644 --- a/tests/sentry/api/endpoints/test_organization_spans_fields.py +++ b/tests/sentry/api/endpoints/test_organization_spans_fields.py @@ -1,3 +1,4 @@ +from typing import int from operator import itemgetter from unittest import mock from uuid import uuid4 diff --git a/tests/sentry/api/endpoints/test_organization_spans_fields_stats.py b/tests/sentry/api/endpoints/test_organization_spans_fields_stats.py index d3681c8a0cabbb..931e8186713ca4 100644 --- a/tests/sentry/api/endpoints/test_organization_spans_fields_stats.py +++ b/tests/sentry/api/endpoints/test_organization_spans_fields_stats.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_organization_stats.py b/tests/sentry/api/endpoints/test_organization_stats.py index c91de7f6bbf375..4944c44358905a 100644 --- a/tests/sentry/api/endpoints/test_organization_stats.py +++ b/tests/sentry/api/endpoints/test_organization_stats.py @@ -1,3 +1,4 @@ +from typing import int import sys from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_organization_traces.py b/tests/sentry/api/endpoints/test_organization_traces.py index ff787db1b4c53b..6d9b8f51bbe0b5 100644 --- a/tests/sentry/api/endpoints/test_organization_traces.py +++ b/tests/sentry/api/endpoints/test_organization_traces.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch from uuid import uuid4 diff --git a/tests/sentry/api/endpoints/test_organization_unsubscribe.py b/tests/sentry/api/endpoints/test_organization_unsubscribe.py index 8e9d2553e223e5..85d68c55ac00e2 100644 --- a/tests/sentry/api/endpoints/test_organization_unsubscribe.py +++ b/tests/sentry/api/endpoints/test_organization_unsubscribe.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.groupsubscription import GroupSubscription diff --git a/tests/sentry/api/endpoints/test_project_alert_rule_task_details.py b/tests/sentry/api/endpoints/test_project_alert_rule_task_details.py index 32cb2e7917844f..1639705b0e0168 100644 --- a/tests/sentry/api/endpoints/test_project_alert_rule_task_details.py +++ b/tests/sentry/api/endpoints/test_project_alert_rule_task_details.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_project_artifact_bundle_file_details.py b/tests/sentry/api/endpoints/test_project_artifact_bundle_file_details.py index 45cff113d4e454..de00b02f89dc2e 100644 --- a/tests/sentry/api/endpoints/test_project_artifact_bundle_file_details.py +++ b/tests/sentry/api/endpoints/test_project_artifact_bundle_file_details.py @@ -1,3 +1,4 @@ +from typing import int import base64 import io import zipfile diff --git a/tests/sentry/api/endpoints/test_project_artifact_bundle_files.py b/tests/sentry/api/endpoints/test_project_artifact_bundle_files.py index c8e13c95748875..9f56201ab336d4 100644 --- a/tests/sentry/api/endpoints/test_project_artifact_bundle_files.py +++ b/tests/sentry/api/endpoints/test_project_artifact_bundle_files.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_project_artifact_lookup.py b/tests/sentry/api/endpoints/test_project_artifact_lookup.py index 0cac0919de4e0a..ca0eb94b556694 100644 --- a/tests/sentry/api/endpoints/test_project_artifact_lookup.py +++ b/tests/sentry/api/endpoints/test_project_artifact_lookup.py @@ -1,3 +1,4 @@ +from typing import int import uuid import zipfile from datetime import datetime, timedelta, timezone diff --git a/tests/sentry/api/endpoints/test_project_commits.py b/tests/sentry/api/endpoints/test_project_commits.py index 58c37214385a1a..60815531af5414 100644 --- a/tests/sentry/api/endpoints/test_project_commits.py +++ b/tests/sentry/api/endpoints/test_project_commits.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.commit import Commit diff --git a/tests/sentry/api/endpoints/test_project_create_sample.py b/tests/sentry/api/endpoints/test_project_create_sample.py index 4d7b149b426ea7..a75ab311616935 100644 --- a/tests/sentry/api/endpoints/test_project_create_sample.py +++ b/tests/sentry/api/endpoints/test_project_create_sample.py @@ -1,3 +1,4 @@ +from typing import int import orjson from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_project_create_sample_transaction.py b/tests/sentry/api/endpoints/test_project_create_sample_transaction.py index ca171f97589e21..6ab25ff4a86629 100644 --- a/tests/sentry/api/endpoints/test_project_create_sample_transaction.py +++ b/tests/sentry/api/endpoints/test_project_create_sample_transaction.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_project_filter_details.py b/tests/sentry/api/endpoints/test_project_filter_details.py index e7866cf673f9a8..37632d8593be80 100644 --- a/tests/sentry/api/endpoints/test_project_filter_details.py +++ b/tests/sentry/api/endpoints/test_project_filter_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_project_filters.py b/tests/sentry/api/endpoints/test_project_filters.py index 45b377089c76fc..66a15cf56c39ad 100644 --- a/tests/sentry/api/endpoints/test_project_filters.py +++ b/tests/sentry/api/endpoints/test_project_filters.py @@ -1,5 +1,5 @@ from collections.abc import Iterable -from typing import Any +from typing import int, Any from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_project_member_index.py b/tests/sentry/api/endpoints/test_project_member_index.py index 2ca79606df28b1..bd96a77f91ed4f 100644 --- a/tests/sentry/api/endpoints/test_project_member_index.py +++ b/tests/sentry/api/endpoints/test_project_member_index.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.organizationmember import InviteStatus diff --git a/tests/sentry/api/endpoints/test_project_overview.py b/tests/sentry/api/endpoints/test_project_overview.py index 97a5a03325f6fb..1df3ad54cd4f8c 100644 --- a/tests/sentry/api/endpoints/test_project_overview.py +++ b/tests/sentry/api/endpoints/test_project_overview.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.models.projectredirect import ProjectRedirect from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_project_performance_general_settings.py b/tests/sentry/api/endpoints/test_project_performance_general_settings.py index b34bbab24cd6f9..bfbc17142468a0 100644 --- a/tests/sentry/api/endpoints/test_project_performance_general_settings.py +++ b/tests/sentry/api/endpoints/test_project_performance_general_settings.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from rest_framework.exceptions import ErrorDetail diff --git a/tests/sentry/api/endpoints/test_project_plugin_details.py b/tests/sentry/api/endpoints/test_project_plugin_details.py index 0f27a3a4a7fac4..a42bd73b838d5e 100644 --- a/tests/sentry/api/endpoints/test_project_plugin_details.py +++ b/tests/sentry/api/endpoints/test_project_plugin_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.models.auditlogentry import AuditLogEntry diff --git a/tests/sentry/api/endpoints/test_project_plugins.py b/tests/sentry/api/endpoints/test_project_plugins.py index 14807b7446670a..0bb9d32543d108 100644 --- a/tests/sentry/api/endpoints/test_project_plugins.py +++ b/tests/sentry/api/endpoints/test_project_plugins.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Container from unittest.mock import patch diff --git a/tests/sentry/api/endpoints/test_project_profiling_profile.py b/tests/sentry/api/endpoints/test_project_profiling_profile.py index 602a70a5c30852..e7adbc41b2a634 100644 --- a/tests/sentry/api/endpoints/test_project_profiling_profile.py +++ b/tests/sentry/api/endpoints/test_project_profiling_profile.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_project_proguard_artifact_releases.py b/tests/sentry/api/endpoints/test_project_proguard_artifact_releases.py index e60d8407a62a0a..9f9b0f1fa891cf 100644 --- a/tests/sentry/api/endpoints/test_project_proguard_artifact_releases.py +++ b/tests/sentry/api/endpoints/test_project_proguard_artifact_releases.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.debugfile import ProguardArtifactRelease, ProjectDebugFile diff --git a/tests/sentry/api/endpoints/test_project_repo_path_parsing.py b/tests/sentry/api/endpoints/test_project_repo_path_parsing.py index 37ed1c092139e8..a7934ed587e420 100644 --- a/tests/sentry/api/endpoints/test_project_repo_path_parsing.py +++ b/tests/sentry/api/endpoints/test_project_repo_path_parsing.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from rest_framework.response import Response diff --git a/tests/sentry/api/endpoints/test_project_rule_actions.py b/tests/sentry/api/endpoints/test_project_rule_actions.py index a8859bede66005..f2890706852750 100644 --- a/tests/sentry/api/endpoints/test_project_rule_actions.py +++ b/tests/sentry/api/endpoints/test_project_rule_actions.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import sentry_sdk diff --git a/tests/sentry/api/endpoints/test_project_rule_details.py b/tests/sentry/api/endpoints/test_project_rule_details.py index f0d1a25d8774eb..89aed4e370f171 100644 --- a/tests/sentry/api/endpoints/test_project_rule_details.py +++ b/tests/sentry/api/endpoints/test_project_rule_details.py @@ -2,7 +2,7 @@ from collections.abc import Mapping from datetime import UTC, datetime, timedelta -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch import responses diff --git a/tests/sentry/api/endpoints/test_project_rule_enable.py b/tests/sentry/api/endpoints/test_project_rule_enable.py index 0c7b4bab71ab5e..763799c3895649 100644 --- a/tests/sentry/api/endpoints/test_project_rule_enable.py +++ b/tests/sentry/api/endpoints/test_project_rule_enable.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from rest_framework import status diff --git a/tests/sentry/api/endpoints/test_project_rule_task_details.py b/tests/sentry/api/endpoints/test_project_rule_task_details.py index 7300c141c22465..ac6d727a396ea5 100644 --- a/tests/sentry/api/endpoints/test_project_rule_task_details.py +++ b/tests/sentry/api/endpoints/test_project_rule_task_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from uuid import uuid4 diff --git a/tests/sentry/api/endpoints/test_project_rules.py b/tests/sentry/api/endpoints/test_project_rules.py index 71d80537d653fd..dff6308ba7ca2d 100644 --- a/tests/sentry/api/endpoints/test_project_rules.py +++ b/tests/sentry/api/endpoints/test_project_rules.py @@ -2,7 +2,7 @@ from collections.abc import Mapping, Sequence from copy import deepcopy -from typing import Any +from typing import int, Any from unittest.mock import patch from uuid import uuid4 diff --git a/tests/sentry/api/endpoints/test_project_rules_configuration.py b/tests/sentry/api/endpoints/test_project_rules_configuration.py index 90e1839cc0bfc1..d92943d328a8df 100644 --- a/tests/sentry/api/endpoints/test_project_rules_configuration.py +++ b/tests/sentry/api/endpoints/test_project_rules_configuration.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch from sentry.constants import TICKET_ACTIONS diff --git a/tests/sentry/api/endpoints/test_project_servicehook_details.py b/tests/sentry/api/endpoints/test_project_servicehook_details.py index 950115e608dad9..78f2c52b851fed 100644 --- a/tests/sentry/api/endpoints/test_project_servicehook_details.py +++ b/tests/sentry/api/endpoints/test_project_servicehook_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.models.servicehook import ServiceHook from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_project_servicehook_stats.py b/tests/sentry/api/endpoints/test_project_servicehook_stats.py index 9bb60336cee83a..9df15f1c114cc6 100644 --- a/tests/sentry/api/endpoints/test_project_servicehook_stats.py +++ b/tests/sentry/api/endpoints/test_project_servicehook_stats.py @@ -1,3 +1,4 @@ +from typing import int from sentry import tsdb from sentry.sentry_apps.models.servicehook import ServiceHook from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_project_servicehooks.py b/tests/sentry/api/endpoints/test_project_servicehooks.py index a6657bdf4794d5..6eb0bd9289df2b 100644 --- a/tests/sentry/api/endpoints/test_project_servicehooks.py +++ b/tests/sentry/api/endpoints/test_project_servicehooks.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.models.servicehook import ServiceHook, ServiceHookProject from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_project_stacktrace_coverage.py b/tests/sentry/api/endpoints/test_project_stacktrace_coverage.py index 471cf395460f61..0f65a301f5ca1b 100644 --- a/tests/sentry/api/endpoints/test_project_stacktrace_coverage.py +++ b/tests/sentry/api/endpoints/test_project_stacktrace_coverage.py @@ -1,3 +1,4 @@ +from typing import int import logging from unittest.mock import MagicMock, patch diff --git a/tests/sentry/api/endpoints/test_project_symbol_sources.py b/tests/sentry/api/endpoints/test_project_symbol_sources.py index 10bee4e0ac35df..e3faaadc56d194 100644 --- a/tests/sentry/api/endpoints/test_project_symbol_sources.py +++ b/tests/sentry/api/endpoints/test_project_symbol_sources.py @@ -1,3 +1,4 @@ +from typing import int import orjson from sentry.lang.native.sources import redact_source_secrets diff --git a/tests/sentry/api/endpoints/test_project_tagkey_details.py b/tests/sentry/api/endpoints/test_project_tagkey_details.py index f687ef01a9ed73..b61ee87e26c105 100644 --- a/tests/sentry/api/endpoints/test_project_tagkey_details.py +++ b/tests/sentry/api/endpoints/test_project_tagkey_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_project_tagkey_values.py b/tests/sentry/api/endpoints/test_project_tagkey_values.py index 77d1deaafdfeaa..08da9283078bce 100644 --- a/tests/sentry/api/endpoints/test_project_tagkey_values.py +++ b/tests/sentry/api/endpoints/test_project_tagkey_values.py @@ -1,3 +1,4 @@ +from typing import int import urllib.parse from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_project_template_detail.py b/tests/sentry/api/endpoints/test_project_template_detail.py index 6f0666393ed84e..ec1e5f9ba0e859 100644 --- a/tests/sentry/api/endpoints/test_project_template_detail.py +++ b/tests/sentry/api/endpoints/test_project_template_detail.py @@ -1,3 +1,4 @@ +from typing import int import pytest from rest_framework.exceptions import ErrorDetail diff --git a/tests/sentry/api/endpoints/test_project_templates_index.py b/tests/sentry/api/endpoints/test_project_templates_index.py index b105e6a3e0f6b6..9a447a0b4c3f0b 100644 --- a/tests/sentry/api/endpoints/test_project_templates_index.py +++ b/tests/sentry/api/endpoints/test_project_templates_index.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from pytest import mark diff --git a/tests/sentry/api/endpoints/test_project_transaction_names.py b/tests/sentry/api/endpoints/test_project_transaction_names.py index 70e0db0e62bbb9..40a348e9e458e0 100644 --- a/tests/sentry/api/endpoints/test_project_transaction_names.py +++ b/tests/sentry/api/endpoints/test_project_transaction_names.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.ingest.transaction_clusterer import ClustererNamespace diff --git a/tests/sentry/api/endpoints/test_project_transaction_threshold.py b/tests/sentry/api/endpoints/test_project_transaction_threshold.py index 30c83bbf3c8906..2e7b445cc8b96d 100644 --- a/tests/sentry/api/endpoints/test_project_transaction_threshold.py +++ b/tests/sentry/api/endpoints/test_project_transaction_threshold.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.transaction_threshold import ProjectTransactionThreshold, TransactionMetric diff --git a/tests/sentry/api/endpoints/test_project_transaction_threshold_override.py b/tests/sentry/api/endpoints/test_project_transaction_threshold_override.py index 2e89389da81b94..5126c7745a5472 100644 --- a/tests/sentry/api/endpoints/test_project_transaction_threshold_override.py +++ b/tests/sentry/api/endpoints/test_project_transaction_threshold_override.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_project_user_stats.py b/tests/sentry/api/endpoints/test_project_user_stats.py index 00239beef86505..09ef6404e41d4f 100644 --- a/tests/sentry/api/endpoints/test_project_user_stats.py +++ b/tests/sentry/api/endpoints/test_project_user_stats.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_prompts_activity.py b/tests/sentry/api/endpoints/test_prompts_activity.py index c7f694ae9effee..bdb70f2bb75add 100644 --- a/tests/sentry/api/endpoints/test_prompts_activity.py +++ b/tests/sentry/api/endpoints/test_prompts_activity.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_relay_globalconfig_v3.py b/tests/sentry/api/endpoints/test_relay_globalconfig_v3.py index 282d1f82378693..0d1a1aa573dbce 100644 --- a/tests/sentry/api/endpoints/test_relay_globalconfig_v3.py +++ b/tests/sentry/api/endpoints/test_relay_globalconfig_v3.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import orjson diff --git a/tests/sentry/api/endpoints/test_relay_healthcheck.py b/tests/sentry/api/endpoints/test_relay_healthcheck.py index df83ce179c8b6d..593678f7b468d7 100644 --- a/tests/sentry/api/endpoints/test_relay_healthcheck.py +++ b/tests/sentry/api/endpoints/test_relay_healthcheck.py @@ -1,3 +1,4 @@ +from typing import int from django.test import Client from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_relay_projectconfigs.py b/tests/sentry/api/endpoints/test_relay_projectconfigs.py index 560db6746febf0..7f96bc0fa7ed2f 100644 --- a/tests/sentry/api/endpoints/test_relay_projectconfigs.py +++ b/tests/sentry/api/endpoints/test_relay_projectconfigs.py @@ -1,7 +1,7 @@ from __future__ import annotations import re -from typing import Any +from typing import int, Any from unittest.mock import patch from uuid import uuid4 diff --git a/tests/sentry/api/endpoints/test_relay_projectconfigs_v2.py b/tests/sentry/api/endpoints/test_relay_projectconfigs_v2.py index f3331fb5f06fb9..a8a117e6f560e5 100644 --- a/tests/sentry/api/endpoints/test_relay_projectconfigs_v2.py +++ b/tests/sentry/api/endpoints/test_relay_projectconfigs_v2.py @@ -1,7 +1,7 @@ from __future__ import annotations import re -from typing import Any +from typing import int, Any from unittest.mock import patch import orjson diff --git a/tests/sentry/api/endpoints/test_relay_projectconfigs_v3.py b/tests/sentry/api/endpoints/test_relay_projectconfigs_v3.py index b94d4702773634..2e8dc2bfdf2883 100644 --- a/tests/sentry/api/endpoints/test_relay_projectconfigs_v3.py +++ b/tests/sentry/api/endpoints/test_relay_projectconfigs_v3.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch, sentinel import orjson diff --git a/tests/sentry/api/endpoints/test_relay_projectids.py b/tests/sentry/api/endpoints/test_relay_projectids.py index 75aff43c5a7e00..59d247a6c40ce2 100644 --- a/tests/sentry/api/endpoints/test_relay_projectids.py +++ b/tests/sentry/api/endpoints/test_relay_projectids.py @@ -1,3 +1,4 @@ +from typing import int import re import uuid from unittest import mock diff --git a/tests/sentry/api/endpoints/test_relay_publickeys.py b/tests/sentry/api/endpoints/test_relay_publickeys.py index 2188e8bd898eb2..6ae73431204d31 100644 --- a/tests/sentry/api/endpoints/test_relay_publickeys.py +++ b/tests/sentry/api/endpoints/test_relay_publickeys.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from uuid import uuid4 diff --git a/tests/sentry/api/endpoints/test_relay_register.py b/tests/sentry/api/endpoints/test_relay_register.py index 4cedbea086e365..674d1e8d051e05 100644 --- a/tests/sentry/api/endpoints/test_relay_register.py +++ b/tests/sentry/api/endpoints/test_relay_register.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 import orjson diff --git a/tests/sentry/api/endpoints/test_rpc.py b/tests/sentry/api/endpoints/test_rpc.py index 2cb505ea946ec9..7d99db260c00f7 100644 --- a/tests/sentry/api/endpoints/test_rpc.py +++ b/tests/sentry/api/endpoints/test_rpc.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import orjson from django.test import override_settings diff --git a/tests/sentry/api/endpoints/test_rule_snooze.py b/tests/sentry/api/endpoints/test_rule_snooze.py index b5f565609060c8..f475715f372227 100644 --- a/tests/sentry/api/endpoints/test_rule_snooze.py +++ b/tests/sentry/api/endpoints/test_rule_snooze.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import datetime, timedelta, timezone -from typing import Any +from typing import int, Any from sentry import audit_log from sentry.audit_log.services.log.service import log_rpc_service diff --git a/tests/sentry/api/endpoints/test_seer_models.py b/tests/sentry/api/endpoints/test_seer_models.py index d252154d539955..f0cc8a1540b289 100644 --- a/tests/sentry/api/endpoints/test_seer_models.py +++ b/tests/sentry/api/endpoints/test_seer_models.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import requests diff --git a/tests/sentry/api/endpoints/test_setup_wizard.py b/tests/sentry/api/endpoints/test_setup_wizard.py index 16ac8a4472eae5..c1a7b7a5eae71a 100644 --- a/tests/sentry/api/endpoints/test_setup_wizard.py +++ b/tests/sentry/api/endpoints/test_setup_wizard.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_source_map_debug_blue_thunder_edition.py b/tests/sentry/api/endpoints/test_source_map_debug_blue_thunder_edition.py index 4fd4b6e4db09b5..e6e1d9bee9f7c8 100644 --- a/tests/sentry/api/endpoints/test_source_map_debug_blue_thunder_edition.py +++ b/tests/sentry/api/endpoints/test_source_map_debug_blue_thunder_edition.py @@ -2,7 +2,7 @@ import zipfile from io import BytesIO -from typing import Any +from typing import int, Any import orjson from django.core.files.base import ContentFile diff --git a/tests/sentry/api/endpoints/test_sudo.py b/tests/sentry/api/endpoints/test_sudo.py index 054e7390df1973..b5589bbc2f0ca7 100644 --- a/tests/sentry/api/endpoints/test_sudo.py +++ b/tests/sentry/api/endpoints/test_sudo.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_system_health.py b/tests/sentry/api/endpoints/test_system_health.py index 8c7e0e9541eadb..0868d2d59b7749 100644 --- a/tests/sentry/api/endpoints/test_system_health.py +++ b/tests/sentry/api/endpoints/test_system_health.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_system_options.py b/tests/sentry/api/endpoints/test_system_options.py index ef9538b27d6d22..283a8075d067d4 100644 --- a/tests/sentry/api/endpoints/test_system_options.py +++ b/tests/sentry/api/endpoints/test_system_options.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from django.urls import reverse diff --git a/tests/sentry/api/endpoints/test_team_alerts_triggered.py b/tests/sentry/api/endpoints/test_team_alerts_triggered.py index 7fa60bf80a4d67..60ece42b3f6863 100644 --- a/tests/sentry/api/endpoints/test_team_alerts_triggered.py +++ b/tests/sentry/api/endpoints/test_team_alerts_triggered.py @@ -1,3 +1,4 @@ +from typing import int from sentry.incidents.models.alert_rule import AlertRuleThresholdType from sentry.incidents.models.incident import ( INCIDENT_STATUS, diff --git a/tests/sentry/api/endpoints/test_user_organizations.py b/tests/sentry/api/endpoints/test_user_organizations.py index 091b3ec38cb84f..45a341a91d7e48 100644 --- a/tests/sentry/api/endpoints/test_user_organizations.py +++ b/tests/sentry/api/endpoints/test_user_organizations.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/api/endpoints/test_user_subscriptions.py b/tests/sentry/api/endpoints/test_user_subscriptions.py index 0b5fda776fefdd..94a1e41ace91ce 100644 --- a/tests/sentry/api/endpoints/test_user_subscriptions.py +++ b/tests/sentry/api/endpoints/test_user_subscriptions.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator import pytest diff --git a/tests/sentry/api/endpoints/test_warmup.py b/tests/sentry/api/endpoints/test_warmup.py index 4ffcdf6dea2997..392bd0354e885a 100644 --- a/tests/sentry/api/endpoints/test_warmup.py +++ b/tests/sentry/api/endpoints/test_warmup.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from rest_framework import status diff --git a/tests/sentry/api/fields/test_serializedfile.py b/tests/sentry/api/fields/test_serializedfile.py index 949cf9695a7f8c..35cb5029db7ee7 100644 --- a/tests/sentry/api/fields/test_serializedfile.py +++ b/tests/sentry/api/fields/test_serializedfile.py @@ -1,3 +1,4 @@ +from typing import int import unittest from base64 import b64encode from io import BytesIO diff --git a/tests/sentry/api/helpers/test_error_upsampling.py b/tests/sentry/api/helpers/test_error_upsampling.py index 5298b3a948f7ae..ab9e048f4458a3 100644 --- a/tests/sentry/api/helpers/test_error_upsampling.py +++ b/tests/sentry/api/helpers/test_error_upsampling.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock, patch from django.http import QueryDict diff --git a/tests/sentry/api/helpers/test_group_index.py b/tests/sentry/api/helpers/test_group_index.py index 7004f6d68d0a61..7b5d0c1fdb3455 100644 --- a/tests/sentry/api/helpers/test_group_index.py +++ b/tests/sentry/api/helpers/test_group_index.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from time import time from unittest.mock import MagicMock, Mock, patch diff --git a/tests/sentry/api/serializers/rest_framework/test_base.py b/tests/sentry/api/serializers/rest_framework/test_base.py index 9d9a352fa32647..ae8144e7eb28bb 100644 --- a/tests/sentry/api/serializers/rest_framework/test_base.py +++ b/tests/sentry/api/serializers/rest_framework/test_base.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.contrib.contenttypes.models import ContentType from rest_framework import serializers diff --git a/tests/sentry/api/serializers/rest_framework/test_origin.py b/tests/sentry/api/serializers/rest_framework/test_origin.py index 4c71031efed91c..73fab5759aa2c9 100644 --- a/tests/sentry/api/serializers/rest_framework/test_origin.py +++ b/tests/sentry/api/serializers/rest_framework/test_origin.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import serializers from sentry.api.serializers.rest_framework import OriginField diff --git a/tests/sentry/api/serializers/rest_framework/test_project_key.py b/tests/sentry/api/serializers/rest_framework/test_project_key.py index bc4deeb9c3471e..1ac0d43eaf1a30 100644 --- a/tests/sentry/api/serializers/rest_framework/test_project_key.py +++ b/tests/sentry/api/serializers/rest_framework/test_project_key.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers.rest_framework import DynamicSdkLoaderOptionSerializer from sentry.loader.dynamic_sdk_options import DynamicSdkLoaderOption from sentry.testutils.cases import TestCase diff --git a/tests/sentry/api/serializers/rest_framework/test_rule.py b/tests/sentry/api/serializers/rest_framework/test_rule.py index 545183bc187737..e55eb31b5d5829 100644 --- a/tests/sentry/api/serializers/rest_framework/test_rule.py +++ b/tests/sentry/api/serializers/rest_framework/test_rule.py @@ -1,5 +1,5 @@ import uuid -from typing import Any +from typing import int, Any from sentry.api.serializers.rest_framework.rule import ( ACTION_UUID_KEY, diff --git a/tests/sentry/api/serializers/test_activity.py b/tests/sentry/api/serializers/test_activity.py index c19e3c2cece64d..3bff5894120b6b 100644 --- a/tests/sentry/api/serializers/test_activity.py +++ b/tests/sentry/api/serializers/test_activity.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.models.activity import Activity from sentry.models.commit import Commit diff --git a/tests/sentry/api/serializers/test_apitoken.py b/tests/sentry/api/serializers/test_apitoken.py index c4a17dbfbc6f1f..7c27089997fd8e 100644 --- a/tests/sentry/api/serializers/test_apitoken.py +++ b/tests/sentry/api/serializers/test_apitoken.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import ApiTokenSerializer from sentry.models.apitoken import ApiToken from sentry.silo.base import SiloMode diff --git a/tests/sentry/api/serializers/test_auditlogentry.py b/tests/sentry/api/serializers/test_auditlogentry.py index 0c12efc66dd7c0..d2ec9ece636b6e 100644 --- a/tests/sentry/api/serializers/test_auditlogentry.py +++ b/tests/sentry/api/serializers/test_auditlogentry.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from sentry import audit_log diff --git a/tests/sentry/api/serializers/test_base.py b/tests/sentry/api/serializers/test_base.py index 2bfb443143cad3..d500a999b49b8e 100644 --- a/tests/sentry/api/serializers/test_base.py +++ b/tests/sentry/api/serializers/test_base.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import Serializer, serialize from sentry.testutils.cases import TestCase from sentry.testutils.silo import control_silo_test diff --git a/tests/sentry/api/serializers/test_commit.py b/tests/sentry/api/serializers/test_commit.py index d127ddcec9421e..c63bd73cb1aae4 100644 --- a/tests/sentry/api/serializers/test_commit.py +++ b/tests/sentry/api/serializers/test_commit.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from sentry.api.serializers import serialize diff --git a/tests/sentry/api/serializers/test_commit_filechange.py b/tests/sentry/api/serializers/test_commit_filechange.py index 8d01456057bcd7..973b9ce97c9005 100644 --- a/tests/sentry/api/serializers/test_commit_filechange.py +++ b/tests/sentry/api/serializers/test_commit_filechange.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from sentry.api.serializers import serialize diff --git a/tests/sentry/api/serializers/test_debugfile.py b/tests/sentry/api/serializers/test_debugfile.py index 44d6800bbca3c4..357222c4975d46 100644 --- a/tests/sentry/api/serializers/test_debugfile.py +++ b/tests/sentry/api/serializers/test_debugfile.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.testutils.cases import TestCase diff --git a/tests/sentry/api/serializers/test_event.py b/tests/sentry/api/serializers/test_event.py index 2c69e57b1e0dcb..79f01a3f43686b 100644 --- a/tests/sentry/api/serializers/test_event.py +++ b/tests/sentry/api/serializers/test_event.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime from unittest import mock diff --git a/tests/sentry/api/serializers/test_fields.py b/tests/sentry/api/serializers/test_fields.py index 0a715542d9a68d..3f1887b1c97fdb 100644 --- a/tests/sentry/api/serializers/test_fields.py +++ b/tests/sentry/api/serializers/test_fields.py @@ -1,3 +1,4 @@ +from typing import int import unittest from rest_framework import serializers diff --git a/tests/sentry/api/serializers/test_group.py b/tests/sentry/api/serializers/test_group.py index 09af3d07e73e86..d0883baca805e4 100644 --- a/tests/sentry/api/serializers/test_group.py +++ b/tests/sentry/api/serializers/test_group.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/api/serializers/test_group_stream.py b/tests/sentry/api/serializers/test_group_stream.py index 4ba38d1a782ed8..c0251557965cf5 100644 --- a/tests/sentry/api/serializers/test_group_stream.py +++ b/tests/sentry/api/serializers/test_group_stream.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry import tsdb diff --git a/tests/sentry/api/serializers/test_group_tombstone.py b/tests/sentry/api/serializers/test_group_tombstone.py index a29e763c9481a1..e5f8fdd6924dfb 100644 --- a/tests/sentry/api/serializers/test_group_tombstone.py +++ b/tests/sentry/api/serializers/test_group_tombstone.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.models.grouphash import GroupHash from sentry.models.grouptombstone import GroupTombstone diff --git a/tests/sentry/api/serializers/test_grouptagkey.py b/tests/sentry/api/serializers/test_grouptagkey.py index d307a23f52c816..d58a3e8614bb90 100644 --- a/tests/sentry/api/serializers/test_grouptagkey.py +++ b/tests/sentry/api/serializers/test_grouptagkey.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.tagstore.types import GroupTagKey from sentry.testutils.cases import TestCase diff --git a/tests/sentry/api/serializers/test_grouptagvalue.py b/tests/sentry/api/serializers/test_grouptagvalue.py index 58ed01b2b68115..e36133a84abadb 100644 --- a/tests/sentry/api/serializers/test_grouptagvalue.py +++ b/tests/sentry/api/serializers/test_grouptagvalue.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from sentry.api.serializers import serialize diff --git a/tests/sentry/api/serializers/test_incident_activity.py b/tests/sentry/api/serializers/test_incident_activity.py index e1d75565adbbc6..b07b40912f37a1 100644 --- a/tests/sentry/api/serializers/test_incident_activity.py +++ b/tests/sentry/api/serializers/test_incident_activity.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from uuid import uuid4 diff --git a/tests/sentry/api/serializers/test_organization.py b/tests/sentry/api/serializers/test_organization.py index 16ea1fcb20b95e..272cc7b6337528 100644 --- a/tests/sentry/api/serializers/test_organization.py +++ b/tests/sentry/api/serializers/test_organization.py @@ -1,3 +1,4 @@ +from typing import int import datetime from unittest import mock diff --git a/tests/sentry/api/serializers/test_organization_member.py b/tests/sentry/api/serializers/test_organization_member.py index db6bb7619f24b7..1ae7f7e770f1ce 100644 --- a/tests/sentry/api/serializers/test_organization_member.py +++ b/tests/sentry/api/serializers/test_organization_member.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import ( OrganizationMemberSerializer, OrganizationMemberWithProjectsSerializer, diff --git a/tests/sentry/api/serializers/test_organization_member_invite.py b/tests/sentry/api/serializers/test_organization_member_invite.py index 500603d6eedae9..46930e073934b0 100644 --- a/tests/sentry/api/serializers/test_organization_member_invite.py +++ b/tests/sentry/api/serializers/test_organization_member_invite.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.api.serializers.models.organizationmemberinvite import ( OrganizationMemberInviteSerializer, diff --git a/tests/sentry/api/serializers/test_project.py b/tests/sentry/api/serializers/test_project.py index 9e6f1b78e2c9f1..7e557bffd59c1c 100644 --- a/tests/sentry/api/serializers/test_project.py +++ b/tests/sentry/api/serializers/test_project.py @@ -1,3 +1,4 @@ +from typing import int import datetime from datetime import UTC, timedelta from functools import cached_property diff --git a/tests/sentry/api/serializers/test_project_template.py b/tests/sentry/api/serializers/test_project_template.py index c5c046f6fad09b..98855629f593b7 100644 --- a/tests/sentry/api/serializers/test_project_template.py +++ b/tests/sentry/api/serializers/test_project_template.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.api.serializers.models.project_template import ( ProjectTemplateAttributes, diff --git a/tests/sentry/api/serializers/test_pull_request.py b/tests/sentry/api/serializers/test_pull_request.py index 9eb0a49b864520..087fea23724e5a 100644 --- a/tests/sentry/api/serializers/test_pull_request.py +++ b/tests/sentry/api/serializers/test_pull_request.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from sentry.api.serializers import serialize diff --git a/tests/sentry/api/serializers/test_recent_searches.py b/tests/sentry/api/serializers/test_recent_searches.py index e153df57cbafb5..e029299cea4732 100644 --- a/tests/sentry/api/serializers/test_recent_searches.py +++ b/tests/sentry/api/serializers/test_recent_searches.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.models.recentsearch import RecentSearch from sentry.models.search_common import SearchType diff --git a/tests/sentry/api/serializers/test_release.py b/tests/sentry/api/serializers/test_release.py index 189aec45b59675..bbd7f9e5586502 100644 --- a/tests/sentry/api/serializers/test_release.py +++ b/tests/sentry/api/serializers/test_release.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import UTC, datetime -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch from uuid import uuid4 diff --git a/tests/sentry/api/serializers/test_rule.py b/tests/sentry/api/serializers/test_rule.py index 8a635c3fefebd7..79372c606a8e54 100644 --- a/tests/sentry/api/serializers/test_rule.py +++ b/tests/sentry/api/serializers/test_rule.py @@ -1,3 +1,4 @@ +from typing import int from django.db import DEFAULT_DB_ALIAS, connections from django.test.utils import CaptureQueriesContext from django.utils import timezone diff --git a/tests/sentry/api/serializers/test_saved_search.py b/tests/sentry/api/serializers/test_saved_search.py index fba934dc44a934..88e2b86c624133 100644 --- a/tests/sentry/api/serializers/test_saved_search.py +++ b/tests/sentry/api/serializers/test_saved_search.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.models.savedsearch import SavedSearch, Visibility from sentry.testutils.cases import TestCase diff --git a/tests/sentry/api/serializers/test_snuba.py b/tests/sentry/api/serializers/test_snuba.py index 760750f383066f..5f9b9078aa4c9c 100644 --- a/tests/sentry/api/serializers/test_snuba.py +++ b/tests/sentry/api/serializers/test_snuba.py @@ -1,3 +1,4 @@ +from typing import int import unittest from datetime import timedelta diff --git a/tests/sentry/api/serializers/test_tagvalue.py b/tests/sentry/api/serializers/test_tagvalue.py index 5395a6c80935b9..c30626fae7422a 100644 --- a/tests/sentry/api/serializers/test_tagvalue.py +++ b/tests/sentry/api/serializers/test_tagvalue.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from unittest.mock import MagicMock, patch diff --git a/tests/sentry/api/serializers/test_team.py b/tests/sentry/api/serializers/test_team.py index 1fa55996baa1ac..46ad8e6d2769bb 100644 --- a/tests/sentry/api/serializers/test_team.py +++ b/tests/sentry/api/serializers/test_team.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.api.serializers import serialize diff --git a/tests/sentry/api/test_api_owners.py b/tests/sentry/api/test_api_owners.py index ea33f09ab41f8e..ab08cf15e49b58 100644 --- a/tests/sentry/api/test_api_owners.py +++ b/tests/sentry/api/test_api_owners.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase from sentry.api.api_owners import ApiOwner diff --git a/tests/sentry/api/test_api_pagination_check.py b/tests/sentry/api/test_api_pagination_check.py index 5cdaa64d055445..d54732547f07b2 100644 --- a/tests/sentry/api/test_api_pagination_check.py +++ b/tests/sentry/api/test_api_pagination_check.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase import pytest diff --git a/tests/sentry/api/test_authentication.py b/tests/sentry/api/test_authentication.py index 23e7bcb7c0edcc..8dd36edc0c15e8 100644 --- a/tests/sentry/api/test_authentication.py +++ b/tests/sentry/api/test_authentication.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import UTC, datetime, timedelta diff --git a/tests/sentry/api/test_base.py b/tests/sentry/api/test_base.py index 23504d9c207969..31251a2a115e3f 100644 --- a/tests/sentry/api/test_base.py +++ b/tests/sentry/api/test_base.py @@ -1,6 +1,6 @@ from collections.abc import Mapping from datetime import datetime -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import MagicMock diff --git a/tests/sentry/api/test_client.py b/tests/sentry/api/test_client.py index 19484ff1734019..5ddec49b8eaea7 100644 --- a/tests/sentry/api/test_client.py +++ b/tests/sentry/api/test_client.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock, patch from django.http import JsonResponse diff --git a/tests/sentry/api/test_data_secrecy.py b/tests/sentry/api/test_data_secrecy.py index a10929e6346c4e..2023452b85db07 100644 --- a/tests/sentry/api/test_data_secrecy.py +++ b/tests/sentry/api/test_data_secrecy.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.helpers import override_options from sentry.testutils.helpers.features import with_feature diff --git a/tests/sentry/api/test_event_search.py b/tests/sentry/api/test_event_search.py index 166e08a24e5ee1..5fb2299205bd25 100644 --- a/tests/sentry/api/test_event_search.py +++ b/tests/sentry/api/test_event_search.py @@ -1,3 +1,4 @@ +from typing import int import datetime import os from datetime import timedelta diff --git a/tests/sentry/api/test_handlers.py b/tests/sentry/api/test_handlers.py index e8953e762a5e2d..052d6f8b474cc8 100644 --- a/tests/sentry/api/test_handlers.py +++ b/tests/sentry/api/test_handlers.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from django.urls import re_path from rest_framework.permissions import AllowAny diff --git a/tests/sentry/api/test_invite_helper.py b/tests/sentry/api/test_invite_helper.py index cac59374bc8a27..4be98071bfc5ff 100644 --- a/tests/sentry/api/test_invite_helper.py +++ b/tests/sentry/api/test_invite_helper.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.http import HttpRequest diff --git a/tests/sentry/api/test_organization_events.py b/tests/sentry/api/test_organization_events.py index d63a546cc18727..7e2c1751851125 100644 --- a/tests/sentry/api/test_organization_events.py +++ b/tests/sentry/api/test_organization_events.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.urls import reverse diff --git a/tests/sentry/api/test_paginator.py b/tests/sentry/api/test_paginator.py index 90fc37acedb3a9..d071e5dcaa47db 100644 --- a/tests/sentry/api/test_paginator.py +++ b/tests/sentry/api/test_paginator.py @@ -1,3 +1,4 @@ +from typing import int import base64 from datetime import UTC, datetime, timedelta from unittest import TestCase as SimpleTestCase diff --git a/tests/sentry/api/test_path_params.py b/tests/sentry/api/test_path_params.py index cd735d1602381b..31536ddd6b8f01 100644 --- a/tests/sentry/api/test_path_params.py +++ b/tests/sentry/api/test_path_params.py @@ -1,6 +1,6 @@ import re from collections.abc import Generator -from typing import Any +from typing import int, Any from django.urls import URLPattern, URLResolver from django.urls.resolvers import get_resolver diff --git a/tests/sentry/api/test_permissions.py b/tests/sentry/api/test_permissions.py index c7451ff5cfe449..289648b73fe39f 100644 --- a/tests/sentry/api/test_permissions.py +++ b/tests/sentry/api/test_permissions.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.views import APIView from sentry.api.permissions import ( diff --git a/tests/sentry/api/test_release_search.py b/tests/sentry/api/test_release_search.py index a0de24eb67606f..143d7ef9cb22c3 100644 --- a/tests/sentry/api/test_release_search.py +++ b/tests/sentry/api/test_release_search.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase import pytest diff --git a/tests/sentry/api/test_utils.py b/tests/sentry/api/test_utils.py index a6ebbc5bf463f5..c2d073f0cd002c 100644 --- a/tests/sentry/api/test_utils.py +++ b/tests/sentry/api/test_utils.py @@ -1,3 +1,4 @@ +from typing import int import datetime import unittest from unittest.mock import MagicMock, patch diff --git a/tests/sentry/api/validators/test_organization_member_invite_validator.py b/tests/sentry/api/validators/test_organization_member_invite_validator.py index 0cf3b0eff9abb9..3695b412b0d028 100644 --- a/tests/sentry/api/validators/test_organization_member_invite_validator.py +++ b/tests/sentry/api/validators/test_organization_member_invite_validator.py @@ -1,3 +1,4 @@ +from typing import int from sentry import roles from sentry.api.serializers.rest_framework.organizationmemberinvite import ( OrganizationMemberInviteRequestValidator, diff --git a/tests/sentry/apidocs/__init__.py b/tests/sentry/apidocs/__init__.py index f62a40c9616ffe..875d02ad56981d 100644 --- a/tests/sentry/apidocs/__init__.py +++ b/tests/sentry/apidocs/__init__.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.validation import validate_schema diff --git a/tests/sentry/apidocs/test_extensions.py b/tests/sentry/apidocs/test_extensions.py index 4a2643d387aece..0300e15e3afc6f 100644 --- a/tests/sentry/apidocs/test_extensions.py +++ b/tests/sentry/apidocs/test_extensions.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, Literal, TypedDict +from typing import Any, Literal, TypedDict, int import pytest from drf_spectacular.openapi import AutoSchema diff --git a/tests/sentry/apidocs/test_schema.py b/tests/sentry/apidocs/test_schema.py index 23b508b1eb2722..8d8ef9ef0255bd 100644 --- a/tests/sentry/apidocs/test_schema.py +++ b/tests/sentry/apidocs/test_schema.py @@ -1,3 +1,4 @@ +from typing import int from drf_spectacular.utils import extend_schema from sentry.api.base import Endpoint diff --git a/tests/sentry/attachments/test_base.py b/tests/sentry/attachments/test_base.py index 7408e016de3a4b..3063405e98df09 100644 --- a/tests/sentry/attachments/test_base.py +++ b/tests/sentry/attachments/test_base.py @@ -1,3 +1,4 @@ +from typing import int import copy from sentry.attachments.base import BaseAttachmentCache, CachedAttachment diff --git a/tests/sentry/attachments/test_redis.py b/tests/sentry/attachments/test_redis.py index 297f56560225fb..2a0528ee220812 100644 --- a/tests/sentry/attachments/test_redis.py +++ b/tests/sentry/attachments/test_redis.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/audit_log/services/test_log.py b/tests/sentry/audit_log/services/test_log.py index 28a53edd3e011f..25ffcfe5bc2bde 100644 --- a/tests/sentry/audit_log/services/test_log.py +++ b/tests/sentry/audit_log/services/test_log.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from unittest.mock import MagicMock diff --git a/tests/sentry/audit_log/test_manager.py b/tests/sentry/audit_log/test_manager.py index 123b230f146047..d68be2e585fb30 100644 --- a/tests/sentry/audit_log/test_manager.py +++ b/tests/sentry/audit_log/test_manager.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.utils import timezone diff --git a/tests/sentry/audit_log/test_register.py b/tests/sentry/audit_log/test_register.py index 7e8b06b5ce28f6..2083bbe30a58be 100644 --- a/tests/sentry/audit_log/test_register.py +++ b/tests/sentry/audit_log/test_register.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry import audit_log diff --git a/tests/sentry/auth/authenticators/test_sms.py b/tests/sentry/auth/authenticators/test_sms.py index f28e32e2ae7563..db180812f97f32 100644 --- a/tests/sentry/auth/authenticators/test_sms.py +++ b/tests/sentry/auth/authenticators/test_sms.py @@ -1,3 +1,4 @@ +from typing import int import datetime import pytest diff --git a/tests/sentry/auth/authenticators/test_u2f.py b/tests/sentry/auth/authenticators/test_u2f.py index f0b94643a57863..9c76ee413f96b5 100644 --- a/tests/sentry/auth/authenticators/test_u2f.py +++ b/tests/sentry/auth/authenticators/test_u2f.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock from fido2 import cbor diff --git a/tests/sentry/auth/providers/fly/test_client.py b/tests/sentry/auth/providers/fly/test_client.py index 3510331368a6c9..a4c22c54d2fd95 100644 --- a/tests/sentry/auth/providers/fly/test_client.py +++ b/tests/sentry/auth/providers/fly/test_client.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/auth/providers/fly/test_provider.py b/tests/sentry/auth/providers/fly/test_provider.py index f47531e93b4333..505e57e8468816 100644 --- a/tests/sentry/auth/providers/fly/test_provider.py +++ b/tests/sentry/auth/providers/fly/test_provider.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.auth.exceptions import IdentityNotValid diff --git a/tests/sentry/auth/providers/github/test_client.py b/tests/sentry/auth/providers/github/test_client.py index 93635ded09126f..253fe33b50addc 100644 --- a/tests/sentry/auth/providers/github/test_client.py +++ b/tests/sentry/auth/providers/github/test_client.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/auth/providers/github/test_views.py b/tests/sentry/auth/providers/github/test_views.py index b46c519e942c2e..71a35c150b8da2 100644 --- a/tests/sentry/auth/providers/github/test_views.py +++ b/tests/sentry/auth/providers/github/test_views.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.auth.providers.github.views import _get_name_from_email diff --git a/tests/sentry/auth/providers/google/test_provider.py b/tests/sentry/auth/providers/google/test_provider.py index 5dbda8893d007d..450192e133103d 100644 --- a/tests/sentry/auth/providers/google/test_provider.py +++ b/tests/sentry/auth/providers/google/test_provider.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.auth.exceptions import IdentityNotValid diff --git a/tests/sentry/auth/providers/test_oauth2.py b/tests/sentry/auth/providers/test_oauth2.py index 9a0dedc496d0f8..71f877e38410d6 100644 --- a/tests/sentry/auth/providers/test_oauth2.py +++ b/tests/sentry/auth/providers/test_oauth2.py @@ -1,6 +1,6 @@ from collections.abc import Mapping from functools import cached_property -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/auth/providers/test_saml2.py b/tests/sentry/auth/providers/test_saml2.py index d976e1d3361ec6..0d0bf87e4d143b 100644 --- a/tests/sentry/auth/providers/test_saml2.py +++ b/tests/sentry/auth/providers/test_saml2.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from unittest import TestCase, mock import pytest diff --git a/tests/sentry/auth/services/test_model.py b/tests/sentry/auth/services/test_model.py index b627f42e2c5149..9919b69b9f9130 100644 --- a/tests/sentry/auth/services/test_model.py +++ b/tests/sentry/auth/services/test_model.py @@ -1,3 +1,4 @@ +from typing import int from sentry.auth.services.auth.serial import serialize_api_key, serialize_api_token from sentry.models.apikey import ApiKey from sentry.testutils.cases import TestCase diff --git a/tests/sentry/auth/test_access.py b/tests/sentry/auth/test_access.py index c0edba152bfa1a..a416a381c15fe2 100644 --- a/tests/sentry/auth/test_access.py +++ b/tests/sentry/auth/test_access.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import Mock, patch diff --git a/tests/sentry/auth/test_email.py b/tests/sentry/auth/test_email.py index 32d65888ec9ed5..91801c15795206 100644 --- a/tests/sentry/auth/test_email.py +++ b/tests/sentry/auth/test_email.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/auth/test_helper.py b/tests/sentry/auth/test_helper.py index e6e727795cb125..77ed01fd9341e2 100644 --- a/tests/sentry/auth/test_helper.py +++ b/tests/sentry/auth/test_helper.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TypedDict +from typing import int, TypedDict from unittest import mock from django.contrib.auth.models import AnonymousUser diff --git a/tests/sentry/auth/test_idpmigration.py b/tests/sentry/auth/test_idpmigration.py index 8122d038fc38ae..b85bb54804b2be 100644 --- a/tests/sentry/auth/test_idpmigration.py +++ b/tests/sentry/auth/test_idpmigration.py @@ -1,5 +1,5 @@ import re -from typing import cast +from typing import int, cast from django.urls import reverse diff --git a/tests/sentry/auth/test_password_validation.py b/tests/sentry/auth/test_password_validation.py index 12b3ca3235dd0f..6fa355748b43af 100644 --- a/tests/sentry/auth/test_password_validation.py +++ b/tests/sentry/auth/test_password_validation.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import responses from django.core.exceptions import ValidationError diff --git a/tests/sentry/auth/test_staff.py b/tests/sentry/auth/test_staff.py index 5f6993d0d54557..5e47bcb74feb10 100644 --- a/tests/sentry/auth/test_staff.py +++ b/tests/sentry/auth/test_staff.py @@ -1,3 +1,4 @@ +from typing import int from contextlib import contextmanager from datetime import UTC, datetime, timedelta from unittest import mock diff --git a/tests/sentry/auth/test_superuser.py b/tests/sentry/auth/test_superuser.py index a5b43024834d00..305b6aba67a8d6 100644 --- a/tests/sentry/auth/test_superuser.py +++ b/tests/sentry/auth/test_superuser.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from unittest import mock from unittest.mock import MagicMock, Mock, patch diff --git a/tests/sentry/auth/test_system.py b/tests/sentry/auth/test_system.py index 1e6cd10b6202fb..b166617c0a457f 100644 --- a/tests/sentry/auth/test_system.py +++ b/tests/sentry/auth/test_system.py @@ -1,3 +1,4 @@ +from typing import int from sentry.auth.system import SystemToken, get_system_token, is_system_auth from sentry.testutils.cases import TestCase from sentry.testutils.pytest.fixtures import django_db_all diff --git a/tests/sentry/auth_v2/endpoints/test_auth_merge_user_accounts.py b/tests/sentry/auth_v2/endpoints/test_auth_merge_user_accounts.py index a375248c4fdf55..db7db818f5614a 100644 --- a/tests/sentry/auth_v2/endpoints/test_auth_merge_user_accounts.py +++ b/tests/sentry/auth_v2/endpoints/test_auth_merge_user_accounts.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/auth_v2/endpoints/test_auth_user_merge_verification_code.py b/tests/sentry/auth_v2/endpoints/test_auth_user_merge_verification_code.py index 740bd9672b3ced..ed5756b1eb1e76 100644 --- a/tests/sentry/auth_v2/endpoints/test_auth_user_merge_verification_code.py +++ b/tests/sentry/auth_v2/endpoints/test_auth_user_merge_verification_code.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.silo import control_silo_test from sentry.users.models.user_merge_verification_code import UserMergeVerificationCode diff --git a/tests/sentry/auth_v2/endpoints/test_auth_v2_permissions.py b/tests/sentry/auth_v2/endpoints/test_auth_v2_permissions.py index b554fc2f6b8568..1016803bc83b38 100644 --- a/tests/sentry/auth_v2/endpoints/test_auth_v2_permissions.py +++ b/tests/sentry/auth_v2/endpoints/test_auth_v2_permissions.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from rest_framework.request import Request from rest_framework.views import APIView diff --git a/tests/sentry/auth_v2/endpoints/test_csrf.py b/tests/sentry/auth_v2/endpoints/test_csrf.py index 85b2d9cb5ec047..0c34a793247c4c 100644 --- a/tests/sentry/auth_v2/endpoints/test_csrf.py +++ b/tests/sentry/auth_v2/endpoints/test_csrf.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.test import override_settings from django.urls import reverse diff --git a/tests/sentry/auth_v2/utils/test_session.py b/tests/sentry/auth_v2/utils/test_session.py index 5bdfe4ce0617d5..4ed242387dc547 100644 --- a/tests/sentry/auth_v2/utils/test_session.py +++ b/tests/sentry/auth_v2/utils/test_session.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from unittest.mock import Mock diff --git a/tests/sentry/autofix/test_utils.py b/tests/sentry/autofix/test_utils.py index f0c8da5a74f511..df95a80373622f 100644 --- a/tests/sentry/autofix/test_utils.py +++ b/tests/sentry/autofix/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from unittest.mock import MagicMock, patch diff --git a/tests/sentry/autofix/test_webhooks.py b/tests/sentry/autofix/test_webhooks.py index 97f5c6380c94bb..419199003ddd94 100644 --- a/tests/sentry/autofix/test_webhooks.py +++ b/tests/sentry/autofix/test_webhooks.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from unittest.mock import call, patch diff --git a/tests/sentry/backup/__init__.py b/tests/sentry/backup/__init__.py index d3695b786fa071..4ca53f89ff1ff4 100644 --- a/tests/sentry/backup/__init__.py +++ b/tests/sentry/backup/__init__.py @@ -2,7 +2,7 @@ from collections.abc import Callable from functools import wraps -from typing import Any, Literal +from typing import Any, Literal, int from django.db import models diff --git a/tests/sentry/backup/test_comparators.py b/tests/sentry/backup/test_comparators.py index f0890173cf1e4f..6b1d76a1975f62 100644 --- a/tests/sentry/backup/test_comparators.py +++ b/tests/sentry/backup/test_comparators.py @@ -1,5 +1,5 @@ from copy import deepcopy -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/backup/test_coverage.py b/tests/sentry/backup/test_coverage.py index 4c27bf2d7f5701..2a0ef799e2bdc6 100644 --- a/tests/sentry/backup/test_coverage.py +++ b/tests/sentry/backup/test_coverage.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.backup.dependencies import dependencies, get_exportable_sentry_models, get_model_name from sentry.backup.scopes import RelocationScope diff --git a/tests/sentry/backup/test_exhaustive.py b/tests/sentry/backup/test_exhaustive.py index 72dafcae0085d6..22d29d8442c6c5 100644 --- a/tests/sentry/backup/test_exhaustive.py +++ b/tests/sentry/backup/test_exhaustive.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import tempfile from pathlib import Path diff --git a/tests/sentry/backup/test_exports.py b/tests/sentry/backup/test_exports.py index e9c2c647f246c8..5195258bfb65fa 100644 --- a/tests/sentry/backup/test_exports.py +++ b/tests/sentry/backup/test_exports.py @@ -4,7 +4,7 @@ from io import BytesIO from pathlib import Path from tempfile import TemporaryDirectory -from typing import Any +from typing import int, Any from orjson import JSONDecodeError, dumps diff --git a/tests/sentry/backup/test_findings.py b/tests/sentry/backup/test_findings.py index 83c610cdc974fa..26244774cfa401 100644 --- a/tests/sentry/backup/test_findings.py +++ b/tests/sentry/backup/test_findings.py @@ -2,7 +2,7 @@ from dataclasses import asdict, dataclass from enum import auto, unique -from typing import Any +from typing import int, Any from sentry.backup.dependencies import get_model_name from sentry.backup.findings import ( diff --git a/tests/sentry/backup/test_imports.py b/tests/sentry/backup/test_imports.py index 8563b00da59c5f..1b95fbf1e982ed 100644 --- a/tests/sentry/backup/test_imports.py +++ b/tests/sentry/backup/test_imports.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import io import os diff --git a/tests/sentry/backup/test_invariants.py b/tests/sentry/backup/test_invariants.py index d15f02228ae597..4e7d58a478bb37 100644 --- a/tests/sentry/backup/test_invariants.py +++ b/tests/sentry/backup/test_invariants.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db.models.fields.related import ManyToManyField diff --git a/tests/sentry/backup/test_models.py b/tests/sentry/backup/test_models.py index f92af879fb9a8b..77925c9207a4e4 100644 --- a/tests/sentry/backup/test_models.py +++ b/tests/sentry/backup/test_models.py @@ -2,7 +2,7 @@ import tempfile from pathlib import Path -from typing import Any +from typing import int, Any from django.db.models import Model diff --git a/tests/sentry/backup/test_rpc.py b/tests/sentry/backup/test_rpc.py index b8bcf489bd3d03..e6f7a3ab1e6ead 100644 --- a/tests/sentry/backup/test_rpc.py +++ b/tests/sentry/backup/test_rpc.py @@ -2,7 +2,7 @@ from copy import deepcopy from functools import cached_property -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch from uuid import uuid4 diff --git a/tests/sentry/backup/test_sanitize.py b/tests/sentry/backup/test_sanitize.py index 515066bb563d77..e59e812a910597 100644 --- a/tests/sentry/backup/test_sanitize.py +++ b/tests/sentry/backup/test_sanitize.py @@ -1,6 +1,6 @@ from collections.abc import Sequence from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from unittest import TestCase from unittest.mock import Mock, patch diff --git a/tests/sentry/backup/test_snapshots.py b/tests/sentry/backup/test_snapshots.py index 5bfc903c44acfd..a6e2e9cac8a6df 100644 --- a/tests/sentry/backup/test_snapshots.py +++ b/tests/sentry/backup/test_snapshots.py @@ -1,6 +1,6 @@ from pathlib import Path from tempfile import TemporaryDirectory -from typing import Any +from typing import int, Any import orjson import pytest diff --git a/tests/sentry/backup/test_validate.py b/tests/sentry/backup/test_validate.py index f01646ff76dbb4..922497b1ad8836 100644 --- a/tests/sentry/backup/test_validate.py +++ b/tests/sentry/backup/test_validate.py @@ -1,5 +1,5 @@ from copy import deepcopy -from typing import Any +from typing import int, Any import orjson diff --git a/tests/sentry/buffer/test_base.py b/tests/sentry/buffer/test_base.py index f4b7c1a5aeba94..890e49ff3634df 100644 --- a/tests/sentry/buffer/test_base.py +++ b/tests/sentry/buffer/test_base.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/buffer/test_redis.py b/tests/sentry/buffer/test_redis.py index 0eaa2b2840d793..d95e0ad7186acd 100644 --- a/tests/sentry/buffer/test_redis.py +++ b/tests/sentry/buffer/test_redis.py @@ -1,3 +1,4 @@ +from typing import int import copy import datetime import pickle diff --git a/tests/sentry/cache/test_cache.py b/tests/sentry/cache/test_cache.py index ca834aaa8c46e3..f3b15110efac17 100644 --- a/tests/sentry/cache/test_cache.py +++ b/tests/sentry/cache/test_cache.py @@ -1,3 +1,4 @@ +from typing import int import time from django.core.cache import cache diff --git a/tests/sentry/cache/test_django.py b/tests/sentry/cache/test_django.py index c52e1608986b92..6397f574608a28 100644 --- a/tests/sentry/cache/test_django.py +++ b/tests/sentry/cache/test_django.py @@ -1,3 +1,4 @@ +from typing import int import time from unittest import TestCase diff --git a/tests/sentry/cache/test_redis.py b/tests/sentry/cache/test_redis.py index 96fe63884e008d..9d0e09a8f75953 100644 --- a/tests/sentry/cache/test_redis.py +++ b/tests/sentry/cache/test_redis.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.cache.redis import RedisCache, RedisClusterCache, ValueTooLarge diff --git a/tests/sentry/charts/test_chartcuterie.py b/tests/sentry/charts/test_chartcuterie.py index 5f2e0e3990b0ff..394a0fa983420d 100644 --- a/tests/sentry/charts/test_chartcuterie.py +++ b/tests/sentry/charts/test_chartcuterie.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/codecov/endpoints/test_branches.py b/tests/sentry/codecov/endpoints/test_branches.py index 4837d09a553ad6..7a3a9af4de7992 100644 --- a/tests/sentry/codecov/endpoints/test_branches.py +++ b/tests/sentry/codecov/endpoints/test_branches.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, Mock, patch from django.urls import reverse diff --git a/tests/sentry/codecov/endpoints/test_codecov_endpoint.py b/tests/sentry/codecov/endpoints/test_codecov_endpoint.py index c4ae65a793c854..4d9086372d22b9 100644 --- a/tests/sentry/codecov/endpoints/test_codecov_endpoint.py +++ b/tests/sentry/codecov/endpoints/test_codecov_endpoint.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from rest_framework import status diff --git a/tests/sentry/codecov/endpoints/test_repositories.py b/tests/sentry/codecov/endpoints/test_repositories.py index d28ccbe39dd25d..371718c5549ce8 100644 --- a/tests/sentry/codecov/endpoints/test_repositories.py +++ b/tests/sentry/codecov/endpoints/test_repositories.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, Mock, patch from django.urls import reverse diff --git a/tests/sentry/codecov/endpoints/test_repository.py b/tests/sentry/codecov/endpoints/test_repository.py index 2a397d90847207..144e5756b51402 100644 --- a/tests/sentry/codecov/endpoints/test_repository.py +++ b/tests/sentry/codecov/endpoints/test_repository.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, Mock, patch from django.urls import reverse diff --git a/tests/sentry/codecov/endpoints/test_repository_token_regenerate.py b/tests/sentry/codecov/endpoints/test_repository_token_regenerate.py index f154631371606f..71f2e867071e1c 100644 --- a/tests/sentry/codecov/endpoints/test_repository_token_regenerate.py +++ b/tests/sentry/codecov/endpoints/test_repository_token_regenerate.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import ANY, Mock, patch from django.urls import reverse diff --git a/tests/sentry/codecov/endpoints/test_repository_tokens.py b/tests/sentry/codecov/endpoints/test_repository_tokens.py index 1ffb281da43c91..e563e136cf49d2 100644 --- a/tests/sentry/codecov/endpoints/test_repository_tokens.py +++ b/tests/sentry/codecov/endpoints/test_repository_tokens.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, Mock, patch from django.urls import reverse diff --git a/tests/sentry/codecov/endpoints/test_sync_repos.py b/tests/sentry/codecov/endpoints/test_sync_repos.py index 4c63884418e9f6..847a94f041a5e0 100644 --- a/tests/sentry/codecov/endpoints/test_sync_repos.py +++ b/tests/sentry/codecov/endpoints/test_sync_repos.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import ANY, Mock, patch import pytest diff --git a/tests/sentry/codecov/endpoints/test_test_result_aggregates.py b/tests/sentry/codecov/endpoints/test_test_result_aggregates.py index 539b230b9002bf..e67290ee7398be 100644 --- a/tests/sentry/codecov/endpoints/test_test_result_aggregates.py +++ b/tests/sentry/codecov/endpoints/test_test_result_aggregates.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import ANY, MagicMock, Mock, patch from django.urls import reverse diff --git a/tests/sentry/codecov/endpoints/test_test_results.py b/tests/sentry/codecov/endpoints/test_test_results.py index 210a49000de22b..65d396dad8d6a9 100644 --- a/tests/sentry/codecov/endpoints/test_test_results.py +++ b/tests/sentry/codecov/endpoints/test_test_results.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch from django.urls import reverse diff --git a/tests/sentry/codecov/endpoints/test_test_suites.py b/tests/sentry/codecov/endpoints/test_test_suites.py index d3d3f330024d42..66ed57d7a077e6 100644 --- a/tests/sentry/codecov/endpoints/test_test_suites.py +++ b/tests/sentry/codecov/endpoints/test_test_suites.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import ANY, MagicMock, Mock, patch from django.urls import reverse diff --git a/tests/sentry/codecov/test_client.py b/tests/sentry/codecov/test_client.py index b263f2cce944ab..36588f0379b734 100644 --- a/tests/sentry/codecov/test_client.py +++ b/tests/sentry/codecov/test_client.py @@ -1,3 +1,4 @@ +from typing import int import datetime from unittest.mock import MagicMock, patch diff --git a/tests/sentry/conduit/endpoints/test_organization_conduit_demo.py b/tests/sentry/conduit/endpoints/test_organization_conduit_demo.py index 0358d706caf75d..14c0d9ae3d1ff3 100644 --- a/tests/sentry/conduit/endpoints/test_organization_conduit_demo.py +++ b/tests/sentry/conduit/endpoints/test_organization_conduit_demo.py @@ -1,3 +1,4 @@ +from typing import int import base64 from unittest.mock import MagicMock, patch diff --git a/tests/sentry/conduit/test_auth.py b/tests/sentry/conduit/test_auth.py index 0c03a0723fbcf7..cc1167ad2cb8cb 100644 --- a/tests/sentry/conduit/test_auth.py +++ b/tests/sentry/conduit/test_auth.py @@ -1,3 +1,4 @@ +from typing import int import base64 import time from unittest.mock import patch diff --git a/tests/sentry/conduit/test_tasks.py b/tests/sentry/conduit/test_tasks.py index 5135f28eee1975..312e7318a9f397 100644 --- a/tests/sentry/conduit/test_tasks.py +++ b/tests/sentry/conduit/test_tasks.py @@ -1,3 +1,4 @@ +from typing import int import datetime import re from unittest.mock import patch diff --git a/tests/sentry/conf/test_kafka_definition.py b/tests/sentry/conf/test_kafka_definition.py index 6020ff0240688d..2f257d5f9e5a7c 100644 --- a/tests/sentry/conf/test_kafka_definition.py +++ b/tests/sentry/conf/test_kafka_definition.py @@ -1,3 +1,4 @@ +from typing import int import pytest import sentry_kafka_schemas from django.conf import settings diff --git a/tests/sentry/conf/test_scopes.py b/tests/sentry/conf/test_scopes.py index a0ee31e0f477d6..299432e9ee1998 100644 --- a/tests/sentry/conf/test_scopes.py +++ b/tests/sentry/conf/test_scopes.py @@ -1,3 +1,4 @@ +from typing import int from sentry.conf.server import SENTRY_READONLY_SCOPES, SENTRY_SCOPE_HIERARCHY_MAPPING, SENTRY_SCOPES from sentry.testutils.cases import TestCase diff --git a/tests/sentry/conf/types/test_imports.py b/tests/sentry/conf/types/test_imports.py index f6b4026b9257e4..1ad88aca58fe94 100644 --- a/tests/sentry/conf/types/test_imports.py +++ b/tests/sentry/conf/types/test_imports.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import pkgutil import subprocess diff --git a/tests/sentry/consumers/test_dlq.py b/tests/sentry/consumers/test_dlq.py index 257f479534410f..a64bf07a2b259e 100644 --- a/tests/sentry/consumers/test_dlq.py +++ b/tests/sentry/consumers/test_dlq.py @@ -1,6 +1,6 @@ import time from datetime import datetime, timedelta, timezone -from typing import cast +from typing import int, cast from unittest.mock import Mock import msgpack diff --git a/tests/sentry/consumers/test_get_topic_definition.py b/tests/sentry/consumers/test_get_topic_definition.py index 26717b859d3c86..e01fd0c9efe13a 100644 --- a/tests/sentry/consumers/test_get_topic_definition.py +++ b/tests/sentry/consumers/test_get_topic_definition.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from sentry.conf.types.kafka_definition import Topic diff --git a/tests/sentry/consumers/test_profiler.py b/tests/sentry/consumers/test_profiler.py index 27e0a373593e55..8dbf0409d972d0 100644 --- a/tests/sentry/consumers/test_profiler.py +++ b/tests/sentry/consumers/test_profiler.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock from sentry.consumers import JoinProfilerStrategyFactoryWrapper diff --git a/tests/sentry/consumers/test_run.py b/tests/sentry/consumers/test_run.py index 8fea38ec77ad14..4369bcba4b5ae7 100644 --- a/tests/sentry/consumers/test_run.py +++ b/tests/sentry/consumers/test_run.py @@ -1,3 +1,4 @@ +from typing import int import pytest from arroyo.processing.strategies.abstract import ProcessingStrategyFactory diff --git a/tests/sentry/consumers/test_synchronized.py b/tests/sentry/consumers/test_synchronized.py index ee1a060056a691..b18570bcc1347b 100644 --- a/tests/sentry/consumers/test_synchronized.py +++ b/tests/sentry/consumers/test_synchronized.py @@ -4,7 +4,7 @@ from contextlib import closing, contextmanager from datetime import datetime from threading import Event -from typing import TypeVar +from typing import int, TypeVar import pytest from arroyo.backends.abstract import Consumer diff --git a/tests/sentry/consumers/test_validate_schema.py b/tests/sentry/consumers/test_validate_schema.py index c0021ffe1acbe2..cdfa01631b3bf6 100644 --- a/tests/sentry/consumers/test_validate_schema.py +++ b/tests/sentry/consumers/test_validate_schema.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock import pytest diff --git a/tests/sentry/core/endpoints/scim/test_scim_schema.py b/tests/sentry/core/endpoints/scim/test_scim_schema.py index 88ebb16564154f..c0e822a6cd2a1c 100644 --- a/tests/sentry/core/endpoints/scim/test_scim_schema.py +++ b/tests/sentry/core/endpoints/scim/test_scim_schema.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import SCIMTestCase diff --git a/tests/sentry/core/endpoints/scim/test_scim_team_details.py b/tests/sentry/core/endpoints/scim/test_scim_team_details.py index 2701b4ab4c7ff1..cb1733e5be3f5c 100644 --- a/tests/sentry/core/endpoints/scim/test_scim_team_details.py +++ b/tests/sentry/core/endpoints/scim/test_scim_team_details.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch from django.urls import reverse diff --git a/tests/sentry/core/endpoints/scim/test_scim_team_index.py b/tests/sentry/core/endpoints/scim/test_scim_team_index.py index d2bc557faff658..68b8d60d5f39dd 100644 --- a/tests/sentry/core/endpoints/scim/test_scim_team_index.py +++ b/tests/sentry/core/endpoints/scim/test_scim_team_index.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.urls import reverse diff --git a/tests/sentry/core/endpoints/scim/test_scim_user_details.py b/tests/sentry/core/endpoints/scim/test_scim_user_details.py index 0cd37fa3f0c06a..a33abd916a1012 100644 --- a/tests/sentry/core/endpoints/scim/test_scim_user_details.py +++ b/tests/sentry/core/endpoints/scim/test_scim_user_details.py @@ -1,3 +1,4 @@ +from typing import int import unittest import pytest diff --git a/tests/sentry/core/endpoints/scim/test_scim_user_index.py b/tests/sentry/core/endpoints/scim/test_scim_user_index.py index a85ad0e1e55c1a..f031716e7231d6 100644 --- a/tests/sentry/core/endpoints/scim/test_scim_user_index.py +++ b/tests/sentry/core/endpoints/scim/test_scim_user_index.py @@ -1,3 +1,4 @@ +from typing import int import unittest from datetime import timedelta from unittest.mock import MagicMock, call, patch diff --git a/tests/sentry/core/endpoints/test_organization_auditlogs.py b/tests/sentry/core/endpoints/test_organization_auditlogs.py index b22d5d77d96fd7..02a97a1422a239 100644 --- a/tests/sentry/core/endpoints/test_organization_auditlogs.py +++ b/tests/sentry/core/endpoints/test_organization_auditlogs.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.test import override_settings diff --git a/tests/sentry/core/endpoints/test_organization_avatar.py b/tests/sentry/core/endpoints/test_organization_avatar.py index 0dc65b1589aaf2..be4005e86e8a7b 100644 --- a/tests/sentry/core/endpoints/test_organization_avatar.py +++ b/tests/sentry/core/endpoints/test_organization_avatar.py @@ -1,3 +1,4 @@ +from typing import int from base64 import b64encode from sentry.models.avatars.organization_avatar import OrganizationAvatar diff --git a/tests/sentry/core/endpoints/test_organization_details.py b/tests/sentry/core/endpoints/test_organization_details.py index b2e7a456639e7f..df05b1996f7b8c 100644 --- a/tests/sentry/core/endpoints/test_organization_details.py +++ b/tests/sentry/core/endpoints/test_organization_details.py @@ -3,7 +3,7 @@ import re from base64 import b64encode from datetime import UTC, datetime, timedelta -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/core/endpoints/test_organization_environments.py b/tests/sentry/core/endpoints/test_organization_environments.py index f411605c7c8fb1..75a75ca37d8d61 100644 --- a/tests/sentry/core/endpoints/test_organization_environments.py +++ b/tests/sentry/core/endpoints/test_organization_environments.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from sentry.api.serializers import serialize diff --git a/tests/sentry/core/endpoints/test_organization_index.py b/tests/sentry/core/endpoints/test_organization_index.py index 26c8d52321b488..251a23d91516b6 100644 --- a/tests/sentry/core/endpoints/test_organization_index.py +++ b/tests/sentry/core/endpoints/test_organization_index.py @@ -1,7 +1,7 @@ from __future__ import annotations import re -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch from django.test import override_settings diff --git a/tests/sentry/core/endpoints/test_organization_join_request.py b/tests/sentry/core/endpoints/test_organization_join_request.py index e282db760c9e67..41ac605a4bb599 100644 --- a/tests/sentry/core/endpoints/test_organization_join_request.py +++ b/tests/sentry/core/endpoints/test_organization_join_request.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import MagicMock, patch from urllib.parse import parse_qs, urlparse diff --git a/tests/sentry/core/endpoints/test_organization_member_details.py b/tests/sentry/core/endpoints/test_organization_member_details.py index 3e84d3f0b540f2..06cbe9f1154f8a 100644 --- a/tests/sentry/core/endpoints/test_organization_member_details.py +++ b/tests/sentry/core/endpoints/test_organization_member_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.core import mail diff --git a/tests/sentry/core/endpoints/test_organization_member_index.py b/tests/sentry/core/endpoints/test_organization_member_index.py index 09353d4f0734f9..0db06a6b8821c1 100644 --- a/tests/sentry/core/endpoints/test_organization_member_index.py +++ b/tests/sentry/core/endpoints/test_organization_member_index.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import replace from unittest.mock import MagicMock, patch diff --git a/tests/sentry/core/endpoints/test_organization_member_invite_details.py b/tests/sentry/core/endpoints/test_organization_member_invite_details.py index 9ac1cfd461fa90..35797a99f3c517 100644 --- a/tests/sentry/core/endpoints/test_organization_member_invite_details.py +++ b/tests/sentry/core/endpoints/test_organization_member_invite_details.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import replace from unittest.mock import MagicMock, patch diff --git a/tests/sentry/core/endpoints/test_organization_member_invite_index.py b/tests/sentry/core/endpoints/test_organization_member_invite_index.py index 7e6419b7deaf05..fa0936190cd14a 100644 --- a/tests/sentry/core/endpoints/test_organization_member_invite_index.py +++ b/tests/sentry/core/endpoints/test_organization_member_invite_index.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import replace from unittest.mock import MagicMock, patch diff --git a/tests/sentry/core/endpoints/test_organization_member_team_details.py b/tests/sentry/core/endpoints/test_organization_member_team_details.py index e2ef621245b4b9..c89796e51eb137 100644 --- a/tests/sentry/core/endpoints/test_organization_member_team_details.py +++ b/tests/sentry/core/endpoints/test_organization_member_team_details.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import MagicMock, patch diff --git a/tests/sentry/core/endpoints/test_organization_projects.py b/tests/sentry/core/endpoints/test_organization_projects.py index 921e27242ff06f..48fc60343fe110 100644 --- a/tests/sentry/core/endpoints/test_organization_projects.py +++ b/tests/sentry/core/endpoints/test_organization_projects.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.urls import reverse diff --git a/tests/sentry/core/endpoints/test_organization_projects_experiment.py b/tests/sentry/core/endpoints/test_organization_projects_experiment.py index 98b236b7e75dba..6b7e5d2be5dba0 100644 --- a/tests/sentry/core/endpoints/test_organization_projects_experiment.py +++ b/tests/sentry/core/endpoints/test_organization_projects_experiment.py @@ -1,3 +1,4 @@ +from typing import int import re from unittest import mock from unittest.mock import MagicMock, Mock, patch diff --git a/tests/sentry/core/endpoints/test_organization_region.py b/tests/sentry/core/endpoints/test_organization_region.py index c4fd75bd9cbccc..038a40c4758472 100644 --- a/tests/sentry/core/endpoints/test_organization_region.py +++ b/tests/sentry/core/endpoints/test_organization_region.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.organization import Organization from sentry.models.organizationmember import OrganizationMember from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/core/endpoints/test_organization_request_project_creation.py b/tests/sentry/core/endpoints/test_organization_request_project_creation.py index 6ecb50c44b465e..e9dc0aa6de6264 100644 --- a/tests/sentry/core/endpoints/test_organization_request_project_creation.py +++ b/tests/sentry/core/endpoints/test_organization_request_project_creation.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/core/endpoints/test_organization_teams.py b/tests/sentry/core/endpoints/test_organization_teams.py index 21374522c7a284..4b6ec15e5beeda 100644 --- a/tests/sentry/core/endpoints/test_organization_teams.py +++ b/tests/sentry/core/endpoints/test_organization_teams.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.utils.providers import get_provider_string from sentry.models.organizationmember import OrganizationMember from sentry.models.organizationmemberteam import OrganizationMemberTeam diff --git a/tests/sentry/core/endpoints/test_organization_user_details.py b/tests/sentry/core/endpoints/test_organization_user_details.py index 49dac43e252a3e..89373f7e256ddc 100644 --- a/tests/sentry/core/endpoints/test_organization_user_details.py +++ b/tests/sentry/core/endpoints/test_organization_user_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/core/endpoints/test_organization_user_teams.py b/tests/sentry/core/endpoints/test_organization_user_teams.py index 02108bc6d8c84f..9f81dc51fae0d5 100644 --- a/tests/sentry/core/endpoints/test_organization_user_teams.py +++ b/tests/sentry/core/endpoints/test_organization_user_teams.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/core/endpoints/test_organization_users.py b/tests/sentry/core/endpoints/test_organization_users.py index fe3258f678555b..10f7fcb403c956 100644 --- a/tests/sentry/core/endpoints/test_organization_users.py +++ b/tests/sentry/core/endpoints/test_organization_users.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import OrganizationMemberWithProjectsSerializer, serialize from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/core/endpoints/test_project_details.py b/tests/sentry/core/endpoints/test_project_details.py index 438cc884c7acac..41a65e388fed5d 100644 --- a/tests/sentry/core/endpoints/test_project_details.py +++ b/tests/sentry/core/endpoints/test_project_details.py @@ -3,7 +3,7 @@ from abc import ABC from datetime import datetime, timedelta, timezone from time import time -from typing import Any +from typing import int, Any from unittest import mock import orjson diff --git a/tests/sentry/core/endpoints/test_project_environment_details.py b/tests/sentry/core/endpoints/test_project_environment_details.py index 7d7cdd83cc430c..f63840366866e1 100644 --- a/tests/sentry/core/endpoints/test_project_environment_details.py +++ b/tests/sentry/core/endpoints/test_project_environment_details.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import quote from django.urls import reverse diff --git a/tests/sentry/core/endpoints/test_project_environments.py b/tests/sentry/core/endpoints/test_project_environments.py index 587af2d77d4bfe..46dbc737675bf6 100644 --- a/tests/sentry/core/endpoints/test_project_environments.py +++ b/tests/sentry/core/endpoints/test_project_environments.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.environment import Environment, EnvironmentProject diff --git a/tests/sentry/core/endpoints/test_project_index.py b/tests/sentry/core/endpoints/test_project_index.py index dd98d3f0374bb1..a501fc69037ead 100644 --- a/tests/sentry/core/endpoints/test_project_index.py +++ b/tests/sentry/core/endpoints/test_project_index.py @@ -1,3 +1,4 @@ +from typing import int import responses from django.db import router from django.urls import reverse diff --git a/tests/sentry/core/endpoints/test_project_key_details.py b/tests/sentry/core/endpoints/test_project_key_details.py index d3c4e44bf6ab15..27e45eac5d8fa0 100644 --- a/tests/sentry/core/endpoints/test_project_key_details.py +++ b/tests/sentry/core/endpoints/test_project_key_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.urls import reverse diff --git a/tests/sentry/core/endpoints/test_project_key_stats.py b/tests/sentry/core/endpoints/test_project_key_stats.py index 87c6121e7dadff..21547f07ec33f6 100644 --- a/tests/sentry/core/endpoints/test_project_key_stats.py +++ b/tests/sentry/core/endpoints/test_project_key_stats.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.constants import DataCategory diff --git a/tests/sentry/core/endpoints/test_project_keys.py b/tests/sentry/core/endpoints/test_project_keys.py index f6f4321eb823c9..73a6c0e502ecd1 100644 --- a/tests/sentry/core/endpoints/test_project_keys.py +++ b/tests/sentry/core/endpoints/test_project_keys.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.projectkey import ProjectKey, UseCase diff --git a/tests/sentry/core/endpoints/test_project_stats.py b/tests/sentry/core/endpoints/test_project_stats.py index 48adac8db53808..775d4956e8dcb8 100644 --- a/tests/sentry/core/endpoints/test_project_stats.py +++ b/tests/sentry/core/endpoints/test_project_stats.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.constants import DataCategory diff --git a/tests/sentry/core/endpoints/test_project_team_details.py b/tests/sentry/core/endpoints/test_project_team_details.py index 2885f4769b9d18..ca1b2c7d9c60aa 100644 --- a/tests/sentry/core/endpoints/test_project_team_details.py +++ b/tests/sentry/core/endpoints/test_project_team_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from sentry.models.projectteam import ProjectTeam diff --git a/tests/sentry/core/endpoints/test_project_teams.py b/tests/sentry/core/endpoints/test_project_teams.py index 9dd1359734363d..7e457ba5ce9f1b 100644 --- a/tests/sentry/core/endpoints/test_project_teams.py +++ b/tests/sentry/core/endpoints/test_project_teams.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/core/endpoints/test_project_transfer.py b/tests/sentry/core/endpoints/test_project_transfer.py index e8e67844c83650..44e0fb29e6da1a 100644 --- a/tests/sentry/core/endpoints/test_project_transfer.py +++ b/tests/sentry/core/endpoints/test_project_transfer.py @@ -1,3 +1,4 @@ +from typing import int import re from urllib.parse import ParseResult, parse_qs, urlparse diff --git a/tests/sentry/core/endpoints/test_project_users.py b/tests/sentry/core/endpoints/test_project_users.py index 633695f07be602..705612656a3824 100644 --- a/tests/sentry/core/endpoints/test_project_users.py +++ b/tests/sentry/core/endpoints/test_project_users.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/core/endpoints/test_team_details.py b/tests/sentry/core/endpoints/test_team_details.py index e2c5680d2adc9a..b65731854f9c18 100644 --- a/tests/sentry/core/endpoints/test_team_details.py +++ b/tests/sentry/core/endpoints/test_team_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry import audit_log from sentry.audit_log.services.log.service import log_rpc_service from sentry.deletions.models.scheduleddeletion import RegionScheduledDeletion diff --git a/tests/sentry/core/endpoints/test_team_members.py b/tests/sentry/core/endpoints/test_team_members.py index 841bd9f18d6a25..db23612d6f6554 100644 --- a/tests/sentry/core/endpoints/test_team_members.py +++ b/tests/sentry/core/endpoints/test_team_members.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.organizationmember import InviteStatus from sentry.silo.base import SiloMode from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/core/endpoints/test_team_projects.py b/tests/sentry/core/endpoints/test_team_projects.py index be2e8931886a01..6b35f07d675bc5 100644 --- a/tests/sentry/core/endpoints/test_team_projects.py +++ b/tests/sentry/core/endpoints/test_team_projects.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase, mock from unittest.mock import MagicMock, Mock, patch diff --git a/tests/sentry/core/endpoints/test_team_release_count.py b/tests/sentry/core/endpoints/test_team_release_count.py index 2e045ab520ebf7..bebe652faabb4e 100644 --- a/tests/sentry/core/endpoints/test_team_release_count.py +++ b/tests/sentry/core/endpoints/test_team_release_count.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.release import Release from sentry.testutils.cases import APITestCase from sentry.testutils.helpers.datetime import before_now diff --git a/tests/sentry/core/endpoints/test_team_stats.py b/tests/sentry/core/endpoints/test_team_stats.py index 1cf6d9b271df4f..0e44af400d2a81 100644 --- a/tests/sentry/core/endpoints/test_team_stats.py +++ b/tests/sentry/core/endpoints/test_team_stats.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/core/endpoints/test_team_time_to_resolution.py b/tests/sentry/core/endpoints/test_team_time_to_resolution.py index b6bcc2ea2a3488..c0baa6f8bba84d 100644 --- a/tests/sentry/core/endpoints/test_team_time_to_resolution.py +++ b/tests/sentry/core/endpoints/test_team_time_to_resolution.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils.timezone import now diff --git a/tests/sentry/core/endpoints/test_team_unresolved_issue_age.py b/tests/sentry/core/endpoints/test_team_unresolved_issue_age.py index 1cea4376ee8f7b..54c160c19daa15 100644 --- a/tests/sentry/core/endpoints/test_team_unresolved_issue_age.py +++ b/tests/sentry/core/endpoints/test_team_unresolved_issue_age.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.group import GroupStatus from sentry.models.groupassignee import GroupAssignee from sentry.models.groupenvironment import GroupEnvironment diff --git a/tests/sentry/dashboards/endpoints/test_organization_dashboard_details.py b/tests/sentry/dashboards/endpoints/test_organization_dashboard_details.py index ec276bee818812..9f194f18177a08 100644 --- a/tests/sentry/dashboards/endpoints/test_organization_dashboard_details.py +++ b/tests/sentry/dashboards/endpoints/test_organization_dashboard_details.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from unittest import mock from urllib.parse import parse_qs, urlsplit diff --git a/tests/sentry/dashboards/endpoints/test_organization_dashboard_widget_details.py b/tests/sentry/dashboards/endpoints/test_organization_dashboard_widget_details.py index 20db0218bef697..fe5315fc6b670d 100644 --- a/tests/sentry/dashboards/endpoints/test_organization_dashboard_widget_details.py +++ b/tests/sentry/dashboards/endpoints/test_organization_dashboard_widget_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/dashboards/endpoints/test_organization_dashboards.py b/tests/sentry/dashboards/endpoints/test_organization_dashboards.py index 967b761487fae1..900bea2f059cf9 100644 --- a/tests/sentry/dashboards/endpoints/test_organization_dashboards.py +++ b/tests/sentry/dashboards/endpoints/test_organization_dashboards.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from unittest.mock import patch from django.urls import reverse diff --git a/tests/sentry/dashboards/endpoints/test_organization_dashboards_starred.py b/tests/sentry/dashboards/endpoints/test_organization_dashboards_starred.py index 98a17eeb74f450..71e8e31dd48ba2 100644 --- a/tests/sentry/dashboards/endpoints/test_organization_dashboards_starred.py +++ b/tests/sentry/dashboards/endpoints/test_organization_dashboards_starred.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from rest_framework.exceptions import ErrorDetail diff --git a/tests/sentry/data/test_samples.py b/tests/sentry/data/test_samples.py index 991ada27957c17..255f0414fe5903 100644 --- a/tests/sentry/data/test_samples.py +++ b/tests/sentry/data/test_samples.py @@ -1,3 +1,4 @@ +from typing import int import os import pytest diff --git a/tests/sentry/data_export/endpoints/test_data_export.py b/tests/sentry/data_export/endpoints/test_data_export.py index af482ea5eb330d..e64ba5a4305c36 100644 --- a/tests/sentry/data_export/endpoints/test_data_export.py +++ b/tests/sentry/data_export/endpoints/test_data_export.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.data_export.base import ExportQueryType, ExportStatus from sentry.data_export.models import ExportedData diff --git a/tests/sentry/data_export/endpoints/test_data_export_details.py b/tests/sentry/data_export/endpoints/test_data_export_details.py index 6a6424f6a1dddb..87ace877a59cd8 100644 --- a/tests/sentry/data_export/endpoints/test_data_export_details.py +++ b/tests/sentry/data_export/endpoints/test_data_export_details.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from hashlib import sha1 from io import BytesIO diff --git a/tests/sentry/data_export/processors/test_discover.py b/tests/sentry/data_export/processors/test_discover.py index 3cb3bf1c372421..45c766750176a7 100644 --- a/tests/sentry/data_export/processors/test_discover.py +++ b/tests/sentry/data_export/processors/test_discover.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry_relay.consts import SPAN_STATUS_NAME_TO_CODE diff --git a/tests/sentry/data_export/processors/test_issues_by_tag.py b/tests/sentry/data_export/processors/test_issues_by_tag.py index 522c4af2e2974c..50f6b3f085b171 100644 --- a/tests/sentry/data_export/processors/test_issues_by_tag.py +++ b/tests/sentry/data_export/processors/test_issues_by_tag.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/sentry/data_export/test_models.py b/tests/sentry/data_export/test_models.py index 8f5c68904ed071..a57d4165f74f71 100644 --- a/tests/sentry/data_export/test_models.py +++ b/tests/sentry/data_export/test_models.py @@ -1,3 +1,4 @@ +from typing import int import tempfile from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/data_export/test_tasks.py b/tests/sentry/data_export/test_tasks.py index 15e2e23bb3c0df..8d5e55d8061639 100644 --- a/tests/sentry/data_export/test_tasks.py +++ b/tests/sentry/data_export/test_tasks.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.db import IntegrityError diff --git a/tests/sentry/data_secrecy/service/test_data_access_grant_service.py b/tests/sentry/data_secrecy/service/test_data_access_grant_service.py index c5c69815f78ec6..4f8fea50244770 100644 --- a/tests/sentry/data_secrecy/service/test_data_access_grant_service.py +++ b/tests/sentry/data_secrecy/service/test_data_access_grant_service.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from sentry.data_secrecy.models.data_access_grant import DataAccessGrant diff --git a/tests/sentry/data_secrecy/test_data_secrecy_logic.py b/tests/sentry/data_secrecy/test_data_secrecy_logic.py index 9ea3b41c2e86ff..69e328a1c2930c 100644 --- a/tests/sentry/data_secrecy/test_data_secrecy_logic.py +++ b/tests/sentry/data_secrecy/test_data_secrecy_logic.py @@ -1,3 +1,4 @@ +from typing import int from sentry.data_secrecy.data_secrecy_logic import should_allow_superuser_access from sentry.organizations.services.organization import ( RpcOrganization, diff --git a/tests/sentry/db/models/fields/bitfield/test_bitfield.py b/tests/sentry/db/models/fields/bitfield/test_bitfield.py index 68cda2e84da80a..30e4099a97699e 100644 --- a/tests/sentry/db/models/fields/bitfield/test_bitfield.py +++ b/tests/sentry/db/models/fields/bitfield/test_bitfield.py @@ -1,3 +1,4 @@ +from typing import int import pickle import unittest diff --git a/tests/sentry/db/models/fields/test_bounded.py b/tests/sentry/db/models/fields/test_bounded.py index 9eedad75277bd3..b754d488df8f08 100644 --- a/tests/sentry/db/models/fields/test_bounded.py +++ b/tests/sentry/db/models/fields/test_bounded.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.db.models.fields.bounded import ( diff --git a/tests/sentry/db/models/fields/test_encryption.py b/tests/sentry/db/models/fields/test_encryption.py index d96908f6b749b9..0c8cbcf85d1b7a 100644 --- a/tests/sentry/db/models/fields/test_encryption.py +++ b/tests/sentry/db/models/fields/test_encryption.py @@ -1,3 +1,4 @@ +from typing import int import base64 import pytest diff --git a/tests/sentry/db/models/fields/test_hybrid_cloud_foreign_key.py b/tests/sentry/db/models/fields/test_hybrid_cloud_foreign_key.py index dc453cf5d6ae45..e5f8f438d88b47 100644 --- a/tests/sentry/db/models/fields/test_hybrid_cloud_foreign_key.py +++ b/tests/sentry/db/models/fields/test_hybrid_cloud_foreign_key.py @@ -1,3 +1,4 @@ +from typing import int from django.apps import apps from sentry.db.models.fields.hybrid_cloud_foreign_key import HybridCloudForeignKey diff --git a/tests/sentry/db/models/fields/test_jsonfield.py b/tests/sentry/db/models/fields/test_jsonfield.py index 664766f8d92afe..bfd2d4b0c98552 100644 --- a/tests/sentry/db/models/fields/test_jsonfield.py +++ b/tests/sentry/db/models/fields/test_jsonfield.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django import forms from django.db import models diff --git a/tests/sentry/db/models/fields/test_picklefield.py b/tests/sentry/db/models/fields/test_picklefield.py index 854654a5c72673..62a84adebadb1c 100644 --- a/tests/sentry/db/models/fields/test_picklefield.py +++ b/tests/sentry/db/models/fields/test_picklefield.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.db import connection, models diff --git a/tests/sentry/db/models/fields/test_slug.py b/tests/sentry/db/models/fields/test_slug.py index ae40ed4a17ba75..44c77304981a21 100644 --- a/tests/sentry/db/models/fields/test_slug.py +++ b/tests/sentry/db/models/fields/test_slug.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch import pytest diff --git a/tests/sentry/db/models/manager/test_base_query_set.py b/tests/sentry/db/models/manager/test_base_query_set.py index 737cb98f2c39c3..904e3592840f37 100644 --- a/tests/sentry/db/models/manager/test_base_query_set.py +++ b/tests/sentry/db/models/manager/test_base_query_set.py @@ -1,3 +1,4 @@ +from typing import int from contextlib import contextmanager from unittest import mock diff --git a/tests/sentry/db/models/test_base.py b/tests/sentry/db/models/test_base.py index 3df52d2575e2ef..fd715bb4dac27a 100644 --- a/tests/sentry/db/models/test_base.py +++ b/tests/sentry/db/models/test_base.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase from sentry.db.models import DefaultFieldsModelExisting diff --git a/tests/sentry/db/models/test_utils.py b/tests/sentry/db/models/test_utils.py index 7d1af771ea394e..74295ef359f46b 100644 --- a/tests/sentry/db/models/test_utils.py +++ b/tests/sentry/db/models/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from sentry.db.models.utils import is_model_attr_cached, slugify_instance from sentry.models.organization import Organization from sentry.testutils.cases import TestCase diff --git a/tests/sentry/db/postgres/schema/safe_migrations/__init__.py b/tests/sentry/db/postgres/schema/safe_migrations/__init__.py index 6e0555813251d2..1ec3955995e9a6 100644 --- a/tests/sentry/db/postgres/schema/safe_migrations/__init__.py +++ b/tests/sentry/db/postgres/schema/safe_migrations/__init__.py @@ -1,2 +1,3 @@ +from typing import int # Subset of tests taken from https://github.com/tbicr/django-pg-zero-downtime-migrations/tree/c029caac8d0cdaeef1d88870f09efb3c02f199d5/tests # Modified to test our integration diff --git a/tests/sentry/db/postgres/schema/safe_migrations/integration/__init__.py b/tests/sentry/db/postgres/schema/safe_migrations/integration/__init__.py index ad9bd6d5a781cf..5dee3870e9f594 100644 --- a/tests/sentry/db/postgres/schema/safe_migrations/integration/__init__.py +++ b/tests/sentry/db/postgres/schema/safe_migrations/integration/__init__.py @@ -1,3 +1,4 @@ +from typing import int from django.core.management.commands.migrate import Command as MigrateCommand diff --git a/tests/sentry/db/postgres/schema/safe_migrations/integration/test_migrations.py b/tests/sentry/db/postgres/schema/safe_migrations/integration/test_migrations.py index ceaf9f22c3b475..5adf54dd7d4132 100644 --- a/tests/sentry/db/postgres/schema/safe_migrations/integration/test_migrations.py +++ b/tests/sentry/db/postgres/schema/safe_migrations/integration/test_migrations.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.core.exceptions import FieldDoesNotExist from django.db import connection diff --git a/tests/sentry/db/postgres/test_base.py b/tests/sentry/db/postgres/test_base.py index 3cfb60dc87dd33..3aeb4051f7fc51 100644 --- a/tests/sentry/db/postgres/test_base.py +++ b/tests/sentry/db/postgres/test_base.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.db import connection from django.db.utils import DataError diff --git a/tests/sentry/db/test_deletion.py b/tests/sentry/db/test_deletion.py index f9604fce4531c3..3fd802e318c572 100644 --- a/tests/sentry/db/test_deletion.py +++ b/tests/sentry/db/test_deletion.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import timedelta diff --git a/tests/sentry/db/test_pending_deletion.py b/tests/sentry/db/test_pending_deletion.py index 9da9af087944fc..7745af70abb46b 100644 --- a/tests/sentry/db/test_pending_deletion.py +++ b/tests/sentry/db/test_pending_deletion.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from sentry.db.pending_deletion import build_pending_deletion_key diff --git a/tests/sentry/db/test_router.py b/tests/sentry/db/test_router.py index 8c3c6a853cc7bc..3e949c569b0211 100644 --- a/tests/sentry/db/test_router.py +++ b/tests/sentry/db/test_router.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.contrib.auth.models import Permission from django.test import override_settings diff --git a/tests/sentry/db/test_silo_models.py b/tests/sentry/db/test_silo_models.py index d70a119d9591e8..01d72184194266 100644 --- a/tests/sentry/db/test_silo_models.py +++ b/tests/sentry/db/test_silo_models.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.db.models import Model diff --git a/tests/sentry/db/test_transactions.py b/tests/sentry/db/test_transactions.py index b52f2ddfdff6ac..02ad79e27da3fc 100644 --- a/tests/sentry/db/test_transactions.py +++ b/tests/sentry/db/test_transactions.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/debug/utils/test_exception_reporter_filter.py b/tests/sentry/debug/utils/test_exception_reporter_filter.py index d9ba5bcaefb3c9..c6429976118297 100644 --- a/tests/sentry/debug/utils/test_exception_reporter_filter.py +++ b/tests/sentry/debug/utils/test_exception_reporter_filter.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.test import override_settings diff --git a/tests/sentry/debug_files/test_artifact_bundles.py b/tests/sentry/debug_files/test_artifact_bundles.py index 2625299cb1c5b5..ebf5239f26b4a1 100644 --- a/tests/sentry/debug_files/test_artifact_bundles.py +++ b/tests/sentry/debug_files/test_artifact_bundles.py @@ -1,3 +1,4 @@ +from typing import int import uuid import zipfile from datetime import datetime, timedelta diff --git a/tests/sentry/deletions/tasks/test_groups.py b/tests/sentry/deletions/tasks/test_groups.py index d22563cfd051d4..46252a8071a039 100644 --- a/tests/sentry/deletions/tasks/test_groups.py +++ b/tests/sentry/deletions/tasks/test_groups.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from uuid import uuid4 diff --git a/tests/sentry/deletions/tasks/test_hybrid_cloud.py b/tests/sentry/deletions/tasks/test_hybrid_cloud.py index 4ef6fc50419062..3212aa0527d77d 100644 --- a/tests/sentry/deletions/tasks/test_hybrid_cloud.py +++ b/tests/sentry/deletions/tasks/test_hybrid_cloud.py @@ -2,7 +2,7 @@ from collections.abc import Callable, Generator from operator import itemgetter -from typing import Any, ContextManager, NotRequired, TypedDict +from typing import Any, ContextManager, NotRequired, TypedDict, int from unittest.mock import patch import pytest diff --git a/tests/sentry/deletions/tasks/test_nodestore.py b/tests/sentry/deletions/tasks/test_nodestore.py index 7497fb1a874313..f78ad17fe164e9 100644 --- a/tests/sentry/deletions/tasks/test_nodestore.py +++ b/tests/sentry/deletions/tasks/test_nodestore.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 import pytest diff --git a/tests/sentry/deletions/tasks/test_overwatch.py b/tests/sentry/deletions/tasks/test_overwatch.py index f83c758e39fb66..409598ed262ce0 100644 --- a/tests/sentry/deletions/tasks/test_overwatch.py +++ b/tests/sentry/deletions/tasks/test_overwatch.py @@ -1,6 +1,6 @@ import hashlib import hmac -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch import responses diff --git a/tests/sentry/deletions/tasks/test_scheduled.py b/tests/sentry/deletions/tasks/test_scheduled.py index b94d97c87a8636..4ba8d67c5c267f 100644 --- a/tests/sentry/deletions/tasks/test_scheduled.py +++ b/tests/sentry/deletions/tasks/test_scheduled.py @@ -1,3 +1,4 @@ +from typing import int import abc from abc import abstractmethod from datetime import timedelta diff --git a/tests/sentry/deletions/test_alert_rule.py b/tests/sentry/deletions/test_alert_rule.py index 5089b8c5fd1ffe..a4e4b422925c1f 100644 --- a/tests/sentry/deletions/test_alert_rule.py +++ b/tests/sentry/deletions/test_alert_rule.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/deletions/test_alert_rule_trigger.py b/tests/sentry/deletions/test_alert_rule_trigger.py index 1b9cded55cd786..e7d31e621aa069 100644 --- a/tests/sentry/deletions/test_alert_rule_trigger.py +++ b/tests/sentry/deletions/test_alert_rule_trigger.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.tasks.scheduled import run_scheduled_deletions from sentry.incidents.models.alert_rule import AlertRule, AlertRuleTrigger, AlertRuleTriggerAction from sentry.incidents.models.incident import IncidentTrigger, TriggerStatus diff --git a/tests/sentry/deletions/test_alert_rule_trigger_action.py b/tests/sentry/deletions/test_alert_rule_trigger_action.py index c5aa0cc803949d..d5176f328efd52 100644 --- a/tests/sentry/deletions/test_alert_rule_trigger_action.py +++ b/tests/sentry/deletions/test_alert_rule_trigger_action.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.tasks.scheduled import run_scheduled_deletions from sentry.incidents.models.alert_rule import AlertRuleTriggerAction from sentry.notifications.models.notificationmessage import NotificationMessage diff --git a/tests/sentry/deletions/test_apiapplication.py b/tests/sentry/deletions/test_apiapplication.py index ad8fdba1f61848..c047e21674ab93 100644 --- a/tests/sentry/deletions/test_apiapplication.py +++ b/tests/sentry/deletions/test_apiapplication.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.models.scheduleddeletion import ScheduledDeletion from sentry.deletions.tasks.hybrid_cloud import schedule_hybrid_cloud_foreign_key_jobs from sentry.deletions.tasks.scheduled import run_scheduled_deletions_control diff --git a/tests/sentry/deletions/test_artifactbundle.py b/tests/sentry/deletions/test_artifactbundle.py index e73f763aa67d38..4ba1a60f49cc5e 100644 --- a/tests/sentry/deletions/test_artifactbundle.py +++ b/tests/sentry/deletions/test_artifactbundle.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.tasks.scheduled import run_scheduled_deletions from sentry.models.artifactbundle import ( ArtifactBundle, diff --git a/tests/sentry/deletions/test_commit.py b/tests/sentry/deletions/test_commit.py index 69c3f6acbfb93e..e592ca44c35283 100644 --- a/tests/sentry/deletions/test_commit.py +++ b/tests/sentry/deletions/test_commit.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/deletions/test_data_source.py b/tests/sentry/deletions/test_data_source.py index ffa43f7bea36eb..eafc5a59afc5ae 100644 --- a/tests/sentry/deletions/test_data_source.py +++ b/tests/sentry/deletions/test_data_source.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.tasks.scheduled import run_scheduled_deletions from sentry.snuba.models import QuerySubscription from sentry.testutils.hybrid_cloud import HybridCloudTestMixin diff --git a/tests/sentry/deletions/test_debugfiles.py b/tests/sentry/deletions/test_debugfiles.py index 49d52edcacf6e7..1b231ed900c252 100644 --- a/tests/sentry/deletions/test_debugfiles.py +++ b/tests/sentry/deletions/test_debugfiles.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.tasks.scheduled import run_scheduled_deletions from sentry.models.debugfile import ProjectDebugFile from sentry.models.files.file import File diff --git a/tests/sentry/deletions/test_detector.py b/tests/sentry/deletions/test_detector.py index b4812e5da1427e..dd9931f3c34e2c 100644 --- a/tests/sentry/deletions/test_detector.py +++ b/tests/sentry/deletions/test_detector.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.constants import ObjectStatus diff --git a/tests/sentry/deletions/test_file.py b/tests/sentry/deletions/test_file.py index 2036354c548a44..243214f1f148a5 100644 --- a/tests/sentry/deletions/test_file.py +++ b/tests/sentry/deletions/test_file.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/deletions/test_group.py b/tests/sentry/deletions/test_group.py index 5cf32fb398a4da..9b2ec66745f651 100644 --- a/tests/sentry/deletions/test_group.py +++ b/tests/sentry/deletions/test_group.py @@ -2,7 +2,7 @@ import random from datetime import datetime, timedelta from time import time -from typing import Any +from typing import int, Any from unittest import mock from uuid import uuid4 diff --git a/tests/sentry/deletions/test_grouphash.py b/tests/sentry/deletions/test_grouphash.py index 6a10c2dc8f6443..a77c3bd041d456 100644 --- a/tests/sentry/deletions/test_grouphash.py +++ b/tests/sentry/deletions/test_grouphash.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from uuid import uuid4 diff --git a/tests/sentry/deletions/test_incident.py b/tests/sentry/deletions/test_incident.py index d75a602c5ccb89..bbd9ac68afde8e 100644 --- a/tests/sentry/deletions/test_incident.py +++ b/tests/sentry/deletions/test_incident.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from sentry.deletions.tasks.scheduled import run_scheduled_deletions diff --git a/tests/sentry/deletions/test_monitor.py b/tests/sentry/deletions/test_monitor.py index a77cee0753d81f..94b0b2ef2f786e 100644 --- a/tests/sentry/deletions/test_monitor.py +++ b/tests/sentry/deletions/test_monitor.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.tasks.scheduled import run_scheduled_deletions from sentry.models.environment import Environment from sentry.models.project import Project diff --git a/tests/sentry/deletions/test_monitor_environment.py b/tests/sentry/deletions/test_monitor_environment.py index d0aa8996aee9ff..f4f0332c1a955e 100644 --- a/tests/sentry/deletions/test_monitor_environment.py +++ b/tests/sentry/deletions/test_monitor_environment.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.deletions.tasks.scheduled import run_scheduled_deletions diff --git a/tests/sentry/deletions/test_organization.py b/tests/sentry/deletions/test_organization.py index 74e92ae135b8f5..9faf34031be5dd 100644 --- a/tests/sentry/deletions/test_organization.py +++ b/tests/sentry/deletions/test_organization.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import patch from uuid import uuid4 diff --git a/tests/sentry/deletions/test_organizationmember.py b/tests/sentry/deletions/test_organizationmember.py index e107197549dac5..883ebff48a2549 100644 --- a/tests/sentry/deletions/test_organizationmember.py +++ b/tests/sentry/deletions/test_organizationmember.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.tasks.scheduled import run_scheduled_deletions from sentry.models.organizationmember import OrganizationMember from sentry.testutils.cases import APITestCase, TransactionTestCase diff --git a/tests/sentry/deletions/test_project.py b/tests/sentry/deletions/test_project.py index 58871ea0ccef9a..31c2268382ade0 100644 --- a/tests/sentry/deletions/test_project.py +++ b/tests/sentry/deletions/test_project.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.constants import DataCategory diff --git a/tests/sentry/deletions/test_pullrequest.py b/tests/sentry/deletions/test_pullrequest.py index 8a8e1845f76e44..09aed14c531c2d 100644 --- a/tests/sentry/deletions/test_pullrequest.py +++ b/tests/sentry/deletions/test_pullrequest.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from django.utils import timezone diff --git a/tests/sentry/deletions/test_querysubscription.py b/tests/sentry/deletions/test_querysubscription.py index 95ce88296021d8..a9345804fc56e4 100644 --- a/tests/sentry/deletions/test_querysubscription.py +++ b/tests/sentry/deletions/test_querysubscription.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.tasks.scheduled import run_scheduled_deletions from sentry.snuba.models import QuerySubscription, SnubaQuery from sentry.testutils.hybrid_cloud import HybridCloudTestMixin diff --git a/tests/sentry/deletions/test_release.py b/tests/sentry/deletions/test_release.py index 627b826cd4b64b..268304d6be14c0 100644 --- a/tests/sentry/deletions/test_release.py +++ b/tests/sentry/deletions/test_release.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.tasks.hybrid_cloud import schedule_hybrid_cloud_foreign_key_jobs from sentry.deletions.tasks.scheduled import run_scheduled_deletions from sentry.models.environment import Environment diff --git a/tests/sentry/deletions/test_repository.py b/tests/sentry/deletions/test_repository.py index c07c84f4041446..a8fba340e3e4fe 100644 --- a/tests/sentry/deletions/test_repository.py +++ b/tests/sentry/deletions/test_repository.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.core import mail diff --git a/tests/sentry/deletions/test_rule.py b/tests/sentry/deletions/test_rule.py index 6273d992aeca01..3deefa9ffa0485 100644 --- a/tests/sentry/deletions/test_rule.py +++ b/tests/sentry/deletions/test_rule.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import ObjectStatus from sentry.deletions.tasks.scheduled import run_scheduled_deletions from sentry.models.grouprulestatus import GroupRuleStatus diff --git a/tests/sentry/deletions/test_rulefirehistory.py b/tests/sentry/deletions/test_rulefirehistory.py index d89114aeffa14b..01ac3e825c2ede 100644 --- a/tests/sentry/deletions/test_rulefirehistory.py +++ b/tests/sentry/deletions/test_rulefirehistory.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.tasks.scheduled import run_scheduled_deletions from sentry.models.rule import Rule from sentry.models.rulefirehistory import RuleFireHistory diff --git a/tests/sentry/deletions/test_sentry_app.py b/tests/sentry/deletions/test_sentry_app.py index 793a18cd3b8a32..28b50cae8faf4e 100644 --- a/tests/sentry/deletions/test_sentry_app.py +++ b/tests/sentry/deletions/test_sentry_app.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.db import connections, router diff --git a/tests/sentry/deletions/test_sentry_app_installations.py b/tests/sentry/deletions/test_sentry_app_installations.py index a35c33c52aee87..8be470a7e403be 100644 --- a/tests/sentry/deletions/test_sentry_app_installations.py +++ b/tests/sentry/deletions/test_sentry_app_installations.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.db import router from django.db.transaction import get_connection diff --git a/tests/sentry/deletions/test_sentry_installation_tokens.py b/tests/sentry/deletions/test_sentry_installation_tokens.py index e0111868de5257..61006cdf4c3e4b 100644 --- a/tests/sentry/deletions/test_sentry_installation_tokens.py +++ b/tests/sentry/deletions/test_sentry_installation_tokens.py @@ -1,3 +1,4 @@ +from typing import int from sentry import deletions from sentry.models.apitoken import ApiToken from sentry.sentry_apps.models.sentry_app_installation import SentryAppInstallation diff --git a/tests/sentry/deletions/test_team.py b/tests/sentry/deletions/test_team.py index 7c8acb2b983207..5ef79facd1afad 100644 --- a/tests/sentry/deletions/test_team.py +++ b/tests/sentry/deletions/test_team.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.tasks.scheduled import run_scheduled_deletions from sentry.models.project import Project from sentry.models.projectteam import ProjectTeam diff --git a/tests/sentry/deletions/test_validate_group_related_models.py b/tests/sentry/deletions/test_validate_group_related_models.py index 3a7b2a39d953c6..273f585e0f5404 100644 --- a/tests/sentry/deletions/test_validate_group_related_models.py +++ b/tests/sentry/deletions/test_validate_group_related_models.py @@ -1,3 +1,4 @@ +from typing import int """ Tests to ensure all models with group foreign keys are properly registered in group deletion configuration. diff --git a/tests/sentry/deletions/test_workflow.py b/tests/sentry/deletions/test_workflow.py index bfc974a295c998..4e94fbc9df2303 100644 --- a/tests/sentry/deletions/test_workflow.py +++ b/tests/sentry/deletions/test_workflow.py @@ -1,4 +1,4 @@ -from typing import ContextManager +from typing import int, ContextManager import pytest diff --git a/tests/sentry/demo_mode/test_tasks.py b/tests/sentry/demo_mode/test_tasks.py index 1d0f3ea5ae2af1..e658fc70599150 100644 --- a/tests/sentry/demo_mode/test_tasks.py +++ b/tests/sentry/demo_mode/test_tasks.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from unittest import mock from uuid import uuid1 diff --git a/tests/sentry/demo_mode/test_utils.py b/tests/sentry/demo_mode/test_utils.py index fb74ffeac30b40..5a5cf1041e7f98 100644 --- a/tests/sentry/demo_mode/test_utils.py +++ b/tests/sentry/demo_mode/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from sentry.demo_mode.utils import get_demo_org, get_demo_user, is_demo_org, is_demo_user diff --git a/tests/sentry/digests/backends/test_redis.py b/tests/sentry/digests/backends/test_redis.py index f0b74ffb043dc7..5f923f89117c1f 100644 --- a/tests/sentry/digests/backends/test_redis.py +++ b/tests/sentry/digests/backends/test_redis.py @@ -1,3 +1,4 @@ +from typing import int import time import uuid from functools import cached_property diff --git a/tests/sentry/digests/test_notifications.py b/tests/sentry/digests/test_notifications.py index cd14bdbc83ebb8..03708d0d624206 100644 --- a/tests/sentry/digests/test_notifications.py +++ b/tests/sentry/digests/test_notifications.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import uuid from functools import cached_property diff --git a/tests/sentry/digests/test_types.py b/tests/sentry/digests/test_types.py index a04960936dee8e..4a0bb480e137c3 100644 --- a/tests/sentry/digests/test_types.py +++ b/tests/sentry/digests/test_types.py @@ -1,3 +1,4 @@ +from typing import int import uuid from unittest import mock diff --git a/tests/sentry/digests/test_utilities.py b/tests/sentry/digests/test_utilities.py index 59856825b7ca40..645a4d0905741b 100644 --- a/tests/sentry/digests/test_utilities.py +++ b/tests/sentry/digests/test_utilities.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Iterable, Mapping, Sequence diff --git a/tests/sentry/discover/test_arithmetic.py b/tests/sentry/discover/test_arithmetic.py index ea09c521132b33..7989f7f43eeafe 100644 --- a/tests/sentry/discover/test_arithmetic.py +++ b/tests/sentry/discover/test_arithmetic.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.discover.arithmetic import ( diff --git a/tests/sentry/discover/test_compare_tables.py b/tests/sentry/discover/test_compare_tables.py index 5a8b7f5e18fcd7..dc4c8682dbd9e4 100644 --- a/tests/sentry/discover/test_compare_tables.py +++ b/tests/sentry/discover/test_compare_tables.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from uuid import uuid4 diff --git a/tests/sentry/discover/test_compare_timeseries.py b/tests/sentry/discover/test_compare_timeseries.py index b5568105e8a397..7807f4ab696cc9 100644 --- a/tests/sentry/discover/test_compare_timeseries.py +++ b/tests/sentry/discover/test_compare_timeseries.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from unittest import mock from uuid import uuid4 diff --git a/tests/sentry/discover/test_dashboard_widget_split.py b/tests/sentry/discover/test_dashboard_widget_split.py index cd5ca2a2335e6d..d28d08a9bb8a63 100644 --- a/tests/sentry/discover/test_dashboard_widget_split.py +++ b/tests/sentry/discover/test_dashboard_widget_split.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone import pytest diff --git a/tests/sentry/discover/test_dataset_split.py b/tests/sentry/discover/test_dataset_split.py index 95a07c9ae48391..86549a701575a4 100644 --- a/tests/sentry/discover/test_dataset_split.py +++ b/tests/sentry/discover/test_dataset_split.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone import pytest diff --git a/tests/sentry/discover/test_models.py b/tests/sentry/discover/test_models.py index da32e04b021bc5..7e433d785cfa95 100644 --- a/tests/sentry/discover/test_models.py +++ b/tests/sentry/discover/test_models.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.db import IntegrityError, router, transaction diff --git a/tests/sentry/discover/translation/test_mep_to_eap.py b/tests/sentry/discover/translation/test_mep_to_eap.py index 970b1d7611c2dd..6868c0ca38f9c5 100644 --- a/tests/sentry/discover/translation/test_mep_to_eap.py +++ b/tests/sentry/discover/translation/test_mep_to_eap.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.discover.translation.mep_to_eap import QueryParts, translate_mep_to_eap diff --git a/tests/sentry/dynamic_sampling/models/test_base.py b/tests/sentry/dynamic_sampling/models/test_base.py index b0340e69b43cec..cd8f1094842e09 100644 --- a/tests/sentry/dynamic_sampling/models/test_base.py +++ b/tests/sentry/dynamic_sampling/models/test_base.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.dynamic_sampling.models.base import InvalidModelInputError diff --git a/tests/sentry/dynamic_sampling/models/test_projects_rebalancing.py b/tests/sentry/dynamic_sampling/models/test_projects_rebalancing.py index 5f95ff455f6ec6..ab9890e48db6d0 100644 --- a/tests/sentry/dynamic_sampling/models/test_projects_rebalancing.py +++ b/tests/sentry/dynamic_sampling/models/test_projects_rebalancing.py @@ -1,3 +1,4 @@ +from typing import int from operator import attrgetter import pytest diff --git a/tests/sentry/dynamic_sampling/models/test_transactions_rebalancing.py b/tests/sentry/dynamic_sampling/models/test_transactions_rebalancing.py index 07bea7df0b518d..35e08035ec2376 100644 --- a/tests/sentry/dynamic_sampling/models/test_transactions_rebalancing.py +++ b/tests/sentry/dynamic_sampling/models/test_transactions_rebalancing.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping import pytest diff --git a/tests/sentry/dynamic_sampling/rules/biases/test_boost_environments_bias.py b/tests/sentry/dynamic_sampling/rules/biases/test_boost_environments_bias.py index e75ceb542b7d53..bce846a614f576 100644 --- a/tests/sentry/dynamic_sampling/rules/biases/test_boost_environments_bias.py +++ b/tests/sentry/dynamic_sampling/rules/biases/test_boost_environments_bias.py @@ -1,3 +1,4 @@ +from typing import int from sentry.dynamic_sampling import ENVIRONMENT_GLOBS from sentry.dynamic_sampling.rules.biases.boost_environments_bias import BoostEnvironmentsBias from sentry.testutils.pytest.fixtures import django_db_all diff --git a/tests/sentry/dynamic_sampling/rules/biases/test_boost_latest_releases_bias.py b/tests/sentry/dynamic_sampling/rules/biases/test_boost_latest_releases_bias.py index bf16364e3d30a7..abaef95383c6b2 100644 --- a/tests/sentry/dynamic_sampling/rules/biases/test_boost_latest_releases_bias.py +++ b/tests/sentry/dynamic_sampling/rules/biases/test_boost_latest_releases_bias.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import patch diff --git a/tests/sentry/dynamic_sampling/rules/biases/test_boost_low_volume_transactions_bias.py b/tests/sentry/dynamic_sampling/rules/biases/test_boost_low_volume_transactions_bias.py index 03f0d73341118b..2c02ededa03173 100644 --- a/tests/sentry/dynamic_sampling/rules/biases/test_boost_low_volume_transactions_bias.py +++ b/tests/sentry/dynamic_sampling/rules/biases/test_boost_low_volume_transactions_bias.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.dynamic_sampling import RESERVED_IDS, RuleType diff --git a/tests/sentry/dynamic_sampling/rules/biases/test_boost_replay_id_bias.py b/tests/sentry/dynamic_sampling/rules/biases/test_boost_replay_id_bias.py index 9611764d086003..c9a89ce147169f 100644 --- a/tests/sentry/dynamic_sampling/rules/biases/test_boost_replay_id_bias.py +++ b/tests/sentry/dynamic_sampling/rules/biases/test_boost_replay_id_bias.py @@ -1,3 +1,4 @@ +from typing import int from sentry.dynamic_sampling.rules.biases.boost_replay_id_bias import BoostReplayIdBias from sentry.testutils.pytest.fixtures import django_db_all diff --git a/tests/sentry/dynamic_sampling/rules/biases/test_custom_rule_bias.py b/tests/sentry/dynamic_sampling/rules/biases/test_custom_rule_bias.py index 6f08b16bc850a4..5be97f1a9c0e74 100644 --- a/tests/sentry/dynamic_sampling/rules/biases/test_custom_rule_bias.py +++ b/tests/sentry/dynamic_sampling/rules/biases/test_custom_rule_bias.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/dynamic_sampling/rules/biases/test_ignore_health_checks_bias.py b/tests/sentry/dynamic_sampling/rules/biases/test_ignore_health_checks_bias.py index c055b42061b673..7ccbc2b46af208 100644 --- a/tests/sentry/dynamic_sampling/rules/biases/test_ignore_health_checks_bias.py +++ b/tests/sentry/dynamic_sampling/rules/biases/test_ignore_health_checks_bias.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import HEALTH_CHECK_GLOBS from sentry.dynamic_sampling.rules.biases.ignore_health_checks_bias import ( IgnoreHealthChecksTraceBias, diff --git a/tests/sentry/dynamic_sampling/rules/biases/test_minimum_sample_rate_bias.py b/tests/sentry/dynamic_sampling/rules/biases/test_minimum_sample_rate_bias.py index 81d878bc261959..2c1096de86dcfa 100644 --- a/tests/sentry/dynamic_sampling/rules/biases/test_minimum_sample_rate_bias.py +++ b/tests/sentry/dynamic_sampling/rules/biases/test_minimum_sample_rate_bias.py @@ -1,3 +1,4 @@ +from typing import int from sentry.dynamic_sampling.rules.biases.minimum_sample_rate_bias import MinimumSampleRateBias from sentry.dynamic_sampling.rules.utils import RESERVED_IDS, RuleType from sentry.testutils.pytest.fixtures import django_db_all diff --git a/tests/sentry/dynamic_sampling/tasks/helpers/test_boost_low_volume_transactions.py b/tests/sentry/dynamic_sampling/tasks/helpers/test_boost_low_volume_transactions.py index b5fc579b7de580..93ea41e506aea0 100644 --- a/tests/sentry/dynamic_sampling/tasks/helpers/test_boost_low_volume_transactions.py +++ b/tests/sentry/dynamic_sampling/tasks/helpers/test_boost_low_volume_transactions.py @@ -1,3 +1,4 @@ +from typing import int from sentry.dynamic_sampling.models.common import RebalancedItem from sentry.dynamic_sampling.tasks.helpers.boost_low_volume_transactions import ( get_transactions_resampling_rates, diff --git a/tests/sentry/dynamic_sampling/tasks/helpers/test_recalibrate_orgs.py b/tests/sentry/dynamic_sampling/tasks/helpers/test_recalibrate_orgs.py index abb54ade14c24b..77a5a3bbcb0164 100644 --- a/tests/sentry/dynamic_sampling/tasks/helpers/test_recalibrate_orgs.py +++ b/tests/sentry/dynamic_sampling/tasks/helpers/test_recalibrate_orgs.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.dynamic_sampling.tasks.helpers.recalibrate_orgs import compute_adjusted_factor diff --git a/tests/sentry/dynamic_sampling/tasks/helpers/test_sample_rate.py b/tests/sentry/dynamic_sampling/tasks/helpers/test_sample_rate.py index fc2435e22e583b..08794f72a924b3 100644 --- a/tests/sentry/dynamic_sampling/tasks/helpers/test_sample_rate.py +++ b/tests/sentry/dynamic_sampling/tasks/helpers/test_sample_rate.py @@ -1,3 +1,4 @@ +from typing import int from sentry.dynamic_sampling.tasks.helpers.sample_rate import get_org_sample_rate from sentry.models.options.organization_option import OrganizationOption from sentry.testutils.cases import BaseMetricsLayerTestCase, SnubaTestCase, TestCase diff --git a/tests/sentry/dynamic_sampling/tasks/helpers/test_sliding_window.py b/tests/sentry/dynamic_sampling/tasks/helpers/test_sliding_window.py index 124417137fa2cd..0acd873ebc1059 100644 --- a/tests/sentry/dynamic_sampling/tasks/helpers/test_sliding_window.py +++ b/tests/sentry/dynamic_sampling/tasks/helpers/test_sliding_window.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.dynamic_sampling.tasks.helpers.sliding_window import extrapolate_monthly_volume diff --git a/tests/sentry/dynamic_sampling/tasks/test_boost_low_volume_projects.py b/tests/sentry/dynamic_sampling/tasks/test_boost_low_volume_projects.py index 7b562512b29218..ab6380f9bbf9cf 100644 --- a/tests/sentry/dynamic_sampling/tasks/test_boost_low_volume_projects.py +++ b/tests/sentry/dynamic_sampling/tasks/test_boost_low_volume_projects.py @@ -1,5 +1,5 @@ from datetime import datetime, timedelta -from typing import cast +from typing import int, cast from unittest.mock import patch from django.utils import timezone diff --git a/tests/sentry/dynamic_sampling/tasks/test_boost_low_volume_transactions.py b/tests/sentry/dynamic_sampling/tasks/test_boost_low_volume_transactions.py index 22eec1e735cf05..58ed4911d1a765 100644 --- a/tests/sentry/dynamic_sampling/tasks/test_boost_low_volume_transactions.py +++ b/tests/sentry/dynamic_sampling/tasks/test_boost_low_volume_transactions.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/dynamic_sampling/tasks/test_common.py b/tests/sentry/dynamic_sampling/tasks/test_common.py index 22655e6a9fff38..f0379a3936f7f4 100644 --- a/tests/sentry/dynamic_sampling/tasks/test_common.py +++ b/tests/sentry/dynamic_sampling/tasks/test_common.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/sentry/dynamic_sampling/tasks/test_custom_rule_notifications.py b/tests/sentry/dynamic_sampling/tasks/test_custom_rule_notifications.py index da10378b86d7da..05977855909383 100644 --- a/tests/sentry/dynamic_sampling/tasks/test_custom_rule_notifications.py +++ b/tests/sentry/dynamic_sampling/tasks/test_custom_rule_notifications.py @@ -1,3 +1,4 @@ +from typing import int import time from datetime import datetime, timedelta, timezone from unittest import mock diff --git a/tests/sentry/dynamic_sampling/tasks/test_tasks.py b/tests/sentry/dynamic_sampling/tasks/test_tasks.py index f927477f8f17ad..d562f57f0930c5 100644 --- a/tests/sentry/dynamic_sampling/tasks/test_tasks.py +++ b/tests/sentry/dynamic_sampling/tasks/test_tasks.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Callable from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/dynamic_sampling/test_generate_rules.py b/tests/sentry/dynamic_sampling/test_generate_rules.py index 226d1fbdfaaf68..54cb54d175bdc4 100644 --- a/tests/sentry/dynamic_sampling/test_generate_rules.py +++ b/tests/sentry/dynamic_sampling/test_generate_rules.py @@ -1,3 +1,4 @@ +from typing import int import time from datetime import datetime, timedelta, timezone from unittest.mock import MagicMock, patch diff --git a/tests/sentry/dynamic_sampling/test_utils.py b/tests/sentry/dynamic_sampling/test_utils.py index 465caf47ede62f..04c2143b687a01 100644 --- a/tests/sentry/dynamic_sampling/test_utils.py +++ b/tests/sentry/dynamic_sampling/test_utils.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.dynamic_sampling.rules.utils import apply_dynamic_factor diff --git a/tests/sentry/event_manager/grouping/test_assign_to_group.py b/tests/sentry/event_manager/grouping/test_assign_to_group.py index 6636079a920990..cccb0c7410c39e 100644 --- a/tests/sentry/event_manager/grouping/test_assign_to_group.py +++ b/tests/sentry/event_manager/grouping/test_assign_to_group.py @@ -2,7 +2,7 @@ from contextlib import contextmanager from time import time -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/event_manager/grouping/test_group_creation_lock.py b/tests/sentry/event_manager/grouping/test_group_creation_lock.py index db681c0c9e1478..aecf224391384d 100644 --- a/tests/sentry/event_manager/grouping/test_group_creation_lock.py +++ b/tests/sentry/event_manager/grouping/test_group_creation_lock.py @@ -1,3 +1,4 @@ +from typing import int import contextlib import time from threading import Thread diff --git a/tests/sentry/event_manager/grouping/test_grouphash_metadata.py b/tests/sentry/event_manager/grouping/test_grouphash_metadata.py index 8c4a7aab150dcf..90186f6b3b736a 100644 --- a/tests/sentry/event_manager/grouping/test_grouphash_metadata.py +++ b/tests/sentry/event_manager/grouping/test_grouphash_metadata.py @@ -2,7 +2,7 @@ from datetime import timedelta from time import time -from typing import Any +from typing import int, Any from unittest.mock import ANY, MagicMock, patch from django.utils import timezone diff --git a/tests/sentry/event_manager/grouping/test_seer_grouping.py b/tests/sentry/event_manager/grouping/test_seer_grouping.py index 37a097e1cf6a73..53714046a5a651 100644 --- a/tests/sentry/event_manager/grouping/test_seer_grouping.py +++ b/tests/sentry/event_manager/grouping/test_seer_grouping.py @@ -1,6 +1,6 @@ from datetime import datetime from time import time -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch from sentry.grouping.ingest.grouphash_metadata import create_or_update_grouphash_metadata_if_needed diff --git a/tests/sentry/event_manager/interfaces/test_breadcrumbs.py b/tests/sentry/event_manager/interfaces/test_breadcrumbs.py index 48c0118607882a..6d652c1e83fd76 100644 --- a/tests/sentry/event_manager/interfaces/test_breadcrumbs.py +++ b/tests/sentry/event_manager/interfaces/test_breadcrumbs.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/interfaces/test_contexts.py b/tests/sentry/event_manager/interfaces/test_contexts.py index acc86444d45f23..6ee0db09c267ce 100644 --- a/tests/sentry/event_manager/interfaces/test_contexts.py +++ b/tests/sentry/event_manager/interfaces/test_contexts.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/interfaces/test_csp.py b/tests/sentry/event_manager/interfaces/test_csp.py index b8310780343ca4..cf1342fef88ad3 100644 --- a/tests/sentry/event_manager/interfaces/test_csp.py +++ b/tests/sentry/event_manager/interfaces/test_csp.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager, get_event_type, materialize_metadata diff --git a/tests/sentry/event_manager/interfaces/test_debug_meta.py b/tests/sentry/event_manager/interfaces/test_debug_meta.py index 5931a754245533..9b72711ffb9386 100644 --- a/tests/sentry/event_manager/interfaces/test_debug_meta.py +++ b/tests/sentry/event_manager/interfaces/test_debug_meta.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/interfaces/test_exception.py b/tests/sentry/event_manager/interfaces/test_exception.py index 1af49de7d71a85..0b76f8e82e28ca 100644 --- a/tests/sentry/event_manager/interfaces/test_exception.py +++ b/tests/sentry/event_manager/interfaces/test_exception.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/interfaces/test_expectct.py b/tests/sentry/event_manager/interfaces/test_expectct.py index d66bf71b0106ad..3af66725e00cb6 100644 --- a/tests/sentry/event_manager/interfaces/test_expectct.py +++ b/tests/sentry/event_manager/interfaces/test_expectct.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager, get_event_type, materialize_metadata diff --git a/tests/sentry/event_manager/interfaces/test_expectstaple.py b/tests/sentry/event_manager/interfaces/test_expectstaple.py index af555068674430..8260cc4d490272 100644 --- a/tests/sentry/event_manager/interfaces/test_expectstaple.py +++ b/tests/sentry/event_manager/interfaces/test_expectstaple.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager, get_event_type, materialize_metadata diff --git a/tests/sentry/event_manager/interfaces/test_frame.py b/tests/sentry/event_manager/interfaces/test_frame.py index e81235eddfb1ae..50ee89be16dc94 100644 --- a/tests/sentry/event_manager/interfaces/test_frame.py +++ b/tests/sentry/event_manager/interfaces/test_frame.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/interfaces/test_geo.py b/tests/sentry/event_manager/interfaces/test_geo.py index bcb7b83b3ba968..093148e3df4e0f 100644 --- a/tests/sentry/event_manager/interfaces/test_geo.py +++ b/tests/sentry/event_manager/interfaces/test_geo.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/interfaces/test_http.py b/tests/sentry/event_manager/interfaces/test_http.py index 56dca8b9d02097..2f2581c69db7c9 100644 --- a/tests/sentry/event_manager/interfaces/test_http.py +++ b/tests/sentry/event_manager/interfaces/test_http.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/interfaces/test_mechanism.py b/tests/sentry/event_manager/interfaces/test_mechanism.py index 5d29e913fb8351..69a65a98e28ad6 100644 --- a/tests/sentry/event_manager/interfaces/test_mechanism.py +++ b/tests/sentry/event_manager/interfaces/test_mechanism.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/interfaces/test_message.py b/tests/sentry/event_manager/interfaces/test_message.py index ee94a89a20e456..1dba5719aad739 100644 --- a/tests/sentry/event_manager/interfaces/test_message.py +++ b/tests/sentry/event_manager/interfaces/test_message.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/interfaces/test_sdk.py b/tests/sentry/event_manager/interfaces/test_sdk.py index 6978ede77fa46a..5cc00ce1a0b5c5 100644 --- a/tests/sentry/event_manager/interfaces/test_sdk.py +++ b/tests/sentry/event_manager/interfaces/test_sdk.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/interfaces/test_single_exception.py b/tests/sentry/event_manager/interfaces/test_single_exception.py index ef11c7be3ec624..99f5743b043fb4 100644 --- a/tests/sentry/event_manager/interfaces/test_single_exception.py +++ b/tests/sentry/event_manager/interfaces/test_single_exception.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/interfaces/test_spans.py b/tests/sentry/event_manager/interfaces/test_spans.py index 7a420e538a9701..458e631fbb7587 100644 --- a/tests/sentry/event_manager/interfaces/test_spans.py +++ b/tests/sentry/event_manager/interfaces/test_spans.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/interfaces/test_stacktrace.py b/tests/sentry/event_manager/interfaces/test_stacktrace.py index 9ec5fab49a394a..bd88848bec464e 100644 --- a/tests/sentry/event_manager/interfaces/test_stacktrace.py +++ b/tests/sentry/event_manager/interfaces/test_stacktrace.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/event_manager/interfaces/test_template.py b/tests/sentry/event_manager/interfaces/test_template.py index 1648ba7754c074..09c8e1249cea36 100644 --- a/tests/sentry/event_manager/interfaces/test_template.py +++ b/tests/sentry/event_manager/interfaces/test_template.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/interfaces/test_threads.py b/tests/sentry/event_manager/interfaces/test_threads.py index 4abfc958fef7ce..17a31c656a33b5 100644 --- a/tests/sentry/event_manager/interfaces/test_threads.py +++ b/tests/sentry/event_manager/interfaces/test_threads.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/interfaces/test_user.py b/tests/sentry/event_manager/interfaces/test_user.py index 3eea247f3c1355..a3be8b8fb6cf55 100644 --- a/tests/sentry/event_manager/interfaces/test_user.py +++ b/tests/sentry/event_manager/interfaces/test_user.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.event_manager import EventManager diff --git a/tests/sentry/event_manager/test_ensure_has_ip.py b/tests/sentry/event_manager/test_ensure_has_ip.py index 7e53c9202b4691..2303b9b392c0fb 100644 --- a/tests/sentry/event_manager/test_ensure_has_ip.py +++ b/tests/sentry/event_manager/test_ensure_has_ip.py @@ -1,3 +1,4 @@ +from typing import int from sentry.event_manager import EventManager from sentry.testutils.pytest.fixtures import django_db_all diff --git a/tests/sentry/event_manager/test_event_manager.py b/tests/sentry/event_manager/test_event_manager.py index 22d91b980a8ed3..d9d65e2ce43c6d 100644 --- a/tests/sentry/event_manager/test_event_manager.py +++ b/tests/sentry/event_manager/test_event_manager.py @@ -5,7 +5,7 @@ from collections.abc import Mapping from datetime import UTC, datetime, timedelta from time import time -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import MagicMock, patch diff --git a/tests/sentry/event_manager/test_event_manager_grouping.py b/tests/sentry/event_manager/test_event_manager_grouping.py index bffad524167049..d6aab4922e2182 100644 --- a/tests/sentry/event_manager/test_event_manager_grouping.py +++ b/tests/sentry/event_manager/test_event_manager_grouping.py @@ -1,7 +1,7 @@ from __future__ import annotations from time import time -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import ANY, MagicMock, patch diff --git a/tests/sentry/event_manager/test_generate_culprit.py b/tests/sentry/event_manager/test_generate_culprit.py index 5f4623485a2f21..970cc22abe0a1d 100644 --- a/tests/sentry/event_manager/test_generate_culprit.py +++ b/tests/sentry/event_manager/test_generate_culprit.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.constants import MAX_CULPRIT_LENGTH from sentry.culprit import generate_culprit diff --git a/tests/sentry/event_manager/test_normalization.py b/tests/sentry/event_manager/test_normalization.py index b3bd6e5efbb9c6..3311e474f9b539 100644 --- a/tests/sentry/event_manager/test_normalization.py +++ b/tests/sentry/event_manager/test_normalization.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import datetime diff --git a/tests/sentry/event_manager/test_priority.py b/tests/sentry/event_manager/test_priority.py index 0467b249904267..ac051dfea8f5ea 100644 --- a/tests/sentry/event_manager/test_priority.py +++ b/tests/sentry/event_manager/test_priority.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import logging from unittest.mock import MagicMock, patch diff --git a/tests/sentry/event_manager/test_project_platform_infer.py b/tests/sentry/event_manager/test_project_platform_infer.py index bb0318068aa929..8590de49255237 100644 --- a/tests/sentry/event_manager/test_project_platform_infer.py +++ b/tests/sentry/event_manager/test_project_platform_infer.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestCase from sentry.testutils.helpers.eventprocessing import save_new_event diff --git a/tests/sentry/event_manager/test_severity.py b/tests/sentry/event_manager/test_severity.py index 6aa8d9efed4cf4..4fd0e24f28abb1 100644 --- a/tests/sentry/event_manager/test_severity.py +++ b/tests/sentry/event_manager/test_severity.py @@ -1,7 +1,7 @@ from __future__ import annotations import uuid -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/event_manager/test_validate_data.py b/tests/sentry/event_manager/test_validate_data.py index b550d9e90d4d95..8c7dac6eaff7c3 100644 --- a/tests/sentry/event_manager/test_validate_data.py +++ b/tests/sentry/event_manager/test_validate_data.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/sentry/eventstream/kafka/test_dispatch.py b/tests/sentry/eventstream/kafka/test_dispatch.py index c80420df76b84b..e8dc53f13d0802 100644 --- a/tests/sentry/eventstream/kafka/test_dispatch.py +++ b/tests/sentry/eventstream/kafka/test_dispatch.py @@ -1,3 +1,4 @@ +from typing import int import time from datetime import datetime from unittest.mock import Mock, patch diff --git a/tests/sentry/eventstream/kafka/test_protocol.py b/tests/sentry/eventstream/kafka/test_protocol.py index 185296d71d1b41..c35524f34e1ae0 100644 --- a/tests/sentry/eventstream/kafka/test_protocol.py +++ b/tests/sentry/eventstream/kafka/test_protocol.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.eventstream.kafka.protocol import ( diff --git a/tests/sentry/eventstream/test_eap.py b/tests/sentry/eventstream/test_eap.py index f053c6849ca485..0b4df369cdb657 100644 --- a/tests/sentry/eventstream/test_eap.py +++ b/tests/sentry/eventstream/test_eap.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import pytest diff --git a/tests/sentry/eventstream/test_eventstream.py b/tests/sentry/eventstream/test_eventstream.py index 52182b729e621a..3425f34c0f54bf 100644 --- a/tests/sentry/eventstream/test_eventstream.py +++ b/tests/sentry/eventstream/test_eventstream.py @@ -1,3 +1,4 @@ +from typing import int import logging import time import uuid diff --git a/tests/sentry/eventstream/test_item_helpers.py b/tests/sentry/eventstream/test_item_helpers.py index 76e8df8fef8515..de681d9c85dc03 100644 --- a/tests/sentry/eventstream/test_item_helpers.py +++ b/tests/sentry/eventstream/test_item_helpers.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry_protos.snuba.v1.request_common_pb2 import TRACE_ITEM_TYPE_OCCURRENCE from sentry_protos.snuba.v1.trace_item_pb2 import AnyValue, ArrayValue, KeyValue, KeyValueList diff --git a/tests/sentry/eventtypes/test_default.py b/tests/sentry/eventtypes/test_default.py index 629dc7850e0d97..e8b26977068f18 100644 --- a/tests/sentry/eventtypes/test_default.py +++ b/tests/sentry/eventtypes/test_default.py @@ -1,3 +1,4 @@ +from typing import int from sentry.eventtypes.base import DefaultEvent from sentry.testutils.cases import TestCase diff --git a/tests/sentry/eventtypes/test_error.py b/tests/sentry/eventtypes/test_error.py index d28a4a74cf4f2e..5ff54fa804a0f9 100644 --- a/tests/sentry/eventtypes/test_error.py +++ b/tests/sentry/eventtypes/test_error.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from unittest import TestCase from sentry.eventtypes.error import ErrorEvent diff --git a/tests/sentry/eventtypes/test_feedback.py b/tests/sentry/eventtypes/test_feedback.py index b8cd373b8dc3c3..6b09b72ff686f2 100644 --- a/tests/sentry/eventtypes/test_feedback.py +++ b/tests/sentry/eventtypes/test_feedback.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest import TestCase diff --git a/tests/sentry/eventtypes/test_nel.py b/tests/sentry/eventtypes/test_nel.py index 0c330aac9f1209..9d80f74cf9522a 100644 --- a/tests/sentry/eventtypes/test_nel.py +++ b/tests/sentry/eventtypes/test_nel.py @@ -1,3 +1,4 @@ +from typing import int from sentry.eventtypes.nel import NelEvent from sentry.testutils.cases import TestCase diff --git a/tests/sentry/explore/endpoints/test_explore_saved_queries.py b/tests/sentry/explore/endpoints/test_explore_saved_queries.py index cb42fe61045da8..9a28d9c29948ce 100644 --- a/tests/sentry/explore/endpoints/test_explore_saved_queries.py +++ b/tests/sentry/explore/endpoints/test_explore_saved_queries.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from rest_framework.exceptions import ErrorDetail diff --git a/tests/sentry/explore/endpoints/test_explore_saved_query_detail.py b/tests/sentry/explore/endpoints/test_explore_saved_query_detail.py index 47811889df30f2..c52183182e18c5 100644 --- a/tests/sentry/explore/endpoints/test_explore_saved_query_detail.py +++ b/tests/sentry/explore/endpoints/test_explore_saved_query_detail.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.urls import NoReverseMatch, reverse diff --git a/tests/sentry/explore/endpoints/test_explore_saved_query_starred.py b/tests/sentry/explore/endpoints/test_explore_saved_query_starred.py index aedfd73edb01af..2233b060348a3f 100644 --- a/tests/sentry/explore/endpoints/test_explore_saved_query_starred.py +++ b/tests/sentry/explore/endpoints/test_explore_saved_query_starred.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.explore.models import ExploreSavedQuery, ExploreSavedQueryStarred diff --git a/tests/sentry/explore/endpoints/test_explore_saved_query_starred_order.py b/tests/sentry/explore/endpoints/test_explore_saved_query_starred_order.py index fc128d3d90f4dd..f867aa1efc1003 100644 --- a/tests/sentry/explore/endpoints/test_explore_saved_query_starred_order.py +++ b/tests/sentry/explore/endpoints/test_explore_saved_query_starred_order.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.explore.models import ExploreSavedQuery, ExploreSavedQueryStarred diff --git a/tests/sentry/explore/translation/test_alerts_translation.py b/tests/sentry/explore/translation/test_alerts_translation.py index 707fdb39878cd4..ff2f7da6db2351 100644 --- a/tests/sentry/explore/translation/test_alerts_translation.py +++ b/tests/sentry/explore/translation/test_alerts_translation.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import patch diff --git a/tests/sentry/explore/translation/test_dashboards_translation.py b/tests/sentry/explore/translation/test_dashboards_translation.py index e09ca5295ffe5c..4efc5dc5eafaf6 100644 --- a/tests/sentry/explore/translation/test_dashboards_translation.py +++ b/tests/sentry/explore/translation/test_dashboards_translation.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime import pytest diff --git a/tests/sentry/explore/translation/test_discover_translation.py b/tests/sentry/explore/translation/test_discover_translation.py index c2ef605f184cca..06da559d21f641 100644 --- a/tests/sentry/explore/translation/test_discover_translation.py +++ b/tests/sentry/explore/translation/test_discover_translation.py @@ -1,3 +1,4 @@ +from typing import int from sentry.discover.models import DiscoverSavedQuery, DiscoverSavedQueryTypes from sentry.explore.models import ExploreSavedQuery, ExploreSavedQueryDataset from sentry.explore.translation.discover_translation import ( diff --git a/tests/sentry/features/test_flagpole_context.py b/tests/sentry/features/test_flagpole_context.py index 0c2f20ca68b5a4..a3aa763f37a29b 100644 --- a/tests/sentry/features/test_flagpole_context.py +++ b/tests/sentry/features/test_flagpole_context.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.contrib.auth.models import AnonymousUser diff --git a/tests/sentry/features/test_manager.py b/tests/sentry/features/test_manager.py index a3ed1d1624640a..648b0bed8b8fb4 100644 --- a/tests/sentry/features/test_manager.py +++ b/tests/sentry/features/test_manager.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import mock from django.conf import settings diff --git a/tests/sentry/feedback/__init__.py b/tests/sentry/feedback/__init__.py index ebafa3b7e6ca18..24fa0c40899569 100644 --- a/tests/sentry/feedback/__init__.py +++ b/tests/sentry/feedback/__init__.py @@ -1,5 +1,5 @@ from datetime import UTC, datetime, timedelta -from typing import Any +from typing import int, Any from sentry.utils import json diff --git a/tests/sentry/feedback/endpoints/test_error_page_embed.py b/tests/sentry/feedback/endpoints/test_error_page_embed.py index 1b16eb6cfa53cc..bc9ea702dc9ebb 100644 --- a/tests/sentry/feedback/endpoints/test_error_page_embed.py +++ b/tests/sentry/feedback/endpoints/test_error_page_embed.py @@ -1,3 +1,4 @@ +from typing import int import logging from unittest import mock from urllib.parse import quote, urlencode diff --git a/tests/sentry/feedback/endpoints/test_organization_feedback_categories.py b/tests/sentry/feedback/endpoints/test_organization_feedback_categories.py index 76661bee9b1d93..fbad9c24e51248 100644 --- a/tests/sentry/feedback/endpoints/test_organization_feedback_categories.py +++ b/tests/sentry/feedback/endpoints/test_organization_feedback_categories.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from unittest.mock import patch diff --git a/tests/sentry/feedback/endpoints/test_organization_feedback_summary.py b/tests/sentry/feedback/endpoints/test_organization_feedback_summary.py index 4a1d4ceaf851dd..dba7cf3c76018d 100644 --- a/tests/sentry/feedback/endpoints/test_organization_feedback_summary.py +++ b/tests/sentry/feedback/endpoints/test_organization_feedback_summary.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/feedback/endpoints/test_organization_user_reports.py b/tests/sentry/feedback/endpoints/test_organization_user_reports.py index 80f7b5eae0d422..84a0fcde6381af 100644 --- a/tests/sentry/feedback/endpoints/test_organization_user_reports.py +++ b/tests/sentry/feedback/endpoints/test_organization_user_reports.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/feedback/endpoints/test_project_user_reports.py b/tests/sentry/feedback/endpoints/test_project_user_reports.py index 5f6cd9810d5679..818d5fd74fc6ca 100644 --- a/tests/sentry/feedback/endpoints/test_project_user_reports.py +++ b/tests/sentry/feedback/endpoints/test_project_user_reports.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch from uuid import uuid4 diff --git a/tests/sentry/feedback/lib/test_feedback_utils.py b/tests/sentry/feedback/lib/test_feedback_utils.py index 49a9bb0808da5c..9b3ca94b7dc447 100644 --- a/tests/sentry/feedback/lib/test_feedback_utils.py +++ b/tests/sentry/feedback/lib/test_feedback_utils.py @@ -1,3 +1,4 @@ +from typing import int from sentry.feedback.lib.utils import is_in_feedback_denylist from sentry.testutils.pytest.fixtures import django_db_all diff --git a/tests/sentry/feedback/lib/test_label_query.py b/tests/sentry/feedback/lib/test_label_query.py index b4ab9e1d6335b3..ca33c9161561be 100644 --- a/tests/sentry/feedback/lib/test_label_query.py +++ b/tests/sentry/feedback/lib/test_label_query.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime import pytest diff --git a/tests/sentry/feedback/tasks/test_update_user_reports.py b/tests/sentry/feedback/tasks/test_update_user_reports.py index 3ce518be7b6ade..35d9b5eda268ff 100644 --- a/tests/sentry/feedback/tasks/test_update_user_reports.py +++ b/tests/sentry/feedback/tasks/test_update_user_reports.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/feedback/usecases/conftest.py b/tests/sentry/feedback/usecases/conftest.py index f8e8a4d7b983cf..dba77283edd7a1 100644 --- a/tests/sentry/feedback/usecases/conftest.py +++ b/tests/sentry/feedback/usecases/conftest.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from unittest import mock diff --git a/tests/sentry/feedback/usecases/ingest/test_create_feedback.py b/tests/sentry/feedback/usecases/ingest/test_create_feedback.py index 335108d484784a..b3d37f2acdf647 100644 --- a/tests/sentry/feedback/usecases/ingest/test_create_feedback.py +++ b/tests/sentry/feedback/usecases/ingest/test_create_feedback.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import UTC, datetime -from typing import Any +from typing import int, Any from unittest.mock import patch import pytest diff --git a/tests/sentry/feedback/usecases/ingest/test_save_event_feedback.py b/tests/sentry/feedback/usecases/ingest/test_save_event_feedback.py index c6e6fe3d78d501..0e50fe70281282 100644 --- a/tests/sentry/feedback/usecases/ingest/test_save_event_feedback.py +++ b/tests/sentry/feedback/usecases/ingest/test_save_event_feedback.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime from unittest import mock diff --git a/tests/sentry/feedback/usecases/ingest/test_shim_to_feedback.py b/tests/sentry/feedback/usecases/ingest/test_shim_to_feedback.py index 7b78c006451637..7fd22835e94b95 100644 --- a/tests/sentry/feedback/usecases/ingest/test_shim_to_feedback.py +++ b/tests/sentry/feedback/usecases/ingest/test_shim_to_feedback.py @@ -1,3 +1,4 @@ +from typing import int """ shim_to_feedback unit tests. Integration testing is done in test_create_feedback, test_project_user_reports, test_post_process, and test_update_user_reports. """ diff --git a/tests/sentry/feedback/usecases/ingest/test_userreport.py b/tests/sentry/feedback/usecases/ingest/test_userreport.py index 510143f50c45e0..30abd009317cab 100644 --- a/tests/sentry/feedback/usecases/ingest/test_userreport.py +++ b/tests/sentry/feedback/usecases/ingest/test_userreport.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/feedback/usecases/test_label_generation.py b/tests/sentry/feedback/usecases/test_label_generation.py index 8104b8c1b47738..a44df689a38b04 100644 --- a/tests/sentry/feedback/usecases/test_label_generation.py +++ b/tests/sentry/feedback/usecases/test_label_generation.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import pytest diff --git a/tests/sentry/feedback/usecases/test_spam_detection.py b/tests/sentry/feedback/usecases/test_spam_detection.py index 7497d07de19d1d..043ac364041ef4 100644 --- a/tests/sentry/feedback/usecases/test_spam_detection.py +++ b/tests/sentry/feedback/usecases/test_spam_detection.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import pytest diff --git a/tests/sentry/feedback/usecases/test_title_generation.py b/tests/sentry/feedback/usecases/test_title_generation.py index b201417e4010e4..fa51d4bf01326c 100644 --- a/tests/sentry/feedback/usecases/test_title_generation.py +++ b/tests/sentry/feedback/usecases/test_title_generation.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest.mock import patch diff --git a/tests/sentry/flags/endpoints/test_hooks.py b/tests/sentry/flags/endpoints/test_hooks.py index 7e0c88acd2c5cb..8568b2d363c782 100644 --- a/tests/sentry/flags/endpoints/test_hooks.py +++ b/tests/sentry/flags/endpoints/test_hooks.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, call, patch from django.urls import reverse diff --git a/tests/sentry/flags/endpoints/test_logs.py b/tests/sentry/flags/endpoints/test_logs.py index 7b156d1c8ba6a9..64b5295b36a478 100644 --- a/tests/sentry/flags/endpoints/test_logs.py +++ b/tests/sentry/flags/endpoints/test_logs.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from django.urls import reverse diff --git a/tests/sentry/flags/endpoints/test_secrets.py b/tests/sentry/flags/endpoints/test_secrets.py index a117f4d6e4c44f..6b9d18fbf8a759 100644 --- a/tests/sentry/flags/endpoints/test_secrets.py +++ b/tests/sentry/flags/endpoints/test_secrets.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.flags.models import FlagWebHookSigningSecretModel diff --git a/tests/sentry/flags/providers/test_generic.py b/tests/sentry/flags/providers/test_generic.py index 6c0c95c79ced70..b157364298e137 100644 --- a/tests/sentry/flags/providers/test_generic.py +++ b/tests/sentry/flags/providers/test_generic.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from sentry.flags.models import PROVIDER_MAP diff --git a/tests/sentry/flags/providers/test_launchdarkly.py b/tests/sentry/flags/providers/test_launchdarkly.py index 5a93ef01207ed6..4d1a16e813a158 100644 --- a/tests/sentry/flags/providers/test_launchdarkly.py +++ b/tests/sentry/flags/providers/test_launchdarkly.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.utils import timezone from rest_framework.exceptions import ErrorDetail diff --git a/tests/sentry/flags/providers/test_statsig.py b/tests/sentry/flags/providers/test_statsig.py index 2f05891a8c7f4b..6f28cfafe9f412 100644 --- a/tests/sentry/flags/providers/test_statsig.py +++ b/tests/sentry/flags/providers/test_statsig.py @@ -1,3 +1,4 @@ +from typing import int import datetime import pytest diff --git a/tests/sentry/flags/providers/test_unleash.py b/tests/sentry/flags/providers/test_unleash.py index cf70d68cbb542b..cc1e0c79e61099 100644 --- a/tests/sentry/flags/providers/test_unleash.py +++ b/tests/sentry/flags/providers/test_unleash.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from sentry.flags.models import PROVIDER_MAP diff --git a/tests/sentry/flags/test_audit_log_presenter.py b/tests/sentry/flags/test_audit_log_presenter.py index e7b02121eff3d5..bf782146af01cc 100644 --- a/tests/sentry/flags/test_audit_log_presenter.py +++ b/tests/sentry/flags/test_audit_log_presenter.py @@ -1,3 +1,4 @@ +from typing import int from sentry.flags.models import ACTION_MAP, CREATED_BY_TYPE_MAP, FlagAuditLogModel from sentry.runner.commands.presenters.audit_log_presenter import AuditLogPresenter from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/grouping/__init__.py b/tests/sentry/grouping/__init__.py index 54c7483da639af..63cb1a44608ab3 100644 --- a/tests/sentry/grouping/__init__.py +++ b/tests/sentry/grouping/__init__.py @@ -4,7 +4,7 @@ import os from collections.abc import Callable, Iterable, MutableMapping from os import path -from typing import Any +from typing import int, Any from unittest import mock import orjson diff --git a/tests/sentry/grouping/enhancements/test_hints.py b/tests/sentry/grouping/enhancements/test_hints.py index d0b380b90650c6..73d112162bb52b 100644 --- a/tests/sentry/grouping/enhancements/test_hints.py +++ b/tests/sentry/grouping/enhancements/test_hints.py @@ -1,7 +1,7 @@ from __future__ import annotations from dataclasses import dataclass -from typing import Literal +from typing import int, Literal import pytest diff --git a/tests/sentry/grouping/seer_similarity/test_get_seer_similar_issues.py b/tests/sentry/grouping/seer_similarity/test_get_seer_similar_issues.py index 7e0f62549726ab..7cc72962cf6fa3 100644 --- a/tests/sentry/grouping/seer_similarity/test_get_seer_similar_issues.py +++ b/tests/sentry/grouping/seer_similarity/test_get_seer_similar_issues.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, call, patch from sentry import options diff --git a/tests/sentry/grouping/seer_similarity/test_seer.py b/tests/sentry/grouping/seer_similarity/test_seer.py index 3306f28b7ed02b..5012d37b436c08 100644 --- a/tests/sentry/grouping/seer_similarity/test_seer.py +++ b/tests/sentry/grouping/seer_similarity/test_seer.py @@ -1,3 +1,4 @@ +from typing import int from time import time from unittest.mock import ANY, MagicMock, patch diff --git a/tests/sentry/grouping/seer_similarity/test_seer_eligibility.py b/tests/sentry/grouping/seer_similarity/test_seer_eligibility.py index 0d693a88e59fd6..ffd07d09b11631 100644 --- a/tests/sentry/grouping/seer_similarity/test_seer_eligibility.py +++ b/tests/sentry/grouping/seer_similarity/test_seer_eligibility.py @@ -1,5 +1,5 @@ from time import time -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch from uuid import uuid1 diff --git a/tests/sentry/grouping/seer_similarity/test_training_mode.py b/tests/sentry/grouping/seer_similarity/test_training_mode.py index eadd6a08436fe6..7b38caac7161de 100644 --- a/tests/sentry/grouping/seer_similarity/test_training_mode.py +++ b/tests/sentry/grouping/seer_similarity/test_training_mode.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from sentry.grouping.ingest.seer import maybe_send_seer_for_new_model_training diff --git a/tests/sentry/grouping/test_benchmark.py b/tests/sentry/grouping/test_benchmark.py index df13bbf72e0899..bf4f6d0649a41f 100644 --- a/tests/sentry/grouping/test_benchmark.py +++ b/tests/sentry/grouping/test_benchmark.py @@ -1,5 +1,5 @@ from types import ModuleType -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/grouping/test_builtin_fingerprinting.py b/tests/sentry/grouping/test_builtin_fingerprinting.py index 87516999795743..9b286f98599553 100644 --- a/tests/sentry/grouping/test_builtin_fingerprinting.py +++ b/tests/sentry/grouping/test_builtin_fingerprinting.py @@ -1,7 +1,7 @@ from __future__ import annotations from pathlib import Path -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/grouping/test_categorization.py b/tests/sentry/grouping/test_categorization.py index d5c7dbd0f8198f..07d75a58d5e95d 100644 --- a/tests/sentry/grouping/test_categorization.py +++ b/tests/sentry/grouping/test_categorization.py @@ -51,7 +51,7 @@ import uuid from collections.abc import Callable, Generator from contextlib import _GeneratorContextManager, contextmanager -from typing import Any +from typing import int, Any import pytest from django.utils.functional import cached_property diff --git a/tests/sentry/grouping/test_components.py b/tests/sentry/grouping/test_components.py index 17e142dec9a5c3..d538f60baa0717 100644 --- a/tests/sentry/grouping/test_components.py +++ b/tests/sentry/grouping/test_components.py @@ -1,5 +1,5 @@ from collections import Counter -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/grouping/test_enhancer.py b/tests/sentry/grouping/test_enhancer.py index 88776119a2bec8..18e13994699237 100644 --- a/tests/sentry/grouping/test_enhancer.py +++ b/tests/sentry/grouping/test_enhancer.py @@ -2,7 +2,7 @@ from collections.abc import Sequence from dataclasses import dataclass -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import MagicMock, patch diff --git a/tests/sentry/grouping/test_enhancer_dart_flutter_javascript.py b/tests/sentry/grouping/test_enhancer_dart_flutter_javascript.py index a27db0acab5199..4c1a0b5f687509 100644 --- a/tests/sentry/grouping/test_enhancer_dart_flutter_javascript.py +++ b/tests/sentry/grouping/test_enhancer_dart_flutter_javascript.py @@ -5,7 +5,7 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.grouping.enhancer import ENHANCEMENT_BASES from sentry.testutils.cases import TestCase diff --git a/tests/sentry/grouping/test_enhancer_dart_flutter_native.py b/tests/sentry/grouping/test_enhancer_dart_flutter_native.py index c9405d125560f4..373ad50e62e0ae 100644 --- a/tests/sentry/grouping/test_enhancer_dart_flutter_native.py +++ b/tests/sentry/grouping/test_enhancer_dart_flutter_native.py @@ -4,7 +4,7 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.grouping.enhancer import ENHANCEMENT_BASES from sentry.testutils.cases import TestCase diff --git a/tests/sentry/grouping/test_fingerprinting.py b/tests/sentry/grouping/test_fingerprinting.py index 1cb2b22cd71f4a..8a86a416fa3d33 100644 --- a/tests/sentry/grouping/test_fingerprinting.py +++ b/tests/sentry/grouping/test_fingerprinting.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/grouping/test_grouphash_metadata.py b/tests/sentry/grouping/test_grouphash_metadata.py index 9ec671a59224ff..a93cc29910fb48 100644 --- a/tests/sentry/grouping/test_grouphash_metadata.py +++ b/tests/sentry/grouping/test_grouphash_metadata.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from unittest.mock import patch from sentry.grouping.component import MessageGroupingComponent, RootGroupingComponent diff --git a/tests/sentry/grouping/test_grouping_info.py b/tests/sentry/grouping/test_grouping_info.py index 64f48488b0f600..c31cbd9f675776 100644 --- a/tests/sentry/grouping/test_grouping_info.py +++ b/tests/sentry/grouping/test_grouping_info.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.conf.server import DEFAULT_GROUPING_CONFIG from sentry.grouping.api import _load_default_grouping_config diff --git a/tests/sentry/grouping/test_hashing.py b/tests/sentry/grouping/test_hashing.py index 0ffc754931134c..bd3fdf80c244a2 100644 --- a/tests/sentry/grouping/test_hashing.py +++ b/tests/sentry/grouping/test_hashing.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from time import time from unittest.mock import MagicMock, patch diff --git a/tests/sentry/grouping/test_parameterization.py b/tests/sentry/grouping/test_parameterization.py index 5dd881d261e789..b46a06c7a17bef 100644 --- a/tests/sentry/grouping/test_parameterization.py +++ b/tests/sentry/grouping/test_parameterization.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.grouping.parameterization import Parameterizer diff --git a/tests/sentry/grouping/test_strategies.py b/tests/sentry/grouping/test_strategies.py index e07caa61d77da8..e2ddb02f9a337c 100644 --- a/tests/sentry/grouping/test_strategies.py +++ b/tests/sentry/grouping/test_strategies.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/grouping/test_variants.py b/tests/sentry/grouping/test_variants.py index 563ca54cf947c7..dec26ca23ac893 100644 --- a/tests/sentry/grouping/test_variants.py +++ b/tests/sentry/grouping/test_variants.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, cast +from typing import Any, cast, int from unittest.mock import MagicMock, patch from sentry.grouping.fingerprinting.rules import FingerprintRuleJSON diff --git a/tests/sentry/helpers/test_deprecation.py b/tests/sentry/helpers/test_deprecation.py index 363e6be23e8211..fcbed1dac8e3a3 100644 --- a/tests/sentry/helpers/test_deprecation.py +++ b/tests/sentry/helpers/test_deprecation.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from cronsim import CronSim diff --git a/tests/sentry/hybridcloud/apigateway/test_apigateway.py b/tests/sentry/hybridcloud/apigateway/test_apigateway.py index 53ea3d07ca0eb0..64e01840fbe40c 100644 --- a/tests/sentry/hybridcloud/apigateway/test_apigateway.py +++ b/tests/sentry/hybridcloud/apigateway/test_apigateway.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import urlencode import pytest diff --git a/tests/sentry/hybridcloud/apigateway/test_apigateway_helpers.py b/tests/sentry/hybridcloud/apigateway/test_apigateway_helpers.py index 97b80f48d5fa2d..b67956ac0e1c10 100644 --- a/tests/sentry/hybridcloud/apigateway/test_apigateway_helpers.py +++ b/tests/sentry/hybridcloud/apigateway/test_apigateway_helpers.py @@ -1,3 +1,4 @@ +from typing import int from io import BytesIO import requests diff --git a/tests/sentry/hybridcloud/apigateway/test_proxy.py b/tests/sentry/hybridcloud/apigateway/test_proxy.py index 63307ac9d58f2e..4ea4dd4cc6d8ed 100644 --- a/tests/sentry/hybridcloud/apigateway/test_proxy.py +++ b/tests/sentry/hybridcloud/apigateway/test_proxy.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import urlencode import responses diff --git a/tests/sentry/hybridcloud/models/test_cacheversion.py b/tests/sentry/hybridcloud/models/test_cacheversion.py index 1e069798bc9975..95662403f92880 100644 --- a/tests/sentry/hybridcloud/models/test_cacheversion.py +++ b/tests/sentry/hybridcloud/models/test_cacheversion.py @@ -1,3 +1,4 @@ +from typing import int from sentry.hybridcloud.models.cacheversion import RegionCacheVersion from sentry.testutils.pytest.fixtures import django_db_all diff --git a/tests/sentry/hybridcloud/models/test_outbox.py b/tests/sentry/hybridcloud/models/test_outbox.py index b26ad5823c5c90..045ef4a38c1b20 100644 --- a/tests/sentry/hybridcloud/models/test_outbox.py +++ b/tests/sentry/hybridcloud/models/test_outbox.py @@ -2,7 +2,7 @@ import threading from collections.abc import Callable from datetime import datetime, timedelta, timezone -from typing import Any +from typing import int, Any from unittest.mock import Mock, call, patch import pytest diff --git a/tests/sentry/hybridcloud/models/test_webhookpayload.py b/tests/sentry/hybridcloud/models/test_webhookpayload.py index b2f7eb80e7116d..9ddae4ee8f21e6 100644 --- a/tests/sentry/hybridcloud/models/test_webhookpayload.py +++ b/tests/sentry/hybridcloud/models/test_webhookpayload.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.test import RequestFactory diff --git a/tests/sentry/hybridcloud/rpc/test_caching.py b/tests/sentry/hybridcloud/rpc/test_caching.py index 4cdcae1d080029..43e9d966bcd38f 100644 --- a/tests/sentry/hybridcloud/rpc/test_caching.py +++ b/tests/sentry/hybridcloud/rpc/test_caching.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator, Iterator from random import Random diff --git a/tests/sentry/hybridcloud/rpc/test_rpc_model.py b/tests/sentry/hybridcloud/rpc/test_rpc_model.py index b7cb7331f0b1e5..b081385445229b 100644 --- a/tests/sentry/hybridcloud/rpc/test_rpc_model.py +++ b/tests/sentry/hybridcloud/rpc/test_rpc_model.py @@ -1,3 +1,4 @@ +from typing import int from collections import deque from sentry.hybridcloud.rpc import RpcModel diff --git a/tests/sentry/hybridcloud/rpc/test_sig.py b/tests/sentry/hybridcloud/rpc/test_sig.py index 4d70c6c346ac6d..b22d7ecd8df84f 100644 --- a/tests/sentry/hybridcloud/rpc/test_sig.py +++ b/tests/sentry/hybridcloud/rpc/test_sig.py @@ -1,3 +1,4 @@ +from typing import int import pydantic from sentry.hybridcloud.rpc.sig import SerializableFunctionSignature diff --git a/tests/sentry/hybridcloud/services/test_control_organization_provisioning.py b/tests/sentry/hybridcloud/services/test_control_organization_provisioning.py index 05b90458734789..a906e806222b1b 100644 --- a/tests/sentry/hybridcloud/services/test_control_organization_provisioning.py +++ b/tests/sentry/hybridcloud/services/test_control_organization_provisioning.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import pytest from django.db import IntegrityError, router, transaction diff --git a/tests/sentry/hybridcloud/services/test_region_organization_provisioning.py b/tests/sentry/hybridcloud/services/test_region_organization_provisioning.py index 9b49529de22a66..af05334ca38e8a 100644 --- a/tests/sentry/hybridcloud/services/test_region_organization_provisioning.py +++ b/tests/sentry/hybridcloud/services/test_region_organization_provisioning.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from sentry.hybridcloud.models.outbox import outbox_context diff --git a/tests/sentry/hybridcloud/tasks/test_backfill_outboxes.py b/tests/sentry/hybridcloud/tasks/test_backfill_outboxes.py index 8f8620a19b3fcd..65be5acecb2acb 100644 --- a/tests/sentry/hybridcloud/tasks/test_backfill_outboxes.py +++ b/tests/sentry/hybridcloud/tasks/test_backfill_outboxes.py @@ -1,5 +1,5 @@ from collections.abc import Callable -from typing import Any +from typing import int, Any from unittest.mock import patch from django.apps import apps diff --git a/tests/sentry/hybridcloud/tasks/test_deliver_webhooks.py b/tests/sentry/hybridcloud/tasks/test_deliver_webhooks.py index d57b3184161f40..6578db292091fa 100644 --- a/tests/sentry/hybridcloud/tasks/test_deliver_webhooks.py +++ b/tests/sentry/hybridcloud/tasks/test_deliver_webhooks.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, PropertyMock, patch diff --git a/tests/sentry/hybridcloud/test_auth.py b/tests/sentry/hybridcloud/test_auth.py index d0ab2b8a5a22a4..d1a518f18aad46 100644 --- a/tests/sentry/hybridcloud/test_auth.py +++ b/tests/sentry/hybridcloud/test_auth.py @@ -1,3 +1,4 @@ +from typing import int from sentry.adoption import manager as adoption_manager from sentry.auth.services.auth import ( RpcAuthProvider, diff --git a/tests/sentry/hybridcloud/test_organization.py b/tests/sentry/hybridcloud/test_organization.py index 70b1a83a0e975e..8febade614f76a 100644 --- a/tests/sentry/hybridcloud/test_organization.py +++ b/tests/sentry/hybridcloud/test_organization.py @@ -1,6 +1,6 @@ import itertools from collections.abc import Callable -from typing import Any +from typing import int, Any import pytest from django.core import mail diff --git a/tests/sentry/hybridcloud/test_organizationmapping.py b/tests/sentry/hybridcloud/test_organizationmapping.py index da03deeb014922..dc0c789a6bee3a 100644 --- a/tests/sentry/hybridcloud/test_organizationmapping.py +++ b/tests/sentry/hybridcloud/test_organizationmapping.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from sentry.hybridcloud.models.outbox import outbox_context diff --git a/tests/sentry/hybridcloud/test_organizationmembermapping.py b/tests/sentry/hybridcloud/test_organizationmembermapping.py index 87e06da1d2e2fb..c8682cc1834d07 100644 --- a/tests/sentry/hybridcloud/test_organizationmembermapping.py +++ b/tests/sentry/hybridcloud/test_organizationmembermapping.py @@ -1,3 +1,4 @@ +from typing import int from django.db import router, transaction from sentry.hybridcloud.services.organizationmember_mapping import ( diff --git a/tests/sentry/hybridcloud/test_project.py b/tests/sentry/hybridcloud/test_project.py index 4e6ae31435f65b..31b2d4f6b0feb6 100644 --- a/tests/sentry/hybridcloud/test_project.py +++ b/tests/sentry/hybridcloud/test_project.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone import pytest diff --git a/tests/sentry/hybridcloud/test_region.py b/tests/sentry/hybridcloud/test_region.py index fb536dc992bf90..8db77519596f53 100644 --- a/tests/sentry/hybridcloud/test_region.py +++ b/tests/sentry/hybridcloud/test_region.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.test import override_settings diff --git a/tests/sentry/hybridcloud/test_replica.py b/tests/sentry/hybridcloud/test_replica.py index d51f649df54af0..2a4ce8f93429ec 100644 --- a/tests/sentry/hybridcloud/test_replica.py +++ b/tests/sentry/hybridcloud/test_replica.py @@ -1,3 +1,4 @@ +from typing import int from sentry.auth.services.auth.serial import serialize_auth_provider from sentry.hybridcloud.models import ApiKeyReplica, ExternalActorReplica from sentry.hybridcloud.models.outbox import outbox_context diff --git a/tests/sentry/hybridcloud/test_rpc.py b/tests/sentry/hybridcloud/test_rpc.py index 7ddc2b3ce7434e..38060915678eeb 100644 --- a/tests/sentry/hybridcloud/test_rpc.py +++ b/tests/sentry/hybridcloud/test_rpc.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/hybridcloud/test_team.py b/tests/sentry/hybridcloud/test_team.py index 29a604213b7ede..967b3907cb4f50 100644 --- a/tests/sentry/hybridcloud/test_team.py +++ b/tests/sentry/hybridcloud/test_team.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.organizationmemberteam import OrganizationMemberTeam from sentry.models.team import Team, TeamStatus from sentry.organizations.services.organization import organization_service diff --git a/tests/sentry/hybridcloud/test_tombstone.py b/tests/sentry/hybridcloud/test_tombstone.py index 3af4cac5cf3c53..0a9f43782e5fc3 100644 --- a/tests/sentry/hybridcloud/test_tombstone.py +++ b/tests/sentry/hybridcloud/test_tombstone.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.tombstone import ControlTombstone, RegionTombstone from sentry.silo.base import SiloMode from sentry.testutils.cases import TransactionTestCase diff --git a/tests/sentry/identity/test_oauth2.py b/tests/sentry/identity/test_oauth2.py index 3df0c8881e6d90..b7aced3c2f3db0 100644 --- a/tests/sentry/identity/test_oauth2.py +++ b/tests/sentry/identity/test_oauth2.py @@ -1,3 +1,4 @@ +from typing import int from collections import namedtuple from functools import cached_property from unittest import TestCase diff --git a/tests/sentry/incidents/endpoints/serializers/test_alert_rule.py b/tests/sentry/incidents/endpoints/serializers/test_alert_rule.py index 54f0285fe90190..1392ea5c327ec4 100644 --- a/tests/sentry/incidents/endpoints/serializers/test_alert_rule.py +++ b/tests/sentry/incidents/endpoints/serializers/test_alert_rule.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch from sentry.api.serializers import serialize diff --git a/tests/sentry/incidents/endpoints/serializers/test_alert_rule_trigger.py b/tests/sentry/incidents/endpoints/serializers/test_alert_rule_trigger.py index feea20f4541522..a4248801cc0beb 100644 --- a/tests/sentry/incidents/endpoints/serializers/test_alert_rule_trigger.py +++ b/tests/sentry/incidents/endpoints/serializers/test_alert_rule_trigger.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.incidents.logic import create_alert_rule_trigger from sentry.incidents.models.alert_rule import AlertRuleDetectionType, AlertRuleThresholdType diff --git a/tests/sentry/incidents/endpoints/serializers/test_alert_rule_trigger_action.py b/tests/sentry/incidents/endpoints/serializers/test_alert_rule_trigger_action.py index 1945596ed00856..1ce4a1430ee3ee 100644 --- a/tests/sentry/incidents/endpoints/serializers/test_alert_rule_trigger_action.py +++ b/tests/sentry/incidents/endpoints/serializers/test_alert_rule_trigger_action.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/incidents/endpoints/serializers/test_incident.py b/tests/sentry/incidents/endpoints/serializers/test_incident.py index 09ba885fff1e6a..098c91d7fa1f52 100644 --- a/tests/sentry/incidents/endpoints/serializers/test_incident.py +++ b/tests/sentry/incidents/endpoints/serializers/test_incident.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/incidents/endpoints/serializers/test_query_subscription.py b/tests/sentry/incidents/endpoints/serializers/test_query_subscription.py index 5c5b0b9c6cfc58..04d849bd4c8738 100644 --- a/tests/sentry/incidents/endpoints/serializers/test_query_subscription.py +++ b/tests/sentry/incidents/endpoints/serializers/test_query_subscription.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.snuba.models import ( ExtrapolationMode, diff --git a/tests/sentry/incidents/endpoints/test_organization_alert_rule_available_action_index.py b/tests/sentry/incidents/endpoints/test_organization_alert_rule_available_action_index.py index 423b93d7b162b0..6796f90de38c90 100644 --- a/tests/sentry/incidents/endpoints/test_organization_alert_rule_available_action_index.py +++ b/tests/sentry/incidents/endpoints/test_organization_alert_rule_available_action_index.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from sentry.constants import ObjectStatus, SentryAppStatus from sentry.incidents.endpoints.organization_alert_rule_available_action_index import ( diff --git a/tests/sentry/incidents/endpoints/test_organization_alert_rule_details.py b/tests/sentry/incidents/endpoints/test_organization_alert_rule_details.py index df74e72b79f045..ce1c8eadda7b45 100644 --- a/tests/sentry/incidents/endpoints/test_organization_alert_rule_details.py +++ b/tests/sentry/incidents/endpoints/test_organization_alert_rule_details.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from copy import deepcopy from functools import cached_property diff --git a/tests/sentry/incidents/endpoints/test_organization_alert_rule_index.py b/tests/sentry/incidents/endpoints/test_organization_alert_rule_index.py index 97255185232a34..8f7f452da28814 100644 --- a/tests/sentry/incidents/endpoints/test_organization_alert_rule_index.py +++ b/tests/sentry/incidents/endpoints/test_organization_alert_rule_index.py @@ -1,3 +1,4 @@ +from typing import int from copy import deepcopy from datetime import timedelta from functools import cached_property diff --git a/tests/sentry/incidents/endpoints/test_organization_combined_rule_index_endpoint.py b/tests/sentry/incidents/endpoints/test_organization_combined_rule_index_endpoint.py index beffc476e98fc7..62c71bca086fb5 100644 --- a/tests/sentry/incidents/endpoints/test_organization_combined_rule_index_endpoint.py +++ b/tests/sentry/incidents/endpoints/test_organization_combined_rule_index_endpoint.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime import requests diff --git a/tests/sentry/incidents/endpoints/test_organization_incident_details.py b/tests/sentry/incidents/endpoints/test_organization_incident_details.py index e4a772142f6152..7e49c640062557 100644 --- a/tests/sentry/incidents/endpoints/test_organization_incident_details.py +++ b/tests/sentry/incidents/endpoints/test_organization_incident_details.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from sentry.api.serializers import serialize diff --git a/tests/sentry/incidents/endpoints/test_organization_incident_index.py b/tests/sentry/incidents/endpoints/test_organization_incident_index.py index edd5accb68bdec..0f67290df2a838 100644 --- a/tests/sentry/incidents/endpoints/test_organization_incident_index.py +++ b/tests/sentry/incidents/endpoints/test_organization_incident_index.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from functools import cached_property diff --git a/tests/sentry/incidents/endpoints/test_organization_ondemand_rule_stats_endpoint.py b/tests/sentry/incidents/endpoints/test_organization_ondemand_rule_stats_endpoint.py index a69e6dd0f68383..d59c7aa2e8af7a 100644 --- a/tests/sentry/incidents/endpoints/test_organization_ondemand_rule_stats_endpoint.py +++ b/tests/sentry/incidents/endpoints/test_organization_ondemand_rule_stats_endpoint.py @@ -1,3 +1,4 @@ +from typing import int from sentry.snuba.dataset import Dataset from sentry.testutils.cases import APITestCase from tests.sentry.incidents.endpoints.serializers.test_alert_rule import BaseAlertRuleSerializerTest diff --git a/tests/sentry/incidents/endpoints/test_project_alert_rule_details.py b/tests/sentry/incidents/endpoints/test_project_alert_rule_details.py index 62c9edb19577ce..1cf965026e76e2 100644 --- a/tests/sentry/incidents/endpoints/test_project_alert_rule_details.py +++ b/tests/sentry/incidents/endpoints/test_project_alert_rule_details.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry import audit_log from sentry.api.serializers import serialize diff --git a/tests/sentry/incidents/endpoints/test_project_alert_rule_index.py b/tests/sentry/incidents/endpoints/test_project_alert_rule_index.py index a28400417a9383..cea5b8e32f649f 100644 --- a/tests/sentry/incidents/endpoints/test_project_alert_rule_index.py +++ b/tests/sentry/incidents/endpoints/test_project_alert_rule_index.py @@ -1,3 +1,4 @@ +from typing import int from copy import deepcopy from sentry import audit_log diff --git a/tests/sentry/incidents/endpoints/test_serializers.py b/tests/sentry/incidents/endpoints/test_serializers.py index 7a67adfae6cfd5..7a9da5597b4ed3 100644 --- a/tests/sentry/incidents/endpoints/test_serializers.py +++ b/tests/sentry/incidents/endpoints/test_serializers.py @@ -1,7 +1,7 @@ from __future__ import annotations from functools import cached_property -from typing import Any, cast +from typing import Any, cast, int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/incidents/endpoints/validators/test_validators.py b/tests/sentry/incidents/endpoints/validators/test_validators.py index f323594d7ab929..bbe419a4ec00e3 100644 --- a/tests/sentry/incidents/endpoints/validators/test_validators.py +++ b/tests/sentry/incidents/endpoints/validators/test_validators.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import orjson diff --git a/tests/sentry/incidents/handlers/condition/test_anomaly_detection_handler.py b/tests/sentry/incidents/handlers/condition/test_anomaly_detection_handler.py index d532ce8b0d9524..20efacf6d06a87 100644 --- a/tests/sentry/incidents/handlers/condition/test_anomaly_detection_handler.py +++ b/tests/sentry/incidents/handlers/condition/test_anomaly_detection_handler.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime from unittest import mock diff --git a/tests/sentry/incidents/models/test_alert_rule.py b/tests/sentry/incidents/models/test_alert_rule.py index 5d23d6edec05e0..eaad996fd2bb0a 100644 --- a/tests/sentry/incidents/models/test_alert_rule.py +++ b/tests/sentry/incidents/models/test_alert_rule.py @@ -1,3 +1,4 @@ +from typing import int import unittest from collections.abc import Generator from unittest import mock diff --git a/tests/sentry/incidents/models/test_incidents.py b/tests/sentry/incidents/models/test_incidents.py index 554e6973a6c3ea..85755238017042 100644 --- a/tests/sentry/incidents/models/test_incidents.py +++ b/tests/sentry/incidents/models/test_incidents.py @@ -1,3 +1,4 @@ +from typing import int import unittest from datetime import timedelta from unittest.mock import patch diff --git a/tests/sentry/incidents/serializers/test_workflow_engine_action.py b/tests/sentry/incidents/serializers/test_workflow_engine_action.py index 4e58c9a95ebf0a..970d0149c6186c 100644 --- a/tests/sentry/incidents/serializers/test_workflow_engine_action.py +++ b/tests/sentry/incidents/serializers/test_workflow_engine_action.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.incidents.endpoints.serializers.workflow_engine_action import ( WorkflowEngineActionSerializer, diff --git a/tests/sentry/incidents/serializers/test_workflow_engine_base.py b/tests/sentry/incidents/serializers/test_workflow_engine_base.py index 1b4864e6a9d3a3..e6e96419d58a66 100644 --- a/tests/sentry/incidents/serializers/test_workflow_engine_base.py +++ b/tests/sentry/incidents/serializers/test_workflow_engine_base.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import orjson diff --git a/tests/sentry/incidents/serializers/test_workflow_engine_data_condition.py b/tests/sentry/incidents/serializers/test_workflow_engine_data_condition.py index 6da3cb5da77daa..91af445ac07baf 100644 --- a/tests/sentry/incidents/serializers/test_workflow_engine_data_condition.py +++ b/tests/sentry/incidents/serializers/test_workflow_engine_data_condition.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.incidents.endpoints.serializers.workflow_engine_data_condition import ( WorkflowEngineDataConditionSerializer, diff --git a/tests/sentry/incidents/serializers/test_workflow_engine_detector.py b/tests/sentry/incidents/serializers/test_workflow_engine_detector.py index 72f574b6f55328..60133e54969b0c 100644 --- a/tests/sentry/incidents/serializers/test_workflow_engine_detector.py +++ b/tests/sentry/incidents/serializers/test_workflow_engine_detector.py @@ -1,5 +1,5 @@ from datetime import timedelta -from typing import Any +from typing import int, Any from unittest.mock import patch from django.core.cache import cache diff --git a/tests/sentry/incidents/serializers/test_workflow_engine_incident.py b/tests/sentry/incidents/serializers/test_workflow_engine_incident.py index e0faa80a243052..1180685f472b4f 100644 --- a/tests/sentry/incidents/serializers/test_workflow_engine_incident.py +++ b/tests/sentry/incidents/serializers/test_workflow_engine_incident.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.incidents.endpoints.serializers.alert_rule import DetailedAlertRuleSerializer from sentry.incidents.endpoints.serializers.workflow_engine_incident import ( diff --git a/tests/sentry/incidents/subscription_processor/test_subscription_processor_aci.py b/tests/sentry/incidents/subscription_processor/test_subscription_processor_aci.py index 7f55033c138e77..fcb3b0faf3e243 100644 --- a/tests/sentry/incidents/subscription_processor/test_subscription_processor_aci.py +++ b/tests/sentry/incidents/subscription_processor/test_subscription_processor_aci.py @@ -1,3 +1,4 @@ +from typing import int import copy from datetime import timedelta from functools import cached_property diff --git a/tests/sentry/incidents/subscription_processor/test_subscription_processor_base.py b/tests/sentry/incidents/subscription_processor/test_subscription_processor_base.py index 355ec82ab3e05c..c94e041f5bd40b 100644 --- a/tests/sentry/incidents/subscription_processor/test_subscription_processor_base.py +++ b/tests/sentry/incidents/subscription_processor/test_subscription_processor_base.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from functools import cached_property from random import randint diff --git a/tests/sentry/incidents/test_charts.py b/tests/sentry/incidents/test_charts.py index ed6baaf80dae7b..7f104f0d33ceb8 100644 --- a/tests/sentry/incidents/test_charts.py +++ b/tests/sentry/incidents/test_charts.py @@ -1,3 +1,4 @@ +from typing import int import datetime from unittest.mock import MagicMock, patch diff --git a/tests/sentry/incidents/test_logic.py b/tests/sentry/incidents/test_logic.py index e2ade373fc06ce..892cd2dda468c9 100644 --- a/tests/sentry/incidents/test_logic.py +++ b/tests/sentry/incidents/test_logic.py @@ -2,7 +2,7 @@ from datetime import timedelta from functools import cached_property -from typing import TypedDict +from typing import int, TypedDict from unittest import mock from unittest.mock import MagicMock, patch diff --git a/tests/sentry/incidents/test_metric_issue_detector_handler.py b/tests/sentry/incidents/test_metric_issue_detector_handler.py index 435434ba388025..99a671d4552b4f 100644 --- a/tests/sentry/incidents/test_metric_issue_detector_handler.py +++ b/tests/sentry/incidents/test_metric_issue_detector_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.incidents.grouptype import ( MetricIssueDetectorHandler, SessionsAggregate, diff --git a/tests/sentry/incidents/test_metric_issue_post_process.py b/tests/sentry/incidents/test_metric_issue_post_process.py index 321f05d83672b4..b1795e4cdb1003 100644 --- a/tests/sentry/incidents/test_metric_issue_post_process.py +++ b/tests/sentry/incidents/test_metric_issue_post_process.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/incidents/test_receivers.py b/tests/sentry/incidents/test_receivers.py index a095229db56aef..e606433faed146 100644 --- a/tests/sentry/incidents/test_receivers.py +++ b/tests/sentry/incidents/test_receivers.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from sentry.incidents.models.alert_rule import AlertRuleTrigger diff --git a/tests/sentry/incidents/utils/test_format_duration.py b/tests/sentry/incidents/utils/test_format_duration.py index 1a53d5f2f4380d..c2ed9eb4a2d6a8 100644 --- a/tests/sentry/incidents/utils/test_format_duration.py +++ b/tests/sentry/incidents/utils/test_format_duration.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.incidents.utils.format_duration import format_duration_idiomatic diff --git a/tests/sentry/incidents/utils/test_metric_issue_base.py b/tests/sentry/incidents/utils/test_metric_issue_base.py index 89fd183269960c..1f01110fe2b42c 100644 --- a/tests/sentry/incidents/utils/test_metric_issue_base.py +++ b/tests/sentry/incidents/utils/test_metric_issue_base.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from sentry.incidents.grouptype import MetricIssue diff --git a/tests/sentry/ingest/billing_metrics_consumer/test_billing_metrics_consumer_kafka.py b/tests/sentry/ingest/billing_metrics_consumer/test_billing_metrics_consumer_kafka.py index e7dc7c1269f2d1..da1cf6c5b6815e 100644 --- a/tests/sentry/ingest/billing_metrics_consumer/test_billing_metrics_consumer_kafka.py +++ b/tests/sentry/ingest/billing_metrics_consumer/test_billing_metrics_consumer_kafka.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import datetime, timezone from unittest import mock diff --git a/tests/sentry/ingest/ingest_consumer/test_dlq.py b/tests/sentry/ingest/ingest_consumer/test_dlq.py index f6f3478f125d9e..69bb0d85854646 100644 --- a/tests/sentry/ingest/ingest_consumer/test_dlq.py +++ b/tests/sentry/ingest/ingest_consumer/test_dlq.py @@ -1,3 +1,4 @@ +from typing import int import time from datetime import datetime from unittest.mock import Mock diff --git a/tests/sentry/ingest/ingest_consumer/test_ingest_consumer_kafka.py b/tests/sentry/ingest/ingest_consumer/test_ingest_consumer_kafka.py index 5714b0b9f9db7f..dff832dc49aa17 100644 --- a/tests/sentry/ingest/ingest_consumer/test_ingest_consumer_kafka.py +++ b/tests/sentry/ingest/ingest_consumer/test_ingest_consumer_kafka.py @@ -1,3 +1,4 @@ +from typing import int import logging import random import time diff --git a/tests/sentry/ingest/ingest_consumer/test_ingest_consumer_processing.py b/tests/sentry/ingest/ingest_consumer/test_ingest_consumer_processing.py index a67cc8fe7a194d..1408ac86924bec 100644 --- a/tests/sentry/ingest/ingest_consumer/test_ingest_consumer_processing.py +++ b/tests/sentry/ingest/ingest_consumer/test_ingest_consumer_processing.py @@ -5,7 +5,7 @@ import uuid import zipfile from io import BytesIO -from typing import Any +from typing import int, Any from unittest.mock import patch import orjson diff --git a/tests/sentry/ingest/ingest_consumer/test_ingest_consumer_transactions.py b/tests/sentry/ingest/ingest_consumer/test_ingest_consumer_transactions.py index c48f6ccd7b319a..81ff4593365631 100644 --- a/tests/sentry/ingest/ingest_consumer/test_ingest_consumer_transactions.py +++ b/tests/sentry/ingest/ingest_consumer/test_ingest_consumer_transactions.py @@ -1,3 +1,4 @@ +from typing import int import datetime import random import time diff --git a/tests/sentry/ingest/test_slicing.py b/tests/sentry/ingest/test_slicing.py index 057ff864c7ac87..d82a955ff04696 100644 --- a/tests/sentry/ingest/test_slicing.py +++ b/tests/sentry/ingest/test_slicing.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from sentry.ingest.slicing import ( diff --git a/tests/sentry/ingest/test_transaction_clusterer.py b/tests/sentry/ingest/test_transaction_clusterer.py index 966625a11a2362..4815ee95acd425 100644 --- a/tests/sentry/ingest/test_transaction_clusterer.py +++ b/tests/sentry/ingest/test_transaction_clusterer.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/ingest/test_transaction_rule_validator.py b/tests/sentry/ingest/test_transaction_rule_validator.py index f4a463c03ce0bf..0335b0e8b6e7bb 100644 --- a/tests/sentry/ingest/test_transaction_rule_validator.py +++ b/tests/sentry/ingest/test_transaction_rule_validator.py @@ -1,3 +1,4 @@ +from typing import int from sentry.ingest.transaction_clusterer.base import ReplacementRule from sentry.ingest.transaction_clusterer.rule_validator import RuleValidator diff --git a/tests/sentry/insights/endpoints/test_insights_starred_segment.py b/tests/sentry/insights/endpoints/test_insights_starred_segment.py index 4c6760cbed0f45..a69dc4d5b8ffa2 100644 --- a/tests/sentry/insights/endpoints/test_insights_starred_segment.py +++ b/tests/sentry/insights/endpoints/test_insights_starred_segment.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.insights.models import InsightsStarredSegment diff --git a/tests/sentry/integrations/api/bases/test_integration.py b/tests/sentry/integrations/api/bases/test_integration.py index 451dc6437caf15..fedf591d45ec95 100644 --- a/tests/sentry/integrations/api/bases/test_integration.py +++ b/tests/sentry/integrations/api/bases/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.http import HttpRequest diff --git a/tests/sentry/integrations/api/endpoints/test_data_forwarding.py b/tests/sentry/integrations/api/endpoints/test_data_forwarding.py index 3c07f9964f195c..9c0500b9dfea9d 100644 --- a/tests/sentry/integrations/api/endpoints/test_data_forwarding.py +++ b/tests/sentry/integrations/api/endpoints/test_data_forwarding.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.integrations.models.data_forwarder import DataForwarder diff --git a/tests/sentry/integrations/api/endpoints/test_data_forwarding_details.py b/tests/sentry/integrations/api/endpoints/test_data_forwarding_details.py index 7dbad601bab247..9eecfe407ebf0f 100644 --- a/tests/sentry/integrations/api/endpoints/test_data_forwarding_details.py +++ b/tests/sentry/integrations/api/endpoints/test_data_forwarding_details.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.integrations.models.data_forwarder import DataForwarder diff --git a/tests/sentry/integrations/api/endpoints/test_doc_integration_avatar.py b/tests/sentry/integrations/api/endpoints/test_doc_integration_avatar.py index 452e425278ffd6..fa03bcd56cc0d4 100644 --- a/tests/sentry/integrations/api/endpoints/test_doc_integration_avatar.py +++ b/tests/sentry/integrations/api/endpoints/test_doc_integration_avatar.py @@ -1,7 +1,7 @@ from __future__ import annotations from base64 import b64encode -from typing import Any +from typing import int, Any from django.test import override_settings from rest_framework import status diff --git a/tests/sentry/integrations/api/endpoints/test_doc_integration_details.py b/tests/sentry/integrations/api/endpoints/test_doc_integration_details.py index 62cd31caeccb47..37b1802add397f 100644 --- a/tests/sentry/integrations/api/endpoints/test_doc_integration_details.py +++ b/tests/sentry/integrations/api/endpoints/test_doc_integration_details.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import pytest from rest_framework import status diff --git a/tests/sentry/integrations/api/endpoints/test_doc_integrations.py b/tests/sentry/integrations/api/endpoints/test_doc_integrations.py index 9b3a179729f871..b1c77e7afa8655 100644 --- a/tests/sentry/integrations/api/endpoints/test_doc_integrations.py +++ b/tests/sentry/integrations/api/endpoints/test_doc_integrations.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from rest_framework import status from rest_framework.response import Response diff --git a/tests/sentry/integrations/api/endpoints/test_external_team.py b/tests/sentry/integrations/api/endpoints/test_external_team.py index 8ab3b49cdd2712..5b5b51f6e28f16 100644 --- a/tests/sentry/integrations/api/endpoints/test_external_team.py +++ b/tests/sentry/integrations/api/endpoints/test_external_team.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.models.external_actor import ExternalActor from sentry.integrations.utils.providers import get_provider_string from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/integrations/api/endpoints/test_external_team_details.py b/tests/sentry/integrations/api/endpoints/test_external_team_details.py index c1e5bf8aef1161..6ab8f958512fb5 100644 --- a/tests/sentry/integrations/api/endpoints/test_external_team_details.py +++ b/tests/sentry/integrations/api/endpoints/test_external_team_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.models.external_actor import ExternalActor from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/integrations/api/endpoints/test_external_user.py b/tests/sentry/integrations/api/endpoints/test_external_user.py index 8eabce64223316..29e6df2d8cd35e 100644 --- a/tests/sentry/integrations/api/endpoints/test_external_user.py +++ b/tests/sentry/integrations/api/endpoints/test_external_user.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/integrations/api/endpoints/test_external_user_details.py b/tests/sentry/integrations/api/endpoints/test_external_user_details.py index c0112a1209bcf8..8344bcaba65b5d 100644 --- a/tests/sentry/integrations/api/endpoints/test_external_user_details.py +++ b/tests/sentry/integrations/api/endpoints/test_external_user_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.models.external_actor import ExternalActor from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/integrations/api/endpoints/test_integration_features.py b/tests/sentry/integrations/api/endpoints/test_integration_features.py index 633d5d00f264cd..14dc3cfa92060b 100644 --- a/tests/sentry/integrations/api/endpoints/test_integration_features.py +++ b/tests/sentry/integrations/api/endpoints/test_integration_features.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from sentry.integrations.models.integration_feature import Feature, IntegrationFeature diff --git a/tests/sentry/integrations/api/endpoints/test_integration_proxy.py b/tests/sentry/integrations/api/endpoints/test_integration_proxy.py index a8b51c2393ff43..f88556d1deb713 100644 --- a/tests/sentry/integrations/api/endpoints/test_integration_proxy.py +++ b/tests/sentry/integrations/api/endpoints/test_integration_proxy.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, TypedDict +from typing import Any, TypedDict, int from unittest.mock import MagicMock, Mock, patch from django.http.request import HttpHeaders diff --git a/tests/sentry/integrations/api/endpoints/test_organization_code_mapping_details.py b/tests/sentry/integrations/api/endpoints/test_organization_code_mapping_details.py index 8bb2a46c15d784..a14a4a6743619e 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_code_mapping_details.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_code_mapping_details.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from rest_framework import status diff --git a/tests/sentry/integrations/api/endpoints/test_organization_code_mappings.py b/tests/sentry/integrations/api/endpoints/test_organization_code_mappings.py index 648883e5a91155..b2fe0f2a337923 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_code_mappings.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_code_mappings.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.integrations.api.endpoints.organization_code_mappings import BRANCH_NAME_ERROR_MESSAGE diff --git a/tests/sentry/integrations/api/endpoints/test_organization_coding_agents.py b/tests/sentry/integrations/api/endpoints/test_organization_coding_agents.py index 6fdc012659da69..1846010a483536 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_coding_agents.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_coding_agents.py @@ -1,3 +1,4 @@ +from typing import int import contextlib from datetime import UTC, datetime from unittest.mock import MagicMock, Mock, patch diff --git a/tests/sentry/integrations/api/endpoints/test_organization_integration_channel_validate.py b/tests/sentry/integrations/api/endpoints/test_organization_integration_channel_validate.py index f244a3b856d85d..f7096b716ba137 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_integration_channel_validate.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_integration_channel_validate.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest.mock import patch diff --git a/tests/sentry/integrations/api/endpoints/test_organization_integration_channels.py b/tests/sentry/integrations/api/endpoints/test_organization_integration_channels.py index 0e9bd9085bd3be..f2e5ae7bead86c 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_integration_channels.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_integration_channels.py @@ -1,4 +1,4 @@ -from typing import cast +from typing import int, cast from unittest.mock import patch from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/integrations/api/endpoints/test_organization_integration_details.py b/tests/sentry/integrations/api/endpoints/test_organization_integration_details.py index 6df344987fa559..8960329c320a16 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_integration_details.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_integration_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import responses diff --git a/tests/sentry/integrations/api/endpoints/test_organization_integration_issues.py b/tests/sentry/integrations/api/endpoints/test_organization_integration_issues.py index a72e055d50aa7a..ac0189be5b3a65 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_integration_issues.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_integration_issues.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/integrations/api/endpoints/test_organization_integration_migrate_opsgenie.py b/tests/sentry/integrations/api/endpoints/test_organization_integration_migrate_opsgenie.py index 5296f7ce23a5ef..b9f5564878f51a 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_integration_migrate_opsgenie.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_integration_migrate_opsgenie.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/integrations/api/endpoints/test_organization_integration_repos.py b/tests/sentry/integrations/api/endpoints/test_organization_integration_repos.py index 72f2184463ceb9..2afe151f871d43 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_integration_repos.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_integration_repos.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/integrations/api/endpoints/test_organization_integration_request.py b/tests/sentry/integrations/api/endpoints/test_organization_integration_request.py index 30640f483166ef..16784e1a4dc305 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_integration_request.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_integration_request.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/integrations/api/endpoints/test_organization_integration_serverless_functions.py b/tests/sentry/integrations/api/endpoints/test_organization_integration_serverless_functions.py index 7e7b629b6b865b..8808480b0c8b7c 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_integration_serverless_functions.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_integration_serverless_functions.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import responses diff --git a/tests/sentry/integrations/api/endpoints/test_organization_integrations.py b/tests/sentry/integrations/api/endpoints/test_organization_integrations.py index d98501948def2b..b89f55847b2c66 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_integrations.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_integrations.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.silo import control_silo_test diff --git a/tests/sentry/integrations/api/endpoints/test_organization_repositories.py b/tests/sentry/integrations/api/endpoints/test_organization_repositories.py index f39002d01f5014..931e3a9ef6ec29 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_repositories.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_repositories.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.urls import reverse diff --git a/tests/sentry/integrations/api/endpoints/test_organization_repository_commits.py b/tests/sentry/integrations/api/endpoints/test_organization_repository_commits.py index 888ea133af6224..de80ce024925af 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_repository_commits.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_repository_commits.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.commit import Commit diff --git a/tests/sentry/integrations/api/endpoints/test_organization_repository_details.py b/tests/sentry/integrations/api/endpoints/test_organization_repository_details.py index 4de9b9abdd52ec..5dd8cc8a5397eb 100644 --- a/tests/sentry/integrations/api/endpoints/test_organization_repository_details.py +++ b/tests/sentry/integrations/api/endpoints/test_organization_repository_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.urls import reverse diff --git a/tests/sentry/integrations/api/endpoints/test_user_organizationintegration.py b/tests/sentry/integrations/api/endpoints/test_user_organizationintegration.py index ff3463aa297604..9220664dcb051b 100644 --- a/tests/sentry/integrations/api/endpoints/test_user_organizationintegration.py +++ b/tests/sentry/integrations/api/endpoints/test_user_organizationintegration.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import orjson diff --git a/tests/sentry/integrations/api/serializers/rest_framework/test_data_forwarder.py b/tests/sentry/integrations/api/serializers/rest_framework/test_data_forwarder.py index 5c23e479ea554f..494fe83c3bb052 100644 --- a/tests/sentry/integrations/api/serializers/rest_framework/test_data_forwarder.py +++ b/tests/sentry/integrations/api/serializers/rest_framework/test_data_forwarder.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.auth.access import from_request from sentry.integrations.api.serializers.rest_framework.data_forwarder import ( diff --git a/tests/sentry/integrations/api/serializers/test_external_actor.py b/tests/sentry/integrations/api/serializers/test_external_actor.py index 581e05e948c4f4..44dd033d22c2a1 100644 --- a/tests/sentry/integrations/api/serializers/test_external_actor.py +++ b/tests/sentry/integrations/api/serializers/test_external_actor.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.integrations.api.bases.external_actor import ( STRICT_NAME_PROVIDERS, diff --git a/tests/sentry/integrations/api/serializers/test_external_issue.py b/tests/sentry/integrations/api/serializers/test_external_issue.py index 3ed86d6597deb8..e3af773146f6b3 100644 --- a/tests/sentry/integrations/api/serializers/test_external_issue.py +++ b/tests/sentry/integrations/api/serializers/test_external_issue.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.integrations.api.serializers.models.external_issue import ExternalIssueSerializer from sentry.testutils.cases import TestCase diff --git a/tests/sentry/integrations/aws_lambda/test_client.py b/tests/sentry/integrations/aws_lambda/test_client.py index 0ad8c0306ffa05..e65d0e99d1c83f 100644 --- a/tests/sentry/integrations/aws_lambda/test_client.py +++ b/tests/sentry/integrations/aws_lambda/test_client.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import boto3 diff --git a/tests/sentry/integrations/aws_lambda/test_integration.py b/tests/sentry/integrations/aws_lambda/test_integration.py index 1461fc6d8fe0a6..0941d3e187580f 100644 --- a/tests/sentry/integrations/aws_lambda/test_integration.py +++ b/tests/sentry/integrations/aws_lambda/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import ANY, MagicMock, patch from urllib.parse import urlencode diff --git a/tests/sentry/integrations/aws_lambda/test_utils.py b/tests/sentry/integrations/aws_lambda/test_utils.py index 44ff2d682fe6ea..598abbd513681c 100644 --- a/tests/sentry/integrations/aws_lambda/test_utils.py +++ b/tests/sentry/integrations/aws_lambda/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/integrations/bitbucket/test_client.py b/tests/sentry/integrations/bitbucket/test_client.py index c8d7ebcd332694..39efa232ac5d34 100644 --- a/tests/sentry/integrations/bitbucket/test_client.py +++ b/tests/sentry/integrations/bitbucket/test_client.py @@ -1,3 +1,4 @@ +from typing import int import jwt import pytest import responses diff --git a/tests/sentry/integrations/bitbucket/test_descriptor.py b/tests/sentry/integrations/bitbucket/test_descriptor.py index 0c885f5f0a89ad..c051a01a1a3525 100644 --- a/tests/sentry/integrations/bitbucket/test_descriptor.py +++ b/tests/sentry/integrations/bitbucket/test_descriptor.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.bitbucket.client import BITBUCKET_KEY from sentry.integrations.bitbucket.descriptor import BitbucketDescriptorEndpoint from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/integrations/bitbucket/test_installed.py b/tests/sentry/integrations/bitbucket/test_installed.py index 657230ce4527bd..a44183645ba000 100644 --- a/tests/sentry/integrations/bitbucket/test_installed.py +++ b/tests/sentry/integrations/bitbucket/test_installed.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from unittest import mock import responses diff --git a/tests/sentry/integrations/bitbucket/test_integration.py b/tests/sentry/integrations/bitbucket/test_integration.py index 3be655310ecaef..480c066b267ae9 100644 --- a/tests/sentry/integrations/bitbucket/test_integration.py +++ b/tests/sentry/integrations/bitbucket/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from urllib.parse import quote, urlencode diff --git a/tests/sentry/integrations/bitbucket/test_issues.py b/tests/sentry/integrations/bitbucket/test_issues.py index 7709424e7c8e7a..4e09fba285f7a2 100644 --- a/tests/sentry/integrations/bitbucket/test_issues.py +++ b/tests/sentry/integrations/bitbucket/test_issues.py @@ -1,3 +1,4 @@ +from typing import int import orjson import responses diff --git a/tests/sentry/integrations/bitbucket/test_repository.py b/tests/sentry/integrations/bitbucket/test_repository.py index e39345b3747794..7dc9fdd0d6554e 100644 --- a/tests/sentry/integrations/bitbucket/test_repository.py +++ b/tests/sentry/integrations/bitbucket/test_repository.py @@ -1,3 +1,4 @@ +from typing import int import datetime from datetime import timezone from functools import cached_property diff --git a/tests/sentry/integrations/bitbucket/test_search.py b/tests/sentry/integrations/bitbucket/test_search.py index 27c391ec2cbc13..e8594b87e2d662 100644 --- a/tests/sentry/integrations/bitbucket/test_search.py +++ b/tests/sentry/integrations/bitbucket/test_search.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import responses diff --git a/tests/sentry/integrations/bitbucket/test_uninstalled.py b/tests/sentry/integrations/bitbucket/test_uninstalled.py index 72d2234a8ff549..99ff78c6faac02 100644 --- a/tests/sentry/integrations/bitbucket/test_uninstalled.py +++ b/tests/sentry/integrations/bitbucket/test_uninstalled.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/bitbucket/test_webhook.py b/tests/sentry/integrations/bitbucket/test_webhook.py index 607528b5cdc7f3..e1abc46d3f2e32 100644 --- a/tests/sentry/integrations/bitbucket/test_webhook.py +++ b/tests/sentry/integrations/bitbucket/test_webhook.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import datetime, timezone -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch from fixtures.bitbucket import PUSH_EVENT_EXAMPLE diff --git a/tests/sentry/integrations/bitbucket_server/test_client.py b/tests/sentry/integrations/bitbucket_server/test_client.py index db1d033ed344f8..fbe655065ddfa6 100644 --- a/tests/sentry/integrations/bitbucket_server/test_client.py +++ b/tests/sentry/integrations/bitbucket_server/test_client.py @@ -1,3 +1,4 @@ +from typing import int import orjson import pytest import responses diff --git a/tests/sentry/integrations/bitbucket_server/test_integration.py b/tests/sentry/integrations/bitbucket_server/test_integration.py index 6a0bc85789cbec..5b15dbfb9b12a7 100644 --- a/tests/sentry/integrations/bitbucket_server/test_integration.py +++ b/tests/sentry/integrations/bitbucket_server/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/bitbucket_server/test_repository.py b/tests/sentry/integrations/bitbucket_server/test_repository.py index 3c12996e126110..eb92101f0fcc4d 100644 --- a/tests/sentry/integrations/bitbucket_server/test_repository.py +++ b/tests/sentry/integrations/bitbucket_server/test_repository.py @@ -1,3 +1,4 @@ +from typing import int import datetime from datetime import timezone from functools import cached_property diff --git a/tests/sentry/integrations/bitbucket_server/test_webhook.py b/tests/sentry/integrations/bitbucket_server/test_webhook.py index b1e77d599d041e..b9514edd291271 100644 --- a/tests/sentry/integrations/bitbucket_server/test_webhook.py +++ b/tests/sentry/integrations/bitbucket_server/test_webhook.py @@ -1,5 +1,5 @@ from time import time -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/integrations/cursor/test_client.py b/tests/sentry/integrations/cursor/test_client.py index 1431d7c1a286e6..66351a1a98e4ad 100644 --- a/tests/sentry/integrations/cursor/test_client.py +++ b/tests/sentry/integrations/cursor/test_client.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.integrations.cursor.client import CursorAgentClient diff --git a/tests/sentry/integrations/cursor/test_integration.py b/tests/sentry/integrations/cursor/test_integration.py index b01b8c07cdd7aa..9ff47eea518776 100644 --- a/tests/sentry/integrations/cursor/test_integration.py +++ b/tests/sentry/integrations/cursor/test_integration.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any, cast +from typing import Any, cast, int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/integrations/cursor/test_webhook.py b/tests/sentry/integrations/cursor/test_webhook.py index 724cf46a4025dc..66ec5ae369597c 100644 --- a/tests/sentry/integrations/cursor/test_webhook.py +++ b/tests/sentry/integrations/cursor/test_webhook.py @@ -1,6 +1,6 @@ import hashlib import hmac -from typing import Any +from typing import int, Any from unittest.mock import patch import orjson diff --git a/tests/sentry/integrations/data_forwarding/amazon_sqs/test_forwarder.py b/tests/sentry/integrations/data_forwarding/amazon_sqs/test_forwarder.py index 3490126f673ec5..6fb24bab6aa7a4 100644 --- a/tests/sentry/integrations/data_forwarding/amazon_sqs/test_forwarder.py +++ b/tests/sentry/integrations/data_forwarding/amazon_sqs/test_forwarder.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import orjson diff --git a/tests/sentry/integrations/data_forwarding/segment/test_forwarder.py b/tests/sentry/integrations/data_forwarding/segment/test_forwarder.py index ab57c5235ad7e2..3270e185955093 100644 --- a/tests/sentry/integrations/data_forwarding/segment/test_forwarder.py +++ b/tests/sentry/integrations/data_forwarding/segment/test_forwarder.py @@ -1,3 +1,4 @@ +from typing import int import orjson import responses diff --git a/tests/sentry/integrations/data_forwarding/splunk/test_forwarder.py b/tests/sentry/integrations/data_forwarding/splunk/test_forwarder.py index da15a848795b2e..bc3c3dba9d7f0b 100644 --- a/tests/sentry/integrations/data_forwarding/splunk/test_forwarder.py +++ b/tests/sentry/integrations/data_forwarding/splunk/test_forwarder.py @@ -1,3 +1,4 @@ +from typing import int import orjson import pytest import responses diff --git a/tests/sentry/integrations/discord/message_builder/test_action_row.py b/tests/sentry/integrations/discord/message_builder/test_action_row.py index fe8a19a261a5e5..285957a1c707b3 100644 --- a/tests/sentry/integrations/discord/message_builder/test_action_row.py +++ b/tests/sentry/integrations/discord/message_builder/test_action_row.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.integrations.discord.message_builder.base.component.action_row import ( diff --git a/tests/sentry/integrations/discord/message_builder/test_builder.py b/tests/sentry/integrations/discord/message_builder/test_builder.py index 815c2676253b14..a35f69d9a1653e 100644 --- a/tests/sentry/integrations/discord/message_builder/test_builder.py +++ b/tests/sentry/integrations/discord/message_builder/test_builder.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.discord.message_builder import LEVEL_TO_COLOR from sentry.integrations.discord.message_builder.base.base import DiscordMessageBuilder from sentry.integrations.discord.message_builder.base.component.action_row import DiscordActionRow diff --git a/tests/sentry/integrations/discord/message_builder/test_button.py b/tests/sentry/integrations/discord/message_builder/test_button.py index 15d24692c97934..0796810c472759 100644 --- a/tests/sentry/integrations/discord/message_builder/test_button.py +++ b/tests/sentry/integrations/discord/message_builder/test_button.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.discord.message_builder.base.component.button import ( DiscordButton, DiscordButtonStyle, diff --git a/tests/sentry/integrations/discord/message_builder/test_embed.py b/tests/sentry/integrations/discord/message_builder/test_embed.py index b58237e6a83bb4..c48f9ba8000fc5 100644 --- a/tests/sentry/integrations/discord/message_builder/test_embed.py +++ b/tests/sentry/integrations/discord/message_builder/test_embed.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.discord.message_builder import LEVEL_TO_COLOR from sentry.integrations.discord.message_builder.base.embed.base import DiscordMessageEmbed from sentry.integrations.discord.message_builder.base.embed.field import DiscordMessageEmbedField diff --git a/tests/sentry/integrations/discord/message_builder/test_flags.py b/tests/sentry/integrations/discord/message_builder/test_flags.py index 16fbf025664ed3..b3d8825050105d 100644 --- a/tests/sentry/integrations/discord/message_builder/test_flags.py +++ b/tests/sentry/integrations/discord/message_builder/test_flags.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.integrations.discord.message_builder.base.flags import DiscordMessageFlags from sentry.testutils.cases import TestCase diff --git a/tests/sentry/integrations/discord/message_builder/test_select_menu.py b/tests/sentry/integrations/discord/message_builder/test_select_menu.py index b04af8246f19e3..86beb7af82d03d 100644 --- a/tests/sentry/integrations/discord/message_builder/test_select_menu.py +++ b/tests/sentry/integrations/discord/message_builder/test_select_menu.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.discord.message_builder.base.component.select_menu import ( DiscordSelectMenu, DiscordSelectMenuOption, diff --git a/tests/sentry/integrations/discord/test_client.py b/tests/sentry/integrations/discord/test_client.py index 220e136a51f9a9..e071e9cb9d78d2 100644 --- a/tests/sentry/integrations/discord/test_client.py +++ b/tests/sentry/integrations/discord/test_client.py @@ -1,3 +1,4 @@ +from typing import int import responses from responses import matchers diff --git a/tests/sentry/integrations/discord/test_integration.py b/tests/sentry/integrations/discord/test_integration.py index 3debaf1716a552..8167c24a7d0a5a 100644 --- a/tests/sentry/integrations/discord/test_integration.py +++ b/tests/sentry/integrations/discord/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from urllib.parse import parse_qs, urlencode, urlparse diff --git a/tests/sentry/integrations/discord/test_issue_alert.py b/tests/sentry/integrations/discord/test_issue_alert.py index b68f4c5dd91ed9..d26f9218fb4679 100644 --- a/tests/sentry/integrations/discord/test_issue_alert.py +++ b/tests/sentry/integrations/discord/test_issue_alert.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from uuid import uuid4 diff --git a/tests/sentry/integrations/discord/test_requests.py b/tests/sentry/integrations/discord/test_requests.py index 4e20b0980f62ea..33d1bc7688894a 100644 --- a/tests/sentry/integrations/discord/test_requests.py +++ b/tests/sentry/integrations/discord/test_requests.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from unittest import mock import orjson diff --git a/tests/sentry/integrations/discord/test_uninstall.py b/tests/sentry/integrations/discord/test_uninstall.py index 2ac793f8d44bd2..b78287e1ac79b3 100644 --- a/tests/sentry/integrations/discord/test_uninstall.py +++ b/tests/sentry/integrations/discord/test_uninstall.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import mock import responses diff --git a/tests/sentry/integrations/discord/test_utils.py b/tests/sentry/integrations/discord/test_utils.py index 410d2e591a0c3c..4872891d4b386a 100644 --- a/tests/sentry/integrations/discord/test_utils.py +++ b/tests/sentry/integrations/discord/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from cryptography.exceptions import InvalidSignature diff --git a/tests/sentry/integrations/discord/test_views.py b/tests/sentry/integrations/discord/test_views.py index 2715ad7abd825f..894dec5a24139e 100644 --- a/tests/sentry/integrations/discord/test_views.py +++ b/tests/sentry/integrations/discord/test_views.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.core.signing import SignatureExpired diff --git a/tests/sentry/integrations/discord/webhooks/test_command.py b/tests/sentry/integrations/discord/webhooks/test_command.py index 8533864f0cc838..213df582dcf1b3 100644 --- a/tests/sentry/integrations/discord/webhooks/test_command.py +++ b/tests/sentry/integrations/discord/webhooks/test_command.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.integrations.discord.message_builder.base.flags import EPHEMERAL_FLAG diff --git a/tests/sentry/integrations/discord/webhooks/test_endpoint.py b/tests/sentry/integrations/discord/webhooks/test_endpoint.py index 613a541eaa1daf..865d0fc1422c70 100644 --- a/tests/sentry/integrations/discord/webhooks/test_endpoint.py +++ b/tests/sentry/integrations/discord/webhooks/test_endpoint.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from rest_framework import status diff --git a/tests/sentry/integrations/discord/webhooks/test_message_component.py b/tests/sentry/integrations/discord/webhooks/test_message_component.py index 117ecc7e2dbfe3..0464937dccc018 100644 --- a/tests/sentry/integrations/discord/webhooks/test_message_component.py +++ b/tests/sentry/integrations/discord/webhooks/test_message_component.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/github/tasks/test_codecov_account_link.py b/tests/sentry/integrations/github/tasks/test_codecov_account_link.py index 795ae5b8c0fcd6..cade1ba99fd7bb 100644 --- a/tests/sentry/integrations/github/tasks/test_codecov_account_link.py +++ b/tests/sentry/integrations/github/tasks/test_codecov_account_link.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.codecov.client import ConfigurationError diff --git a/tests/sentry/integrations/github/tasks/test_codecov_account_unlink.py b/tests/sentry/integrations/github/tasks/test_codecov_account_unlink.py index 10b12568dc139a..cc4d59fa7ff6a8 100644 --- a/tests/sentry/integrations/github/tasks/test_codecov_account_unlink.py +++ b/tests/sentry/integrations/github/tasks/test_codecov_account_unlink.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.codecov.client import ConfigurationError diff --git a/tests/sentry/integrations/github/tasks/test_link_all_repos.py b/tests/sentry/integrations/github/tasks/test_link_all_repos.py index fada2927434f72..4d47abcd4400d8 100644 --- a/tests/sentry/integrations/github/tasks/test_link_all_repos.py +++ b/tests/sentry/integrations/github/tasks/test_link_all_repos.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/integrations/github/tasks/test_pr_comment.py b/tests/sentry/integrations/github/tasks/test_pr_comment.py index ed19a43b74deff..1cdb0ae2f9e910 100644 --- a/tests/sentry/integrations/github/tasks/test_pr_comment.py +++ b/tests/sentry/integrations/github/tasks/test_pr_comment.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import UTC, datetime, timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/github/test_client.py b/tests/sentry/integrations/github/test_client.py index a2be918f5e2a0f..c12edb387b00af 100644 --- a/tests/sentry/integrations/github/test_client.py +++ b/tests/sentry/integrations/github/test_client.py @@ -1,3 +1,4 @@ +from typing import int import re from dataclasses import asdict from datetime import UTC, datetime, timedelta diff --git a/tests/sentry/integrations/github/test_installation.py b/tests/sentry/integrations/github/test_installation.py index 5a8b631ba452d6..b7a31de4d34eb3 100644 --- a/tests/sentry/integrations/github/test_installation.py +++ b/tests/sentry/integrations/github/test_installation.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from uuid import uuid4 diff --git a/tests/sentry/integrations/github/test_integration.py b/tests/sentry/integrations/github/test_integration.py index bd690a94d5158f..2bdb678a63a6c8 100644 --- a/tests/sentry/integrations/github/test_integration.py +++ b/tests/sentry/integrations/github/test_integration.py @@ -2,7 +2,7 @@ from dataclasses import asdict from datetime import datetime, timezone -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import ANY, MagicMock, patch from urllib.parse import urlencode, urlparse diff --git a/tests/sentry/integrations/github/test_issues.py b/tests/sentry/integrations/github/test_issues.py index 90bbbd1973328d..22265da0ea4b8c 100644 --- a/tests/sentry/integrations/github/test_issues.py +++ b/tests/sentry/integrations/github/test_issues.py @@ -1,7 +1,7 @@ import datetime from collections.abc import Mapping, Sequence from functools import cached_property -from typing import cast +from typing import int, cast from unittest import mock from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/github/test_post_install.py b/tests/sentry/integrations/github/test_post_install.py index c79e925d6a6091..67c9ad3cd54788 100644 --- a/tests/sentry/integrations/github/test_post_install.py +++ b/tests/sentry/integrations/github/test_post_install.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, call, patch from sentry.integrations.github.integration import GitHubIntegrationProvider diff --git a/tests/sentry/integrations/github/test_repository.py b/tests/sentry/integrations/github/test_repository.py index 85cde7c1136add..7d00cf5eb2fd18 100644 --- a/tests/sentry/integrations/github/test_repository.py +++ b/tests/sentry/integrations/github/test_repository.py @@ -1,3 +1,4 @@ +from typing import int import datetime from functools import cached_property from unittest import mock diff --git a/tests/sentry/integrations/github/test_search.py b/tests/sentry/integrations/github/test_search.py index adf7f2772b1583..b7e0db4574d831 100644 --- a/tests/sentry/integrations/github/test_search.py +++ b/tests/sentry/integrations/github/test_search.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from unittest.mock import MagicMock, patch from urllib.parse import urlencode diff --git a/tests/sentry/integrations/github/test_ticket_action.py b/tests/sentry/integrations/github/test_ticket_action.py index 43cd084404d5f8..c27d0e38fd9e30 100644 --- a/tests/sentry/integrations/github/test_ticket_action.py +++ b/tests/sentry/integrations/github/test_ticket_action.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import pytest diff --git a/tests/sentry/integrations/github/test_utils.py b/tests/sentry/integrations/github/test_utils.py index 8ddc2be3527951..3fd6ae74d7bee1 100644 --- a/tests/sentry/integrations/github/test_utils.py +++ b/tests/sentry/integrations/github/test_utils.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.integrations.github.utils import parse_github_blob_url diff --git a/tests/sentry/integrations/github/test_webhooks.py b/tests/sentry/integrations/github/test_webhooks.py index 9003b17cd19c7e..38d34fe9722613 100644 --- a/tests/sentry/integrations/github/test_webhooks.py +++ b/tests/sentry/integrations/github/test_webhooks.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from unittest.mock import MagicMock, patch from uuid import uuid4 diff --git a/tests/sentry/integrations/github_enterprise/test_client.py b/tests/sentry/integrations/github_enterprise/test_client.py index bc1f5a44c4f1ac..11c46d23450011 100644 --- a/tests/sentry/integrations/github_enterprise/test_client.py +++ b/tests/sentry/integrations/github_enterprise/test_client.py @@ -1,3 +1,4 @@ +from typing import int import datetime from unittest import mock diff --git a/tests/sentry/integrations/github_enterprise/test_integration.py b/tests/sentry/integrations/github_enterprise/test_integration.py index 8d541f1c2be02a..5d8d30f0dcfcc6 100644 --- a/tests/sentry/integrations/github_enterprise/test_integration.py +++ b/tests/sentry/integrations/github_enterprise/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import asdict from datetime import datetime, timezone from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/github_enterprise/test_issues.py b/tests/sentry/integrations/github_enterprise/test_issues.py index 38b57ad16be6d0..aaf3e69c02fe4b 100644 --- a/tests/sentry/integrations/github_enterprise/test_issues.py +++ b/tests/sentry/integrations/github_enterprise/test_issues.py @@ -1,5 +1,5 @@ from functools import cached_property -from typing import cast +from typing import int, cast from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/integrations/github_enterprise/test_repository.py b/tests/sentry/integrations/github_enterprise/test_repository.py index 347c24e16807bf..265fce85e453ba 100644 --- a/tests/sentry/integrations/github_enterprise/test_repository.py +++ b/tests/sentry/integrations/github_enterprise/test_repository.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import responses diff --git a/tests/sentry/integrations/github_enterprise/test_search.py b/tests/sentry/integrations/github_enterprise/test_search.py index 34150bf96c33bd..194e52131c9944 100644 --- a/tests/sentry/integrations/github_enterprise/test_search.py +++ b/tests/sentry/integrations/github_enterprise/test_search.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from sentry.integrations.models.integration import Integration diff --git a/tests/sentry/integrations/github_enterprise/test_ticket_action.py b/tests/sentry/integrations/github_enterprise/test_ticket_action.py index 4a46469132352e..9ed8f8eb498ac3 100644 --- a/tests/sentry/integrations/github_enterprise/test_ticket_action.py +++ b/tests/sentry/integrations/github_enterprise/test_ticket_action.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import pytest diff --git a/tests/sentry/integrations/github_enterprise/test_webhooks.py b/tests/sentry/integrations/github_enterprise/test_webhooks.py index af19f790d45b5c..f148531d29553d 100644 --- a/tests/sentry/integrations/github_enterprise/test_webhooks.py +++ b/tests/sentry/integrations/github_enterprise/test_webhooks.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from unittest.mock import MagicMock, patch from uuid import uuid4 diff --git a/tests/sentry/integrations/gitlab/tasks/test_pr_comment.py b/tests/sentry/integrations/gitlab/tasks/test_pr_comment.py index 169bfc13023455..41d4f83e952743 100644 --- a/tests/sentry/integrations/gitlab/tasks/test_pr_comment.py +++ b/tests/sentry/integrations/gitlab/tasks/test_pr_comment.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import UTC, datetime, timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/gitlab/test_client.py b/tests/sentry/integrations/gitlab/test_client.py index 760af2d4d72ca8..cf92fd1d614590 100644 --- a/tests/sentry/integrations/gitlab/test_client.py +++ b/tests/sentry/integrations/gitlab/test_client.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from dataclasses import asdict from datetime import datetime, timezone diff --git a/tests/sentry/integrations/gitlab/test_integration.py b/tests/sentry/integrations/gitlab/test_integration.py index efe63b62c351b7..a0372ff682f5a7 100644 --- a/tests/sentry/integrations/gitlab/test_integration.py +++ b/tests/sentry/integrations/gitlab/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import asdict from datetime import datetime, timezone from unittest.mock import MagicMock, Mock, patch diff --git a/tests/sentry/integrations/gitlab/test_issues.py b/tests/sentry/integrations/gitlab/test_issues.py index e5b02240858644..9236491a7ee274 100644 --- a/tests/sentry/integrations/gitlab/test_issues.py +++ b/tests/sentry/integrations/gitlab/test_issues.py @@ -1,3 +1,4 @@ +from typing import int import orjson import pytest import responses diff --git a/tests/sentry/integrations/gitlab/test_repository.py b/tests/sentry/integrations/gitlab/test_repository.py index 9d1c85d0c7ab43..08f2fd6be2a50d 100644 --- a/tests/sentry/integrations/gitlab/test_repository.py +++ b/tests/sentry/integrations/gitlab/test_repository.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import orjson diff --git a/tests/sentry/integrations/gitlab/test_search.py b/tests/sentry/integrations/gitlab/test_search.py index 6ed1c17a3e2b3f..61567b1dbfa1e4 100644 --- a/tests/sentry/integrations/gitlab/test_search.py +++ b/tests/sentry/integrations/gitlab/test_search.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from urllib.parse import parse_qs diff --git a/tests/sentry/integrations/gitlab/test_webhook.py b/tests/sentry/integrations/gitlab/test_webhook.py index 8468b6de202f0b..bc40fdf4ece2fe 100644 --- a/tests/sentry/integrations/gitlab/test_webhook.py +++ b/tests/sentry/integrations/gitlab/test_webhook.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/integrations/jira/models/test_jira_schema.py b/tests/sentry/integrations/jira/models/test_jira_schema.py index 07418dafc5e27b..d36f987b308198 100644 --- a/tests/sentry/integrations/jira/models/test_jira_schema.py +++ b/tests/sentry/integrations/jira/models/test_jira_schema.py @@ -1,3 +1,4 @@ +from typing import int from fixtures.integrations.jira.stub_client import StubJiraApiClient from sentry.integrations.jira.models.create_issue_metadata import JiraIssueTypeMetadata from sentry.testutils.cases import TestCase diff --git a/tests/sentry/integrations/jira/test_client.py b/tests/sentry/integrations/jira/test_client.py index f87b5b60ba7ce7..e1ee5620ceaa8d 100644 --- a/tests/sentry/integrations/jira/test_client.py +++ b/tests/sentry/integrations/jira/test_client.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import jwt diff --git a/tests/sentry/integrations/jira/test_csp.py b/tests/sentry/integrations/jira/test_csp.py index cedfe3e98ee546..777c14f344d561 100644 --- a/tests/sentry/integrations/jira/test_csp.py +++ b/tests/sentry/integrations/jira/test_csp.py @@ -1,3 +1,4 @@ +from typing import int from django.test.utils import override_settings from sentry.silo.base import SiloMode diff --git a/tests/sentry/integrations/jira/test_extension_configuration.py b/tests/sentry/integrations/jira/test_extension_configuration.py index 646ba2edd88f24..98625e6fa62016 100644 --- a/tests/sentry/integrations/jira/test_extension_configuration.py +++ b/tests/sentry/integrations/jira/test_extension_configuration.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.jira.views import SALT, JiraExtensionConfigurationView from sentry.testutils.cases import TestCase from sentry.utils import json diff --git a/tests/sentry/integrations/jira/test_installed.py b/tests/sentry/integrations/jira/test_installed.py index 41117dafd46efc..c5b22719020900 100644 --- a/tests/sentry/integrations/jira/test_installed.py +++ b/tests/sentry/integrations/jira/test_installed.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch import jwt diff --git a/tests/sentry/integrations/jira/test_integration.py b/tests/sentry/integrations/jira/test_integration.py index d45df9ef26a48f..2dd4f1065f5f92 100644 --- a/tests/sentry/integrations/jira/test_integration.py +++ b/tests/sentry/integrations/jira/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest import mock from unittest.mock import patch diff --git a/tests/sentry/integrations/jira/test_notify_action.py b/tests/sentry/integrations/jira/test_notify_action.py index 8fae25e2432cf5..b4f858ebe1996e 100644 --- a/tests/sentry/integrations/jira/test_notify_action.py +++ b/tests/sentry/integrations/jira/test_notify_action.py @@ -1,3 +1,4 @@ +from typing import int import responses from fixtures.integrations.stub_service import StubService diff --git a/tests/sentry/integrations/jira/test_search_endpoint.py b/tests/sentry/integrations/jira/test_search_endpoint.py index 9427289a581a18..3263d7b49e4df8 100644 --- a/tests/sentry/integrations/jira/test_search_endpoint.py +++ b/tests/sentry/integrations/jira/test_search_endpoint.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from urllib.parse import parse_qs, urlparse diff --git a/tests/sentry/integrations/jira/test_sentry_installation.py b/tests/sentry/integrations/jira/test_sentry_installation.py index 76d5b7789d3513..ff33483802d5d7 100644 --- a/tests/sentry/integrations/jira/test_sentry_installation.py +++ b/tests/sentry/integrations/jira/test_sentry_installation.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from jwt import ExpiredSignatureError diff --git a/tests/sentry/integrations/jira/test_sentry_issue_details.py b/tests/sentry/integrations/jira/test_sentry_issue_details.py index 12ae39414bcffd..e808304d10ad75 100644 --- a/tests/sentry/integrations/jira/test_sentry_issue_details.py +++ b/tests/sentry/integrations/jira/test_sentry_issue_details.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/jira/test_tasks.py b/tests/sentry/integrations/jira/test_tasks.py index 8cba69fae8dff1..7d916e12adf6b6 100644 --- a/tests/sentry/integrations/jira/test_tasks.py +++ b/tests/sentry/integrations/jira/test_tasks.py @@ -1,3 +1,4 @@ +from typing import int import responses from sentry.integrations.jira.tasks import sync_metadata diff --git a/tests/sentry/integrations/jira/test_ticket_action.py b/tests/sentry/integrations/jira/test_ticket_action.py index 64a273a28046ce..e383744b06a1ff 100644 --- a/tests/sentry/integrations/jira/test_ticket_action.py +++ b/tests/sentry/integrations/jira/test_ticket_action.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/integrations/jira/test_uninstalled.py b/tests/sentry/integrations/jira/test_uninstalled.py index 0b0d76cba9d090..c3b8d54b0570cd 100644 --- a/tests/sentry/integrations/jira/test_uninstalled.py +++ b/tests/sentry/integrations/jira/test_uninstalled.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import jwt diff --git a/tests/sentry/integrations/jira/test_utils.py b/tests/sentry/integrations/jira/test_utils.py index df8b01a04c6867..4900be450e559b 100644 --- a/tests/sentry/integrations/jira/test_utils.py +++ b/tests/sentry/integrations/jira/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from fixtures.integrations.stub_service import StubService from sentry.integrations.jira.utils import build_user_choice from sentry.testutils.cases import TestCase diff --git a/tests/sentry/integrations/jira/test_webhooks.py b/tests/sentry/integrations/jira/test_webhooks.py index 56a594231c2fe5..1c4066706186b6 100644 --- a/tests/sentry/integrations/jira/test_webhooks.py +++ b/tests/sentry/integrations/jira/test_webhooks.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/jira/utils/test_create_issue_schema_transformers.py b/tests/sentry/integrations/jira/utils/test_create_issue_schema_transformers.py index 59d7890e960e18..84694a6c59a567 100644 --- a/tests/sentry/integrations/jira/utils/test_create_issue_schema_transformers.py +++ b/tests/sentry/integrations/jira/utils/test_create_issue_schema_transformers.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/integrations/jira_server/__init__.py b/tests/sentry/integrations/jira_server/__init__.py index 9d3e8a17f7844c..79bff8af341390 100644 --- a/tests/sentry/integrations/jira_server/__init__.py +++ b/tests/sentry/integrations/jira_server/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.integrations.models.external_issue import ExternalIssue from sentry.integrations.models.integration import Integration diff --git a/tests/sentry/integrations/jira_server/test_client.py b/tests/sentry/integrations/jira_server/test_client.py index 8ad35ee467efd0..43052317eb4745 100644 --- a/tests/sentry/integrations/jira_server/test_client.py +++ b/tests/sentry/integrations/jira_server/test_client.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from requests import Request diff --git a/tests/sentry/integrations/jira_server/test_installation.py b/tests/sentry/integrations/jira_server/test_installation.py index 8f473faf3589e6..e2c20ed1d7b889 100644 --- a/tests/sentry/integrations/jira_server/test_installation.py +++ b/tests/sentry/integrations/jira_server/test_installation.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import orjson diff --git a/tests/sentry/integrations/jira_server/test_integration.py b/tests/sentry/integrations/jira_server/test_integration.py index e5f88c86ff480d..a60ad368fb09f4 100644 --- a/tests/sentry/integrations/jira_server/test_integration.py +++ b/tests/sentry/integrations/jira_server/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest import mock from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/jira_server/test_search.py b/tests/sentry/integrations/jira_server/test_search.py index f5b13841f6b1f7..5d0545f844a756 100644 --- a/tests/sentry/integrations/jira_server/test_search.py +++ b/tests/sentry/integrations/jira_server/test_search.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from urllib.parse import parse_qs, urlparse diff --git a/tests/sentry/integrations/jira_server/test_ticket_action.py b/tests/sentry/integrations/jira_server/test_ticket_action.py index 02882196c3800b..cf7c2a4ed9e242 100644 --- a/tests/sentry/integrations/jira_server/test_ticket_action.py +++ b/tests/sentry/integrations/jira_server/test_ticket_action.py @@ -1,3 +1,4 @@ +from typing import int import responses from django.urls import reverse from rest_framework.test import APITestCase as BaseAPITestCase diff --git a/tests/sentry/integrations/jira_server/test_utils.py b/tests/sentry/integrations/jira_server/test_utils.py index 78f546440b692d..df89cc83c91252 100644 --- a/tests/sentry/integrations/jira_server/test_utils.py +++ b/tests/sentry/integrations/jira_server/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from fixtures.integrations.stub_service import StubService from sentry.integrations.jira_server.utils import build_user_choice from sentry.testutils.cases import TestCase diff --git a/tests/sentry/integrations/jira_server/test_webhooks.py b/tests/sentry/integrations/jira_server/test_webhooks.py index d0d5a2601fbca0..0af288e7899ef4 100644 --- a/tests/sentry/integrations/jira_server/test_webhooks.py +++ b/tests/sentry/integrations/jira_server/test_webhooks.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import jwt diff --git a/tests/sentry/integrations/middleware/hybrid_cloud/test_base.py b/tests/sentry/integrations/middleware/hybrid_cloud/test_base.py index 803414b2e9d81c..28a42cf70a907c 100644 --- a/tests/sentry/integrations/middleware/hybrid_cloud/test_base.py +++ b/tests/sentry/integrations/middleware/hybrid_cloud/test_base.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Iterable from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/models/deletions/test_organizationintegration.py b/tests/sentry/integrations/models/deletions/test_organizationintegration.py index f83cfdb041419c..e7424640871a83 100644 --- a/tests/sentry/integrations/models/deletions/test_organizationintegration.py +++ b/tests/sentry/integrations/models/deletions/test_organizationintegration.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import ObjectStatus from sentry.deletions.models.scheduleddeletion import ScheduledDeletion from sentry.deletions.tasks.scheduled import run_scheduled_deletions_control diff --git a/tests/sentry/integrations/models/test_external_actor.py b/tests/sentry/integrations/models/test_external_actor.py index da3327157e41af..763a6c83736e5f 100644 --- a/tests/sentry/integrations/models/test_external_actor.py +++ b/tests/sentry/integrations/models/test_external_actor.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.models.external_actor import ExternalActor from sentry.testutils.cases import TestCase diff --git a/tests/sentry/integrations/models/test_integrationfeature.py b/tests/sentry/integrations/models/test_integrationfeature.py index 405a859993a909..bb3503c020ff11 100644 --- a/tests/sentry/integrations/models/test_integrationfeature.py +++ b/tests/sentry/integrations/models/test_integrationfeature.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.models.integration_feature import IntegrationFeature, IntegrationTypes from sentry.testutils.cases import TestCase from sentry.testutils.silo import control_silo_test diff --git a/tests/sentry/integrations/msteams/notifications/test_assigned.py b/tests/sentry/integrations/msteams/notifications/test_assigned.py index c7492c005bfcd6..f2bb6c49fb5d54 100644 --- a/tests/sentry/integrations/msteams/notifications/test_assigned.py +++ b/tests/sentry/integrations/msteams/notifications/test_assigned.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch from sentry.models.activity import Activity diff --git a/tests/sentry/integrations/msteams/notifications/test_deploy.py b/tests/sentry/integrations/msteams/notifications/test_deploy.py index bbb60b93352118..b4760ad03873c9 100644 --- a/tests/sentry/integrations/msteams/notifications/test_deploy.py +++ b/tests/sentry/integrations/msteams/notifications/test_deploy.py @@ -1,3 +1,4 @@ +from typing import int from unittest import skip from unittest.mock import MagicMock, Mock, patch diff --git a/tests/sentry/integrations/msteams/notifications/test_escalating.py b/tests/sentry/integrations/msteams/notifications/test_escalating.py index 000c38acc58851..eb19e4c3b7e24e 100644 --- a/tests/sentry/integrations/msteams/notifications/test_escalating.py +++ b/tests/sentry/integrations/msteams/notifications/test_escalating.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch from sentry.models.activity import Activity diff --git a/tests/sentry/integrations/msteams/notifications/test_issue_alert.py b/tests/sentry/integrations/msteams/notifications/test_issue_alert.py index 6583af71fab50f..233ed4766bcedf 100644 --- a/tests/sentry/integrations/msteams/notifications/test_issue_alert.py +++ b/tests/sentry/integrations/msteams/notifications/test_issue_alert.py @@ -1,3 +1,4 @@ +from typing import int import uuid from unittest.mock import MagicMock, Mock, patch diff --git a/tests/sentry/integrations/msteams/notifications/test_note.py b/tests/sentry/integrations/msteams/notifications/test_note.py index ff774b0f47c058..b47eead02e4113 100644 --- a/tests/sentry/integrations/msteams/notifications/test_note.py +++ b/tests/sentry/integrations/msteams/notifications/test_note.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch from sentry.models.activity import Activity diff --git a/tests/sentry/integrations/msteams/notifications/test_regression.py b/tests/sentry/integrations/msteams/notifications/test_regression.py index 772c1e4028aa1d..eec26394867521 100644 --- a/tests/sentry/integrations/msteams/notifications/test_regression.py +++ b/tests/sentry/integrations/msteams/notifications/test_regression.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch from sentry.models.activity import Activity diff --git a/tests/sentry/integrations/msteams/notifications/test_resolved.py b/tests/sentry/integrations/msteams/notifications/test_resolved.py index 611ad63ef2cc79..5c88a7fb993fb8 100644 --- a/tests/sentry/integrations/msteams/notifications/test_resolved.py +++ b/tests/sentry/integrations/msteams/notifications/test_resolved.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch from sentry.models.activity import Activity diff --git a/tests/sentry/integrations/msteams/notifications/test_unassigned.py b/tests/sentry/integrations/msteams/notifications/test_unassigned.py index e4540132fa8c6e..e8214ca5c80bdb 100644 --- a/tests/sentry/integrations/msteams/notifications/test_unassigned.py +++ b/tests/sentry/integrations/msteams/notifications/test_unassigned.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch from sentry.models.activity import Activity diff --git a/tests/sentry/integrations/msteams/test_action_state_change.py b/tests/sentry/integrations/msteams/test_action_state_change.py index 43d3f221e40344..d0fbba10469b10 100644 --- a/tests/sentry/integrations/msteams/test_action_state_change.py +++ b/tests/sentry/integrations/msteams/test_action_state_change.py @@ -1,3 +1,4 @@ +from typing import int import time from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/msteams/test_client.py b/tests/sentry/integrations/msteams/test_client.py index 39fad7ba3beeb8..0f6415c73e1037 100644 --- a/tests/sentry/integrations/msteams/test_client.py +++ b/tests/sentry/integrations/msteams/test_client.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from unittest import mock from unittest.mock import call, patch diff --git a/tests/sentry/integrations/msteams/test_helpers.py b/tests/sentry/integrations/msteams/test_helpers.py index d73cca9e0b13ed..ca8ac788f51884 100644 --- a/tests/sentry/integrations/msteams/test_helpers.py +++ b/tests/sentry/integrations/msteams/test_helpers.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any GENERIC_EVENT: dict[str, Any] = { "serviceUrl": "https://smba.trafficmanager.net/amer/", diff --git a/tests/sentry/integrations/msteams/test_integration.py b/tests/sentry/integrations/msteams/test_integration.py index d30bae8828f493..e6b386ec0da568 100644 --- a/tests/sentry/integrations/msteams/test_integration.py +++ b/tests/sentry/integrations/msteams/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from urllib.parse import urlencode diff --git a/tests/sentry/integrations/msteams/test_link_identity.py b/tests/sentry/integrations/msteams/test_link_identity.py index 699e2110834dbc..e9f74fc9a28a6c 100644 --- a/tests/sentry/integrations/msteams/test_link_identity.py +++ b/tests/sentry/integrations/msteams/test_link_identity.py @@ -1,3 +1,4 @@ +from typing import int import time from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/msteams/test_message_builder.py b/tests/sentry/integrations/msteams/test_message_builder.py index 677036d45b8b3d..e651a7a47550f7 100644 --- a/tests/sentry/integrations/msteams/test_message_builder.py +++ b/tests/sentry/integrations/msteams/test_message_builder.py @@ -1,7 +1,7 @@ from __future__ import annotations import re -from typing import TypeGuard +from typing import int, TypeGuard import orjson diff --git a/tests/sentry/integrations/msteams/test_notifications.py b/tests/sentry/integrations/msteams/test_notifications.py index be618078b4ce0b..7e19522d0b2eea 100644 --- a/tests/sentry/integrations/msteams/test_notifications.py +++ b/tests/sentry/integrations/msteams/test_notifications.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, call, patch import orjson diff --git a/tests/sentry/integrations/msteams/test_notify_action.py b/tests/sentry/integrations/msteams/test_notify_action.py index a10477553f9829..51e66647b6c3d1 100644 --- a/tests/sentry/integrations/msteams/test_notify_action.py +++ b/tests/sentry/integrations/msteams/test_notify_action.py @@ -1,3 +1,4 @@ +from typing import int import re import time from unittest import mock diff --git a/tests/sentry/integrations/msteams/test_unlink_identity.py b/tests/sentry/integrations/msteams/test_unlink_identity.py index 709686f52a3a6a..8c8f05e4d92810 100644 --- a/tests/sentry/integrations/msteams/test_unlink_identity.py +++ b/tests/sentry/integrations/msteams/test_unlink_identity.py @@ -1,3 +1,4 @@ +from typing import int import time import responses diff --git a/tests/sentry/integrations/msteams/test_utils.py b/tests/sentry/integrations/msteams/test_utils.py index ec6deece591c1f..38d140a76e3f01 100644 --- a/tests/sentry/integrations/msteams/test_utils.py +++ b/tests/sentry/integrations/msteams/test_utils.py @@ -1,3 +1,4 @@ +from typing import int import time import orjson diff --git a/tests/sentry/integrations/msteams/test_webhook.py b/tests/sentry/integrations/msteams/test_webhook.py index 121cbea36caf16..780a7c4da7e12c 100644 --- a/tests/sentry/integrations/msteams/test_webhook.py +++ b/tests/sentry/integrations/msteams/test_webhook.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from copy import deepcopy from unittest import mock diff --git a/tests/sentry/integrations/msteams/webhook/test_ms_teams_events.py b/tests/sentry/integrations/msteams/webhook/test_ms_teams_events.py index 88ab68cc3a885e..5cc1725e8eb7ad 100644 --- a/tests/sentry/integrations/msteams/webhook/test_ms_teams_events.py +++ b/tests/sentry/integrations/msteams/webhook/test_ms_teams_events.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from sentry.integrations.msteams.webhook import MsTeamsEvents diff --git a/tests/sentry/integrations/msteams/webhook/test_ms_teams_webhook_endpoint.py b/tests/sentry/integrations/msteams/webhook/test_ms_teams_webhook_endpoint.py index 1adfe7bd2987de..c8a48997e04096 100644 --- a/tests/sentry/integrations/msteams/webhook/test_ms_teams_webhook_endpoint.py +++ b/tests/sentry/integrations/msteams/webhook/test_ms_teams_webhook_endpoint.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import TestCase import pytest diff --git a/tests/sentry/integrations/msteams/webhook/test_ms_teams_webhook_parsing.py b/tests/sentry/integrations/msteams/webhook/test_ms_teams_webhook_parsing.py index c679190f86322b..2fca53505f5c1e 100644 --- a/tests/sentry/integrations/msteams/webhook/test_ms_teams_webhook_parsing.py +++ b/tests/sentry/integrations/msteams/webhook/test_ms_teams_webhook_parsing.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.integrations.msteams.parsing import is_new_integration_installation_event diff --git a/tests/sentry/integrations/opsgenie/test_client.py b/tests/sentry/integrations/opsgenie/test_client.py index 6a8197508131f5..053135bcfe1745 100644 --- a/tests/sentry/integrations/opsgenie/test_client.py +++ b/tests/sentry/integrations/opsgenie/test_client.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/integrations/opsgenie/test_integration.py b/tests/sentry/integrations/opsgenie/test_integration.py index 6be22a3d7e94bc..20c6815849e810 100644 --- a/tests/sentry/integrations/opsgenie/test_integration.py +++ b/tests/sentry/integrations/opsgenie/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/opsgenie/test_notify_action.py b/tests/sentry/integrations/opsgenie/test_notify_action.py index 82e21e95f46bf3..558d159852a601 100644 --- a/tests/sentry/integrations/opsgenie/test_notify_action.py +++ b/tests/sentry/integrations/opsgenie/test_notify_action.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/integrations/pagerduty/test_client.py b/tests/sentry/integrations/pagerduty/test_client.py index bb6c8123fbb867..07b85850badbf0 100644 --- a/tests/sentry/integrations/pagerduty/test_client.py +++ b/tests/sentry/integrations/pagerduty/test_client.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from unittest import mock from unittest.mock import MagicMock, call, patch diff --git a/tests/sentry/integrations/pagerduty/test_integration.py b/tests/sentry/integrations/pagerduty/test_integration.py index b17cd3891bbbc8..5e90fb6e1c2eaf 100644 --- a/tests/sentry/integrations/pagerduty/test_integration.py +++ b/tests/sentry/integrations/pagerduty/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from urllib.parse import urlencode, urlparse diff --git a/tests/sentry/integrations/pagerduty/test_notification.py b/tests/sentry/integrations/pagerduty/test_notification.py index dfe2a4c22809a7..b913331dca46ac 100644 --- a/tests/sentry/integrations/pagerduty/test_notification.py +++ b/tests/sentry/integrations/pagerduty/test_notification.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/integrations/repository/base/test_base_new_notification_message.py b/tests/sentry/integrations/repository/base/test_base_new_notification_message.py index 32acb6a04304ac..6d5fb4400dc3b9 100644 --- a/tests/sentry/integrations/repository/base/test_base_new_notification_message.py +++ b/tests/sentry/integrations/repository/base/test_base_new_notification_message.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.integrations.repository.base import ( diff --git a/tests/sentry/integrations/repository/issue_alert/test_issue_alert_notification_message_repository.py b/tests/sentry/integrations/repository/issue_alert/test_issue_alert_notification_message_repository.py index af7bbcb4a90127..e80fcb78503190 100644 --- a/tests/sentry/integrations/repository/issue_alert/test_issue_alert_notification_message_repository.py +++ b/tests/sentry/integrations/repository/issue_alert/test_issue_alert_notification_message_repository.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from uuid import uuid4 diff --git a/tests/sentry/integrations/repository/metric_alert/test_metric_alert_notification_message_repository.py b/tests/sentry/integrations/repository/metric_alert/test_metric_alert_notification_message_repository.py index d4f42d518ee135..15661b1e491c7f 100644 --- a/tests/sentry/integrations/repository/metric_alert/test_metric_alert_notification_message_repository.py +++ b/tests/sentry/integrations/repository/metric_alert/test_metric_alert_notification_message_repository.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.repository.metric_alert import ( MetricAlertNotificationMessage, MetricAlertNotificationMessageRepository, diff --git a/tests/sentry/integrations/repository/metric_alert/test_new_metric_alert_notification_message.py b/tests/sentry/integrations/repository/metric_alert/test_new_metric_alert_notification_message.py index 4a0bdc4aa27676..b537f91b86233f 100644 --- a/tests/sentry/integrations/repository/metric_alert/test_new_metric_alert_notification_message.py +++ b/tests/sentry/integrations/repository/metric_alert/test_new_metric_alert_notification_message.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.integrations.repository.base import MessageIdentifierWithErrorValidationError diff --git a/tests/sentry/integrations/repository/notification_action/test_notification_action_notification_message_repository.py b/tests/sentry/integrations/repository/notification_action/test_notification_action_notification_message_repository.py index 0f80b0f10bf9fe..8158b703c9a465 100644 --- a/tests/sentry/integrations/repository/notification_action/test_notification_action_notification_message_repository.py +++ b/tests/sentry/integrations/repository/notification_action/test_notification_action_notification_message_repository.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/integrations/services/test_assignment_source.py b/tests/sentry/integrations/services/test_assignment_source.py index 528dd57b8ad65b..45317e9f48c514 100644 --- a/tests/sentry/integrations/services/test_assignment_source.py +++ b/tests/sentry/integrations/services/test_assignment_source.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import TestCase from sentry.integrations.services.assignment_source import AssignmentSource diff --git a/tests/sentry/integrations/services/test_integration.py b/tests/sentry/integrations/services/test_integration.py index 67fcb7d3b099e7..ee7ecf3e4bf92c 100644 --- a/tests/sentry/integrations/services/test_integration.py +++ b/tests/sentry/integrations/services/test_integration.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import datetime, timedelta, timezone from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/slack/actions/notification/test_slack_notify_service_action.py b/tests/sentry/integrations/slack/actions/notification/test_slack_notify_service_action.py index bcee29dee149ff..2b8c31d7c95631 100644 --- a/tests/sentry/integrations/slack/actions/notification/test_slack_notify_service_action.py +++ b/tests/sentry/integrations/slack/actions/notification/test_slack_notify_service_action.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from uuid import uuid4 diff --git a/tests/sentry/integrations/slack/message_builder/test_routing.py b/tests/sentry/integrations/slack/message_builder/test_routing.py index 7ddf150caae988..0fc7b9182082c8 100644 --- a/tests/sentry/integrations/slack/message_builder/test_routing.py +++ b/tests/sentry/integrations/slack/message_builder/test_routing.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.slack.message_builder.routing import decode_action_id, encode_action_id from sentry.integrations.slack.message_builder.types import SlackAction from sentry.testutils.cases import TestCase diff --git a/tests/sentry/integrations/slack/notifications/test_assigned.py b/tests/sentry/integrations/slack/notifications/test_assigned.py index 5459b7f74480ae..b64bbf9ba46129 100644 --- a/tests/sentry/integrations/slack/notifications/test_assigned.py +++ b/tests/sentry/integrations/slack/notifications/test_assigned.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import orjson diff --git a/tests/sentry/integrations/slack/notifications/test_deploy.py b/tests/sentry/integrations/slack/notifications/test_deploy.py index d71ff3c470bc87..cdad45e8495914 100644 --- a/tests/sentry/integrations/slack/notifications/test_deploy.py +++ b/tests/sentry/integrations/slack/notifications/test_deploy.py @@ -1,3 +1,4 @@ +from typing import int import orjson from django.utils import timezone diff --git a/tests/sentry/integrations/slack/notifications/test_escalating.py b/tests/sentry/integrations/slack/notifications/test_escalating.py index e75333b9aea4f1..4000031843a565 100644 --- a/tests/sentry/integrations/slack/notifications/test_escalating.py +++ b/tests/sentry/integrations/slack/notifications/test_escalating.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import orjson diff --git a/tests/sentry/integrations/slack/notifications/test_issue_alert.py b/tests/sentry/integrations/slack/notifications/test_issue_alert.py index d7eea5dd1285eb..43a14f95903acf 100644 --- a/tests/sentry/integrations/slack/notifications/test_issue_alert.py +++ b/tests/sentry/integrations/slack/notifications/test_issue_alert.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import UTC, datetime from unittest import mock diff --git a/tests/sentry/integrations/slack/notifications/test_note.py b/tests/sentry/integrations/slack/notifications/test_note.py index 9b664c7141b83f..3d7dc44fb9a70e 100644 --- a/tests/sentry/integrations/slack/notifications/test_note.py +++ b/tests/sentry/integrations/slack/notifications/test_note.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import orjson diff --git a/tests/sentry/integrations/slack/notifications/test_nudge.py b/tests/sentry/integrations/slack/notifications/test_nudge.py index 20e4da816b2774..3b058060ff8d31 100644 --- a/tests/sentry/integrations/slack/notifications/test_nudge.py +++ b/tests/sentry/integrations/slack/notifications/test_nudge.py @@ -1,3 +1,4 @@ +from typing import int import orjson import responses diff --git a/tests/sentry/integrations/slack/notifications/test_regression.py b/tests/sentry/integrations/slack/notifications/test_regression.py index 7b88c2c734ea3d..318f10a81c3c4a 100644 --- a/tests/sentry/integrations/slack/notifications/test_regression.py +++ b/tests/sentry/integrations/slack/notifications/test_regression.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import orjson diff --git a/tests/sentry/integrations/slack/notifications/test_resolved.py b/tests/sentry/integrations/slack/notifications/test_resolved.py index 8f109578acd1ff..f1b7e74f729a6f 100644 --- a/tests/sentry/integrations/slack/notifications/test_resolved.py +++ b/tests/sentry/integrations/slack/notifications/test_resolved.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import orjson diff --git a/tests/sentry/integrations/slack/notifications/test_resolved_in_pull_request.py b/tests/sentry/integrations/slack/notifications/test_resolved_in_pull_request.py index 80b6dc986450a1..ae5fbe11254dd4 100644 --- a/tests/sentry/integrations/slack/notifications/test_resolved_in_pull_request.py +++ b/tests/sentry/integrations/slack/notifications/test_resolved_in_pull_request.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import orjson diff --git a/tests/sentry/integrations/slack/notifications/test_resolved_in_release.py b/tests/sentry/integrations/slack/notifications/test_resolved_in_release.py index bc0083dde67984..e198e7b34475db 100644 --- a/tests/sentry/integrations/slack/notifications/test_resolved_in_release.py +++ b/tests/sentry/integrations/slack/notifications/test_resolved_in_release.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import orjson diff --git a/tests/sentry/integrations/slack/notifications/test_unassigned.py b/tests/sentry/integrations/slack/notifications/test_unassigned.py index 352cfc89da9bca..681828f1dc6f64 100644 --- a/tests/sentry/integrations/slack/notifications/test_unassigned.py +++ b/tests/sentry/integrations/slack/notifications/test_unassigned.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import orjson diff --git a/tests/sentry/integrations/slack/service/test_slack_service.py b/tests/sentry/integrations/slack/service/test_slack_service.py index 720c46869d996c..953d4882b57c6e 100644 --- a/tests/sentry/integrations/slack/service/test_slack_service.py +++ b/tests/sentry/integrations/slack/service/test_slack_service.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from unittest import mock from uuid import uuid4 diff --git a/tests/sentry/integrations/slack/tasks/test_send_notifications_on_activity.py b/tests/sentry/integrations/slack/tasks/test_send_notifications_on_activity.py index 434aa5f45c838c..3c4516b9a07663 100644 --- a/tests/sentry/integrations/slack/tasks/test_send_notifications_on_activity.py +++ b/tests/sentry/integrations/slack/tasks/test_send_notifications_on_activity.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.integrations.slack.tasks.send_notifications_on_activity import ( diff --git a/tests/sentry/integrations/slack/tasks/test_tasks.py b/tests/sentry/integrations/slack/tasks/test_tasks.py index 7efcd09d26e6ab..6ca4d22bc40e2f 100644 --- a/tests/sentry/integrations/slack/tasks/test_tasks.py +++ b/tests/sentry/integrations/slack/tasks/test_tasks.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import ANY, MagicMock, patch from uuid import uuid4 diff --git a/tests/sentry/integrations/slack/test_integration.py b/tests/sentry/integrations/slack/test_integration.py index 9734a92819ff8b..474ab22339f816 100644 --- a/tests/sentry/integrations/slack/test_integration.py +++ b/tests/sentry/integrations/slack/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from urllib.parse import parse_qs, urlencode, urlparse diff --git a/tests/sentry/integrations/slack/test_link_identity.py b/tests/sentry/integrations/slack/test_link_identity.py index 012769d39f6540..e41cb908bf0459 100644 --- a/tests/sentry/integrations/slack/test_link_identity.py +++ b/tests/sentry/integrations/slack/test_link_identity.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/slack/test_link_team.py b/tests/sentry/integrations/slack/test_link_team.py index f6f65e1607b5e5..7496fbd8a723f2 100644 --- a/tests/sentry/integrations/slack/test_link_team.py +++ b/tests/sentry/integrations/slack/test_link_team.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, Sequence -from typing import Any, Optional +from typing import Any, Optional, int from unittest.mock import patch from urllib.parse import urlencode diff --git a/tests/sentry/integrations/slack/test_message_builder.py b/tests/sentry/integrations/slack/test_message_builder.py index ea6b6711893b89..293eda035edcac 100644 --- a/tests/sentry/integrations/slack/test_message_builder.py +++ b/tests/sentry/integrations/slack/test_message_builder.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import datetime -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, Mock, patch from sentry.grouping.grouptype import ErrorGroupType diff --git a/tests/sentry/integrations/slack/test_notifications.py b/tests/sentry/integrations/slack/test_notifications.py index b84dda3b0e9679..9f095e6394f7a5 100644 --- a/tests/sentry/integrations/slack/test_notifications.py +++ b/tests/sentry/integrations/slack/test_notifications.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import orjson diff --git a/tests/sentry/integrations/slack/test_notify_action.py b/tests/sentry/integrations/slack/test_notify_action.py index 0bb071fc468adc..12460f671b628f 100644 --- a/tests/sentry/integrations/slack/test_notify_action.py +++ b/tests/sentry/integrations/slack/test_notify_action.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/slack/test_requests.py b/tests/sentry/integrations/slack/test_requests.py index a065fd55bba531..a8474587efff81 100644 --- a/tests/sentry/integrations/slack/test_requests.py +++ b/tests/sentry/integrations/slack/test_requests.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from unittest.mock import MagicMock, patch from urllib.parse import urlencode diff --git a/tests/sentry/integrations/slack/test_sdk_client.py b/tests/sentry/integrations/slack/test_sdk_client.py index 8ac5a5d4e655a1..fe41ab620d0530 100644 --- a/tests/sentry/integrations/slack/test_sdk_client.py +++ b/tests/sentry/integrations/slack/test_sdk_client.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/integrations/slack/test_unfurl.py b/tests/sentry/integrations/slack/test_unfurl.py index 279cac69772026..c099f4dcef06c8 100644 --- a/tests/sentry/integrations/slack/test_unfurl.py +++ b/tests/sentry/integrations/slack/test_unfurl.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/slack/threads/activity_notifications/__init__.py b/tests/sentry/integrations/slack/threads/activity_notifications/__init__.py index 0e4b89fed3c69b..c7b6e1cb45d840 100644 --- a/tests/sentry/integrations/slack/threads/activity_notifications/__init__.py +++ b/tests/sentry/integrations/slack/threads/activity_notifications/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestCase from sentry.types.activity import ActivityType diff --git a/tests/sentry/integrations/slack/threads/activity_notifications/test_asana_external_issue_created_activity.py b/tests/sentry/integrations/slack/threads/activity_notifications/test_asana_external_issue_created_activity.py index e6bbfb184169fd..558e26d7ef8a15 100644 --- a/tests/sentry/integrations/slack/threads/activity_notifications/test_asana_external_issue_created_activity.py +++ b/tests/sentry/integrations/slack/threads/activity_notifications/test_asana_external_issue_created_activity.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.slack.threads.activity_notifications import ( _AsanaExternalIssueCreatedActivity, ) diff --git a/tests/sentry/integrations/slack/threads/activity_notifications/test_assigned_activity_notification.py b/tests/sentry/integrations/slack/threads/activity_notifications/test_assigned_activity_notification.py index 8dc97880b9d0ec..4bd330666473df 100644 --- a/tests/sentry/integrations/slack/threads/activity_notifications/test_assigned_activity_notification.py +++ b/tests/sentry/integrations/slack/threads/activity_notifications/test_assigned_activity_notification.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.activity import Activity from sentry.notifications.notifications.activity.assigned import AssignedActivityNotification from sentry.testutils.cases import TestCase diff --git a/tests/sentry/integrations/slack/threads/activity_notifications/test_external_issue_created_activity.py b/tests/sentry/integrations/slack/threads/activity_notifications/test_external_issue_created_activity.py index bb102c33894572..56f4e4838be328 100644 --- a/tests/sentry/integrations/slack/threads/activity_notifications/test_external_issue_created_activity.py +++ b/tests/sentry/integrations/slack/threads/activity_notifications/test_external_issue_created_activity.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.integrations.slack.threads.activity_notifications import _ExternalIssueCreatedActivity diff --git a/tests/sentry/integrations/slack/threads/activity_notifications/test_external_issue_created_activity_notification.py b/tests/sentry/integrations/slack/threads/activity_notifications/test_external_issue_created_activity_notification.py index e314d82767baa5..6931a691a4b7cc 100644 --- a/tests/sentry/integrations/slack/threads/activity_notifications/test_external_issue_created_activity_notification.py +++ b/tests/sentry/integrations/slack/threads/activity_notifications/test_external_issue_created_activity_notification.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.slack.threads.activity_notifications import ( ExternalIssueCreatedActivityNotification, ) diff --git a/tests/sentry/integrations/slack/utils/test_channel.py b/tests/sentry/integrations/slack/utils/test_channel.py index 28c4c1a6d81064..95baa596488458 100644 --- a/tests/sentry/integrations/slack/utils/test_channel.py +++ b/tests/sentry/integrations/slack/utils/test_channel.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/integrations/slack/utils/test_mock_slack_response.py b/tests/sentry/integrations/slack/utils/test_mock_slack_response.py index 10aa1ea4d13c9b..920035c245b15c 100644 --- a/tests/sentry/integrations/slack/utils/test_mock_slack_response.py +++ b/tests/sentry/integrations/slack/utils/test_mock_slack_response.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from slack_sdk.web.slack_response import SlackResponse diff --git a/tests/sentry/integrations/slack/webhooks/actions/__init__.py b/tests/sentry/integrations/slack/webhooks/actions/__init__.py index 6ff84b0c756682..eedd768cd1a988 100644 --- a/tests/sentry/integrations/slack/webhooks/actions/__init__.py +++ b/tests/sentry/integrations/slack/webhooks/actions/__init__.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import orjson diff --git a/tests/sentry/integrations/slack/webhooks/actions/test_enable_notifications.py b/tests/sentry/integrations/slack/webhooks/actions/test_enable_notifications.py index e19c3220adc8c4..b608816e19abbe 100644 --- a/tests/sentry/integrations/slack/webhooks/actions/test_enable_notifications.py +++ b/tests/sentry/integrations/slack/webhooks/actions/test_enable_notifications.py @@ -1,3 +1,4 @@ +from typing import int import orjson from sentry.integrations.slack.webhooks.action import ( diff --git a/tests/sentry/integrations/slack/webhooks/actions/test_link_clicked.py b/tests/sentry/integrations/slack/webhooks/actions/test_link_clicked.py index f1c04e1e12b785..08667130532918 100644 --- a/tests/sentry/integrations/slack/webhooks/actions/test_link_clicked.py +++ b/tests/sentry/integrations/slack/webhooks/actions/test_link_clicked.py @@ -1,3 +1,4 @@ +from typing import int from tests.sentry.integrations.slack.webhooks.actions import BaseEventTest diff --git a/tests/sentry/integrations/slack/webhooks/actions/test_status.py b/tests/sentry/integrations/slack/webhooks/actions/test_status.py index 8e46b71e969fd8..ea2364f80ed4c6 100644 --- a/tests/sentry/integrations/slack/webhooks/actions/test_status.py +++ b/tests/sentry/integrations/slack/webhooks/actions/test_status.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/integrations/slack/webhooks/commands/__init__.py b/tests/sentry/integrations/slack/webhooks/commands/__init__.py index 862d053fa4f336..768bfba1fe4f1f 100644 --- a/tests/sentry/integrations/slack/webhooks/commands/__init__.py +++ b/tests/sentry/integrations/slack/webhooks/commands/__init__.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Generator, Mapping -from typing import Any +from typing import int, Any from unittest.mock import patch from urllib.parse import urlencode diff --git a/tests/sentry/integrations/slack/webhooks/commands/test_get.py b/tests/sentry/integrations/slack/webhooks/commands/test_get.py index aed7f1d5f9a8c5..d1569933e043f4 100644 --- a/tests/sentry/integrations/slack/webhooks/commands/test_get.py +++ b/tests/sentry/integrations/slack/webhooks/commands/test_get.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from tests.sentry.integrations.slack.webhooks.commands import SlackCommandsTest diff --git a/tests/sentry/integrations/slack/webhooks/commands/test_help.py b/tests/sentry/integrations/slack/webhooks/commands/test_help.py index 8a5d1e580fb12b..6ee62ace39679c 100644 --- a/tests/sentry/integrations/slack/webhooks/commands/test_help.py +++ b/tests/sentry/integrations/slack/webhooks/commands/test_help.py @@ -1,3 +1,4 @@ +from typing import int import responses from sentry.integrations.slack.message_builder.help import SlackHelpMessageBuilder diff --git a/tests/sentry/integrations/slack/webhooks/commands/test_link_team.py b/tests/sentry/integrations/slack/webhooks/commands/test_link_team.py index 583105b22d93b8..7bbe10343e3cea 100644 --- a/tests/sentry/integrations/slack/webhooks/commands/test_link_team.py +++ b/tests/sentry/integrations/slack/webhooks/commands/test_link_team.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/integrations/slack/webhooks/commands/test_link_user.py b/tests/sentry/integrations/slack/webhooks/commands/test_link_user.py index add3490abb00be..79cfe34b7a28aa 100644 --- a/tests/sentry/integrations/slack/webhooks/commands/test_link_user.py +++ b/tests/sentry/integrations/slack/webhooks/commands/test_link_user.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.integrations.models.organization_integration import OrganizationIntegration diff --git a/tests/sentry/integrations/slack/webhooks/commands/test_post.py b/tests/sentry/integrations/slack/webhooks/commands/test_post.py index bc93338cd766a7..fc7cf9606148fa 100644 --- a/tests/sentry/integrations/slack/webhooks/commands/test_post.py +++ b/tests/sentry/integrations/slack/webhooks/commands/test_post.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from sentry.integrations.slack.message_builder.disconnected import DISCONNECTED_MESSAGE diff --git a/tests/sentry/integrations/slack/webhooks/events/__init__.py b/tests/sentry/integrations/slack/webhooks/events/__init__.py index 660c17593e1594..229171284c8e95 100644 --- a/tests/sentry/integrations/slack/webhooks/events/__init__.py +++ b/tests/sentry/integrations/slack/webhooks/events/__init__.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import orjson diff --git a/tests/sentry/integrations/slack/webhooks/events/test_discover_link_shared.py b/tests/sentry/integrations/slack/webhooks/events/test_discover_link_shared.py index 797f7d890b3402..c58beb51738640 100644 --- a/tests/sentry/integrations/slack/webhooks/events/test_discover_link_shared.py +++ b/tests/sentry/integrations/slack/webhooks/events/test_discover_link_shared.py @@ -1,3 +1,4 @@ +from typing import int import re from unittest.mock import Mock, patch from urllib.parse import parse_qsl diff --git a/tests/sentry/integrations/slack/webhooks/events/test_link_shared.py b/tests/sentry/integrations/slack/webhooks/events/test_link_shared.py index 892273e11190be..c28baffc1259ff 100644 --- a/tests/sentry/integrations/slack/webhooks/events/test_link_shared.py +++ b/tests/sentry/integrations/slack/webhooks/events/test_link_shared.py @@ -1,3 +1,4 @@ +from typing import int import re from unittest.mock import Mock, patch diff --git a/tests/sentry/integrations/slack/webhooks/events/test_message_im.py b/tests/sentry/integrations/slack/webhooks/events/test_message_im.py index afb5b9c7c0089c..a0d21293030d0f 100644 --- a/tests/sentry/integrations/slack/webhooks/events/test_message_im.py +++ b/tests/sentry/integrations/slack/webhooks/events/test_message_im.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/integrations/slack/webhooks/events/test_url_verification.py b/tests/sentry/integrations/slack/webhooks/events/test_url_verification.py index a92351cbde20a4..cfd635e0f73ae2 100644 --- a/tests/sentry/integrations/slack/webhooks/events/test_url_verification.py +++ b/tests/sentry/integrations/slack/webhooks/events/test_url_verification.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from . import BaseEventTest diff --git a/tests/sentry/integrations/slack/webhooks/options_load/__init__.py b/tests/sentry/integrations/slack/webhooks/options_load/__init__.py index 373232eb34b025..49bfa45350543b 100644 --- a/tests/sentry/integrations/slack/webhooks/options_load/__init__.py +++ b/tests/sentry/integrations/slack/webhooks/options_load/__init__.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import orjson diff --git a/tests/sentry/integrations/slack/webhooks/options_load/test_dynamic_assignment_dropdown.py b/tests/sentry/integrations/slack/webhooks/options_load/test_dynamic_assignment_dropdown.py index 7431af3555185e..84a40ef14fd97f 100644 --- a/tests/sentry/integrations/slack/webhooks/options_load/test_dynamic_assignment_dropdown.py +++ b/tests/sentry/integrations/slack/webhooks/options_load/test_dynamic_assignment_dropdown.py @@ -1,3 +1,4 @@ +from typing import int import orjson from sentry.testutils.helpers.datetime import freeze_time diff --git a/tests/sentry/integrations/source_code_management/test_commit_context.py b/tests/sentry/integrations/source_code_management/test_commit_context.py index 0b9fa77784c039..b59ebd49e8dbee 100644 --- a/tests/sentry/integrations/source_code_management/test_commit_context.py +++ b/tests/sentry/integrations/source_code_management/test_commit_context.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch import pytest diff --git a/tests/sentry/integrations/tasks/test_create_comment.py b/tests/sentry/integrations/tasks/test_create_comment.py index d1f77c8daeb743..44641c712c9697 100644 --- a/tests/sentry/integrations/tasks/test_create_comment.py +++ b/tests/sentry/integrations/tasks/test_create_comment.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/integrations/tasks/test_sync_assignee_outbound.py b/tests/sentry/integrations/tasks/test_sync_assignee_outbound.py index c0a7d0de485949..04ee7788a550b6 100644 --- a/tests/sentry/integrations/tasks/test_sync_assignee_outbound.py +++ b/tests/sentry/integrations/tasks/test_sync_assignee_outbound.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/integrations/tasks/test_sync_status_inbound.py b/tests/sentry/integrations/tasks/test_sync_status_inbound.py index 32485fb0e8b65f..68c74b66330eee 100644 --- a/tests/sentry/integrations/tasks/test_sync_status_inbound.py +++ b/tests/sentry/integrations/tasks/test_sync_status_inbound.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/integrations/tasks/test_sync_status_outbound.py b/tests/sentry/integrations/tasks/test_sync_status_outbound.py index 5ee3f202564eb5..fb32c3009411a7 100644 --- a/tests/sentry/integrations/tasks/test_sync_status_outbound.py +++ b/tests/sentry/integrations/tasks/test_sync_status_outbound.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/integrations/tasks/test_update_comment.py b/tests/sentry/integrations/tasks/test_update_comment.py index cf59a9fda181af..6b28899e41543e 100644 --- a/tests/sentry/integrations/tasks/test_update_comment.py +++ b/tests/sentry/integrations/tasks/test_update_comment.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/integrations/test_base.py b/tests/sentry/integrations/test_base.py index 2feb3aba1fd4aa..17398a99d55d88 100644 --- a/tests/sentry/integrations/test_base.py +++ b/tests/sentry/integrations/test_base.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.identity.services.identity.serial import serialize_identity diff --git a/tests/sentry/integrations/test_client.py b/tests/sentry/integrations/test_client.py index b8658b9d17263b..4cf112cc4943eb 100644 --- a/tests/sentry/integrations/test_client.py +++ b/tests/sentry/integrations/test_client.py @@ -1,3 +1,4 @@ +from typing import int import errno import os from unittest import TestCase, mock diff --git a/tests/sentry/integrations/test_helpers.py b/tests/sentry/integrations/test_helpers.py index eb441cfd22752b..08d72874c32df5 100644 --- a/tests/sentry/integrations/test_helpers.py +++ b/tests/sentry/integrations/test_helpers.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import responses diff --git a/tests/sentry/integrations/test_issues.py b/tests/sentry/integrations/test_issues.py index f849177e9a7f0a..6a2fb2b358242d 100644 --- a/tests/sentry/integrations/test_issues.py +++ b/tests/sentry/integrations/test_issues.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/test_manager.py b/tests/sentry/integrations/test_manager.py index 27b2e849851c46..85258a7384946c 100644 --- a/tests/sentry/integrations/test_manager.py +++ b/tests/sentry/integrations/test_manager.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.manager import default_manager as integrations from sentry.integrations.vsts_extension import VstsExtensionIntegrationProvider from sentry.testutils.cases import TestCase diff --git a/tests/sentry/integrations/test_model.py b/tests/sentry/integrations/test_model.py index 388fecbc7e71c8..68588c3eb140a4 100644 --- a/tests/sentry/integrations/test_model.py +++ b/tests/sentry/integrations/test_model.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import ObjectStatus from sentry.integrations.services.integration.model import RpcIntegration from sentry.testutils.cases import TestCase diff --git a/tests/sentry/integrations/test_notification_utilities.py b/tests/sentry/integrations/test_notification_utilities.py index e4f02a442b4efb..69f55465ce4bb1 100644 --- a/tests/sentry/integrations/test_notification_utilities.py +++ b/tests/sentry/integrations/test_notification_utilities.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Mapping diff --git a/tests/sentry/integrations/test_pipeline.py b/tests/sentry/integrations/test_pipeline.py index 918a8919a8e75f..301d0136302045 100644 --- a/tests/sentry/integrations/test_pipeline.py +++ b/tests/sentry/integrations/test_pipeline.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Generator from unittest.mock import patch diff --git a/tests/sentry/integrations/utils/test_atlassian_connect.py b/tests/sentry/integrations/utils/test_atlassian_connect.py index c95a8ebc9a8d11..1faa9536b02b1d 100644 --- a/tests/sentry/integrations/utils/test_atlassian_connect.py +++ b/tests/sentry/integrations/utils/test_atlassian_connect.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.test import RequestFactory, override_settings diff --git a/tests/sentry/integrations/utils/test_codecov.py b/tests/sentry/integrations/utils/test_codecov.py index 97cf29e0fe71dd..33fc5d13dc3cbe 100644 --- a/tests/sentry/integrations/utils/test_codecov.py +++ b/tests/sentry/integrations/utils/test_codecov.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/integrations/utils/test_issue_summary_for_alerts.py b/tests/sentry/integrations/utils/test_issue_summary_for_alerts.py index 20c75ec9cc7488..722bfb50779a09 100644 --- a/tests/sentry/integrations/utils/test_issue_summary_for_alerts.py +++ b/tests/sentry/integrations/utils/test_issue_summary_for_alerts.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.grouping.grouptype import ErrorGroupType diff --git a/tests/sentry/integrations/utils/test_lifecycle_metrics.py b/tests/sentry/integrations/utils/test_lifecycle_metrics.py index 85f2c45e3ea497..95a7e262a8981d 100644 --- a/tests/sentry/integrations/utils/test_lifecycle_metrics.py +++ b/tests/sentry/integrations/utils/test_lifecycle_metrics.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase, mock import pytest diff --git a/tests/sentry/integrations/utils/test_scope.py b/tests/sentry/integrations/utils/test_scope.py index 453bb5d8e728b2..19b24f918bc90c 100644 --- a/tests/sentry/integrations/utils/test_scope.py +++ b/tests/sentry/integrations/utils/test_scope.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.integrations.models.organization_integration import OrganizationIntegration diff --git a/tests/sentry/integrations/utils/test_sync.py b/tests/sentry/integrations/utils/test_sync.py index a35ebc4b4e748e..25390f382cfbcf 100644 --- a/tests/sentry/integrations/utils/test_sync.py +++ b/tests/sentry/integrations/utils/test_sync.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/integrations/vercel/test_integration.py b/tests/sentry/integrations/vercel/test_integration.py index 533ef6b08c0362..01b64d31ccaaba 100644 --- a/tests/sentry/integrations/vercel/test_integration.py +++ b/tests/sentry/integrations/vercel/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import parse_qs import orjson diff --git a/tests/sentry/integrations/vercel/test_uninstall.py b/tests/sentry/integrations/vercel/test_uninstall.py index 3f47a416f1c179..a235ad05f1d8e5 100644 --- a/tests/sentry/integrations/vercel/test_uninstall.py +++ b/tests/sentry/integrations/vercel/test_uninstall.py @@ -1,3 +1,4 @@ +from typing import int import responses from fixtures.vercel import SECRET diff --git a/tests/sentry/integrations/vercel/test_webhook.py b/tests/sentry/integrations/vercel/test_webhook.py index 74104e65f919f6..d1c0e31bcd9036 100644 --- a/tests/sentry/integrations/vercel/test_webhook.py +++ b/tests/sentry/integrations/vercel/test_webhook.py @@ -1,3 +1,4 @@ +from typing import int import hashlib import hmac diff --git a/tests/sentry/integrations/vsts/test_client.py b/tests/sentry/integrations/vsts/test_client.py index 96970031ecf5fe..74d2b37fd00916 100644 --- a/tests/sentry/integrations/vsts/test_client.py +++ b/tests/sentry/integrations/vsts/test_client.py @@ -1,7 +1,7 @@ from __future__ import annotations from time import time -from typing import TypedDict +from typing import int, TypedDict from unittest import mock from unittest.mock import MagicMock, call from urllib.parse import parse_qs, quote_plus diff --git a/tests/sentry/integrations/vsts/test_integration.py b/tests/sentry/integrations/vsts/test_integration.py index b07182c011dc98..a01f7e010fe8a0 100644 --- a/tests/sentry/integrations/vsts/test_integration.py +++ b/tests/sentry/integrations/vsts/test_integration.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, Mock, patch from urllib.parse import parse_qs, urlparse diff --git a/tests/sentry/integrations/vsts/test_issues.py b/tests/sentry/integrations/vsts/test_issues.py index 985a568c29a567..7f72b140a36015 100644 --- a/tests/sentry/integrations/vsts/test_issues.py +++ b/tests/sentry/integrations/vsts/test_issues.py @@ -1,7 +1,7 @@ from __future__ import annotations from time import time -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/integrations/vsts/test_kickoff_vsts_subscription_check.py b/tests/sentry/integrations/vsts/test_kickoff_vsts_subscription_check.py index e66287e64448ee..ff50fff40fad66 100644 --- a/tests/sentry/integrations/vsts/test_kickoff_vsts_subscription_check.py +++ b/tests/sentry/integrations/vsts/test_kickoff_vsts_subscription_check.py @@ -1,6 +1,6 @@ from collections.abc import Mapping from time import time -from typing import Any +from typing import int, Any import responses diff --git a/tests/sentry/integrations/vsts/test_notify_action.py b/tests/sentry/integrations/vsts/test_notify_action.py index 8bd8fa1d2225d4..8c02fc81c64565 100644 --- a/tests/sentry/integrations/vsts/test_notify_action.py +++ b/tests/sentry/integrations/vsts/test_notify_action.py @@ -1,3 +1,4 @@ +from typing import int from time import time import orjson diff --git a/tests/sentry/integrations/vsts/test_provider.py b/tests/sentry/integrations/vsts/test_provider.py index ee77f0781a3765..6600a27217b89b 100644 --- a/tests/sentry/integrations/vsts/test_provider.py +++ b/tests/sentry/integrations/vsts/test_provider.py @@ -2,7 +2,7 @@ from collections.abc import Generator from time import time -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, Mock, patch from urllib.parse import parse_qs diff --git a/tests/sentry/integrations/vsts/test_repository.py b/tests/sentry/integrations/vsts/test_repository.py index 47098de9d35484..6c6c2f4e618a73 100644 --- a/tests/sentry/integrations/vsts/test_repository.py +++ b/tests/sentry/integrations/vsts/test_repository.py @@ -1,3 +1,4 @@ +from typing import int import datetime from datetime import timezone from functools import cached_property diff --git a/tests/sentry/integrations/vsts/test_search.py b/tests/sentry/integrations/vsts/test_search.py index 97cb8f4dc59cc0..532083fbda7bae 100644 --- a/tests/sentry/integrations/vsts/test_search.py +++ b/tests/sentry/integrations/vsts/test_search.py @@ -1,3 +1,4 @@ +from typing import int from time import time from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/vsts/test_webhooks.py b/tests/sentry/integrations/vsts/test_webhooks.py index 97688d33594f45..6164cd8ce78a37 100644 --- a/tests/sentry/integrations/vsts/test_webhooks.py +++ b/tests/sentry/integrations/vsts/test_webhooks.py @@ -1,3 +1,4 @@ +from typing import int from copy import deepcopy from time import time from unittest.mock import MagicMock, patch diff --git a/tests/sentry/integrations/vsts_extension/test_provider.py b/tests/sentry/integrations/vsts_extension/test_provider.py index 7dc644d9b60f4c..714d91acbf4348 100644 --- a/tests/sentry/integrations/vsts_extension/test_provider.py +++ b/tests/sentry/integrations/vsts_extension/test_provider.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch from urllib.parse import parse_qs, urlparse diff --git a/tests/sentry/integrations/web/test_msteams_extension.py b/tests/sentry/integrations/web/test_msteams_extension.py index 92f722f785c876..dbe275d2e86d26 100644 --- a/tests/sentry/integrations/web/test_msteams_extension.py +++ b/tests/sentry/integrations/web/test_msteams_extension.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.core.signing import SignatureExpired diff --git a/tests/sentry/integrations/web/test_organization_integration_setup.py b/tests/sentry/integrations/web/test_organization_integration_setup.py index 6f9bdbde7fae90..4648e250120853 100644 --- a/tests/sentry/integrations/web/test_organization_integration_setup.py +++ b/tests/sentry/integrations/web/test_organization_integration_setup.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.testutils.cases import PermissionTestCase, TestCase diff --git a/tests/sentry/issue_detection/experiments/test_m_n_plus_one_db_detector.py b/tests/sentry/issue_detection/experiments/test_m_n_plus_one_db_detector.py index da995b8cb2bd50..cbcb91772bc5c7 100644 --- a/tests/sentry/issue_detection/experiments/test_m_n_plus_one_db_detector.py +++ b/tests/sentry/issue_detection/experiments/test_m_n_plus_one_db_detector.py @@ -1,7 +1,7 @@ from __future__ import annotations from copy import deepcopy -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, Mock, call, patch import pytest diff --git a/tests/sentry/issue_detection/experiments/test_n_plus_one_api_calls_detector.py b/tests/sentry/issue_detection/experiments/test_n_plus_one_api_calls_detector.py index 2c24da7e5455f4..81f5c9ce6ba4b9 100644 --- a/tests/sentry/issue_detection/experiments/test_n_plus_one_api_calls_detector.py +++ b/tests/sentry/issue_detection/experiments/test_n_plus_one_api_calls_detector.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable -from typing import Any +from typing import int, Any from uuid import uuid4 import pytest diff --git a/tests/sentry/issue_detection/experiments/test_n_plus_one_db_span_detector.py b/tests/sentry/issue_detection/experiments/test_n_plus_one_db_span_detector.py index 36ae21a845a80d..480da19898bccf 100644 --- a/tests/sentry/issue_detection/experiments/test_n_plus_one_db_span_detector.py +++ b/tests/sentry/issue_detection/experiments/test_n_plus_one_db_span_detector.py @@ -1,7 +1,7 @@ from __future__ import annotations import unittest -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issue_detection/test_consecutive_db_detector.py b/tests/sentry/issue_detection/test_consecutive_db_detector.py index 904ac4641a997c..4439722d921ff5 100644 --- a/tests/sentry/issue_detection/test_consecutive_db_detector.py +++ b/tests/sentry/issue_detection/test_consecutive_db_detector.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issue_detection/test_consecutive_http_detector.py b/tests/sentry/issue_detection/test_consecutive_http_detector.py index d0f74684cd1599..89011d9cb8385f 100644 --- a/tests/sentry/issue_detection/test_consecutive_http_detector.py +++ b/tests/sentry/issue_detection/test_consecutive_http_detector.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issue_detection/test_db_main_thread_detector.py b/tests/sentry/issue_detection/test_db_main_thread_detector.py index 9c07f7e702d36e..8a6c06d10848ca 100644 --- a/tests/sentry/issue_detection/test_db_main_thread_detector.py +++ b/tests/sentry/issue_detection/test_db_main_thread_detector.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issue_detection/test_file_io_on_main_thread_detector.py b/tests/sentry/issue_detection/test_file_io_on_main_thread_detector.py index 5c895cb88bdd33..b0310aaa66225c 100644 --- a/tests/sentry/issue_detection/test_file_io_on_main_thread_detector.py +++ b/tests/sentry/issue_detection/test_file_io_on_main_thread_detector.py @@ -2,7 +2,7 @@ import hashlib from io import BytesIO -from typing import Any +from typing import int, Any from zipfile import ZipFile import pytest diff --git a/tests/sentry/issue_detection/test_http_overhead_detector.py b/tests/sentry/issue_detection/test_http_overhead_detector.py index d42473676db11c..21109c10fc7abd 100644 --- a/tests/sentry/issue_detection/test_http_overhead_detector.py +++ b/tests/sentry/issue_detection/test_http_overhead_detector.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issue_detection/test_large_http_payload_detector.py b/tests/sentry/issue_detection/test_large_http_payload_detector.py index b4148379e74c02..dd5f5f39568d5f 100644 --- a/tests/sentry/issue_detection/test_large_http_payload_detector.py +++ b/tests/sentry/issue_detection/test_large_http_payload_detector.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issue_detection/test_m_n_plus_one_db_detector.py b/tests/sentry/issue_detection/test_m_n_plus_one_db_detector.py index 364dd81e54af7c..b8b683fa229044 100644 --- a/tests/sentry/issue_detection/test_m_n_plus_one_db_detector.py +++ b/tests/sentry/issue_detection/test_m_n_plus_one_db_detector.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from unittest.mock import Mock, call import pytest diff --git a/tests/sentry/issue_detection/test_n_plus_one_api_calls_detector.py b/tests/sentry/issue_detection/test_n_plus_one_api_calls_detector.py index 16c7905881834a..03f143db09f4e7 100644 --- a/tests/sentry/issue_detection/test_n_plus_one_api_calls_detector.py +++ b/tests/sentry/issue_detection/test_n_plus_one_api_calls_detector.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Callable -from typing import Any +from typing import int, Any from uuid import uuid4 import pytest diff --git a/tests/sentry/issue_detection/test_n_plus_one_db_span_detector.py b/tests/sentry/issue_detection/test_n_plus_one_db_span_detector.py index c6389ec50eef42..7d5f870db17646 100644 --- a/tests/sentry/issue_detection/test_n_plus_one_db_span_detector.py +++ b/tests/sentry/issue_detection/test_n_plus_one_db_span_detector.py @@ -1,7 +1,7 @@ from __future__ import annotations import unittest -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issue_detection/test_performance_detection.py b/tests/sentry/issue_detection/test_performance_detection.py index be813cdab664d1..51ae84197358d6 100644 --- a/tests/sentry/issue_detection/test_performance_detection.py +++ b/tests/sentry/issue_detection/test_performance_detection.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest.mock import MagicMock, Mock, call, patch diff --git a/tests/sentry/issue_detection/test_query_injection_detector.py b/tests/sentry/issue_detection/test_query_injection_detector.py index 0d191542397f9f..a7067787826697 100644 --- a/tests/sentry/issue_detection/test_query_injection_detector.py +++ b/tests/sentry/issue_detection/test_query_injection_detector.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issue_detection/test_render_blocking_asset_detector.py b/tests/sentry/issue_detection/test_render_blocking_asset_detector.py index d0b82e8fb97d49..cf8a97047f28da 100644 --- a/tests/sentry/issue_detection/test_render_blocking_asset_detector.py +++ b/tests/sentry/issue_detection/test_render_blocking_asset_detector.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issue_detection/test_slow_db_span_detector.py b/tests/sentry/issue_detection/test_slow_db_span_detector.py index 2b311728c38993..826d11a442269e 100644 --- a/tests/sentry/issue_detection/test_slow_db_span_detector.py +++ b/tests/sentry/issue_detection/test_slow_db_span_detector.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issue_detection/test_sql_injection_detector.py b/tests/sentry/issue_detection/test_sql_injection_detector.py index 9199792ad66254..6781cb564d3e1d 100644 --- a/tests/sentry/issue_detection/test_sql_injection_detector.py +++ b/tests/sentry/issue_detection/test_sql_injection_detector.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issue_detection/test_uncompressed_asset_detector.py b/tests/sentry/issue_detection/test_uncompressed_asset_detector.py index 72f4acc74b34fe..c6b30fae340a1d 100644 --- a/tests/sentry/issue_detection/test_uncompressed_asset_detector.py +++ b/tests/sentry/issue_detection/test_uncompressed_asset_detector.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issues/auto_source_code_config/test_code_mapping.py b/tests/sentry/issues/auto_source_code_config/test_code_mapping.py index 2e07eda2fd1a94..b0fd0dd9408a35 100644 --- a/tests/sentry/issues/auto_source_code_config/test_code_mapping.py +++ b/tests/sentry/issues/auto_source_code_config/test_code_mapping.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import patch import pytest diff --git a/tests/sentry/issues/auto_source_code_config/test_frame_info.py b/tests/sentry/issues/auto_source_code_config/test_frame_info.py index e42d01bd764626..3e80b1cbfafafb 100644 --- a/tests/sentry/issues/auto_source_code_config/test_frame_info.py +++ b/tests/sentry/issues/auto_source_code_config/test_frame_info.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issues/auto_source_code_config/test_process_event.py b/tests/sentry/issues/auto_source_code_config/test_process_event.py index 503ab26bb65e2d..8d6ab746b5489b 100644 --- a/tests/sentry/issues/auto_source_code_config/test_process_event.py +++ b/tests/sentry/issues/auto_source_code_config/test_process_event.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, Sequence -from typing import Any, TypedDict, cast +from typing import Any, TypedDict, cast, int from unittest.mock import patch from sentry.integrations.models.organization_integration import OrganizationIntegration diff --git a/tests/sentry/issues/auto_source_code_config/test_stacktraces.py b/tests/sentry/issues/auto_source_code_config/test_stacktraces.py index cb79e21eabbb82..0d83d334129838 100644 --- a/tests/sentry/issues/auto_source_code_config/test_stacktraces.py +++ b/tests/sentry/issues/auto_source_code_config/test_stacktraces.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issues/endpoints/test_actionable_items.py b/tests/sentry/issues/endpoints/test_actionable_items.py index 601be3b848ab68..0329f55e67db9e 100644 --- a/tests/sentry/issues/endpoints/test_actionable_items.py +++ b/tests/sentry/issues/endpoints/test_actionable_items.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from sentry.models.eventerror import EventError diff --git a/tests/sentry/issues/endpoints/test_event_grouping_info.py b/tests/sentry/issues/endpoints/test_event_grouping_info.py index b508c65fb36333..1e2f49e751407d 100644 --- a/tests/sentry/issues/endpoints/test_event_grouping_info.py +++ b/tests/sentry/issues/endpoints/test_event_grouping_info.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import orjson diff --git a/tests/sentry/issues/endpoints/test_event_owners.py b/tests/sentry/issues/endpoints/test_event_owners.py index 0839aa8b932717..2f2c9061ed5626 100644 --- a/tests/sentry/issues/endpoints/test_event_owners.py +++ b/tests/sentry/issues/endpoints/test_event_owners.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.issues.ownership.grammar import Matcher, Owner, Rule, dump_schema diff --git a/tests/sentry/issues/endpoints/test_event_reprocessable.py b/tests/sentry/issues/endpoints/test_event_reprocessable.py index 2321b504ea9c0d..4649e308693069 100644 --- a/tests/sentry/issues/endpoints/test_event_reprocessable.py +++ b/tests/sentry/issues/endpoints/test_event_reprocessable.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.helpers.datetime import before_now from sentry.testutils.skips import requires_snuba diff --git a/tests/sentry/issues/endpoints/test_group.py b/tests/sentry/issues/endpoints/test_group.py index 45f67c2553ca86..093a7864e74727 100644 --- a/tests/sentry/issues/endpoints/test_group.py +++ b/tests/sentry/issues/endpoints/test_group.py @@ -1,4 +1,4 @@ -from typing import ContextManager +from typing import int, ContextManager from rest_framework.views import APIView diff --git a/tests/sentry/issues/endpoints/test_group_activities.py b/tests/sentry/issues/endpoints/test_group_activities.py index b8a45f59bfde9c..32d4c43c0b04aa 100644 --- a/tests/sentry/issues/endpoints/test_group_activities.py +++ b/tests/sentry/issues/endpoints/test_group_activities.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.activity import Activity from sentry.models.group import GroupStatus from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/issues/endpoints/test_group_attachments.py b/tests/sentry/issues/endpoints/test_group_attachments.py index 17744fb8052426..e799ca19c5cbd5 100644 --- a/tests/sentry/issues/endpoints/test_group_attachments.py +++ b/tests/sentry/issues/endpoints/test_group_attachments.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from urllib.parse import urlencode diff --git a/tests/sentry/issues/endpoints/test_group_current_release.py b/tests/sentry/issues/endpoints/test_group_current_release.py index 94754d6ab88a99..cdbc29c6ae15c5 100644 --- a/tests/sentry/issues/endpoints/test_group_current_release.py +++ b/tests/sentry/issues/endpoints/test_group_current_release.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.models.environment import Environment from sentry.models.group import Group diff --git a/tests/sentry/issues/endpoints/test_group_details.py b/tests/sentry/issues/endpoints/test_group_details.py index c3bfa468582be1..bbce3995913faa 100644 --- a/tests/sentry/issues/endpoints/test_group_details.py +++ b/tests/sentry/issues/endpoints/test_group_details.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/issues/endpoints/test_group_event_details.py b/tests/sentry/issues/endpoints/test_group_event_details.py index fc2812f0b40057..765442207398e5 100644 --- a/tests/sentry/issues/endpoints/test_group_event_details.py +++ b/tests/sentry/issues/endpoints/test_group_event_details.py @@ -1,3 +1,4 @@ +from typing import int import uuid from uuid import uuid4 diff --git a/tests/sentry/issues/endpoints/test_group_events.py b/tests/sentry/issues/endpoints/test_group_events.py index ed6cc997366f50..74623983602822 100644 --- a/tests/sentry/issues/endpoints/test_group_events.py +++ b/tests/sentry/issues/endpoints/test_group_events.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/issues/endpoints/test_group_first_last_release.py b/tests/sentry/issues/endpoints/test_group_first_last_release.py index 33f4754be00329..4f399b9f794dba 100644 --- a/tests/sentry/issues/endpoints/test_group_first_last_release.py +++ b/tests/sentry/issues/endpoints/test_group_first_last_release.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase, SnubaTestCase diff --git a/tests/sentry/issues/endpoints/test_group_hashes.py b/tests/sentry/issues/endpoints/test_group_hashes.py index b59cdccf29726a..22455d4c96b491 100644 --- a/tests/sentry/issues/endpoints/test_group_hashes.py +++ b/tests/sentry/issues/endpoints/test_group_hashes.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from urllib.parse import urlencode diff --git a/tests/sentry/issues/endpoints/test_group_integration_details.py b/tests/sentry/issues/endpoints/test_group_integration_details.py index b4c3d84d49c8f5..248a93d05a07c4 100644 --- a/tests/sentry/issues/endpoints/test_group_integration_details.py +++ b/tests/sentry/issues/endpoints/test_group_integration_details.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import mock from django.db.utils import IntegrityError diff --git a/tests/sentry/issues/endpoints/test_group_integrations.py b/tests/sentry/issues/endpoints/test_group_integrations.py index f531ee7134f6db..a3488e35703237 100644 --- a/tests/sentry/issues/endpoints/test_group_integrations.py +++ b/tests/sentry/issues/endpoints/test_group_integrations.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.skips import requires_snuba diff --git a/tests/sentry/issues/endpoints/test_group_notes.py b/tests/sentry/issues/endpoints/test_group_notes.py index bf96220a8b512b..eed3ecc172bf66 100644 --- a/tests/sentry/issues/endpoints/test_group_notes.py +++ b/tests/sentry/issues/endpoints/test_group_notes.py @@ -1,3 +1,4 @@ +from typing import int import datetime from sentry.integrations.models.external_issue import ExternalIssue diff --git a/tests/sentry/issues/endpoints/test_group_notes_details.py b/tests/sentry/issues/endpoints/test_group_notes_details.py index c9edd470a46764..2a0fddf3ffbddf 100644 --- a/tests/sentry/issues/endpoints/test_group_notes_details.py +++ b/tests/sentry/issues/endpoints/test_group_notes_details.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import MagicMock, patch diff --git a/tests/sentry/issues/endpoints/test_group_similar_issues_embeddings.py b/tests/sentry/issues/endpoints/test_group_similar_issues_embeddings.py index 64e3f0b1dc5f9d..1e7607804d959f 100644 --- a/tests/sentry/issues/endpoints/test_group_similar_issues_embeddings.py +++ b/tests/sentry/issues/endpoints/test_group_similar_issues_embeddings.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any from unittest import mock import orjson diff --git a/tests/sentry/issues/endpoints/test_group_stats.py b/tests/sentry/issues/endpoints/test_group_stats.py index 4b4954957ebcf0..80c31530c98521 100644 --- a/tests/sentry/issues/endpoints/test_group_stats.py +++ b/tests/sentry/issues/endpoints/test_group_stats.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.helpers.datetime import before_now, freeze_time from sentry.testutils.skips import requires_snuba diff --git a/tests/sentry/issues/endpoints/test_group_tagkey_details.py b/tests/sentry/issues/endpoints/test_group_tagkey_details.py index c80d53504a5eb3..991ddc5a7f7b80 100644 --- a/tests/sentry/issues/endpoints/test_group_tagkey_details.py +++ b/tests/sentry/issues/endpoints/test_group_tagkey_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.group import Group from sentry.testutils.cases import APITestCase, PerformanceIssueTestCase, SnubaTestCase from sentry.testutils.helpers.datetime import before_now diff --git a/tests/sentry/issues/endpoints/test_group_tagkey_values.py b/tests/sentry/issues/endpoints/test_group_tagkey_values.py index 09225f35bf46fe..b5725755afa287 100644 --- a/tests/sentry/issues/endpoints/test_group_tagkey_values.py +++ b/tests/sentry/issues/endpoints/test_group_tagkey_values.py @@ -1,3 +1,4 @@ +from typing import int import datetime from datetime import timedelta from unittest import mock diff --git a/tests/sentry/issues/endpoints/test_group_tags.py b/tests/sentry/issues/endpoints/test_group_tags.py index 54e48e2f7d8997..53ff854ea34648 100644 --- a/tests/sentry/issues/endpoints/test_group_tags.py +++ b/tests/sentry/issues/endpoints/test_group_tags.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase, PerformanceIssueTestCase, SnubaTestCase from sentry.testutils.helpers.datetime import before_now diff --git a/tests/sentry/issues/endpoints/test_group_tombstone.py b/tests/sentry/issues/endpoints/test_group_tombstone.py index 27ad487de164f8..c398fca7951420 100644 --- a/tests/sentry/issues/endpoints/test_group_tombstone.py +++ b/tests/sentry/issues/endpoints/test_group_tombstone.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.grouphash import GroupHash diff --git a/tests/sentry/issues/endpoints/test_group_tombstone_details.py b/tests/sentry/issues/endpoints/test_group_tombstone_details.py index 906848afc0947c..df74b7f9cfb88f 100644 --- a/tests/sentry/issues/endpoints/test_group_tombstone_details.py +++ b/tests/sentry/issues/endpoints/test_group_tombstone_details.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.grouphash import GroupHash diff --git a/tests/sentry/issues/endpoints/test_group_user_reports.py b/tests/sentry/issues/endpoints/test_group_user_reports.py index bf161d34367312..16cdb80e2b7ec6 100644 --- a/tests/sentry/issues/endpoints/test_group_user_reports.py +++ b/tests/sentry/issues/endpoints/test_group_user_reports.py @@ -1,7 +1,7 @@ from __future__ import annotations from functools import cached_property -from typing import Any +from typing import int, Any from sentry.models.userreport import UserReport from sentry.testutils.cases import APITestCase, SnubaTestCase diff --git a/tests/sentry/issues/endpoints/test_grouping_configs.py b/tests/sentry/issues/endpoints/test_grouping_configs.py index 278cbeb88d3520..a174a219f854f0 100644 --- a/tests/sentry/issues/endpoints/test_grouping_configs.py +++ b/tests/sentry/issues/endpoints/test_grouping_configs.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/issues/endpoints/test_organization_codeowners_associations.py b/tests/sentry/issues/endpoints/test_organization_codeowners_associations.py index f4fde56fdfb6a9..40c98fe46f4f77 100644 --- a/tests/sentry/issues/endpoints/test_organization_codeowners_associations.py +++ b/tests/sentry/issues/endpoints/test_organization_codeowners_associations.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from sentry.api.validators.project_codeowners import build_codeowners_associations diff --git a/tests/sentry/issues/endpoints/test_organization_group_index.py b/tests/sentry/issues/endpoints/test_organization_group_index.py index 531eb35a3a2b11..01f6f15db0f00a 100644 --- a/tests/sentry/issues/endpoints/test_organization_group_index.py +++ b/tests/sentry/issues/endpoints/test_organization_group_index.py @@ -5,7 +5,7 @@ from collections.abc import Sequence from datetime import UTC, datetime, timedelta from time import sleep -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, Mock, call, patch from uuid import uuid4 diff --git a/tests/sentry/issues/endpoints/test_organization_group_search_view_details.py b/tests/sentry/issues/endpoints/test_organization_group_search_view_details.py index 96738f1b29a550..d6cb6342a8ce78 100644 --- a/tests/sentry/issues/endpoints/test_organization_group_search_view_details.py +++ b/tests/sentry/issues/endpoints/test_organization_group_search_view_details.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from django.utils import timezone diff --git a/tests/sentry/issues/endpoints/test_organization_group_search_view_details_starred.py b/tests/sentry/issues/endpoints/test_organization_group_search_view_details_starred.py index c1fd1cbc2652b4..794409fce47fc6 100644 --- a/tests/sentry/issues/endpoints/test_organization_group_search_view_details_starred.py +++ b/tests/sentry/issues/endpoints/test_organization_group_search_view_details_starred.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.groupsearchview import GroupSearchView, GroupSearchViewVisibility diff --git a/tests/sentry/issues/endpoints/test_organization_group_search_view_starred_order.py b/tests/sentry/issues/endpoints/test_organization_group_search_view_starred_order.py index 21aef45cbe5a69..c7f392615242fd 100644 --- a/tests/sentry/issues/endpoints/test_organization_group_search_view_starred_order.py +++ b/tests/sentry/issues/endpoints/test_organization_group_search_view_starred_order.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from rest_framework.exceptions import ErrorDetail diff --git a/tests/sentry/issues/endpoints/test_organization_group_search_view_visit.py b/tests/sentry/issues/endpoints/test_organization_group_search_view_visit.py index ec7907062a4429..b6d375c38183bb 100644 --- a/tests/sentry/issues/endpoints/test_organization_group_search_view_visit.py +++ b/tests/sentry/issues/endpoints/test_organization_group_search_view_visit.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from django.utils import timezone diff --git a/tests/sentry/issues/endpoints/test_organization_group_search_views.py b/tests/sentry/issues/endpoints/test_organization_group_search_views.py index 156f5a1fecf2d9..329d77c05179af 100644 --- a/tests/sentry/issues/endpoints/test_organization_group_search_views.py +++ b/tests/sentry/issues/endpoints/test_organization_group_search_views.py @@ -1,5 +1,5 @@ from datetime import datetime, timedelta -from typing import NotRequired, TypedDict +from typing import NotRequired, TypedDict, int from django.urls import reverse from django.utils import timezone diff --git a/tests/sentry/issues/endpoints/test_organization_group_search_views_starred.py b/tests/sentry/issues/endpoints/test_organization_group_search_views_starred.py index bf9dd4d97e189e..a8903c2ac64e8f 100644 --- a/tests/sentry/issues/endpoints/test_organization_group_search_views_starred.py +++ b/tests/sentry/issues/endpoints/test_organization_group_search_views_starred.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from sentry.models.groupsearchview import GroupSearchView, GroupSearchViewVisibility diff --git a/tests/sentry/issues/endpoints/test_organization_group_suspect_flags.py b/tests/sentry/issues/endpoints/test_organization_group_suspect_flags.py index 8e662ecf7c43be..1a7507cf60b483 100644 --- a/tests/sentry/issues/endpoints/test_organization_group_suspect_flags.py +++ b/tests/sentry/issues/endpoints/test_organization_group_suspect_flags.py @@ -1,7 +1,7 @@ import datetime import time import uuid -from typing import TypedDict +from typing import int, TypedDict from sentry.testutils.cases import APITestCase, SnubaTestCase diff --git a/tests/sentry/issues/endpoints/test_organization_group_suspect_tags.py b/tests/sentry/issues/endpoints/test_organization_group_suspect_tags.py index 4b54e8e0c366db..373c90a2d54482 100644 --- a/tests/sentry/issues/endpoints/test_organization_group_suspect_tags.py +++ b/tests/sentry/issues/endpoints/test_organization_group_suspect_tags.py @@ -1,7 +1,7 @@ import datetime import time import uuid -from typing import Any +from typing import int, Any from sentry.testutils.cases import APITestCase, SnubaTestCase diff --git a/tests/sentry/issues/endpoints/test_organization_issue_metrics.py b/tests/sentry/issues/endpoints/test_organization_issue_metrics.py index 09b8cfd5c17051..b5a9726969f91a 100644 --- a/tests/sentry/issues/endpoints/test_organization_issue_metrics.py +++ b/tests/sentry/issues/endpoints/test_organization_issue_metrics.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from django.urls import reverse diff --git a/tests/sentry/issues/endpoints/test_organization_issue_timeseries.py b/tests/sentry/issues/endpoints/test_organization_issue_timeseries.py index 6b9b38cc7cb4e7..239017e69b9666 100644 --- a/tests/sentry/issues/endpoints/test_organization_issue_timeseries.py +++ b/tests/sentry/issues/endpoints/test_organization_issue_timeseries.py @@ -1,5 +1,5 @@ from datetime import datetime, timedelta, timezone -from typing import Any +from typing import int, Any from django.urls import reverse diff --git a/tests/sentry/issues/endpoints/test_organization_issues_count.py b/tests/sentry/issues/endpoints/test_organization_issues_count.py index 9de9f4e57423ab..5d5d3516823b5b 100644 --- a/tests/sentry/issues/endpoints/test_organization_issues_count.py +++ b/tests/sentry/issues/endpoints/test_organization_issues_count.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase, SnubaTestCase diff --git a/tests/sentry/issues/endpoints/test_organization_searches.py b/tests/sentry/issues/endpoints/test_organization_searches.py index 26cf45a65ff63c..5b24a7ab2e8a0c 100644 --- a/tests/sentry/issues/endpoints/test_organization_searches.py +++ b/tests/sentry/issues/endpoints/test_organization_searches.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from django.utils import timezone diff --git a/tests/sentry/issues/endpoints/test_organization_shortid.py b/tests/sentry/issues/endpoints/test_organization_shortid.py index 1c8eeaa6190fb4..a10cd9367164bf 100644 --- a/tests/sentry/issues/endpoints/test_organization_shortid.py +++ b/tests/sentry/issues/endpoints/test_organization_shortid.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/issues/endpoints/test_project_codeowners_details.py b/tests/sentry/issues/endpoints/test_project_codeowners_details.py index 49378a1755aa62..23a337866ea343 100644 --- a/tests/sentry/issues/endpoints/test_project_codeowners_details.py +++ b/tests/sentry/issues/endpoints/test_project_codeowners_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from unittest.mock import MagicMock, patch diff --git a/tests/sentry/issues/endpoints/test_project_codeowners_index.py b/tests/sentry/issues/endpoints/test_project_codeowners_index.py index ed852fda30446f..f511ae5e1e7a2e 100644 --- a/tests/sentry/issues/endpoints/test_project_codeowners_index.py +++ b/tests/sentry/issues/endpoints/test_project_codeowners_index.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.urls import reverse diff --git a/tests/sentry/issues/endpoints/test_project_group_stats.py b/tests/sentry/issues/endpoints/test_project_group_stats.py index a76c3ea4603fd7..aa754f6b3ec1f5 100644 --- a/tests/sentry/issues/endpoints/test_project_group_stats.py +++ b/tests/sentry/issues/endpoints/test_project_group_stats.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.helpers.datetime import before_now, freeze_time from sentry.testutils.skips import requires_snuba diff --git a/tests/sentry/issues/endpoints/test_project_grouping_configs.py b/tests/sentry/issues/endpoints/test_project_grouping_configs.py index cff578eabcbade..91d35931022165 100644 --- a/tests/sentry/issues/endpoints/test_project_grouping_configs.py +++ b/tests/sentry/issues/endpoints/test_project_grouping_configs.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.apitoken import ApiToken diff --git a/tests/sentry/issues/endpoints/test_project_issues_resolved_in_release.py b/tests/sentry/issues/endpoints/test_project_issues_resolved_in_release.py index 3b941b742927cd..9ef78e371ab2ab 100644 --- a/tests/sentry/issues/endpoints/test_project_issues_resolved_in_release.py +++ b/tests/sentry/issues/endpoints/test_project_issues_resolved_in_release.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid1 from sentry.models.commit import Commit diff --git a/tests/sentry/issues/endpoints/test_project_ownership.py b/tests/sentry/issues/endpoints/test_project_ownership.py index a884b3516c4bc0..88c0e07600c074 100644 --- a/tests/sentry/issues/endpoints/test_project_ownership.py +++ b/tests/sentry/issues/endpoints/test_project_ownership.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.urls import reverse diff --git a/tests/sentry/issues/endpoints/test_project_performance_issue_settings.py b/tests/sentry/issues/endpoints/test_project_performance_issue_settings.py index ad185d5fb10242..ce9e932486266f 100644 --- a/tests/sentry/issues/endpoints/test_project_performance_issue_settings.py +++ b/tests/sentry/issues/endpoints/test_project_performance_issue_settings.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.test import override_settings diff --git a/tests/sentry/issues/endpoints/test_project_stacktrace_link.py b/tests/sentry/issues/endpoints/test_project_stacktrace_link.py index 3180c6c25d28af..3ab289a2d52ede 100644 --- a/tests/sentry/issues/endpoints/test_project_stacktrace_link.py +++ b/tests/sentry/issues/endpoints/test_project_stacktrace_link.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch from sentry.integrations.example.integration import ExampleIntegration diff --git a/tests/sentry/issues/endpoints/test_project_user_issue.py b/tests/sentry/issues/endpoints/test_project_user_issue.py index 895610f50750b5..a67b984e55d30f 100644 --- a/tests/sentry/issues/endpoints/test_project_user_issue.py +++ b/tests/sentry/issues/endpoints/test_project_user_issue.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest.mock import patch diff --git a/tests/sentry/issues/endpoints/test_related_issues.py b/tests/sentry/issues/endpoints/test_related_issues.py index 54086889f27e68..283def0882c549 100644 --- a/tests/sentry/issues/endpoints/test_related_issues.py +++ b/tests/sentry/issues/endpoints/test_related_issues.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from rest_framework.exceptions import ErrorDetail diff --git a/tests/sentry/issues/endpoints/test_shared_group_details.py b/tests/sentry/issues/endpoints/test_shared_group_details.py index 4f409f1dd4f01d..8d348f74915461 100644 --- a/tests/sentry/issues/endpoints/test_shared_group_details.py +++ b/tests/sentry/issues/endpoints/test_shared_group_details.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Callable from sentry.models.groupshare import GroupShare diff --git a/tests/sentry/issues/endpoints/test_source_map_debug.py b/tests/sentry/issues/endpoints/test_source_map_debug.py index b695108c99dba5..a962399a442065 100644 --- a/tests/sentry/issues/endpoints/test_source_map_debug.py +++ b/tests/sentry/issues/endpoints/test_source_map_debug.py @@ -1,3 +1,4 @@ +from typing import int from django.core.files.base import ContentFile from rest_framework import status diff --git a/tests/sentry/issues/endpoints/test_team_all_unresolved_issues.py b/tests/sentry/issues/endpoints/test_team_all_unresolved_issues.py index 5f85c0b34fdf57..5181b181377737 100644 --- a/tests/sentry/issues/endpoints/test_team_all_unresolved_issues.py +++ b/tests/sentry/issues/endpoints/test_team_all_unresolved_issues.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from django.utils.timezone import now diff --git a/tests/sentry/issues/endpoints/test_team_groups_old.py b/tests/sentry/issues/endpoints/test_team_groups_old.py index 6a87ee28967c87..53f20008820a5a 100644 --- a/tests/sentry/issues/endpoints/test_team_groups_old.py +++ b/tests/sentry/issues/endpoints/test_team_groups_old.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from sentry.models.group import GroupStatus diff --git a/tests/sentry/issues/endpoints/test_team_issue_breakdown.py b/tests/sentry/issues/endpoints/test_team_issue_breakdown.py index 07729a2f5e559d..2ca911d440eb8b 100644 --- a/tests/sentry/issues/endpoints/test_team_issue_breakdown.py +++ b/tests/sentry/issues/endpoints/test_team_issue_breakdown.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from sentry.models.groupassignee import GroupAssignee diff --git a/tests/sentry/issues/escalating/test_escalating.py b/tests/sentry/issues/escalating/test_escalating.py index 4cf163f266bb51..860a46f4570250 100644 --- a/tests/sentry/issues/escalating/test_escalating.py +++ b/tests/sentry/issues/escalating/test_escalating.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import patch from uuid import uuid4 diff --git a/tests/sentry/issues/escalating/test_escalating_issues_alg.py b/tests/sentry/issues/escalating/test_escalating_issues_alg.py index 1c1436e9385e7c..9f2c5e5cdb2fcf 100644 --- a/tests/sentry/issues/escalating/test_escalating_issues_alg.py +++ b/tests/sentry/issues/escalating/test_escalating_issues_alg.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from sentry.issues.escalating.escalating_issues_alg import generate_issue_forecast diff --git a/tests/sentry/issues/escalating/test_issue_velocity.py b/tests/sentry/issues/escalating/test_issue_velocity.py index b1734b5ec977d7..0448f9c04f2575 100644 --- a/tests/sentry/issues/escalating/test_issue_velocity.py +++ b/tests/sentry/issues/escalating/test_issue_velocity.py @@ -1,3 +1,4 @@ +from typing import int import math from datetime import datetime, timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/issues/ownership/test_grammar.py b/tests/sentry/issues/ownership/test_grammar.py index 6638c50242d0f3..dfe89298c52e58 100644 --- a/tests/sentry/issues/ownership/test_grammar.py +++ b/tests/sentry/issues/ownership/test_grammar.py @@ -1,5 +1,5 @@ from collections.abc import Mapping, Sequence -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/issues/test_attributes.py b/tests/sentry/issues/test_attributes.py index a1438db4d5f1fa..761d5b2e0e5be9 100644 --- a/tests/sentry/issues/test_attributes.py +++ b/tests/sentry/issues/test_attributes.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from datetime import timedelta from unittest.mock import patch diff --git a/tests/sentry/issues/test_group.py b/tests/sentry/issues/test_group.py index a10a56ae7456ad..5f101c9815c4c1 100644 --- a/tests/sentry/issues/test_group.py +++ b/tests/sentry/issues/test_group.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import replace from hashlib import md5 diff --git a/tests/sentry/issues/test_group_attributes_dataset.py b/tests/sentry/issues/test_group_attributes_dataset.py index 46f23d6eaff263..9720baf85ef041 100644 --- a/tests/sentry/issues/test_group_attributes_dataset.py +++ b/tests/sentry/issues/test_group_attributes_dataset.py @@ -1,3 +1,4 @@ +from typing import int from sentry_kafka_schemas.schema_types.group_attributes_v1 import GroupAttributesSnapshot from snuba_sdk.legacy import json_to_snql diff --git a/tests/sentry/issues/test_grouptype.py b/tests/sentry/issues/test_grouptype.py index b4d598d3b3d825..b287b84604fa95 100644 --- a/tests/sentry/issues/test_grouptype.py +++ b/tests/sentry/issues/test_grouptype.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass from datetime import timedelta from unittest.mock import patch diff --git a/tests/sentry/issues/test_ignored.py b/tests/sentry/issues/test_ignored.py index caf0bae4b2ae14..3b34e4470b1aa4 100644 --- a/tests/sentry/issues/test_ignored.py +++ b/tests/sentry/issues/test_ignored.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.issues.escalating.escalating_group_forecast import ( diff --git a/tests/sentry/issues/test_ingest.py b/tests/sentry/issues/test_ingest.py index 51d52a6f8b29be..eb7aed420274fe 100644 --- a/tests/sentry/issues/test_ingest.py +++ b/tests/sentry/issues/test_ingest.py @@ -1,3 +1,4 @@ +from typing import int from collections import namedtuple from dataclasses import dataclass from datetime import UTC, datetime, timedelta diff --git a/tests/sentry/issues/test_ingest_incident_integration.py b/tests/sentry/issues/test_ingest_incident_integration.py index 10009877b145e6..8d4a0d476796fe 100644 --- a/tests/sentry/issues/test_ingest_incident_integration.py +++ b/tests/sentry/issues/test_ingest_incident_integration.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock from unittest.mock import patch diff --git a/tests/sentry/issues/test_issue_occurrence.py b/tests/sentry/issues/test_issue_occurrence.py index 27b02ecbb5c2d3..51c3b988aba15b 100644 --- a/tests/sentry/issues/test_issue_occurrence.py +++ b/tests/sentry/issues/test_issue_occurrence.py @@ -1,3 +1,4 @@ +from typing import int from sentry.issues.issue_occurrence import DEFAULT_LEVEL, IssueEvidence, IssueOccurrence from sentry.testutils.cases import TestCase from sentry.types.actor import Actor, ActorType diff --git a/tests/sentry/issues/test_issue_search.py b/tests/sentry/issues/test_issue_search.py index 83842902c79f2b..f9adcbd2d63ed1 100644 --- a/tests/sentry/issues/test_issue_search.py +++ b/tests/sentry/issues/test_issue_search.py @@ -1,3 +1,4 @@ +from typing import int import unittest import pytest diff --git a/tests/sentry/issues/test_json_schemas.py b/tests/sentry/issues/test_json_schemas.py index e4c64ca628f649..7d342953df05b3 100644 --- a/tests/sentry/issues/test_json_schemas.py +++ b/tests/sentry/issues/test_json_schemas.py @@ -1,3 +1,4 @@ +from typing import int from importlib import reload from unittest import TestCase, mock diff --git a/tests/sentry/issues/test_merge.py b/tests/sentry/issues/test_merge.py index bc3bc6bdd9af1e..c46dd734de7be4 100644 --- a/tests/sentry/issues/test_merge.py +++ b/tests/sentry/issues/test_merge.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/issues/test_occurrence_consumer.py b/tests/sentry/issues/test_occurrence_consumer.py index e0c34a42045be6..8db22595174698 100644 --- a/tests/sentry/issues/test_occurrence_consumer.py +++ b/tests/sentry/issues/test_occurrence_consumer.py @@ -5,7 +5,7 @@ from collections.abc import Sequence from copy import deepcopy from datetime import timezone -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/issues/test_ongoing.py b/tests/sentry/issues/test_ongoing.py index dd6739e9140720..7f00afc6c5fa63 100644 --- a/tests/sentry/issues/test_ongoing.py +++ b/tests/sentry/issues/test_ongoing.py @@ -1,3 +1,4 @@ +from typing import int from sentry.issues.ongoing import bulk_transition_group_to_ongoing from sentry.models.activity import Activity from sentry.models.group import GroupStatus diff --git a/tests/sentry/issues/test_priority.py b/tests/sentry/issues/test_priority.py index e7001fb699cb75..726c6e77b5ff0e 100644 --- a/tests/sentry/issues/test_priority.py +++ b/tests/sentry/issues/test_priority.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.api.helpers.group_index.update import handle_priority diff --git a/tests/sentry/issues/test_producer.py b/tests/sentry/issues/test_producer.py index 1238294521a056..6111dc92ea253c 100644 --- a/tests/sentry/issues/test_producer.py +++ b/tests/sentry/issues/test_producer.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import datetime from unittest.mock import MagicMock, patch diff --git a/tests/sentry/issues/test_run.py b/tests/sentry/issues/test_run.py index 14a10e644c2794..0c524db609d59a 100644 --- a/tests/sentry/issues/test_run.py +++ b/tests/sentry/issues/test_run.py @@ -1,7 +1,7 @@ import sys from collections.abc import Mapping, MutableMapping from datetime import datetime -from typing import Any +from typing import int, Any from unittest import mock from arroyo.backends.kafka import KafkaPayload diff --git a/tests/sentry/issues/test_search_issues_dataset.py b/tests/sentry/issues/test_search_issues_dataset.py index 7fbf99e5db94af..a483725734cd3c 100644 --- a/tests/sentry/issues/test_search_issues_dataset.py +++ b/tests/sentry/issues/test_search_issues_dataset.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from snuba_sdk.legacy import json_to_snql diff --git a/tests/sentry/issues/test_status_change.py b/tests/sentry/issues/test_status_change.py index e1ff3161310c76..2e6199c6d1198e 100644 --- a/tests/sentry/issues/test_status_change.py +++ b/tests/sentry/issues/test_status_change.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import datetime, timedelta, timezone -from typing import Any +from typing import int, Any from unittest.mock import patch from sentry.incidents.grouptype import MetricIssue diff --git a/tests/sentry/issues/test_status_change_consumer.py b/tests/sentry/issues/test_status_change_consumer.py index 9f05e454cfed5d..5e6fdfb992350e 100644 --- a/tests/sentry/issues/test_status_change_consumer.py +++ b/tests/sentry/issues/test_status_change_consumer.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch from django.utils import timezone diff --git a/tests/sentry/issues/test_suspect_flags.py b/tests/sentry/issues/test_suspect_flags.py index da50859f57c336..c72195f5c03ccf 100644 --- a/tests/sentry/issues/test_suspect_flags.py +++ b/tests/sentry/issues/test_suspect_flags.py @@ -1,7 +1,7 @@ import datetime import time import uuid -from typing import TypedDict +from typing import int, TypedDict from sentry.issues.suspect_flags import ( get_suspect_flag_scores, diff --git a/tests/sentry/issues/test_suspect_tags.py b/tests/sentry/issues/test_suspect_tags.py index abbebb37d0ca09..627de1e72d7f73 100644 --- a/tests/sentry/issues/test_suspect_tags.py +++ b/tests/sentry/issues/test_suspect_tags.py @@ -1,3 +1,4 @@ +from typing import int import datetime import time import uuid diff --git a/tests/sentry/issues/test_update_inbox.py b/tests/sentry/issues/test_update_inbox.py index 0e675170c93ba3..283d53bcf05bcd 100644 --- a/tests/sentry/issues/test_update_inbox.py +++ b/tests/sentry/issues/test_update_inbox.py @@ -1,3 +1,4 @@ +from typing import int from sentry.issues.update_inbox import update_inbox from sentry.models.group import Group, GroupStatus from sentry.models.grouphistory import GroupHistory, GroupHistoryStatus diff --git a/tests/sentry/issues/test_utils.py b/tests/sentry/issues/test_utils.py index 6cec63910bb0a3..a1b0abe28b3907 100644 --- a/tests/sentry/issues/test_utils.py +++ b/tests/sentry/issues/test_utils.py @@ -3,7 +3,7 @@ import uuid from collections.abc import Sequence from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from django.utils import timezone diff --git a/tests/sentry/lang/dart/test_plugin_deobfuscation.py b/tests/sentry/lang/dart/test_plugin_deobfuscation.py index 23f25ca87c2aa7..2cdd4a8940c093 100644 --- a/tests/sentry/lang/dart/test_plugin_deobfuscation.py +++ b/tests/sentry/lang/dart/test_plugin_deobfuscation.py @@ -1,3 +1,4 @@ +from typing import int """Tests for Dart plugin deobfuscation functionality.""" from __future__ import annotations diff --git a/tests/sentry/lang/dart/test_plugin_logic.py b/tests/sentry/lang/dart/test_plugin_logic.py index d720033e5815d7..cca6e49d03ba21 100644 --- a/tests/sentry/lang/dart/test_plugin_logic.py +++ b/tests/sentry/lang/dart/test_plugin_logic.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.lang.dart.plugin import DartPlugin from sentry.testutils.cases import TestCase diff --git a/tests/sentry/lang/dart/test_utils.py b/tests/sentry/lang/dart/test_utils.py index 6ecc6586844803..7b3eb8e0a8b0c4 100644 --- a/tests/sentry/lang/dart/test_utils.py +++ b/tests/sentry/lang/dart/test_utils.py @@ -1,5 +1,5 @@ import tempfile -from typing import Any +from typing import int, Any from unittest import mock from sentry.lang.dart.utils import ( diff --git a/tests/sentry/lang/java/test_exceptions.py b/tests/sentry/lang/java/test_exceptions.py index 62353919cf47a7..64a8309e8f0292 100644 --- a/tests/sentry/lang/java/test_exceptions.py +++ b/tests/sentry/lang/java/test_exceptions.py @@ -1,3 +1,4 @@ +from typing import int import re from sentry.lang.java.exceptions import Exceptions diff --git a/tests/sentry/lang/javascript/test_cache.py b/tests/sentry/lang/javascript/test_cache.py index ff726846395b81..f8ac5b7eebcf91 100644 --- a/tests/sentry/lang/javascript/test_cache.py +++ b/tests/sentry/lang/javascript/test_cache.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase from sentry.lang.javascript.cache import SourceCache diff --git a/tests/sentry/lang/javascript/test_errorlocale.py b/tests/sentry/lang/javascript/test_errorlocale.py index 527411a3c47b8b..ba7ce1e15880d3 100644 --- a/tests/sentry/lang/javascript/test_errorlocale.py +++ b/tests/sentry/lang/javascript/test_errorlocale.py @@ -1,7 +1,7 @@ from __future__ import annotations from copy import deepcopy -from typing import Any +from typing import int, Any from unittest import TestCase from sentry.lang.javascript.errorlocale import translate_exception, translate_message diff --git a/tests/sentry/lang/javascript/test_errormapping.py b/tests/sentry/lang/javascript/test_errormapping.py index 1cf3df2e6770b1..9bd1b4898cd63e 100644 --- a/tests/sentry/lang/javascript/test_errormapping.py +++ b/tests/sentry/lang/javascript/test_errormapping.py @@ -1,6 +1,6 @@ import unittest from copy import deepcopy -from typing import Any +from typing import int, Any import responses from sentry_relay.processing import StoreNormalizer diff --git a/tests/sentry/lang/javascript/test_processing.py b/tests/sentry/lang/javascript/test_processing.py index bb8e24742e7392..1bc199dcb6da5a 100644 --- a/tests/sentry/lang/javascript/test_processing.py +++ b/tests/sentry/lang/javascript/test_processing.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase from unittest.mock import Mock diff --git a/tests/sentry/lang/javascript/test_sourcemaps.py b/tests/sentry/lang/javascript/test_sourcemaps.py index b284f1a7b0c2df..62b8fda0d38db3 100644 --- a/tests/sentry/lang/javascript/test_sourcemaps.py +++ b/tests/sentry/lang/javascript/test_sourcemaps.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase import orjson diff --git a/tests/sentry/lang/javascript/test_utils.py b/tests/sentry/lang/javascript/test_utils.py index 6bc243d4bdee59..8b117cb1e1b3aa 100644 --- a/tests/sentry/lang/javascript/test_utils.py +++ b/tests/sentry/lang/javascript/test_utils.py @@ -1,5 +1,5 @@ from copy import deepcopy -from typing import Any +from typing import int, Any from sentry.lang.javascript.plugin import generate_modules from sentry.lang.javascript.utils import generate_module, trim_line diff --git a/tests/sentry/lang/native/test_applecrashreport.py b/tests/sentry/lang/native/test_applecrashreport.py index ab964d80cbb0f3..e06dd2b9578f85 100644 --- a/tests/sentry/lang/native/test_applecrashreport.py +++ b/tests/sentry/lang/native/test_applecrashreport.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import NATIVE_UNKNOWN_STRING from sentry.lang.native.applecrashreport import AppleCrashReport diff --git a/tests/sentry/lang/native/test_processing.py b/tests/sentry/lang/native/test_processing.py index 01e70542b486f3..292cf513aa560e 100644 --- a/tests/sentry/lang/native/test_processing.py +++ b/tests/sentry/lang/native/test_processing.py @@ -6,7 +6,7 @@ from __future__ import annotations import re -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/lang/native/test_sources.py b/tests/sentry/lang/native/test_sources.py index 5093df90a6acad..6fb0d107a18503 100644 --- a/tests/sentry/lang/native/test_sources.py +++ b/tests/sentry/lang/native/test_sources.py @@ -1,3 +1,4 @@ +from typing import int import copy from unittest.mock import patch diff --git a/tests/sentry/lang/native/test_symbolicator.py b/tests/sentry/lang/native/test_symbolicator.py index ea1305ebd8040b..94db611453a50d 100644 --- a/tests/sentry/lang/native/test_symbolicator.py +++ b/tests/sentry/lang/native/test_symbolicator.py @@ -1,3 +1,4 @@ +from typing import int import copy import pytest diff --git a/tests/sentry/lang/native/test_utils.py b/tests/sentry/lang/native/test_utils.py index cc9c9419541cac..41dc260ec19644 100644 --- a/tests/sentry/lang/native/test_utils.py +++ b/tests/sentry/lang/native/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.lang.native.utils import Backoff, get_os_from_event, is_minidump_event diff --git a/tests/sentry/loader/test_browsersdkversion.py b/tests/sentry/loader/test_browsersdkversion.py index e68540c92ecdb1..7f67dccf5f69f4 100644 --- a/tests/sentry/loader/test_browsersdkversion.py +++ b/tests/sentry/loader/test_browsersdkversion.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase, mock from django.conf import settings diff --git a/tests/sentry/loader/test_dynamic_sdk_options.py b/tests/sentry/loader/test_dynamic_sdk_options.py index 421facffd402c8..3b2ad40d65fde4 100644 --- a/tests/sentry/loader/test_dynamic_sdk_options.py +++ b/tests/sentry/loader/test_dynamic_sdk_options.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase from sentry.loader.dynamic_sdk_options import DynamicSdkLoaderOption, get_dynamic_sdk_loader_option diff --git a/tests/sentry/logging/test_handler.py b/tests/sentry/logging/test_handler.py index 724ef3b40b5aa3..c98cda58cf4bfa 100644 --- a/tests/sentry/logging/test_handler.py +++ b/tests/sentry/logging/test_handler.py @@ -1,7 +1,7 @@ import logging from collections.abc import Callable from contextlib import contextmanager -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/mail/__init__.py b/tests/sentry/mail/__init__.py index 83b40e67e06aaa..c47e828484827e 100644 --- a/tests/sentry/mail/__init__.py +++ b/tests/sentry/mail/__init__.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any from unittest import mock from sentry.event_manager import EventManager, get_event_type diff --git a/tests/sentry/mail/activity/test_note.py b/tests/sentry/mail/activity/test_note.py index 1e2f02c99c3d61..d6ed1601c8a68c 100644 --- a/tests/sentry/mail/activity/test_note.py +++ b/tests/sentry/mail/activity/test_note.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.types import ExternalProviders from sentry.models.activity import Activity from sentry.notifications.models.notificationsettingoption import NotificationSettingOption diff --git a/tests/sentry/mail/activity/test_release.py b/tests/sentry/mail/activity/test_release.py index 54e4e6cede2666..bfcf753185d308 100644 --- a/tests/sentry/mail/activity/test_release.py +++ b/tests/sentry/mail/activity/test_release.py @@ -1,3 +1,4 @@ +from typing import int from django.core import mail from sentry.integrations.types import ExternalProviderEnum, ExternalProviders diff --git a/tests/sentry/mail/test_actions.py b/tests/sentry/mail/test_actions.py index fbe9f50ffab669..838a8b8725d978 100644 --- a/tests/sentry/mail/test_actions.py +++ b/tests/sentry/mail/test_actions.py @@ -1,3 +1,4 @@ +from typing import int from django.core import mail from sentry.eventstream.types import EventStreamEventType diff --git a/tests/sentry/mail/test_adapter.py b/tests/sentry/mail/test_adapter.py index 6bacfec1d33c6a..75cb26c71bdd3d 100644 --- a/tests/sentry/mail/test_adapter.py +++ b/tests/sentry/mail/test_adapter.py @@ -1,3 +1,4 @@ +from typing import int import uuid import zoneinfo from collections import Counter diff --git a/tests/sentry/management/commands/test_generate_controlsilo_urls.py b/tests/sentry/management/commands/test_generate_controlsilo_urls.py index 06283d11222953..bd6807788b361e 100644 --- a/tests/sentry/management/commands/test_generate_controlsilo_urls.py +++ b/tests/sentry/management/commands/test_generate_controlsilo_urls.py @@ -1,3 +1,4 @@ +from typing import int import os.path import tempfile from io import StringIO diff --git a/tests/sentry/manager/test_external_issue_manager.py b/tests/sentry/manager/test_external_issue_manager.py index 13b2378345549b..fd2dce24b3277f 100644 --- a/tests/sentry/manager/test_external_issue_manager.py +++ b/tests/sentry/manager/test_external_issue_manager.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.models.external_issue import ExternalIssue from sentry.integrations.services.integration.serial import serialize_integration from sentry.services.eventstore.models import GroupEvent diff --git a/tests/sentry/manager/test_group_manager.py b/tests/sentry/manager/test_group_manager.py index 8cd54084c6b137..628aa31d0c9926 100644 --- a/tests/sentry/manager/test_group_manager.py +++ b/tests/sentry/manager/test_group_manager.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.services.integration.serial import serialize_integration from sentry.models.group import Group from sentry.testutils.cases import TestCase diff --git a/tests/sentry/manager/test_organization_manager.py b/tests/sentry/manager/test_organization_manager.py index 0cd5eeeae863ca..f211bc23c029a7 100644 --- a/tests/sentry/manager/test_organization_manager.py +++ b/tests/sentry/manager/test_organization_manager.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.organization import Organization from sentry.testutils.cases import TestCase diff --git a/tests/sentry/manager/test_project_manager.py b/tests/sentry/manager/test_project_manager.py index 8de262ed6cf6a7..08456d4ca4f22f 100644 --- a/tests/sentry/manager/test_project_manager.py +++ b/tests/sentry/manager/test_project_manager.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.project import Project from sentry.testutils.cases import TestCase diff --git a/tests/sentry/manager/test_projectteam_manager.py b/tests/sentry/manager/test_projectteam_manager.py index 1f2fc870355cf3..7b016d1f662b72 100644 --- a/tests/sentry/manager/test_projectteam_manager.py +++ b/tests/sentry/manager/test_projectteam_manager.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.projectteam import ProjectTeam from sentry.models.team import Team from sentry.testutils.cases import TestCase diff --git a/tests/sentry/manager/test_team_manager.py b/tests/sentry/manager/test_team_manager.py index 7527252fcdbc5c..3efdc6d5231805 100644 --- a/tests/sentry/manager/test_team_manager.py +++ b/tests/sentry/manager/test_team_manager.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.team import Team from sentry.testutils.cases import TestCase from sentry.users.services.user.service import user_service diff --git a/tests/sentry/metrics/test_datadog.py b/tests/sentry/metrics/test_datadog.py index 30067e59fb9f89..8e4fa9174fc419 100644 --- a/tests/sentry/metrics/test_datadog.py +++ b/tests/sentry/metrics/test_datadog.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase from unittest.mock import MagicMock, patch diff --git a/tests/sentry/metrics/test_dualwrite.py b/tests/sentry/metrics/test_dualwrite.py index 7c15c1e9d91fbd..0011dbac248566 100644 --- a/tests/sentry/metrics/test_dualwrite.py +++ b/tests/sentry/metrics/test_dualwrite.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.metrics.dualwrite import DualWriteMetricsBackend diff --git a/tests/sentry/metrics/test_middleware.py b/tests/sentry/metrics/test_middleware.py index dede56da490a00..b12d0fd8c1d4eb 100644 --- a/tests/sentry/metrics/test_middleware.py +++ b/tests/sentry/metrics/test_middleware.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.test import override_settings diff --git a/tests/sentry/metrics/test_precise.py b/tests/sentry/metrics/test_precise.py index c48622ab8cec17..7311cea4d91f85 100644 --- a/tests/sentry/metrics/test_precise.py +++ b/tests/sentry/metrics/test_precise.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.metrics.precise_dogstatsd import PreciseDogStatsdMetricsBackend diff --git a/tests/sentry/metrics/test_sentry_sdk.py b/tests/sentry/metrics/test_sentry_sdk.py index 7f11ae412a2059..71359e7981b627 100644 --- a/tests/sentry/metrics/test_sentry_sdk.py +++ b/tests/sentry/metrics/test_sentry_sdk.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/metrics/test_statsd.py b/tests/sentry/metrics/test_statsd.py index be3ad001a16596..7312a519690bf9 100644 --- a/tests/sentry/metrics/test_statsd.py +++ b/tests/sentry/metrics/test_statsd.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import pytest diff --git a/tests/sentry/middleware/integrations/parsers/test_bitbucket.py b/tests/sentry/middleware/integrations/parsers/test_bitbucket.py index 32c2c76be1981f..ae471164c9d0e6 100644 --- a/tests/sentry/middleware/integrations/parsers/test_bitbucket.py +++ b/tests/sentry/middleware/integrations/parsers/test_bitbucket.py @@ -1,3 +1,4 @@ +from typing import int from django.http import HttpRequest, HttpResponse from django.test import RequestFactory, override_settings from django.urls import reverse diff --git a/tests/sentry/middleware/integrations/parsers/test_bitbucket_server.py b/tests/sentry/middleware/integrations/parsers/test_bitbucket_server.py index 109f2d6afa493e..c54243bf61c37d 100644 --- a/tests/sentry/middleware/integrations/parsers/test_bitbucket_server.py +++ b/tests/sentry/middleware/integrations/parsers/test_bitbucket_server.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from unittest.mock import MagicMock diff --git a/tests/sentry/middleware/integrations/parsers/test_discord.py b/tests/sentry/middleware/integrations/parsers/test_discord.py index de98c74c527ded..9216160342b5d8 100644 --- a/tests/sentry/middleware/integrations/parsers/test_discord.py +++ b/tests/sentry/middleware/integrations/parsers/test_discord.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch import responses diff --git a/tests/sentry/middleware/integrations/parsers/test_github.py b/tests/sentry/middleware/integrations/parsers/test_github.py index a307bcf81fcc40..30ef2f4d16cdd6 100644 --- a/tests/sentry/middleware/integrations/parsers/test_github.py +++ b/tests/sentry/middleware/integrations/parsers/test_github.py @@ -1,3 +1,4 @@ +from typing import int import orjson import pytest import responses diff --git a/tests/sentry/middleware/integrations/parsers/test_github_enterprise.py b/tests/sentry/middleware/integrations/parsers/test_github_enterprise.py index a51449ddf30a34..c142d80cddecef 100644 --- a/tests/sentry/middleware/integrations/parsers/test_github_enterprise.py +++ b/tests/sentry/middleware/integrations/parsers/test_github_enterprise.py @@ -1,3 +1,4 @@ +from typing import int import responses from django.db import router, transaction from django.http import HttpRequest, HttpResponse diff --git a/tests/sentry/middleware/integrations/parsers/test_gitlab.py b/tests/sentry/middleware/integrations/parsers/test_gitlab.py index 1f95b0678e17e1..ce36b0d6182f46 100644 --- a/tests/sentry/middleware/integrations/parsers/test_gitlab.py +++ b/tests/sentry/middleware/integrations/parsers/test_gitlab.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import responses diff --git a/tests/sentry/middleware/integrations/parsers/test_google.py b/tests/sentry/middleware/integrations/parsers/test_google.py index 8dc90eeb6e39e9..d5fd29abda98a1 100644 --- a/tests/sentry/middleware/integrations/parsers/test_google.py +++ b/tests/sentry/middleware/integrations/parsers/test_google.py @@ -1,3 +1,4 @@ +from typing import int import responses from django.http import HttpRequest, HttpResponse from django.test import RequestFactory diff --git a/tests/sentry/middleware/integrations/parsers/test_jira.py b/tests/sentry/middleware/integrations/parsers/test_jira.py index 93b1f5a7794134..d8f26fb5642fcd 100644 --- a/tests/sentry/middleware/integrations/parsers/test_jira.py +++ b/tests/sentry/middleware/integrations/parsers/test_jira.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest.mock import patch diff --git a/tests/sentry/middleware/integrations/parsers/test_jira_server.py b/tests/sentry/middleware/integrations/parsers/test_jira_server.py index bb1a55c8f92a01..bc27b13bfa8ef6 100644 --- a/tests/sentry/middleware/integrations/parsers/test_jira_server.py +++ b/tests/sentry/middleware/integrations/parsers/test_jira_server.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import mock import responses diff --git a/tests/sentry/middleware/integrations/parsers/test_msteams.py b/tests/sentry/middleware/integrations/parsers/test_msteams.py index 797933839e75fd..fb971af324bfa3 100644 --- a/tests/sentry/middleware/integrations/parsers/test_msteams.py +++ b/tests/sentry/middleware/integrations/parsers/test_msteams.py @@ -1,5 +1,5 @@ from copy import deepcopy -from typing import Any +from typing import int, Any import responses from django.http import HttpRequest, HttpResponse diff --git a/tests/sentry/middleware/integrations/parsers/test_plugin.py b/tests/sentry/middleware/integrations/parsers/test_plugin.py index 1836fb682e6b70..570eef7d42aaa9 100644 --- a/tests/sentry/middleware/integrations/parsers/test_plugin.py +++ b/tests/sentry/middleware/integrations/parsers/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int import responses from django.http import HttpRequest, HttpResponse from django.test import RequestFactory diff --git a/tests/sentry/middleware/integrations/parsers/test_slack.py b/tests/sentry/middleware/integrations/parsers/test_slack.py index aafed99e921f07..9ed50ee65286f4 100644 --- a/tests/sentry/middleware/integrations/parsers/test_slack.py +++ b/tests/sentry/middleware/integrations/parsers/test_slack.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest.mock import MagicMock, patch from urllib.parse import urlencode diff --git a/tests/sentry/middleware/integrations/parsers/test_vercel.py b/tests/sentry/middleware/integrations/parsers/test_vercel.py index 88566d4823c634..b2aa8d2b0ea713 100644 --- a/tests/sentry/middleware/integrations/parsers/test_vercel.py +++ b/tests/sentry/middleware/integrations/parsers/test_vercel.py @@ -1,3 +1,4 @@ +from typing import int import responses from django.http import HttpRequest, HttpResponse from django.test import RequestFactory diff --git a/tests/sentry/middleware/integrations/parsers/test_vsts.py b/tests/sentry/middleware/integrations/parsers/test_vsts.py index ff3856afeb6d44..44bb65f7023540 100644 --- a/tests/sentry/middleware/integrations/parsers/test_vsts.py +++ b/tests/sentry/middleware/integrations/parsers/test_vsts.py @@ -1,3 +1,4 @@ +from typing import int from copy import deepcopy import responses diff --git a/tests/sentry/middleware/integrations/test_classifications.py b/tests/sentry/middleware/integrations/test_classifications.py index d3354b76960707..42b24d67fd14bf 100644 --- a/tests/sentry/middleware/integrations/test_classifications.py +++ b/tests/sentry/middleware/integrations/test_classifications.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase from unittest.mock import MagicMock, patch diff --git a/tests/sentry/middleware/integrations/test_integration_control.py b/tests/sentry/middleware/integrations/test_integration_control.py index 289de32959b2bb..65994860f94c1d 100644 --- a/tests/sentry/middleware/integrations/test_integration_control.py +++ b/tests/sentry/middleware/integrations/test_integration_control.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase from unittest.mock import MagicMock, patch diff --git a/tests/sentry/middleware/integrations/test_parsers_defined.py b/tests/sentry/middleware/integrations/test_parsers_defined.py index 313b73dea8191d..73d422f3b93fde 100644 --- a/tests/sentry/middleware/integrations/test_parsers_defined.py +++ b/tests/sentry/middleware/integrations/test_parsers_defined.py @@ -1,3 +1,4 @@ +from typing import int import importlib from django.http import HttpResponse diff --git a/tests/sentry/middleware/integrations/test_tasks.py b/tests/sentry/middleware/integrations/test_tasks.py index 3f5009958b1a42..fa907dd8590946 100644 --- a/tests/sentry/middleware/integrations/test_tasks.py +++ b/tests/sentry/middleware/integrations/test_tasks.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import responses diff --git a/tests/sentry/middleware/test_access_log_middleware.py b/tests/sentry/middleware/test_access_log_middleware.py index 02457f73001d9e..4317eebc6d7e9f 100644 --- a/tests/sentry/middleware/test_access_log_middleware.py +++ b/tests/sentry/middleware/test_access_log_middleware.py @@ -1,3 +1,4 @@ +from typing import int import logging from urllib.parse import unquote diff --git a/tests/sentry/middleware/test_auth.py b/tests/sentry/middleware/test_auth.py index 83942a11dfd5e6..3ae7d81f81128a 100644 --- a/tests/sentry/middleware/test_auth.py +++ b/tests/sentry/middleware/test_auth.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import MagicMock, patch diff --git a/tests/sentry/middleware/test_customer_domain.py b/tests/sentry/middleware/test_customer_domain.py index 829d719ff55e32..a050b69d40b5e0 100644 --- a/tests/sentry/middleware/test_customer_domain.py +++ b/tests/sentry/middleware/test_customer_domain.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest import mock diff --git a/tests/sentry/middleware/test_demo_mode_guard.py b/tests/sentry/middleware/test_demo_mode_guard.py index 952352061304c5..cdefe018fb0d94 100644 --- a/tests/sentry/middleware/test_demo_mode_guard.py +++ b/tests/sentry/middleware/test_demo_mode_guard.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import sentinel diff --git a/tests/sentry/middleware/test_devtoolbar.py b/tests/sentry/middleware/test_devtoolbar.py index d7af2cd8be30ab..d4a543774a2204 100644 --- a/tests/sentry/middleware/test_devtoolbar.py +++ b/tests/sentry/middleware/test_devtoolbar.py @@ -1,5 +1,5 @@ from functools import cached_property -from typing import cast +from typing import int, cast from unittest.mock import MagicMock, patch from django.http import HttpResponse diff --git a/tests/sentry/middleware/test_health.py b/tests/sentry/middleware/test_health.py index f8e5a3c16c0f07..d8ce4ba092a8e8 100644 --- a/tests/sentry/middleware/test_health.py +++ b/tests/sentry/middleware/test_health.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest import TestCase from unittest.mock import MagicMock, patch diff --git a/tests/sentry/middleware/test_proxy.py b/tests/sentry/middleware/test_proxy.py index a916a6cf962621..f928da3d569e2d 100644 --- a/tests/sentry/middleware/test_proxy.py +++ b/tests/sentry/middleware/test_proxy.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from functools import cached_property diff --git a/tests/sentry/middleware/test_ratelimit_middleware.py b/tests/sentry/middleware/test_ratelimit_middleware.py index e7fbab1b5fdd1f..a4a79bd614e69f 100644 --- a/tests/sentry/middleware/test_ratelimit_middleware.py +++ b/tests/sentry/middleware/test_ratelimit_middleware.py @@ -1,3 +1,4 @@ +from typing import int from concurrent.futures import ThreadPoolExecutor from functools import cached_property from time import sleep, time diff --git a/tests/sentry/middleware/test_reporting_endpoint.py b/tests/sentry/middleware/test_reporting_endpoint.py index d6996b8b93a7de..1ec7c69caf6248 100644 --- a/tests/sentry/middleware/test_reporting_endpoint.py +++ b/tests/sentry/middleware/test_reporting_endpoint.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from django.http import HttpResponse diff --git a/tests/sentry/middleware/test_staff.py b/tests/sentry/middleware/test_staff.py index d9ce8edc2276b1..bc0b74fbdb2986 100644 --- a/tests/sentry/middleware/test_staff.py +++ b/tests/sentry/middleware/test_staff.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from django.test import override_settings from django.urls import re_path diff --git a/tests/sentry/middleware/test_stats.py b/tests/sentry/middleware/test_stats.py index a4055db8e57602..690d54431948e7 100644 --- a/tests/sentry/middleware/test_stats.py +++ b/tests/sentry/middleware/test_stats.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import MagicMock, Mock, patch, sentinel diff --git a/tests/sentry/middleware/test_subdomain.py b/tests/sentry/middleware/test_subdomain.py index acff679cf51925..26ffa9470bf8c1 100644 --- a/tests/sentry/middleware/test_subdomain.py +++ b/tests/sentry/middleware/test_subdomain.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest import mock diff --git a/tests/sentry/middleware/test_superuser.py b/tests/sentry/middleware/test_superuser.py index b30aa18e170789..bbe36eca066853 100644 --- a/tests/sentry/middleware/test_superuser.py +++ b/tests/sentry/middleware/test_superuser.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import MagicMock, patch diff --git a/tests/sentry/migrations/test_0002_backfill_insights_team_starred_segments.py b/tests/sentry/migrations/test_0002_backfill_insights_team_starred_segments.py index 42731aebb0dba9..5cfd9b10f1b3b1 100644 --- a/tests/sentry/migrations/test_0002_backfill_insights_team_starred_segments.py +++ b/tests/sentry/migrations/test_0002_backfill_insights_team_starred_segments.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.discover.models import TeamKeyTransaction diff --git a/tests/sentry/migrations/test_0913_split_discover_dataset_dashboards_self_hosted.py b/tests/sentry/migrations/test_0913_split_discover_dataset_dashboards_self_hosted.py index d5b2c044f758be..c0f0e92df3229b 100644 --- a/tests/sentry/migrations/test_0913_split_discover_dataset_dashboards_self_hosted.py +++ b/tests/sentry/migrations/test_0913_split_discover_dataset_dashboards_self_hosted.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.hybridcloud.models.outbox import outbox_context diff --git a/tests/sentry/migrations/test_0921_convert_org_saved_searches_to_views_rerevised.py b/tests/sentry/migrations/test_0921_convert_org_saved_searches_to_views_rerevised.py index be1b1edf7ca171..9ab9587284d066 100644 --- a/tests/sentry/migrations/test_0921_convert_org_saved_searches_to_views_rerevised.py +++ b/tests/sentry/migrations/test_0921_convert_org_saved_searches_to_views_rerevised.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.models.groupsearchview import GroupSearchView diff --git a/tests/sentry/migrations/test_0925_backfill_open_periods.py b/tests/sentry/migrations/test_0925_backfill_open_periods.py index 989d06034bb27b..dbdc1d3d48fa54 100644 --- a/tests/sentry/migrations/test_0925_backfill_open_periods.py +++ b/tests/sentry/migrations/test_0925_backfill_open_periods.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/sentry/migrations/test_noop.py b/tests/sentry/migrations/test_noop.py index 4d074cdf57848d..eefad366f6d98e 100644 --- a/tests/sentry/migrations/test_noop.py +++ b/tests/sentry/migrations/test_noop.py @@ -1,3 +1,4 @@ +from typing import int import pytest diff --git a/tests/sentry/models/releases/test_release_project.py b/tests/sentry/models/releases/test_release_project.py index 7bf872a4bbda58..dc2bde7a5cf841 100644 --- a/tests/sentry/models/releases/test_release_project.py +++ b/tests/sentry/models/releases/test_release_project.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import call as mock_call from unittest.mock import patch diff --git a/tests/sentry/models/test_activity.py b/tests/sentry/models/test_activity.py index 0ddd63bd7a9d77..e3b0b0cae2fc21 100644 --- a/tests/sentry/models/test_activity.py +++ b/tests/sentry/models/test_activity.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import datetime, timezone from unittest.mock import MagicMock, patch diff --git a/tests/sentry/models/test_apiapplication.py b/tests/sentry/models/test_apiapplication.py index 81dee339bfffdf..14076869e5d7a2 100644 --- a/tests/sentry/models/test_apiapplication.py +++ b/tests/sentry/models/test_apiapplication.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.apiapplication import ApiApplication from sentry.testutils.cases import TestCase from sentry.testutils.silo import control_silo_test diff --git a/tests/sentry/models/test_apigrant.py b/tests/sentry/models/test_apigrant.py index 79740316b1252d..cfcac67a86d51f 100644 --- a/tests/sentry/models/test_apigrant.py +++ b/tests/sentry/models/test_apigrant.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.apiapplication import ApiApplication from sentry.models.apigrant import ApiGrant from sentry.testutils.cases import TestCase diff --git a/tests/sentry/models/test_apikey.py b/tests/sentry/models/test_apikey.py index ccf8a884a23e4e..419a50f7d7d323 100644 --- a/tests/sentry/models/test_apikey.py +++ b/tests/sentry/models/test_apikey.py @@ -1,3 +1,4 @@ +from typing import int from sentry.conf.server import SENTRY_SCOPE_HIERARCHY_MAPPING, SENTRY_SCOPES from sentry.hybridcloud.models import ApiKeyReplica from sentry.silo.base import SiloMode diff --git a/tests/sentry/models/test_apitoken.py b/tests/sentry/models/test_apitoken.py index 07d08c19339d44..338d45809f935d 100644 --- a/tests/sentry/models/test_apitoken.py +++ b/tests/sentry/models/test_apitoken.py @@ -1,3 +1,4 @@ +from typing import int import hashlib from datetime import timedelta from unittest import mock diff --git a/tests/sentry/models/test_auditlogentry.py b/tests/sentry/models/test_auditlogentry.py index df0ca8b9013de0..559566440c56fa 100644 --- a/tests/sentry/models/test_auditlogentry.py +++ b/tests/sentry/models/test_auditlogentry.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from sentry import audit_log diff --git a/tests/sentry/models/test_base.py b/tests/sentry/models/test_base.py index f841ea2fd7acbb..9ef3946b81ed02 100644 --- a/tests/sentry/models/test_base.py +++ b/tests/sentry/models/test_base.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock from django.apps import apps diff --git a/tests/sentry/models/test_commit.py b/tests/sentry/models/test_commit.py index 52ebd4584ac992..5eb847b606a201 100644 --- a/tests/sentry/models/test_commit.py +++ b/tests/sentry/models/test_commit.py @@ -1,3 +1,4 @@ +from typing import int from hashlib import sha1 from uuid import uuid4 diff --git a/tests/sentry/models/test_commitauthor.py b/tests/sentry/models/test_commitauthor.py index 03c4172eca3675..a6b018adb5bf83 100644 --- a/tests/sentry/models/test_commitauthor.py +++ b/tests/sentry/models/test_commitauthor.py @@ -1,3 +1,4 @@ +from typing import int from django.test import SimpleTestCase from sentry.models.commitauthor import CommitAuthor diff --git a/tests/sentry/models/test_commitfilechange.py b/tests/sentry/models/test_commitfilechange.py index 25b29ddb75f1a1..8810baf386883f 100644 --- a/tests/sentry/models/test_commitfilechange.py +++ b/tests/sentry/models/test_commitfilechange.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.commit import Commit from sentry.models.commitfilechange import CommitFileChange from sentry.models.repository import Repository diff --git a/tests/sentry/models/test_dashboard.py b/tests/sentry/models/test_dashboard.py index 4724ceccfe6e48..e48f0a231eb186 100644 --- a/tests/sentry/models/test_dashboard.py +++ b/tests/sentry/models/test_dashboard.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.dashboard import Dashboard, DashboardFavoriteUser from sentry.models.organization import Organization from sentry.testutils.cases import TestCase diff --git a/tests/sentry/models/test_debugfile.py b/tests/sentry/models/test_debugfile.py index ffe48026368b3e..f71515ad02d6e2 100644 --- a/tests/sentry/models/test_debugfile.py +++ b/tests/sentry/models/test_debugfile.py @@ -5,7 +5,7 @@ import time import zipfile from io import BytesIO -from typing import Any +from typing import int, Any import pytest from django.core.files.uploadedfile import SimpleUploadedFile diff --git a/tests/sentry/models/test_deploy.py b/tests/sentry/models/test_deploy.py index 302a6df9854989..d1fa14edf05ce0 100644 --- a/tests/sentry/models/test_deploy.py +++ b/tests/sentry/models/test_deploy.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.activity import Activity from sentry.models.commit import Commit from sentry.models.deploy import Deploy diff --git a/tests/sentry/models/test_dynamicsampling.py b/tests/sentry/models/test_dynamicsampling.py index c5faef01d4baa1..a577341965a30d 100644 --- a/tests/sentry/models/test_dynamicsampling.py +++ b/tests/sentry/models/test_dynamicsampling.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta import pytest diff --git a/tests/sentry/models/test_environment.py b/tests/sentry/models/test_environment.py index 189b23cebff0e1..2679974dfd1cf8 100644 --- a/tests/sentry/models/test_environment.py +++ b/tests/sentry/models/test_environment.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.models.environment import Environment diff --git a/tests/sentry/models/test_eventerror.py b/tests/sentry/models/test_eventerror.py index f9619711821a7d..a71a93fbc4339b 100644 --- a/tests/sentry/models/test_eventerror.py +++ b/tests/sentry/models/test_eventerror.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.models.eventerror import EventError diff --git a/tests/sentry/models/test_featureadoption.py b/tests/sentry/models/test_featureadoption.py index 90d558052d80c2..4bc8e8d46f4ae3 100644 --- a/tests/sentry/models/test_featureadoption.py +++ b/tests/sentry/models/test_featureadoption.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.featureadoption import FeatureAdoptionRedisBackend from sentry.testutils.cases import TestCase from sentry.utils.redis import redis_clusters diff --git a/tests/sentry/models/test_file.py b/tests/sentry/models/test_file.py index 1db6d6a5ae5f83..d72c7c58d09a2d 100644 --- a/tests/sentry/models/test_file.py +++ b/tests/sentry/models/test_file.py @@ -1,3 +1,4 @@ +from typing import int import os from datetime import timedelta from io import BytesIO diff --git a/tests/sentry/models/test_group.py b/tests/sentry/models/test_group.py index 84874e417377f8..a12cf3ced8ff34 100644 --- a/tests/sentry/models/test_group.py +++ b/tests/sentry/models/test_group.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import datetime, timedelta from unittest import mock diff --git a/tests/sentry/models/test_groupassignee.py b/tests/sentry/models/test_groupassignee.py index d9dca52451bd91..c82ddb78f5ef19 100644 --- a/tests/sentry/models/test_groupassignee.py +++ b/tests/sentry/models/test_groupassignee.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/models/test_grouphash.py b/tests/sentry/models/test_grouphash.py index 001900ebebf593..0b29871858c90d 100644 --- a/tests/sentry/models/test_grouphash.py +++ b/tests/sentry/models/test_grouphash.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.grouphash import GroupHash from sentry.models.grouphashmetadata import GroupHashMetadata from sentry.testutils.cases import TestCase diff --git a/tests/sentry/models/test_grouphistory.py b/tests/sentry/models/test_grouphistory.py index 78fcf9c71e0e95..56be8ea6fd0f0b 100644 --- a/tests/sentry/models/test_grouphistory.py +++ b/tests/sentry/models/test_grouphistory.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.groupassignee import GroupAssignee from sentry.models.grouphistory import GroupHistory, GroupHistoryStatus, get_prev_history from sentry.testutils.cases import TestCase diff --git a/tests/sentry/models/test_groupinbox.py b/tests/sentry/models/test_groupinbox.py index 7e9ddb8a3dae8a..b782860b0f0cb8 100644 --- a/tests/sentry/models/test_groupinbox.py +++ b/tests/sentry/models/test_groupinbox.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.activity import Activity from sentry.models.groupinbox import ( GroupInbox, diff --git a/tests/sentry/models/test_groupmeta.py b/tests/sentry/models/test_groupmeta.py index a8116b95033b93..2e22ef1a36fde1 100644 --- a/tests/sentry/models/test_groupmeta.py +++ b/tests/sentry/models/test_groupmeta.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.models.groupmeta import GroupMeta, GroupMetaCacheNotPopulated diff --git a/tests/sentry/models/test_groupowner.py b/tests/sentry/models/test_groupowner.py index b704c72c87fbe5..8eed3a3a79acf9 100644 --- a/tests/sentry/models/test_groupowner.py +++ b/tests/sentry/models/test_groupowner.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from sentry.models.groupowner import GroupOwner, GroupOwnerType, SuspectCommitStrategy diff --git a/tests/sentry/models/test_groupreaction.py b/tests/sentry/models/test_groupreaction.py index 78cca67d2cd098..2c5b35d3a5b2b4 100644 --- a/tests/sentry/models/test_groupreaction.py +++ b/tests/sentry/models/test_groupreaction.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.db import IntegrityError diff --git a/tests/sentry/models/test_grouprelease.py b/tests/sentry/models/test_grouprelease.py index 4c54d144a83010..ff093665ccc19a 100644 --- a/tests/sentry/models/test_grouprelease.py +++ b/tests/sentry/models/test_grouprelease.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/models/test_groupresolution.py b/tests/sentry/models/test_groupresolution.py index 39dac4983d89e9..a8df4908f7cebd 100644 --- a/tests/sentry/models/test_groupresolution.py +++ b/tests/sentry/models/test_groupresolution.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/models/test_groupsearchview.py b/tests/sentry/models/test_groupsearchview.py index 4a9ff29b6d6bb4..091214dfb97f28 100644 --- a/tests/sentry/models/test_groupsearchview.py +++ b/tests/sentry/models/test_groupsearchview.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.groupsearchview import GroupSearchView from sentry.testutils.cases import TestCase diff --git a/tests/sentry/models/test_groupsnooze.py b/tests/sentry/models/test_groupsnooze.py index d173773e62b5f7..38e916f9ef22bd 100644 --- a/tests/sentry/models/test_groupsnooze.py +++ b/tests/sentry/models/test_groupsnooze.py @@ -1,3 +1,4 @@ +from typing import int import itertools from datetime import timedelta from unittest import mock diff --git a/tests/sentry/models/test_groupsubscription.py b/tests/sentry/models/test_groupsubscription.py index 22c90c2da8d8ec..eb9b85230dc1f0 100644 --- a/tests/sentry/models/test_groupsubscription.py +++ b/tests/sentry/models/test_groupsubscription.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.integrations.types import ExternalProviderEnum, ExternalProviders from sentry.models.group import Group diff --git a/tests/sentry/models/test_manager.py b/tests/sentry/models/test_manager.py index 10aec1179115b1..cf10efaa89484a 100644 --- a/tests/sentry/models/test_manager.py +++ b/tests/sentry/models/test_manager.py @@ -1,3 +1,4 @@ +from typing import int from sentry.db.models.manager.base import flush_manager_local_cache from sentry.models.organization import Organization from sentry.testutils.cases import TestCase diff --git a/tests/sentry/models/test_organization.py b/tests/sentry/models/test_organization.py index 03cb9a659f38fe..93b16d35acd247 100644 --- a/tests/sentry/models/test_organization.py +++ b/tests/sentry/models/test_organization.py @@ -1,3 +1,4 @@ +from typing import int import copy from unittest import mock diff --git a/tests/sentry/models/test_organization_avatar.py b/tests/sentry/models/test_organization_avatar.py index 3b99c91782e762..0f17d27e8a3f9e 100644 --- a/tests/sentry/models/test_organization_avatar.py +++ b/tests/sentry/models/test_organization_avatar.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.avatars.organization_avatar import OrganizationAvatar from sentry.models.files.file import File from sentry.testutils.cases import TestCase diff --git a/tests/sentry/models/test_organizationaccessrequest.py b/tests/sentry/models/test_organizationaccessrequest.py index a762db4940d55b..5f9b716d66b1b6 100644 --- a/tests/sentry/models/test_organizationaccessrequest.py +++ b/tests/sentry/models/test_organizationaccessrequest.py @@ -1,3 +1,4 @@ +from typing import int from django.core import mail from sentry.models.organizationaccessrequest import OrganizationAccessRequest diff --git a/tests/sentry/models/test_organizationmember.py b/tests/sentry/models/test_organizationmember.py index 81b8768e6f7299..c3069eb46def05 100644 --- a/tests/sentry/models/test_organizationmember.py +++ b/tests/sentry/models/test_organizationmember.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/models/test_organizationmemberteam.py b/tests/sentry/models/test_organizationmemberteam.py index 30921889177781..18092a80ded408 100644 --- a/tests/sentry/models/test_organizationmemberteam.py +++ b/tests/sentry/models/test_organizationmemberteam.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.organizationmemberteam import OrganizationMemberTeam from sentry.roles import team_roles from sentry.testutils.cases import TestCase diff --git a/tests/sentry/models/test_organizationoption.py b/tests/sentry/models/test_organizationoption.py index e6851dd48b9b5d..0b221ecce54607 100644 --- a/tests/sentry/models/test_organizationoption.py +++ b/tests/sentry/models/test_organizationoption.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.options.organization_option import OrganizationOption from sentry.testutils.cases import TestCase diff --git a/tests/sentry/models/test_organizationslugreservation.py b/tests/sentry/models/test_organizationslugreservation.py index de3c23459c7b09..848dcf4e3678e7 100644 --- a/tests/sentry/models/test_organizationslugreservation.py +++ b/tests/sentry/models/test_organizationslugreservation.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.db import router, transaction diff --git a/tests/sentry/models/test_orgauthtoken.py b/tests/sentry/models/test_orgauthtoken.py index 63e1ba3f607546..2a7ccd2249b142 100644 --- a/tests/sentry/models/test_orgauthtoken.py +++ b/tests/sentry/models/test_orgauthtoken.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.core.exceptions import ValidationError diff --git a/tests/sentry/models/test_project.py b/tests/sentry/models/test_project.py index 771401f98ba468..e75e5baf74f78e 100644 --- a/tests/sentry/models/test_project.py +++ b/tests/sentry/models/test_project.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Iterable from unittest import skip from unittest.mock import MagicMock, patch diff --git a/tests/sentry/models/test_projectcodeowners.py b/tests/sentry/models/test_projectcodeowners.py index 75551a574bca2b..cddd33bef06088 100644 --- a/tests/sentry/models/test_projectcodeowners.py +++ b/tests/sentry/models/test_projectcodeowners.py @@ -1,3 +1,4 @@ +from typing import int from sentry.issues.ownership.grammar import Matcher, Owner, Rule, dump_schema from sentry.models.projectcodeowners import ProjectCodeOwners from sentry.testutils.cases import TestCase diff --git a/tests/sentry/models/test_projectcounter.py b/tests/sentry/models/test_projectcounter.py index 27e1bcf42b1594..3718d3f88e65ef 100644 --- a/tests/sentry/models/test_projectcounter.py +++ b/tests/sentry/models/test_projectcounter.py @@ -1,3 +1,4 @@ +from typing import int from contextlib import contextmanager from unittest.mock import MagicMock, patch diff --git a/tests/sentry/models/test_projectkey.py b/tests/sentry/models/test_projectkey.py index 9d2db4f1ffc449..fe7b4ef55ad8bb 100644 --- a/tests/sentry/models/test_projectkey.py +++ b/tests/sentry/models/test_projectkey.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/models/test_projectoption.py b/tests/sentry/models/test_projectoption.py index 79c49b1821dba3..551edbde43252e 100644 --- a/tests/sentry/models/test_projectoption.py +++ b/tests/sentry/models/test_projectoption.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.options.project_option import ProjectOption from sentry.testutils.cases import TransactionTestCase diff --git a/tests/sentry/models/test_projectownership.py b/tests/sentry/models/test_projectownership.py index ec95654c98aca2..09fca8b713fcb6 100644 --- a/tests/sentry/models/test_projectownership.py +++ b/tests/sentry/models/test_projectownership.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.issues.ownership.grammar import Matcher, Owner, Rule, dump_schema, resolve_actors diff --git a/tests/sentry/models/test_projectredirect.py b/tests/sentry/models/test_projectredirect.py index 7e99e7c9e8e5ff..d4666b6e39bc93 100644 --- a/tests/sentry/models/test_projectredirect.py +++ b/tests/sentry/models/test_projectredirect.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.projectredirect import ProjectRedirect from sentry.testutils.cases import TestCase diff --git a/tests/sentry/models/test_projectsdk.py b/tests/sentry/models/test_projectsdk.py index fb986dcd54d603..d86ed15098c5c1 100644 --- a/tests/sentry/models/test_projectsdk.py +++ b/tests/sentry/models/test_projectsdk.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.test import override_settings diff --git a/tests/sentry/models/test_projecttemplate.py b/tests/sentry/models/test_projecttemplate.py index 7043b7b41589ff..c3ea4366862e77 100644 --- a/tests/sentry/models/test_projecttemplate.py +++ b/tests/sentry/models/test_projecttemplate.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.projecttemplate import ProjectTemplate from sentry.testutils.cases import TestCase diff --git a/tests/sentry/models/test_projecttemplateoption.py b/tests/sentry/models/test_projecttemplateoption.py index decbbaa3cf8de5..26fdf7aa3883cb 100644 --- a/tests/sentry/models/test_projecttemplateoption.py +++ b/tests/sentry/models/test_projecttemplateoption.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.options.project_template_option import ProjectTemplateOption from sentry.models.projecttemplate import ProjectTemplate from sentry.testutils.cases import TestCase diff --git a/tests/sentry/models/test_pullrequest.py b/tests/sentry/models/test_pullrequest.py index 900c2b2cfaa8a5..e9d0a0f1e4ce75 100644 --- a/tests/sentry/models/test_pullrequest.py +++ b/tests/sentry/models/test_pullrequest.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from hashlib import sha1 from uuid import uuid4 diff --git a/tests/sentry/models/test_recentsearch.py b/tests/sentry/models/test_recentsearch.py index 45bb9c379945bd..af4e502d72d41b 100644 --- a/tests/sentry/models/test_recentsearch.py +++ b/tests/sentry/models/test_recentsearch.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import patch diff --git a/tests/sentry/models/test_release.py b/tests/sentry/models/test_release.py index 0dbc2b503324d8..4dbcf385c96528 100644 --- a/tests/sentry/models/test_release.py +++ b/tests/sentry/models/test_release.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/models/test_releaseenvironment.py b/tests/sentry/models/test_releaseenvironment.py index d572797573bb92..d1d4f0b306ecab 100644 --- a/tests/sentry/models/test_releaseenvironment.py +++ b/tests/sentry/models/test_releaseenvironment.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/models/test_releasefile.py b/tests/sentry/models/test_releasefile.py index 9f99d5207d1360..e85084d2dc9a4d 100644 --- a/tests/sentry/models/test_releasefile.py +++ b/tests/sentry/models/test_releasefile.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from io import BytesIO from threading import Thread diff --git a/tests/sentry/models/test_releaseprojectenvironment.py b/tests/sentry/models/test_releaseprojectenvironment.py index 375b01f04e7b3e..764d377bb15be5 100644 --- a/tests/sentry/models/test_releaseprojectenvironment.py +++ b/tests/sentry/models/test_releaseprojectenvironment.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/models/test_rule.py b/tests/sentry/models/test_rule.py index f83c421ffdf5a4..dd8bf54914d620 100644 --- a/tests/sentry/models/test_rule.py +++ b/tests/sentry/models/test_rule.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from sentry.testutils.cases import TestCase diff --git a/tests/sentry/models/test_rulesnooze.py b/tests/sentry/models/test_rulesnooze.py index a87e4b7bf9b702..4dd6f7a421879c 100644 --- a/tests/sentry/models/test_rulesnooze.py +++ b/tests/sentry/models/test_rulesnooze.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta import pytest diff --git a/tests/sentry/models/test_statistical_detectors.py b/tests/sentry/models/test_statistical_detectors.py index da84314a111b08..c7d80a3f0c0f6a 100644 --- a/tests/sentry/models/test_statistical_detectors.py +++ b/tests/sentry/models/test_statistical_detectors.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.models.statistical_detectors import RegressionType diff --git a/tests/sentry/models/test_team.py b/tests/sentry/models/test_team.py index 001a72d5230eff..f86bb7e3c39190 100644 --- a/tests/sentry/models/test_team.py +++ b/tests/sentry/models/test_team.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from sentry.deletions.tasks.hybrid_cloud import schedule_hybrid_cloud_foreign_key_jobs_control diff --git a/tests/sentry/models/test_teamkeytransaction.py b/tests/sentry/models/test_teamkeytransaction.py index f23a4251504dcf..479d7c40ba2a57 100644 --- a/tests/sentry/models/test_teamkeytransaction.py +++ b/tests/sentry/models/test_teamkeytransaction.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import call as mock_call from unittest.mock import patch diff --git a/tests/sentry/monitors/clock_tasks/test_check_missed.py b/tests/sentry/monitors/clock_tasks/test_check_missed.py index 9565a5e3c3a8dc..4a335bc72c9996 100644 --- a/tests/sentry/monitors/clock_tasks/test_check_missed.py +++ b/tests/sentry/monitors/clock_tasks/test_check_missed.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, timedelta from unittest import mock from zoneinfo import ZoneInfo diff --git a/tests/sentry/monitors/clock_tasks/test_check_timeout.py b/tests/sentry/monitors/clock_tasks/test_check_timeout.py index 58ef1c67fa64ac..5ee6022ec9ea26 100644 --- a/tests/sentry/monitors/clock_tasks/test_check_timeout.py +++ b/tests/sentry/monitors/clock_tasks/test_check_timeout.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/monitors/clock_tasks/test_mark_unknown.py b/tests/sentry/monitors/clock_tasks/test_mark_unknown.py index bd11e7f83b889a..eade0e4016f99b 100644 --- a/tests/sentry/monitors/clock_tasks/test_mark_unknown.py +++ b/tests/sentry/monitors/clock_tasks/test_mark_unknown.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/monitors/clock_tasks/test_producer.py b/tests/sentry/monitors/clock_tasks/test_producer.py index 978a4f20a6eb9a..02c611cfbd6a45 100644 --- a/tests/sentry/monitors/clock_tasks/test_producer.py +++ b/tests/sentry/monitors/clock_tasks/test_producer.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from arroyo import Topic diff --git a/tests/sentry/monitors/consumers/test_clock_tasks_consumer.py b/tests/sentry/monitors/consumers/test_clock_tasks_consumer.py index 500ded6d708942..cbf6a62cc903b6 100644 --- a/tests/sentry/monitors/consumers/test_clock_tasks_consumer.py +++ b/tests/sentry/monitors/consumers/test_clock_tasks_consumer.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from unittest import mock diff --git a/tests/sentry/monitors/consumers/test_clock_tick_consumer.py b/tests/sentry/monitors/consumers/test_clock_tick_consumer.py index e1b602c5f9eb31..b83a6986590449 100644 --- a/tests/sentry/monitors/consumers/test_clock_tick_consumer.py +++ b/tests/sentry/monitors/consumers/test_clock_tick_consumer.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/monitors/consumers/test_end_to_end.py b/tests/sentry/monitors/consumers/test_end_to_end.py index 04068d2447ba52..4f8b35ef88d85f 100644 --- a/tests/sentry/monitors/consumers/test_end_to_end.py +++ b/tests/sentry/monitors/consumers/test_end_to_end.py @@ -1,3 +1,4 @@ +from typing import int import contextlib import uuid from collections.abc import Generator diff --git a/tests/sentry/monitors/consumers/test_incident_occurrence_consumer.py b/tests/sentry/monitors/consumers/test_incident_occurrence_consumer.py index aa5fcc2f2959b1..bf7221ef29d90f 100644 --- a/tests/sentry/monitors/consumers/test_incident_occurrence_consumer.py +++ b/tests/sentry/monitors/consumers/test_incident_occurrence_consumer.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from unittest import mock diff --git a/tests/sentry/monitors/consumers/test_monitor_consumer.py b/tests/sentry/monitors/consumers/test_monitor_consumer.py index d767d82905765f..58dcaa0685c661 100644 --- a/tests/sentry/monitors/consumers/test_monitor_consumer.py +++ b/tests/sentry/monitors/consumers/test_monitor_consumer.py @@ -2,7 +2,7 @@ import uuid from collections.abc import Generator, Mapping, Sequence from datetime import UTC, datetime, timedelta -from typing import Any +from typing import int, Any from unittest import mock import msgpack diff --git a/tests/sentry/monitors/endpoints/test_base.py b/tests/sentry/monitors/endpoints/test_base.py index 56df35d4c01781..428ee633320449 100644 --- a/tests/sentry/monitors/endpoints/test_base.py +++ b/tests/sentry/monitors/endpoints/test_base.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/monitors/endpoints/test_base_monitor_checkin_index.py b/tests/sentry/monitors/endpoints/test_base_monitor_checkin_index.py index e6c89a623d71a8..68f1916f133b4f 100644 --- a/tests/sentry/monitors/endpoints/test_base_monitor_checkin_index.py +++ b/tests/sentry/monitors/endpoints/test_base_monitor_checkin_index.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import timedelta diff --git a/tests/sentry/monitors/endpoints/test_base_monitor_details.py b/tests/sentry/monitors/endpoints/test_base_monitor_details.py index 46af4d83c2b46b..df44207fed2606 100644 --- a/tests/sentry/monitors/endpoints/test_base_monitor_details.py +++ b/tests/sentry/monitors/endpoints/test_base_monitor_details.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from unittest.mock import MagicMock, patch from uuid import UUID diff --git a/tests/sentry/monitors/endpoints/test_base_monitor_environment_details.py b/tests/sentry/monitors/endpoints/test_base_monitor_environment_details.py index 6628e02cbb0857..f26e19905a5d4d 100644 --- a/tests/sentry/monitors/endpoints/test_base_monitor_environment_details.py +++ b/tests/sentry/monitors/endpoints/test_base_monitor_environment_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import ObjectStatus from sentry.deletions.models.scheduleddeletion import RegionScheduledDeletion from sentry.monitors.models import Monitor, MonitorEnvironment, MonitorStatus diff --git a/tests/sentry/monitors/endpoints/test_base_monitor_stats.py b/tests/sentry/monitors/endpoints/test_base_monitor_stats.py index 0798eb3d7eb0b7..dfba3f8145a7e2 100644 --- a/tests/sentry/monitors/endpoints/test_base_monitor_stats.py +++ b/tests/sentry/monitors/endpoints/test_base_monitor_stats.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from sentry.monitors.models import CheckInStatus, MonitorCheckIn diff --git a/tests/sentry/monitors/endpoints/test_organization_detector_details.py b/tests/sentry/monitors/endpoints/test_organization_detector_details.py index 0af8e64a8dcb64..236e53af9b3b4d 100644 --- a/tests/sentry/monitors/endpoints/test_organization_detector_details.py +++ b/tests/sentry/monitors/endpoints/test_organization_detector_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.constants import ObjectStatus from sentry.deletions.models.scheduleddeletion import RegionScheduledDeletion diff --git a/tests/sentry/monitors/endpoints/test_organization_detector_index.py b/tests/sentry/monitors/endpoints/test_organization_detector_index.py index 3a782fe0750eec..60890fd5b21e45 100644 --- a/tests/sentry/monitors/endpoints/test_organization_detector_index.py +++ b/tests/sentry/monitors/endpoints/test_organization_detector_index.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from sentry.api.serializers import serialize diff --git a/tests/sentry/monitors/endpoints/test_organization_monitor_checkin_index.py b/tests/sentry/monitors/endpoints/test_organization_monitor_checkin_index.py index 19b9e0c787e358..7e001dce5cd95a 100644 --- a/tests/sentry/monitors/endpoints/test_organization_monitor_checkin_index.py +++ b/tests/sentry/monitors/endpoints/test_organization_monitor_checkin_index.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.helpers.datetime import freeze_time from sentry.testutils.skips import requires_snuba from tests.sentry.monitors.endpoints.test_base_monitor_checkin_index import ( diff --git a/tests/sentry/monitors/endpoints/test_organization_monitor_details.py b/tests/sentry/monitors/endpoints/test_organization_monitor_details.py index 043461c019dfae..b1892e9c04efde 100644 --- a/tests/sentry/monitors/endpoints/test_organization_monitor_details.py +++ b/tests/sentry/monitors/endpoints/test_organization_monitor_details.py @@ -1,3 +1,4 @@ +from typing import int from tests.sentry.monitors.endpoints.test_base_monitor_details import ( BaseDeleteMonitorTest, BaseMonitorDetailsTest, diff --git a/tests/sentry/monitors/endpoints/test_organization_monitor_environment_details.py b/tests/sentry/monitors/endpoints/test_organization_monitor_environment_details.py index 714784b286a77d..9e3f5b4bbe74fd 100644 --- a/tests/sentry/monitors/endpoints/test_organization_monitor_environment_details.py +++ b/tests/sentry/monitors/endpoints/test_organization_monitor_environment_details.py @@ -1,3 +1,4 @@ +from typing import int from tests.sentry.monitors.endpoints.test_base_monitor_environment_details import ( BaseDeleteMonitorTest, BaseUpdateMonitorEnvironmentTest, diff --git a/tests/sentry/monitors/endpoints/test_organization_monitor_index.py b/tests/sentry/monitors/endpoints/test_organization_monitor_index.py index b9a165d9997a09..d753287e66eab6 100644 --- a/tests/sentry/monitors/endpoints/test_organization_monitor_index.py +++ b/tests/sentry/monitors/endpoints/test_organization_monitor_index.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import uuid from datetime import UTC, datetime, timedelta diff --git a/tests/sentry/monitors/endpoints/test_organization_monitor_index_count.py b/tests/sentry/monitors/endpoints/test_organization_monitor_index_count.py index fb974cb40cf037..d995160e26a994 100644 --- a/tests/sentry/monitors/endpoints/test_organization_monitor_index_count.py +++ b/tests/sentry/monitors/endpoints/test_organization_monitor_index_count.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.constants import ObjectStatus from sentry.testutils.cases import MonitorTestCase diff --git a/tests/sentry/monitors/endpoints/test_organization_monitor_index_stats.py b/tests/sentry/monitors/endpoints/test_organization_monitor_index_stats.py index aefd380d90663b..8f7ca968cbfb05 100644 --- a/tests/sentry/monitors/endpoints/test_organization_monitor_index_stats.py +++ b/tests/sentry/monitors/endpoints/test_organization_monitor_index_stats.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from sentry.monitors.models import CheckInStatus, MonitorCheckIn diff --git a/tests/sentry/monitors/endpoints/test_organization_monitor_processing_errors_index.py b/tests/sentry/monitors/endpoints/test_organization_monitor_processing_errors_index.py index 0082e53a00f832..6028978049d015 100644 --- a/tests/sentry/monitors/endpoints/test_organization_monitor_processing_errors_index.py +++ b/tests/sentry/monitors/endpoints/test_organization_monitor_processing_errors_index.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.monitors.processing_errors.errors import ProcessingErrorType from sentry.monitors.processing_errors.manager import store_error diff --git a/tests/sentry/monitors/endpoints/test_organization_monitor_schedule_sample_data.py b/tests/sentry/monitors/endpoints/test_organization_monitor_schedule_sample_data.py index 4762ef1c907428..2d35d020476a83 100644 --- a/tests/sentry/monitors/endpoints/test_organization_monitor_schedule_sample_data.py +++ b/tests/sentry/monitors/endpoints/test_organization_monitor_schedule_sample_data.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import zoneinfo from datetime import datetime diff --git a/tests/sentry/monitors/endpoints/test_organization_monitor_stats.py b/tests/sentry/monitors/endpoints/test_organization_monitor_stats.py index cc6e03586d11a5..2c550b185d8cf4 100644 --- a/tests/sentry/monitors/endpoints/test_organization_monitor_stats.py +++ b/tests/sentry/monitors/endpoints/test_organization_monitor_stats.py @@ -1,3 +1,4 @@ +from typing import int from tests.sentry.monitors.endpoints.test_base_monitor_stats import BaseMonitorStatsTest diff --git a/tests/sentry/monitors/endpoints/test_project_monitor_checkin_index.py b/tests/sentry/monitors/endpoints/test_project_monitor_checkin_index.py index 4b6e2bbe474b5a..2055fbe0000380 100644 --- a/tests/sentry/monitors/endpoints/test_project_monitor_checkin_index.py +++ b/tests/sentry/monitors/endpoints/test_project_monitor_checkin_index.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.helpers.datetime import freeze_time from sentry.testutils.skips import requires_snuba from tests.sentry.monitors.endpoints.test_base import BaseProjectMonitorTest diff --git a/tests/sentry/monitors/endpoints/test_project_monitor_details.py b/tests/sentry/monitors/endpoints/test_project_monitor_details.py index 6719bac3464cdf..fe7d2c89c4a841 100644 --- a/tests/sentry/monitors/endpoints/test_project_monitor_details.py +++ b/tests/sentry/monitors/endpoints/test_project_monitor_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.helpers.datetime import freeze_time from tests.sentry.monitors.endpoints.test_base import BaseProjectMonitorTest from tests.sentry.monitors.endpoints.test_base_monitor_details import ( diff --git a/tests/sentry/monitors/endpoints/test_project_monitor_environment_details.py b/tests/sentry/monitors/endpoints/test_project_monitor_environment_details.py index d6fbd4d30ed904..c4b7d4dfb47665 100644 --- a/tests/sentry/monitors/endpoints/test_project_monitor_environment_details.py +++ b/tests/sentry/monitors/endpoints/test_project_monitor_environment_details.py @@ -1,3 +1,4 @@ +from typing import int from tests.sentry.monitors.endpoints.test_base import BaseProjectMonitorTest from tests.sentry.monitors.endpoints.test_base_monitor_environment_details import ( BaseDeleteMonitorTest, diff --git a/tests/sentry/monitors/endpoints/test_project_monitor_processing_errors_index.py b/tests/sentry/monitors/endpoints/test_project_monitor_processing_errors_index.py index 15f29d04cc2072..ca147800251989 100644 --- a/tests/sentry/monitors/endpoints/test_project_monitor_processing_errors_index.py +++ b/tests/sentry/monitors/endpoints/test_project_monitor_processing_errors_index.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.monitors.processing_errors.errors import ProcessingErrorType from sentry.monitors.processing_errors.manager import get_errors_for_monitor, store_error diff --git a/tests/sentry/monitors/endpoints/test_project_monitor_stats.py b/tests/sentry/monitors/endpoints/test_project_monitor_stats.py index 628d76f84961c7..59c20fe5840aee 100644 --- a/tests/sentry/monitors/endpoints/test_project_monitor_stats.py +++ b/tests/sentry/monitors/endpoints/test_project_monitor_stats.py @@ -1,3 +1,4 @@ +from typing import int from tests.sentry.monitors.endpoints.test_base import BaseProjectMonitorTest from tests.sentry.monitors.endpoints.test_base_monitor_stats import BaseMonitorStatsTest diff --git a/tests/sentry/monitors/endpoints/test_project_processing_errors_details.py b/tests/sentry/monitors/endpoints/test_project_processing_errors_details.py index 5cef026a19708d..9dd696908286c8 100644 --- a/tests/sentry/monitors/endpoints/test_project_processing_errors_details.py +++ b/tests/sentry/monitors/endpoints/test_project_processing_errors_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.monitors.processing_errors.errors import ProcessingErrorType from sentry.monitors.processing_errors.manager import get_errors_for_projects, store_error from sentry.monitors.testutils import build_checkin_processing_error diff --git a/tests/sentry/monitors/endpoints/test_project_processing_errors_index.py b/tests/sentry/monitors/endpoints/test_project_processing_errors_index.py index 33398ef3d868fd..6e23ce01b99c78 100644 --- a/tests/sentry/monitors/endpoints/test_project_processing_errors_index.py +++ b/tests/sentry/monitors/endpoints/test_project_processing_errors_index.py @@ -1,3 +1,4 @@ +from typing import int from sentry.monitors.processing_errors.errors import ProcessingErrorType from sentry.monitors.processing_errors.manager import get_errors_for_projects, store_error from sentry.monitors.testutils import build_checkin_processing_error diff --git a/tests/sentry/monitors/logic/test_incident_occurrence.py b/tests/sentry/monitors/logic/test_incident_occurrence.py index 2791fc1c53af12..154fea47eace9c 100644 --- a/tests/sentry/monitors/logic/test_incident_occurrence.py +++ b/tests/sentry/monitors/logic/test_incident_occurrence.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import timedelta from unittest import mock diff --git a/tests/sentry/monitors/logic/test_mark_failed.py b/tests/sentry/monitors/logic/test_mark_failed.py index d494c7a06f3fb9..69148a6cf409b7 100644 --- a/tests/sentry/monitors/logic/test_mark_failed.py +++ b/tests/sentry/monitors/logic/test_mark_failed.py @@ -1,3 +1,4 @@ +from typing import int import uuid from itertools import cycle from unittest import mock diff --git a/tests/sentry/monitors/logic/test_mark_ok.py b/tests/sentry/monitors/logic/test_mark_ok.py index b60a4525ced18f..dd9f08ee33bc6b 100644 --- a/tests/sentry/monitors/logic/test_mark_ok.py +++ b/tests/sentry/monitors/logic/test_mark_ok.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock from unittest.mock import MagicMock, patch diff --git a/tests/sentry/monitors/migrations/test_0008_fix_processing_error_keys.py b/tests/sentry/monitors/migrations/test_0008_fix_processing_error_keys.py index 0a7d4e27e7d90f..9b64f1e0c4757d 100644 --- a/tests/sentry/monitors/migrations/test_0008_fix_processing_error_keys.py +++ b/tests/sentry/monitors/migrations/test_0008_fix_processing_error_keys.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.conf import settings diff --git a/tests/sentry/monitors/migrations/test_0009_backfill_monitor_detectors.py b/tests/sentry/monitors/migrations/test_0009_backfill_monitor_detectors.py index a51a3d21ec3a20..df07067efaecbf 100644 --- a/tests/sentry/monitors/migrations/test_0009_backfill_monitor_detectors.py +++ b/tests/sentry/monitors/migrations/test_0009_backfill_monitor_detectors.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import pytest from django.conf import settings diff --git a/tests/sentry/monitors/migrations/test_0010_delete_orphaned_detectors.py b/tests/sentry/monitors/migrations/test_0010_delete_orphaned_detectors.py index 5054c2f0d10b02..92c55fa1050615 100644 --- a/tests/sentry/monitors/migrations/test_0010_delete_orphaned_detectors.py +++ b/tests/sentry/monitors/migrations/test_0010_delete_orphaned_detectors.py @@ -1,3 +1,4 @@ +from typing import int from sentry.monitors.types import DATA_SOURCE_CRON_MONITOR from sentry.monitors.utils import ensure_cron_detector, get_detector_for_monitor from sentry.testutils.cases import TestMigrations diff --git a/tests/sentry/monitors/processing_errors/test_errors.py b/tests/sentry/monitors/processing_errors/test_errors.py index d5a45551516e7e..4cf6c961b4c8cf 100644 --- a/tests/sentry/monitors/processing_errors/test_errors.py +++ b/tests/sentry/monitors/processing_errors/test_errors.py @@ -1,3 +1,4 @@ +from typing import int from sentry.monitors.processing_errors.errors import CheckinProcessingError, ProcessingErrorType from sentry.monitors.testutils import build_checkin_item diff --git a/tests/sentry/monitors/processing_errors/test_manager.py b/tests/sentry/monitors/processing_errors/test_manager.py index 543eff295f71d0..0f4394be778869 100644 --- a/tests/sentry/monitors/processing_errors/test_manager.py +++ b/tests/sentry/monitors/processing_errors/test_manager.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.analytics.events.checkin_processing_error_stored import CheckinProcessingErrorStored diff --git a/tests/sentry/monitors/tasks/test_clock_pulse.py b/tests/sentry/monitors/tasks/test_clock_pulse.py index 9c216c9f897c5c..8328377baddd7e 100644 --- a/tests/sentry/monitors/tasks/test_clock_pulse.py +++ b/tests/sentry/monitors/tasks/test_clock_pulse.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import MutableMapping from unittest import mock diff --git a/tests/sentry/monitors/tasks/test_detect_broken_monitor_envs.py b/tests/sentry/monitors/tasks/test_detect_broken_monitor_envs.py index d32f89f9bbb359..899a4046f8cb17 100644 --- a/tests/sentry/monitors/tasks/test_detect_broken_monitor_envs.py +++ b/tests/sentry/monitors/tasks/test_detect_broken_monitor_envs.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import timedelta from unittest.mock import MagicMock, Mock, call, patch diff --git a/tests/sentry/monitors/test_clock_dispatch.py b/tests/sentry/monitors/test_clock_dispatch.py index dfd277a763f802..4ddf9537dfe7f1 100644 --- a/tests/sentry/monitors/test_clock_dispatch.py +++ b/tests/sentry/monitors/test_clock_dispatch.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/monitors/test_models.py b/tests/sentry/monitors/test_models.py index 8ea7b1c738358d..f011a83636fc17 100644 --- a/tests/sentry/monitors/test_models.py +++ b/tests/sentry/monitors/test_models.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import datetime, timezone from unittest import mock diff --git a/tests/sentry/monitors/test_rate_limit.py b/tests/sentry/monitors/test_rate_limit.py index 3e6f112e7cea68..68254b19b80e82 100644 --- a/tests/sentry/monitors/test_rate_limit.py +++ b/tests/sentry/monitors/test_rate_limit.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.monitors.models import Monitor, MonitorEnvironment, MonitorStatus, ScheduleType diff --git a/tests/sentry/monitors/test_schedule.py b/tests/sentry/monitors/test_schedule.py index 7cb950fa42bec3..ee91b0edb9c63c 100644 --- a/tests/sentry/monitors/test_schedule.py +++ b/tests/sentry/monitors/test_schedule.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from zoneinfo import ZoneInfo diff --git a/tests/sentry/monitors/test_system_incidents.py b/tests/sentry/monitors/test_system_incidents.py index e3914ab216a0b7..c70b60f134c8ef 100644 --- a/tests/sentry/monitors/test_system_incidents.py +++ b/tests/sentry/monitors/test_system_incidents.py @@ -1,3 +1,4 @@ +from typing import int import itertools from collections.abc import Sequence from datetime import datetime, timedelta diff --git a/tests/sentry/monitors/test_types.py b/tests/sentry/monitors/test_types.py index d8e89210985ebc..d5810ddc91b3f3 100644 --- a/tests/sentry/monitors/test_types.py +++ b/tests/sentry/monitors/test_types.py @@ -1,3 +1,4 @@ +from typing import int from sentry.monitors.testutils import build_checkin_item from sentry.monitors.types import CheckinItem from sentry.testutils.cases import TestCase diff --git a/tests/sentry/monitors/test_utils.py b/tests/sentry/monitors/test_utils.py index 200d410bc1decb..2b723b3b59e935 100644 --- a/tests/sentry/monitors/test_utils.py +++ b/tests/sentry/monitors/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from django.db import IntegrityError diff --git a/tests/sentry/monitors/test_validators.py b/tests/sentry/monitors/test_validators.py index 400c26150f6be5..c6f7a2424902bd 100644 --- a/tests/sentry/monitors/test_validators.py +++ b/tests/sentry/monitors/test_validators.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/net/test_socket.py b/tests/sentry/net/test_socket.py index 9f8bc9bce6b2ef..47165dceb2753d 100644 --- a/tests/sentry/net/test_socket.py +++ b/tests/sentry/net/test_socket.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.test import override_settings diff --git a/tests/sentry/new_migrations/monkey/test_executor.py b/tests/sentry/new_migrations/monkey/test_executor.py index 2d6469ce2c7002..e55633b2ef4102 100644 --- a/tests/sentry/new_migrations/monkey/test_executor.py +++ b/tests/sentry/new_migrations/monkey/test_executor.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from unittest.mock import patch diff --git a/tests/sentry/new_migrations/monkey/test_monkey.py b/tests/sentry/new_migrations/monkey/test_monkey.py index 006a0c0821d8ec..e924d5135e9c3b 100644 --- a/tests/sentry/new_migrations/monkey/test_monkey.py +++ b/tests/sentry/new_migrations/monkey/test_monkey.py @@ -1,3 +1,4 @@ +from typing import int from django.db.migrations import executor, writer from django.db.models import Field diff --git a/tests/sentry/newsletter/test_base.py b/tests/sentry/newsletter/test_base.py index 49592cde4dc157..c1f893f6f69a3a 100644 --- a/tests/sentry/newsletter/test_base.py +++ b/tests/sentry/newsletter/test_base.py @@ -1,3 +1,4 @@ +from typing import int from sentry.newsletter.base import Newsletter from sentry.testutils.cases import TestCase from sentry.testutils.silo import control_silo_test diff --git a/tests/sentry/newsletter/test_dummy.py b/tests/sentry/newsletter/test_dummy.py index 52d5b8239fcce6..9a89810e362360 100644 --- a/tests/sentry/newsletter/test_dummy.py +++ b/tests/sentry/newsletter/test_dummy.py @@ -1,3 +1,4 @@ +from typing import int from sentry.newsletter.dummy import DummyNewsletter from sentry.testutils.cases import TestCase from sentry.testutils.silo import control_silo_test diff --git a/tests/sentry/notifications/api/endpoints/test_notification_actions_available.py b/tests/sentry/notifications/api/endpoints/test_notification_actions_available.py index ffd70b0f2e8fc3..9f38d1943f17c7 100644 --- a/tests/sentry/notifications/api/endpoints/test_notification_actions_available.py +++ b/tests/sentry/notifications/api/endpoints/test_notification_actions_available.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from rest_framework import status diff --git a/tests/sentry/notifications/api/endpoints/test_notification_actions_details.py b/tests/sentry/notifications/api/endpoints/test_notification_actions_details.py index d8f7e7bd3b4454..5fd99e4fc4b052 100644 --- a/tests/sentry/notifications/api/endpoints/test_notification_actions_details.py +++ b/tests/sentry/notifications/api/endpoints/test_notification_actions_details.py @@ -1,5 +1,5 @@ from collections.abc import Callable, MutableMapping -from typing import Any, TypeVar +from typing import Any, TypeVar, int from unittest.mock import MagicMock, patch from rest_framework import serializers, status diff --git a/tests/sentry/notifications/api/endpoints/test_notification_actions_index.py b/tests/sentry/notifications/api/endpoints/test_notification_actions_index.py index 681a893f6f7a6f..2ea075c2363810 100644 --- a/tests/sentry/notifications/api/endpoints/test_notification_actions_index.py +++ b/tests/sentry/notifications/api/endpoints/test_notification_actions_index.py @@ -1,5 +1,5 @@ from collections.abc import Callable, MutableMapping -from typing import Any, TypedDict, TypeVar +from typing import Any, TypedDict, TypeVar, int from unittest.mock import MagicMock, patch import responses diff --git a/tests/sentry/notifications/api/endpoints/test_notification_defaults.py b/tests/sentry/notifications/api/endpoints/test_notification_defaults.py index 2a649499630e9c..511af52b31a491 100644 --- a/tests/sentry/notifications/api/endpoints/test_notification_defaults.py +++ b/tests/sentry/notifications/api/endpoints/test_notification_defaults.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.silo import control_silo_test diff --git a/tests/sentry/notifications/api/endpoints/test_user_notification_details.py b/tests/sentry/notifications/api/endpoints/test_user_notification_details.py index 3aeebeb3238a40..37bdb63bc9d65a 100644 --- a/tests/sentry/notifications/api/endpoints/test_user_notification_details.py +++ b/tests/sentry/notifications/api/endpoints/test_user_notification_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.silo import control_silo_test diff --git a/tests/sentry/notifications/api/endpoints/test_user_notification_email.py b/tests/sentry/notifications/api/endpoints/test_user_notification_email.py index c77f24e01e418b..6f35be00acaff6 100644 --- a/tests/sentry/notifications/api/endpoints/test_user_notification_email.py +++ b/tests/sentry/notifications/api/endpoints/test_user_notification_email.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.silo import control_silo_test from sentry.users.models.user_option import UserOption diff --git a/tests/sentry/notifications/api/endpoints/test_user_notification_settings_options.py b/tests/sentry/notifications/api/endpoints/test_user_notification_settings_options.py index c20e0abc56d62b..1048347219dc12 100644 --- a/tests/sentry/notifications/api/endpoints/test_user_notification_settings_options.py +++ b/tests/sentry/notifications/api/endpoints/test_user_notification_settings_options.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from sentry.notifications.models.notificationsettingoption import NotificationSettingOption diff --git a/tests/sentry/notifications/api/endpoints/test_user_notification_settings_options_details.py b/tests/sentry/notifications/api/endpoints/test_user_notification_settings_options_details.py index 159aa7c227aba3..03e30f38023df9 100644 --- a/tests/sentry/notifications/api/endpoints/test_user_notification_settings_options_details.py +++ b/tests/sentry/notifications/api/endpoints/test_user_notification_settings_options_details.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from sentry.notifications.models.notificationsettingoption import NotificationSettingOption diff --git a/tests/sentry/notifications/api/endpoints/test_user_notification_settings_providers.py b/tests/sentry/notifications/api/endpoints/test_user_notification_settings_providers.py index b97a8507ae3bc9..38e444991bf72e 100644 --- a/tests/sentry/notifications/api/endpoints/test_user_notification_settings_providers.py +++ b/tests/sentry/notifications/api/endpoints/test_user_notification_settings_providers.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from sentry.integrations.types import ExternalProviderEnum diff --git a/tests/sentry/notifications/models/test_notificationaction.py b/tests/sentry/notifications/models/test_notificationaction.py index ff4fa3aee0776a..44175ae5f86666 100644 --- a/tests/sentry/notifications/models/test_notificationaction.py +++ b/tests/sentry/notifications/models/test_notificationaction.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/notifications/models/test_notificationsettingoption.py b/tests/sentry/notifications/models/test_notificationsettingoption.py index 8eedd44d30e28c..eff9d9d511d72d 100644 --- a/tests/sentry/notifications/models/test_notificationsettingoption.py +++ b/tests/sentry/notifications/models/test_notificationsettingoption.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.tasks.hybrid_cloud import schedule_hybrid_cloud_foreign_key_jobs_control from sentry.notifications.models.notificationsettingoption import NotificationSettingOption from sentry.silo.base import SiloMode diff --git a/tests/sentry/notifications/models/test_notificationsettingprovider.py b/tests/sentry/notifications/models/test_notificationsettingprovider.py index 7f25b503709559..411e2d6ad0b6e3 100644 --- a/tests/sentry/notifications/models/test_notificationsettingprovider.py +++ b/tests/sentry/notifications/models/test_notificationsettingprovider.py @@ -1,3 +1,4 @@ +from typing import int from sentry.deletions.tasks.hybrid_cloud import schedule_hybrid_cloud_foreign_key_jobs_control from sentry.notifications.models.notificationsettingprovider import NotificationSettingProvider from sentry.silo.base import SiloMode diff --git a/tests/sentry/notifications/notification_action/metric_alert_registry/test_discord_metric_alert_handler.py b/tests/sentry/notifications/notification_action/metric_alert_registry/test_discord_metric_alert_handler.py index 40302a6fd9b17d..68d339985e2653 100644 --- a/tests/sentry/notifications/notification_action/metric_alert_registry/test_discord_metric_alert_handler.py +++ b/tests/sentry/notifications/notification_action/metric_alert_registry/test_discord_metric_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int import uuid from dataclasses import asdict from unittest import mock diff --git a/tests/sentry/notifications/notification_action/metric_alert_registry/test_email_metric_alert_handler.py b/tests/sentry/notifications/notification_action/metric_alert_registry/test_email_metric_alert_handler.py index 909e008b2e73a6..e5291b9908c638 100644 --- a/tests/sentry/notifications/notification_action/metric_alert_registry/test_email_metric_alert_handler.py +++ b/tests/sentry/notifications/notification_action/metric_alert_registry/test_email_metric_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int import uuid from dataclasses import asdict from unittest import mock diff --git a/tests/sentry/notifications/notification_action/metric_alert_registry/test_msteams_metric_alert_handler.py b/tests/sentry/notifications/notification_action/metric_alert_registry/test_msteams_metric_alert_handler.py index 593de2d76e0648..c493698c5c2179 100644 --- a/tests/sentry/notifications/notification_action/metric_alert_registry/test_msteams_metric_alert_handler.py +++ b/tests/sentry/notifications/notification_action/metric_alert_registry/test_msteams_metric_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int import uuid from dataclasses import asdict from unittest import mock diff --git a/tests/sentry/notifications/notification_action/metric_alert_registry/test_opsgenie_metric_alert_handler.py b/tests/sentry/notifications/notification_action/metric_alert_registry/test_opsgenie_metric_alert_handler.py index e2954c9314c3aa..3bc325c6c0f0fb 100644 --- a/tests/sentry/notifications/notification_action/metric_alert_registry/test_opsgenie_metric_alert_handler.py +++ b/tests/sentry/notifications/notification_action/metric_alert_registry/test_opsgenie_metric_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int import uuid from dataclasses import asdict from unittest import mock diff --git a/tests/sentry/notifications/notification_action/metric_alert_registry/test_pagerduty_metric_alert_handler.py b/tests/sentry/notifications/notification_action/metric_alert_registry/test_pagerduty_metric_alert_handler.py index 01c0ee98253a26..d6bddbbe1652f0 100644 --- a/tests/sentry/notifications/notification_action/metric_alert_registry/test_pagerduty_metric_alert_handler.py +++ b/tests/sentry/notifications/notification_action/metric_alert_registry/test_pagerduty_metric_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int import uuid from dataclasses import asdict from unittest import mock diff --git a/tests/sentry/notifications/notification_action/metric_alert_registry/test_sentry_app_metric_alert_handler.py b/tests/sentry/notifications/notification_action/metric_alert_registry/test_sentry_app_metric_alert_handler.py index 73f02b5aa5cfd7..895e2296cdcf90 100644 --- a/tests/sentry/notifications/notification_action/metric_alert_registry/test_sentry_app_metric_alert_handler.py +++ b/tests/sentry/notifications/notification_action/metric_alert_registry/test_sentry_app_metric_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int import uuid from dataclasses import asdict from unittest import mock diff --git a/tests/sentry/notifications/notification_action/metric_alert_registry/test_slack_metric_alert_handler.py b/tests/sentry/notifications/notification_action/metric_alert_registry/test_slack_metric_alert_handler.py index 432c5a45c3df72..6cd5c5a72cf4fd 100644 --- a/tests/sentry/notifications/notification_action/metric_alert_registry/test_slack_metric_alert_handler.py +++ b/tests/sentry/notifications/notification_action/metric_alert_registry/test_slack_metric_alert_handler.py @@ -1,3 +1,4 @@ +from typing import int import uuid from dataclasses import asdict from unittest import mock diff --git a/tests/sentry/notifications/notification_action/test_group_type_notification_registry_handlers.py b/tests/sentry/notifications/notification_action/test_group_type_notification_registry_handlers.py index 36e59c8d88a42f..30bf578b37adf7 100644 --- a/tests/sentry/notifications/notification_action/test_group_type_notification_registry_handlers.py +++ b/tests/sentry/notifications/notification_action/test_group_type_notification_registry_handlers.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/notifications/notification_action/test_issue_alert_registry_handlers.py b/tests/sentry/notifications/notification_action/test_issue_alert_registry_handlers.py index b223e5628471d0..ae792d12506c49 100644 --- a/tests/sentry/notifications/notification_action/test_issue_alert_registry_handlers.py +++ b/tests/sentry/notifications/notification_action/test_issue_alert_registry_handlers.py @@ -1,3 +1,4 @@ +from typing import int import uuid from unittest import mock diff --git a/tests/sentry/notifications/notification_action/test_metric_alert_registry_handlers.py b/tests/sentry/notifications/notification_action/test_metric_alert_registry_handlers.py index 9712b2b38ef9b5..48564eb56550b0 100644 --- a/tests/sentry/notifications/notification_action/test_metric_alert_registry_handlers.py +++ b/tests/sentry/notifications/notification_action/test_metric_alert_registry_handlers.py @@ -2,7 +2,7 @@ from collections.abc import Mapping from dataclasses import asdict from datetime import datetime -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/notifications/notifications/organization_request/test_integration_request.py b/tests/sentry/notifications/notifications/organization_request/test_integration_request.py index 5e19f1dfa65287..dc6645d97aa6e1 100644 --- a/tests/sentry/notifications/notifications/organization_request/test_integration_request.py +++ b/tests/sentry/notifications/notifications/organization_request/test_integration_request.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.notifications.organization_request.integration_request import ( IntegrationRequestNotification, ) diff --git a/tests/sentry/notifications/notifications/test_assigned.py b/tests/sentry/notifications/notifications/test_assigned.py index 54bd4836251bfb..5360290b0e2ba4 100644 --- a/tests/sentry/notifications/notifications/test_assigned.py +++ b/tests/sentry/notifications/notifications/test_assigned.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/notifications/notifications/test_digests.py b/tests/sentry/notifications/notifications/test_digests.py index df903c6f8caf89..2248fcf22a8938 100644 --- a/tests/sentry/notifications/notifications/test_digests.py +++ b/tests/sentry/notifications/notifications/test_digests.py @@ -1,3 +1,4 @@ +from typing import int import uuid from unittest import mock from unittest.mock import ANY, MagicMock, patch diff --git a/tests/sentry/notifications/notifications/test_organization_request.py b/tests/sentry/notifications/notifications/test_organization_request.py index b4d72f7fe06241..946cf03aaca3e2 100644 --- a/tests/sentry/notifications/notifications/test_organization_request.py +++ b/tests/sentry/notifications/notifications/test_organization_request.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models.query import QuerySet from sentry.integrations.types import ExternalProviders diff --git a/tests/sentry/notifications/notifications/test_suspect_commits_activity.py b/tests/sentry/notifications/notifications/test_suspect_commits_activity.py index 8c06757271ce6f..5e9a716125c455 100644 --- a/tests/sentry/notifications/notifications/test_suspect_commits_activity.py +++ b/tests/sentry/notifications/notifications/test_suspect_commits_activity.py @@ -1,3 +1,4 @@ +from typing import int from django.db.models import F from django.utils import timezone diff --git a/tests/sentry/notifications/platform/api/endpoints/test_internal_registered_templates.py b/tests/sentry/notifications/platform/api/endpoints/test_internal_registered_templates.py index ac9e7a4c1a2f0c..37faf9aa93004f 100644 --- a/tests/sentry/notifications/platform/api/endpoints/test_internal_registered_templates.py +++ b/tests/sentry/notifications/platform/api/endpoints/test_internal_registered_templates.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.notifications.platform.api.endpoints.internal_registered_templates import ( serialize_slack_preview, diff --git a/tests/sentry/notifications/platform/discord/test_provider.py b/tests/sentry/notifications/platform/discord/test_provider.py index 510410fdcb5938..ddb178c2175185 100644 --- a/tests/sentry/notifications/platform/discord/test_provider.py +++ b/tests/sentry/notifications/platform/discord/test_provider.py @@ -1,4 +1,4 @@ -from typing import TypeGuard +from typing import int, TypeGuard from unittest.mock import Mock, patch from sentry.integrations.discord.message_builder.base.component.action_row import ( diff --git a/tests/sentry/notifications/platform/email/test_provider.py b/tests/sentry/notifications/platform/email/test_provider.py index 06ad60cc18c336..4390a6739e2685 100644 --- a/tests/sentry/notifications/platform/email/test_provider.py +++ b/tests/sentry/notifications/platform/email/test_provider.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.core.mail import EmailMultiAlternatives diff --git a/tests/sentry/notifications/platform/msteams/test_provider.py b/tests/sentry/notifications/platform/msteams/test_provider.py index d7f391f71303ed..3c117f75c8a56d 100644 --- a/tests/sentry/notifications/platform/msteams/test_provider.py +++ b/tests/sentry/notifications/platform/msteams/test_provider.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock, patch from sentry.integrations.msteams.card_builder.block import ( diff --git a/tests/sentry/notifications/platform/slack/test_provider.py b/tests/sentry/notifications/platform/slack/test_provider.py index b78629fcc2168e..ce3838c70de7d2 100644 --- a/tests/sentry/notifications/platform/slack/test_provider.py +++ b/tests/sentry/notifications/platform/slack/test_provider.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock, patch import pytest diff --git a/tests/sentry/notifications/platform/test_provider.py b/tests/sentry/notifications/platform/test_provider.py index 3b2511f456ea50..f42043babec814 100644 --- a/tests/sentry/notifications/platform/test_provider.py +++ b/tests/sentry/notifications/platform/test_provider.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/notifications/platform/test_registry.py b/tests/sentry/notifications/platform/test_registry.py index ebf3cac5a9c758..963c719e69c49e 100644 --- a/tests/sentry/notifications/platform/test_registry.py +++ b/tests/sentry/notifications/platform/test_registry.py @@ -1,3 +1,4 @@ +from typing import int from sentry.notifications.platform.discord.provider import DiscordNotificationProvider from sentry.notifications.platform.email.provider import EmailNotificationProvider from sentry.notifications.platform.msteams.provider import MSTeamsNotificationProvider diff --git a/tests/sentry/notifications/platform/test_service.py b/tests/sentry/notifications/platform/test_service.py index 707b5eba1d1ce3..7507606d347f74 100644 --- a/tests/sentry/notifications/platform/test_service.py +++ b/tests/sentry/notifications/platform/test_service.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/notifications/platform/test_target.py b/tests/sentry/notifications/platform/test_target.py index bb59eb16284e51..38ed5be1c9958a 100644 --- a/tests/sentry/notifications/platform/test_target.py +++ b/tests/sentry/notifications/platform/test_target.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/notifications/test_apps.py b/tests/sentry/notifications/test_apps.py index 744d36f3a690aa..9084b985025367 100644 --- a/tests/sentry/notifications/test_apps.py +++ b/tests/sentry/notifications/test_apps.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.types import ExternalProviders from sentry.notifications.platform.types import NotificationProviderKey from sentry.testutils.cases import TestCase diff --git a/tests/sentry/notifications/test_class_manager.py b/tests/sentry/notifications/test_class_manager.py index 2009e165890a68..e0b3692a4e12ee 100644 --- a/tests/sentry/notifications/test_class_manager.py +++ b/tests/sentry/notifications/test_class_manager.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.notifications.class_manager import ( diff --git a/tests/sentry/notifications/test_helpers.py b/tests/sentry/notifications/test_helpers.py index 3df9d9e945b6f7..786a762e4aac00 100644 --- a/tests/sentry/notifications/test_helpers.py +++ b/tests/sentry/notifications/test_helpers.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import parse_qs, urlparse from sentry.integrations.models.external_actor import ExternalActor diff --git a/tests/sentry/notifications/test_notificationcontroller.py b/tests/sentry/notifications/test_notificationcontroller.py index 5b33e0c6d6dc0b..fad6cd67ab60d1 100644 --- a/tests/sentry/notifications/test_notificationcontroller.py +++ b/tests/sentry/notifications/test_notificationcontroller.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.types import ExternalProviderEnum, ExternalProviders from sentry.notifications.models.notificationsettingoption import NotificationSettingOption from sentry.notifications.models.notificationsettingprovider import NotificationSettingProvider diff --git a/tests/sentry/notifications/test_notificationmessage_table_constraints.py b/tests/sentry/notifications/test_notificationmessage_table_constraints.py index 1a483e4a404d22..d6fa8da1a41d39 100644 --- a/tests/sentry/notifications/test_notificationmessage_table_constraints.py +++ b/tests/sentry/notifications/test_notificationmessage_table_constraints.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/sentry/notifications/test_notifications.py b/tests/sentry/notifications/test_notifications.py index 78b66eb62fdf4a..4b41bb81b06b5c 100644 --- a/tests/sentry/notifications/test_notifications.py +++ b/tests/sentry/notifications/test_notifications.py @@ -1,3 +1,4 @@ +from typing import int import logging import uuid from time import time diff --git a/tests/sentry/notifications/test_utils.py b/tests/sentry/notifications/test_utils.py index 6ac95957b2da9b..345f4a19095df8 100644 --- a/tests/sentry/notifications/test_utils.py +++ b/tests/sentry/notifications/test_utils.py @@ -1,3 +1,4 @@ +from typing import int import types from unittest import TestCase diff --git a/tests/sentry/notifications/utils/test_open_period.py b/tests/sentry/notifications/utils/test_open_period.py index 0cec8beb89035b..19796fe17b294b 100644 --- a/tests/sentry/notifications/utils/test_open_period.py +++ b/tests/sentry/notifications/utils/test_open_period.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from sentry.incidents.grouptype import MetricIssue diff --git a/tests/sentry/notifications/utils/test_participants.py b/tests/sentry/notifications/utils/test_participants.py index 0a8881f9c1fd51..f9aa8e826b98ef 100644 --- a/tests/sentry/notifications/utils/test_participants.py +++ b/tests/sentry/notifications/utils/test_participants.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import collections from collections.abc import Iterable, Mapping, Sequence diff --git a/tests/sentry/notifications/utils/test_tasks.py b/tests/sentry/notifications/utils/test_tasks.py index 2442109aa13e91..90a9d04ea9c8d0 100644 --- a/tests/sentry/notifications/utils/test_tasks.py +++ b/tests/sentry/notifications/utils/test_tasks.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/objectstore/test_objectstore.py b/tests/sentry/objectstore/test_objectstore.py index 7c7d0881bec385..475582be857e6b 100644 --- a/tests/sentry/objectstore/test_objectstore.py +++ b/tests/sentry/objectstore/test_objectstore.py @@ -1,3 +1,4 @@ +from typing import int import pytest import zstandard diff --git a/tests/sentry/onboarding_tasks/backends/test_organization_onboarding_tasks.py b/tests/sentry/onboarding_tasks/backends/test_organization_onboarding_tasks.py index 4df8b609a07431..d324755e6a666e 100644 --- a/tests/sentry/onboarding_tasks/backends/test_organization_onboarding_tasks.py +++ b/tests/sentry/onboarding_tasks/backends/test_organization_onboarding_tasks.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.organizationonboardingtask import ( OnboardingTask, OnboardingTaskStatus, diff --git a/tests/sentry/options/test_manager.py b/tests/sentry/options/test_manager.py index 8f4e9383d39c40..e82edb6587417f 100644 --- a/tests/sentry/options/test_manager.py +++ b/tests/sentry/options/test_manager.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from functools import cached_property from unittest.mock import patch diff --git a/tests/sentry/options/test_rollout.py b/tests/sentry/options/test_rollout.py index ce8c41b2e627fd..d6b059605f6b31 100644 --- a/tests/sentry/options/test_rollout.py +++ b/tests/sentry/options/test_rollout.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Sequence diff --git a/tests/sentry/options/test_store.py b/tests/sentry/options/test_store.py index 95db16042e43e2..900567faf8492d 100644 --- a/tests/sentry/options/test_store.py +++ b/tests/sentry/options/test_store.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import MagicMock, patch from uuid import uuid1 diff --git a/tests/sentry/options/test_update_channels.py b/tests/sentry/options/test_update_channels.py index 24dbf51b6378e0..f8327a83148fd9 100644 --- a/tests/sentry/options/test_update_channels.py +++ b/tests/sentry/options/test_update_channels.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import pytest from django.conf import settings diff --git a/tests/sentry/organizations/services/test_organization.py b/tests/sentry/organizations/services/test_organization.py index a9412ed7820d1b..5717bbaaa7b4dd 100644 --- a/tests/sentry/organizations/services/test_organization.py +++ b/tests/sentry/organizations/services/test_organization.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.organization import Organization, OrganizationStatus from sentry.organizations.services.organization.service import organization_service from sentry.testutils.cases import TestCase diff --git a/tests/sentry/organizations/test_absolute_url.py b/tests/sentry/organizations/test_absolute_url.py index edbe9cff31e1ee..a60fed81967d76 100644 --- a/tests/sentry/organizations/test_absolute_url.py +++ b/tests/sentry/organizations/test_absolute_url.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.organizations.absolute_url import customer_domain_path diff --git a/tests/sentry/overwatch/endpoints/test_overwatch_rpc.py b/tests/sentry/overwatch/endpoints/test_overwatch_rpc.py index d5f11031d4df05..07b52635071020 100644 --- a/tests/sentry/overwatch/endpoints/test_overwatch_rpc.py +++ b/tests/sentry/overwatch/endpoints/test_overwatch_rpc.py @@ -1,3 +1,4 @@ +from typing import int import hashlib import hmac from copy import deepcopy diff --git a/tests/sentry/overwatch_webhooks/overwatch_consent/test_service.py b/tests/sentry/overwatch_webhooks/overwatch_consent/test_service.py index 17a5eac2b5ca69..e4e12176cf8b47 100644 --- a/tests/sentry/overwatch_webhooks/overwatch_consent/test_service.py +++ b/tests/sentry/overwatch_webhooks/overwatch_consent/test_service.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.options import OrganizationOption from sentry.models.organization import Organization from sentry.overwatch_webhooks.overwatch_consent.model import RpcOrganizationConsentStatus diff --git a/tests/sentry/overwatch_webhooks/test_webhook_forwarder.py b/tests/sentry/overwatch_webhooks/test_webhook_forwarder.py index 59056c7b867171..21e243b8af75f2 100644 --- a/tests/sentry/overwatch_webhooks/test_webhook_forwarder.py +++ b/tests/sentry/overwatch_webhooks/test_webhook_forwarder.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import orjson diff --git a/tests/sentry/partnerships/test_base.py b/tests/sentry/partnerships/test_base.py index ac8d8045a60b3b..bdd378baa0c72e 100644 --- a/tests/sentry/partnerships/test_base.py +++ b/tests/sentry/partnerships/test_base.py @@ -1,3 +1,4 @@ +from typing import int from sentry.partnerships.base import Partnership from sentry.testutils.cases import TestCase diff --git a/tests/sentry/pipeline/test_pipeline.py b/tests/sentry/pipeline/test_pipeline.py index 67a6e22ca752f4..89feb8f05062e9 100644 --- a/tests/sentry/pipeline/test_pipeline.py +++ b/tests/sentry/pipeline/test_pipeline.py @@ -1,6 +1,6 @@ from collections.abc import Sequence from functools import cached_property -from typing import Never +from typing import int, Never from unittest.mock import MagicMock, patch from django.contrib.sessions.backends.base import SessionBase diff --git a/tests/sentry/plugins/base/test_group_api_urls.py b/tests/sentry/plugins/base/test_group_api_urls.py index 567b2834c7ea75..d23663c5548cb5 100644 --- a/tests/sentry/plugins/base/test_group_api_urls.py +++ b/tests/sentry/plugins/base/test_group_api_urls.py @@ -1,3 +1,4 @@ +from typing import int from sentry.plugins.base.group_api_urls import load_plugin_urls from sentry_plugins.asana.plugin import AsanaPlugin from sentry_plugins.bitbucket.plugin import BitbucketPlugin diff --git a/tests/sentry/plugins/base/test_v2.py b/tests/sentry/plugins/base/test_v2.py index 28a78ed138775e..eec63c33dca5be 100644 --- a/tests/sentry/plugins/base/test_v2.py +++ b/tests/sentry/plugins/base/test_v2.py @@ -1,3 +1,4 @@ +from typing import int from sentry.plugins.base.v2 import Plugin2 from sentry.testutils.cases import TestCase diff --git a/tests/sentry/plugins/bases/test_issue.py b/tests/sentry/plugins/bases/test_issue.py index 582126e3866d39..7afb35bd07ac47 100644 --- a/tests/sentry/plugins/bases/test_issue.py +++ b/tests/sentry/plugins/bases/test_issue.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/plugins/bases/test_issue2.py b/tests/sentry/plugins/bases/test_issue2.py index bc9974369d967b..b0596b95845548 100644 --- a/tests/sentry/plugins/bases/test_issue2.py +++ b/tests/sentry/plugins/bases/test_issue2.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/plugins/bases/test_notify.py b/tests/sentry/plugins/bases/test_notify.py index b9b9a5f1baf9a4..158877b55dde3f 100644 --- a/tests/sentry/plugins/bases/test_notify.py +++ b/tests/sentry/plugins/bases/test_notify.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from requests.exceptions import HTTPError, SSLError diff --git a/tests/sentry/plugins/interfaces/test_releasehook.py b/tests/sentry/plugins/interfaces/test_releasehook.py index d4f77cac8ba98f..1b8ac063a0ff5d 100644 --- a/tests/sentry/plugins/interfaces/test_releasehook.py +++ b/tests/sentry/plugins/interfaces/test_releasehook.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.commit import Commit from sentry.models.release import Release from sentry.models.releases.release_project import ReleaseProject diff --git a/tests/sentry/plugins/sentry_useragents/test_models.py b/tests/sentry/plugins/sentry_useragents/test_models.py index a4a298468945e5..15bd97610336d7 100644 --- a/tests/sentry/plugins/sentry_useragents/test_models.py +++ b/tests/sentry/plugins/sentry_useragents/test_models.py @@ -1,3 +1,4 @@ +from typing import int from ua_parser.user_agent_parser import Parse from sentry.plugins.sentry_useragents.models import BrowserPlugin, DevicePlugin, OsPlugin diff --git a/tests/sentry/plugins/sentry_webhooks/test_plugin.py b/tests/sentry/plugins/sentry_webhooks/test_plugin.py index dae743cd268c24..c6f12fbe0cf02f 100644 --- a/tests/sentry/plugins/sentry_webhooks/test_plugin.py +++ b/tests/sentry/plugins/sentry_webhooks/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import pytest diff --git a/tests/sentry/plugins/test_config.py b/tests/sentry/plugins/test_config.py index 2aaa2948c3f6c5..7a3af67eb50ba9 100644 --- a/tests/sentry/plugins/test_config.py +++ b/tests/sentry/plugins/test_config.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django import forms diff --git a/tests/sentry/plugins/test_helpers.py b/tests/sentry/plugins/test_helpers.py index 48c978ae6b45f7..891aabfb94f6ac 100644 --- a/tests/sentry/plugins/test_helpers.py +++ b/tests/sentry/plugins/test_helpers.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.plugins.helpers import get_option, set_option, unset_option diff --git a/tests/sentry/plugins/test_integration_repository.py b/tests/sentry/plugins/test_integration_repository.py index 7bf1e691da3bef..332a60faebaf64 100644 --- a/tests/sentry/plugins/test_integration_repository.py +++ b/tests/sentry/plugins/test_integration_repository.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import MagicMock, patch diff --git a/tests/sentry/plugins/test_migrate.py b/tests/sentry/plugins/test_migrate.py index 2ff095d0aed849..1a01e5a5942dea 100644 --- a/tests/sentry/plugins/test_migrate.py +++ b/tests/sentry/plugins/test_migrate.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Generator from unittest import mock diff --git a/tests/sentry/plugins/test_plugins.py b/tests/sentry/plugins/test_plugins.py index 3075bd10e30dea..9fe18781f5ab0b 100644 --- a/tests/sentry/plugins/test_plugins.py +++ b/tests/sentry/plugins/test_plugins.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.plugins.base import plugins diff --git a/tests/sentry/plugins/test_repository_provider.py b/tests/sentry/plugins/test_repository_provider.py index 8f9d74c88c2a29..de3a74d3dddd1e 100644 --- a/tests/sentry/plugins/test_repository_provider.py +++ b/tests/sentry/plugins/test_repository_provider.py @@ -1,3 +1,4 @@ +from typing import int from sentry.plugins.providers.dummy.repository import DummyRepositoryProvider from sentry.testutils.cases import TestCase from sentry.testutils.silo import control_silo_test diff --git a/tests/sentry/post_process_forwarder/test_post_process_forwarder.py b/tests/sentry/post_process_forwarder/test_post_process_forwarder.py index 2ba854b2ae212c..870e41f095eb5a 100644 --- a/tests/sentry/post_process_forwarder/test_post_process_forwarder.py +++ b/tests/sentry/post_process_forwarder/test_post_process_forwarder.py @@ -2,7 +2,7 @@ import os import time import uuid -from typing import Any +from typing import int, Any from unittest.mock import patch from arroyo.backends.kafka import KafkaPayload diff --git a/tests/sentry/preprod/api/endpoints/pull_request/test_organization_pullrequest_comments.py b/tests/sentry/preprod/api/endpoints/pull_request/test_organization_pullrequest_comments.py index 767b3ad085fb84..142abc5729f1c1 100644 --- a/tests/sentry/preprod/api/endpoints/pull_request/test_organization_pullrequest_comments.py +++ b/tests/sentry/preprod/api/endpoints/pull_request/test_organization_pullrequest_comments.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from rest_framework.test import APIRequestFactory diff --git a/tests/sentry/preprod/api/endpoints/pull_request/test_organization_pullrequest_details.py b/tests/sentry/preprod/api/endpoints/pull_request/test_organization_pullrequest_details.py index 7b8c52fc921ab8..c0635d2dfe8ed9 100644 --- a/tests/sentry/preprod/api/endpoints/pull_request/test_organization_pullrequest_details.py +++ b/tests/sentry/preprod/api/endpoints/pull_request/test_organization_pullrequest_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from rest_framework.test import APIRequestFactory diff --git a/tests/sentry/preprod/api/endpoints/pull_request/test_organization_pullrequest_size_analysis_download.py b/tests/sentry/preprod/api/endpoints/pull_request/test_organization_pullrequest_size_analysis_download.py index 39874746d34c4d..127e91e4c9344c 100644 --- a/tests/sentry/preprod/api/endpoints/pull_request/test_organization_pullrequest_size_analysis_download.py +++ b/tests/sentry/preprod/api/endpoints/pull_request/test_organization_pullrequest_size_analysis_download.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.preprod.models import PreprodArtifact, PreprodArtifactSizeMetrics diff --git a/tests/sentry/preprod/api/endpoints/size_analysis/test_project_preprod_size_analysis_compare.py b/tests/sentry/preprod/api/endpoints/size_analysis/test_project_preprod_size_analysis_compare.py index 8f0d25d6212d91..63eb050aa6a01e 100644 --- a/tests/sentry/preprod/api/endpoints/size_analysis/test_project_preprod_size_analysis_compare.py +++ b/tests/sentry/preprod/api/endpoints/size_analysis/test_project_preprod_size_analysis_compare.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from django.test import override_settings diff --git a/tests/sentry/preprod/api/endpoints/size_analysis/test_project_preprod_size_analysis_compare_download.py b/tests/sentry/preprod/api/endpoints/size_analysis/test_project_preprod_size_analysis_compare_download.py index 9ff4a06fd05a54..33356ebeda903f 100644 --- a/tests/sentry/preprod/api/endpoints/size_analysis/test_project_preprod_size_analysis_compare_download.py +++ b/tests/sentry/preprod/api/endpoints/size_analysis/test_project_preprod_size_analysis_compare_download.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from django.urls import reverse diff --git a/tests/sentry/preprod/api/endpoints/size_analysis/test_project_preprod_size_analysis_download.py b/tests/sentry/preprod/api/endpoints/size_analysis/test_project_preprod_size_analysis_download.py index 4ce841f191a7bb..8a109a5a1cad7b 100644 --- a/tests/sentry/preprod/api/endpoints/size_analysis/test_project_preprod_size_analysis_download.py +++ b/tests/sentry/preprod/api/endpoints/size_analysis/test_project_preprod_size_analysis_download.py @@ -1,3 +1,4 @@ +from typing import int from io import BytesIO from django.test import override_settings diff --git a/tests/sentry/preprod/api/endpoints/test_organization_preprod_artifact_assemble.py b/tests/sentry/preprod/api/endpoints/test_organization_preprod_artifact_assemble.py index 491dd847e3a466..a9481c88d5816f 100644 --- a/tests/sentry/preprod/api/endpoints/test_organization_preprod_artifact_assemble.py +++ b/tests/sentry/preprod/api/endpoints/test_organization_preprod_artifact_assemble.py @@ -1,3 +1,4 @@ +from typing import int from hashlib import sha1 from unittest.mock import MagicMock, patch diff --git a/tests/sentry/preprod/api/endpoints/test_preprod_artifact_rerun_analysis.py b/tests/sentry/preprod/api/endpoints/test_preprod_artifact_rerun_analysis.py index 54fc5b5f261aa0..ed58bf4af4c5d0 100644 --- a/tests/sentry/preprod/api/endpoints/test_preprod_artifact_rerun_analysis.py +++ b/tests/sentry/preprod/api/endpoints/test_preprod_artifact_rerun_analysis.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from sentry.models.files.file import File diff --git a/tests/sentry/preprod/api/endpoints/test_project_installable_preprod_artifact_download.py b/tests/sentry/preprod/api/endpoints/test_project_installable_preprod_artifact_download.py index 0c589c86daaf91..e8e095cecba532 100644 --- a/tests/sentry/preprod/api/endpoints/test_project_installable_preprod_artifact_download.py +++ b/tests/sentry/preprod/api/endpoints/test_project_installable_preprod_artifact_download.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_assemble_generic.py b/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_assemble_generic.py index dc1d9697f5216d..b7db10cb1cf832 100644 --- a/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_assemble_generic.py +++ b/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_assemble_generic.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_delete.py b/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_delete.py index 7a6db62664cf3c..de5825c04ba876 100644 --- a/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_delete.py +++ b/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_delete.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from sentry.models.files.file import File diff --git a/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_download.py b/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_download.py index 2cfdf572d2f981..538c5ddeed9f53 100644 --- a/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_download.py +++ b/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_download.py @@ -1,3 +1,4 @@ +from typing import int from io import BytesIO from django.test import override_settings diff --git a/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py b/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py index 2af3787faf032c..209727e8da720e 100644 --- a/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py +++ b/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_install_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.utils import timezone diff --git a/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_update.py b/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_update.py index 678c8019fc1f96..808b1ae72c9157 100644 --- a/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_update.py +++ b/tests/sentry/preprod/api/endpoints/test_project_preprod_artifact_update.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import orjson from django.test import override_settings diff --git a/tests/sentry/preprod/api/endpoints/test_project_preprod_build_details.py b/tests/sentry/preprod/api/endpoints/test_project_preprod_build_details.py index 60700f9fd8948a..6c137ba10bef0f 100644 --- a/tests/sentry/preprod/api/endpoints/test_project_preprod_build_details.py +++ b/tests/sentry/preprod/api/endpoints/test_project_preprod_build_details.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.commitcomparison import CommitComparison diff --git a/tests/sentry/preprod/api/endpoints/test_project_preprod_check_for_updates.py b/tests/sentry/preprod/api/endpoints/test_project_preprod_check_for_updates.py index 2646c6f5fee99f..bfac0b6473d1d6 100644 --- a/tests/sentry/preprod/api/endpoints/test_project_preprod_check_for_updates.py +++ b/tests/sentry/preprod/api/endpoints/test_project_preprod_check_for_updates.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.orgauthtoken import OrgAuthToken diff --git a/tests/sentry/preprod/api/endpoints/test_project_preprod_list_builds.py b/tests/sentry/preprod/api/endpoints/test_project_preprod_list_builds.py index 030cc09eb26e96..a7bf8d7dfc17bc 100644 --- a/tests/sentry/preprod/api/endpoints/test_project_preprod_list_builds.py +++ b/tests/sentry/preprod/api/endpoints/test_project_preprod_list_builds.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from django.urls import reverse diff --git a/tests/sentry/preprod/api/endpoints/test_project_preprod_size.py b/tests/sentry/preprod/api/endpoints/test_project_preprod_size.py index 44435e5d4a5ce2..810723496a8b67 100644 --- a/tests/sentry/preprod/api/endpoints/test_project_preprod_size.py +++ b/tests/sentry/preprod/api/endpoints/test_project_preprod_size.py @@ -1,3 +1,4 @@ +from typing import int import orjson from django.test import override_settings diff --git a/tests/sentry/preprod/api/models/test_project_preprod_build_details_models.py b/tests/sentry/preprod/api/models/test_project_preprod_build_details_models.py index 334576dcabd3a7..b86dbd0822747c 100644 --- a/tests/sentry/preprod/api/models/test_project_preprod_build_details_models.py +++ b/tests/sentry/preprod/api/models/test_project_preprod_build_details_models.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import pytest diff --git a/tests/sentry/preprod/pull_request/test_comment_types.py b/tests/sentry/preprod/pull_request/test_comment_types.py index 74dc7e4f14f236..3e1af7800df4f4 100644 --- a/tests/sentry/preprod/pull_request/test_comment_types.py +++ b/tests/sentry/preprod/pull_request/test_comment_types.py @@ -1,3 +1,4 @@ +from typing import int from sentry.preprod.pull_request.comment_types import ( AuthorAssociation, IssueComment, diff --git a/tests/sentry/preprod/size_analysis/test_compare.py b/tests/sentry/preprod/size_analysis/test_compare.py index 6cb31201629a57..ced49dc810d916 100644 --- a/tests/sentry/preprod/size_analysis/test_compare.py +++ b/tests/sentry/preprod/size_analysis/test_compare.py @@ -1,3 +1,4 @@ +from typing import int from sentry.preprod.models import PreprodArtifactSizeMetrics from sentry.preprod.size_analysis.compare import ( _should_skip_diff_item_comparison, diff --git a/tests/sentry/preprod/size_analysis/test_size_analysis_tasks.py b/tests/sentry/preprod/size_analysis/test_size_analysis_tasks.py index 6509c586bb611e..f350501d2b103c 100644 --- a/tests/sentry/preprod/size_analysis/test_size_analysis_tasks.py +++ b/tests/sentry/preprod/size_analysis/test_size_analysis_tasks.py @@ -1,3 +1,4 @@ +from typing import int from io import BytesIO from unittest.mock import patch diff --git a/tests/sentry/preprod/test_models.py b/tests/sentry/preprod/test_models.py index cfaf3715c753a4..b3295c08f8d2b9 100644 --- a/tests/sentry/preprod/test_models.py +++ b/tests/sentry/preprod/test_models.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.models.commitcomparison import CommitComparison from sentry.preprod.models import PreprodArtifact diff --git a/tests/sentry/preprod/test_models_size_metrics.py b/tests/sentry/preprod/test_models_size_metrics.py index dd973b195c2cdc..b493e29c998ef2 100644 --- a/tests/sentry/preprod/test_models_size_metrics.py +++ b/tests/sentry/preprod/test_models_size_metrics.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.preprod.models import PreprodArtifact, PreprodArtifactSizeMetrics from sentry.testutils.cases import TestCase diff --git a/tests/sentry/preprod/test_tasks.py b/tests/sentry/preprod/test_tasks.py index 4488b7c561b5d7..c9ea71cfbe00ea 100644 --- a/tests/sentry/preprod/test_tasks.py +++ b/tests/sentry/preprod/test_tasks.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from hashlib import sha1 from unittest.mock import patch diff --git a/tests/sentry/preprod/vcs/status_checks/size/test_status_checks_tasks.py b/tests/sentry/preprod/vcs/status_checks/size/test_status_checks_tasks.py index 439ce11c2870e3..ee06c93fa4b0e4 100644 --- a/tests/sentry/preprod/vcs/status_checks/size/test_status_checks_tasks.py +++ b/tests/sentry/preprod/vcs/status_checks/size/test_status_checks_tasks.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import uuid from unittest.mock import Mock, patch diff --git a/tests/sentry/preprod/vcs/status_checks/size/test_templates.py b/tests/sentry/preprod/vcs/status_checks/size/test_templates.py index 611bdb31c435ee..2c20148d9bc370 100644 --- a/tests/sentry/preprod/vcs/status_checks/size/test_templates.py +++ b/tests/sentry/preprod/vcs/status_checks/size/test_templates.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import pytest diff --git a/tests/sentry/prevent/endpoints/test_organization_github_repos.py b/tests/sentry/prevent/endpoints/test_organization_github_repos.py index 425bae5ef9974b..b8c14a463e20f2 100644 --- a/tests/sentry/prevent/endpoints/test_organization_github_repos.py +++ b/tests/sentry/prevent/endpoints/test_organization_github_repos.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/prevent/endpoints/test_pr_review_config.py b/tests/sentry/prevent/endpoints/test_pr_review_config.py index 1cda279ae7b13c..ec246d195b281d 100644 --- a/tests/sentry/prevent/endpoints/test_pr_review_config.py +++ b/tests/sentry/prevent/endpoints/test_pr_review_config.py @@ -1,5 +1,5 @@ from copy import deepcopy -from typing import Any +from typing import int, Any from unittest import mock from sentry.constants import ObjectStatus diff --git a/tests/sentry/processing/backpressure/test_checking.py b/tests/sentry/processing/backpressure/test_checking.py index 82400d3356a610..1cf16aac587c54 100644 --- a/tests/sentry/processing/backpressure/test_checking.py +++ b/tests/sentry/processing/backpressure/test_checking.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from unittest.mock import MagicMock, Mock, patch diff --git a/tests/sentry/processing/backpressure/test_monitoring.py b/tests/sentry/processing/backpressure/test_monitoring.py index 47e7ae33dbd5ce..37e239f9ce054e 100644 --- a/tests/sentry/processing/backpressure/test_monitoring.py +++ b/tests/sentry/processing/backpressure/test_monitoring.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import MutableMapping import pytest diff --git a/tests/sentry/processing/backpressure/test_redis.py b/tests/sentry/processing/backpressure/test_redis.py index 7679521413ecbb..3053e7d56e98e6 100644 --- a/tests/sentry/processing/backpressure/test_redis.py +++ b/tests/sentry/processing/backpressure/test_redis.py @@ -1,3 +1,4 @@ +from typing import int from django.test.utils import override_settings from sentry.processing.backpressure.memory import iter_cluster_memory_usage diff --git a/tests/sentry/processing/eventstore/test_processing.py b/tests/sentry/processing/eventstore/test_processing.py index 99329f0131b775..e843b2a576a781 100644 --- a/tests/sentry/processing/eventstore/test_processing.py +++ b/tests/sentry/processing/eventstore/test_processing.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from sentry.services.eventstore.processing import ( diff --git a/tests/sentry/profiles/consumers/test_process.py b/tests/sentry/profiles/consumers/test_process.py index 92ccc9f4856ebf..ee9fe4e8daa89e 100644 --- a/tests/sentry/profiles/consumers/test_process.py +++ b/tests/sentry/profiles/consumers/test_process.py @@ -2,7 +2,7 @@ from base64 import b64encode from datetime import datetime -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, Mock, patch import msgpack diff --git a/tests/sentry/profiles/test_flamegraph.py b/tests/sentry/profiles/test_flamegraph.py index eb07394a8b3ce9..ed96130d66c1f8 100644 --- a/tests/sentry/profiles/test_flamegraph.py +++ b/tests/sentry/profiles/test_flamegraph.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from sentry.profiles.flamegraph import split_datetime_range_exponential diff --git a/tests/sentry/profiles/test_java.py b/tests/sentry/profiles/test_java.py index 8c35c723fcd94c..67a66ccc361b04 100644 --- a/tests/sentry/profiles/test_java.py +++ b/tests/sentry/profiles/test_java.py @@ -1,3 +1,4 @@ +from typing import int import pytest from symbolic.proguard import ProguardMapper diff --git a/tests/sentry/profiles/test_task.py b/tests/sentry/profiles/test_task.py index 512bb148a634b8..08c3686edc3d29 100644 --- a/tests/sentry/profiles/test_task.py +++ b/tests/sentry/profiles/test_task.py @@ -4,7 +4,7 @@ from base64 import b64encode from io import BytesIO from os.path import join -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import patch diff --git a/tests/sentry/profiles/test_utils.py b/tests/sentry/profiles/test_utils.py index bc958d3362c21b..613b5b115f280e 100644 --- a/tests/sentry/profiles/test_utils.py +++ b/tests/sentry/profiles/test_utils.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.profiles.utils import apply_stack_trace_rules_to_profile diff --git a/tests/sentry/profiling/test_utils.py b/tests/sentry/profiling/test_utils.py index 8245c176735f7f..758880ac4d79a0 100644 --- a/tests/sentry/profiling/test_utils.py +++ b/tests/sentry/profiling/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/projectoptions/test_basic.py b/tests/sentry/projectoptions/test_basic.py index af09a54410c7bb..e29710036d7f58 100644 --- a/tests/sentry/projectoptions/test_basic.py +++ b/tests/sentry/projectoptions/test_basic.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/projects/project_rules/test_creator.py b/tests/sentry/projects/project_rules/test_creator.py index 55777d0eb67b3b..f5f8a68c4b2788 100644 --- a/tests/sentry/projects/project_rules/test_creator.py +++ b/tests/sentry/projects/project_rules/test_creator.py @@ -1,3 +1,4 @@ +from typing import int from sentry.grouping.grouptype import ErrorGroupType from sentry.models.rule import RuleSource from sentry.projects.project_rules.creator import ProjectRuleCreator diff --git a/tests/sentry/projects/project_rules/test_updater.py b/tests/sentry/projects/project_rules/test_updater.py index 3cb01cc957c44a..f4f221b50f72eb 100644 --- a/tests/sentry/projects/project_rules/test_updater.py +++ b/tests/sentry/projects/project_rules/test_updater.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.grouping.grouptype import ErrorGroupType diff --git a/tests/sentry/quotas/test_base.py b/tests/sentry/quotas/test_base.py index 987b0536b7ab94..0478424fdec43a 100644 --- a/tests/sentry/quotas/test_base.py +++ b/tests/sentry/quotas/test_base.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.constants import DataCategory, ObjectStatus diff --git a/tests/sentry/quotas/test_redis.py b/tests/sentry/quotas/test_redis.py index a59b4a28756bfd..c7dd81243cc83d 100644 --- a/tests/sentry/quotas/test_redis.py +++ b/tests/sentry/quotas/test_redis.py @@ -1,3 +1,4 @@ +from typing import int import time from collections.abc import Generator from functools import cached_property diff --git a/tests/sentry/ratelimits/test_cardinality.py b/tests/sentry/ratelimits/test_cardinality.py index 3f7a3ac8370f48..d5bff3a8affa04 100644 --- a/tests/sentry/ratelimits/test_cardinality.py +++ b/tests/sentry/ratelimits/test_cardinality.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Collection, Sequence import pytest diff --git a/tests/sentry/ratelimits/test_config.py b/tests/sentry/ratelimits/test_config.py index 1ff21930574514..a851a89c7486fd 100644 --- a/tests/sentry/ratelimits/test_config.py +++ b/tests/sentry/ratelimits/test_config.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase, mock from sentry.ratelimits.config import RateLimitConfig, get_default_rate_limits_for_group diff --git a/tests/sentry/ratelimits/test_leaky_bucket.py b/tests/sentry/ratelimits/test_leaky_bucket.py index ef68a81bc290ba..a3d517d9b7955c 100644 --- a/tests/sentry/ratelimits/test_leaky_bucket.py +++ b/tests/sentry/ratelimits/test_leaky_bucket.py @@ -1,4 +1,4 @@ -from typing import Any, Never +from typing import Any, Never, int from unittest import TestCase, mock import pytest diff --git a/tests/sentry/ratelimits/test_redis.py b/tests/sentry/ratelimits/test_redis.py index 18da948d1ef09e..bb57a5b6a2bc48 100644 --- a/tests/sentry/ratelimits/test_redis.py +++ b/tests/sentry/ratelimits/test_redis.py @@ -1,3 +1,4 @@ +from typing import int from time import time from sentry.ratelimits.redis import RedisRateLimiter diff --git a/tests/sentry/ratelimits/test_redis_cluster.py b/tests/sentry/ratelimits/test_redis_cluster.py index f3704051842169..d05e0e6a2690d5 100644 --- a/tests/sentry/ratelimits/test_redis_cluster.py +++ b/tests/sentry/ratelimits/test_redis_cluster.py @@ -1,3 +1,4 @@ +from typing import int import uuid from sentry.ratelimits.redis import RedisRateLimiter diff --git a/tests/sentry/ratelimits/test_redis_concurrent.py b/tests/sentry/ratelimits/test_redis_concurrent.py index ad4b39477a9e89..ff48194c1aa1d5 100644 --- a/tests/sentry/ratelimits/test_redis_concurrent.py +++ b/tests/sentry/ratelimits/test_redis_concurrent.py @@ -1,3 +1,4 @@ +from typing import int import time import uuid from concurrent.futures import ThreadPoolExecutor diff --git a/tests/sentry/ratelimits/test_sliding_windows.py b/tests/sentry/ratelimits/test_sliding_windows.py index e86c4e4fb22347..8aa3e3c75efda1 100644 --- a/tests/sentry/ratelimits/test_sliding_windows.py +++ b/tests/sentry/ratelimits/test_sliding_windows.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.ratelimits.sliding_windows import ( diff --git a/tests/sentry/ratelimits/utils/test_above_rate_limit_check.py b/tests/sentry/ratelimits/utils/test_above_rate_limit_check.py index 7230407127eb9b..124f866ae5c92f 100644 --- a/tests/sentry/ratelimits/utils/test_above_rate_limit_check.py +++ b/tests/sentry/ratelimits/utils/test_above_rate_limit_check.py @@ -1,3 +1,4 @@ +from typing import int import uuid from concurrent.futures import ThreadPoolExecutor from time import sleep, time diff --git a/tests/sentry/ratelimits/utils/test_enforce_rate_limit.py b/tests/sentry/ratelimits/utils/test_enforce_rate_limit.py index f6afe253f27705..a0e2451920c831 100644 --- a/tests/sentry/ratelimits/utils/test_enforce_rate_limit.py +++ b/tests/sentry/ratelimits/utils/test_enforce_rate_limit.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from django.urls import re_path from rest_framework import status diff --git a/tests/sentry/ratelimits/utils/test_get_rate_limit_value.py b/tests/sentry/ratelimits/utils/test_get_rate_limit_value.py index 7074d7e5cf4b7c..60cc8df6ab8484 100644 --- a/tests/sentry/ratelimits/utils/test_get_rate_limit_value.py +++ b/tests/sentry/ratelimits/utils/test_get_rate_limit_value.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest import TestCase diff --git a/tests/sentry/ratelimits/utils/test_get_ratelimit_key.py b/tests/sentry/ratelimits/utils/test_get_ratelimit_key.py index aa856e5402fd07..3a6f02cfd00143 100644 --- a/tests/sentry/ratelimits/utils/test_get_ratelimit_key.py +++ b/tests/sentry/ratelimits/utils/test_get_ratelimit_key.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.auth.models import AnonymousUser from django.contrib.sessions.backends.base import SessionBase from django.test import RequestFactory diff --git a/tests/sentry/receivers/outbox/test_control.py b/tests/sentry/receivers/outbox/test_control.py index 65987f7cba0dd2..6fc50ff5aab203 100644 --- a/tests/sentry/receivers/outbox/test_control.py +++ b/tests/sentry/receivers/outbox/test_control.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.integrations.models.integration import Integration diff --git a/tests/sentry/receivers/test_analytics.py b/tests/sentry/receivers/test_analytics.py index 0657c9e8dcd832..8c7e383e47f9ea 100644 --- a/tests/sentry/receivers/test_analytics.py +++ b/tests/sentry/receivers/test_analytics.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.analytics.events.user_created import UserCreatedEvent diff --git a/tests/sentry/receivers/test_core.py b/tests/sentry/receivers/test_core.py index 849534e6455188..78b89e8aa77c3d 100644 --- a/tests/sentry/receivers/test_core.py +++ b/tests/sentry/receivers/test_core.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.db import router from django.test.utils import override_settings diff --git a/tests/sentry/receivers/test_data_forwarding.py b/tests/sentry/receivers/test_data_forwarding.py index ac5fad18b80359..100174cd985c36 100644 --- a/tests/sentry/receivers/test_data_forwarding.py +++ b/tests/sentry/receivers/test_data_forwarding.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.models.data_forwarder import DataForwarder from sentry.integrations.models.data_forwarder_project import DataForwarderProject from sentry.signals import project_created diff --git a/tests/sentry/receivers/test_featureadoption.py b/tests/sentry/receivers/test_featureadoption.py index 8af0c697c1972a..bef6ee95032df8 100644 --- a/tests/sentry/receivers/test_featureadoption.py +++ b/tests/sentry/receivers/test_featureadoption.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from sentry.models.featureadoption import FeatureAdoption diff --git a/tests/sentry/receivers/test_onboarding.py b/tests/sentry/receivers/test_onboarding.py index 7162c7c166095c..8e7e91a6b6805b 100644 --- a/tests/sentry/receivers/test_onboarding.py +++ b/tests/sentry/receivers/test_onboarding.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime from unittest.mock import MagicMock, patch diff --git a/tests/sentry/receivers/test_releases.py b/tests/sentry/receivers/test_releases.py index e180094ae72371..3073b9913fd1dc 100644 --- a/tests/sentry/receivers/test_releases.py +++ b/tests/sentry/receivers/test_releases.py @@ -1,3 +1,4 @@ +from typing import int from hashlib import sha1 from unittest.mock import MagicMock, patch from uuid import uuid4 diff --git a/tests/sentry/receivers/test_sentry_apps.py b/tests/sentry/receivers/test_sentry_apps.py index 7af70fff5f9563..f1911359fc5558 100644 --- a/tests/sentry/receivers/test_sentry_apps.py +++ b/tests/sentry/receivers/test_sentry_apps.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest.mock import MagicMock, patch diff --git a/tests/sentry/receivers/test_signals.py b/tests/sentry/receivers/test_signals.py index 795f29197547aa..9ff4e38a9c32c5 100644 --- a/tests/sentry/receivers/test_signals.py +++ b/tests/sentry/receivers/test_signals.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.utils import timezone diff --git a/tests/sentry/receivers/test_staff.py b/tests/sentry/receivers/test_staff.py index fffca5c237f9fa..bebc71267467cf 100644 --- a/tests/sentry/receivers/test_staff.py +++ b/tests/sentry/receivers/test_staff.py @@ -1,3 +1,4 @@ +from typing import int from sentry.auth.staff import is_active_staff from sentry.receivers.staff import disable_staff from sentry.testutils.cases import TestCase diff --git a/tests/sentry/receivers/test_superuser.py b/tests/sentry/receivers/test_superuser.py index cb6ec491c1365d..cc3cb63dfc19f8 100644 --- a/tests/sentry/receivers/test_superuser.py +++ b/tests/sentry/receivers/test_superuser.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.endpoints.auth_index import PREFILLED_SU_MODAL_KEY from sentry.auth.superuser import is_active_superuser from sentry.receivers.superuser import disable_superuser, enable_superuser diff --git a/tests/sentry/receivers/test_transactions.py b/tests/sentry/receivers/test_transactions.py index 4fbc173d5321fc..3cc660699f5a9b 100644 --- a/tests/sentry/receivers/test_transactions.py +++ b/tests/sentry/receivers/test_transactions.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import MagicMock, patch diff --git a/tests/sentry/relay/config/test_experimental.py b/tests/sentry/relay/config/test_experimental.py index d5f9524b7ae1f3..19fb4c8f25cf06 100644 --- a/tests/sentry/relay/config/test_experimental.py +++ b/tests/sentry/relay/config/test_experimental.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from time import sleep from unittest.mock import patch diff --git a/tests/sentry/relay/config/test_metric_extraction.py b/tests/sentry/relay/config/test_metric_extraction.py index e55d359276da0f..99724ee5312254 100644 --- a/tests/sentry/relay/config/test_metric_extraction.py +++ b/tests/sentry/relay/config/test_metric_extraction.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Sequence from datetime import timedelta diff --git a/tests/sentry/relay/test_config.py b/tests/sentry/relay/test_config.py index 1deaaf0c411874..2a1e647add1b16 100644 --- a/tests/sentry/relay/test_config.py +++ b/tests/sentry/relay/test_config.py @@ -1,6 +1,6 @@ import time from datetime import datetime, timedelta, timezone -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import ANY, MagicMock, patch diff --git a/tests/sentry/relay/test_datascrubbing.py b/tests/sentry/relay/test_datascrubbing.py index 1624a2062e263f..c3f0fb4b7c4707 100644 --- a/tests/sentry/relay/test_datascrubbing.py +++ b/tests/sentry/relay/test_datascrubbing.py @@ -1,3 +1,4 @@ +from typing import int import copy import pytest diff --git a/tests/sentry/relay/test_projectconfig_cache.py b/tests/sentry/relay/test_projectconfig_cache.py index 6d57590ccbaebf..e7dc28ed87ddd4 100644 --- a/tests/sentry/relay/test_projectconfig_cache.py +++ b/tests/sentry/relay/test_projectconfig_cache.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.relay.projectconfig_cache import redis diff --git a/tests/sentry/relay/test_projectconfig_debounce_cache.py b/tests/sentry/relay/test_projectconfig_debounce_cache.py index 601c7068a7c967..058562e26d5034 100644 --- a/tests/sentry/relay/test_projectconfig_debounce_cache.py +++ b/tests/sentry/relay/test_projectconfig_debounce_cache.py @@ -1,3 +1,4 @@ +from typing import int from sentry.relay.projectconfig_debounce_cache.redis import RedisProjectConfigDebounceCache diff --git a/tests/sentry/release_health/release_monitor/__init__.py b/tests/sentry/release_health/release_monitor/__init__.py index f8671c48f1ff30..53892d257fc8d2 100644 --- a/tests/sentry/release_health/release_monitor/__init__.py +++ b/tests/sentry/release_health/release_monitor/__init__.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.release_health.release_monitor.base import BaseReleaseMonitorBackend from sentry.testutils.abstract import Abstract diff --git a/tests/sentry/release_health/release_monitor/test_metrics.py b/tests/sentry/release_health/release_monitor/test_metrics.py index 6f85bfecba9e42..b12f55d8b6d631 100644 --- a/tests/sentry/release_health/release_monitor/test_metrics.py +++ b/tests/sentry/release_health/release_monitor/test_metrics.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.release_health.release_monitor.metrics import MetricReleaseMonitorBackend diff --git a/tests/sentry/release_health/test_metrics_sessions_v2.py b/tests/sentry/release_health/test_metrics_sessions_v2.py index 365fad2dc63040..191be3774523a1 100644 --- a/tests/sentry/release_health/test_metrics_sessions_v2.py +++ b/tests/sentry/release_health/test_metrics_sessions_v2.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/sentry/release_health/test_tasks.py b/tests/sentry/release_health/test_tasks.py index 5e3ae86f1177a9..6d2e67b802d70b 100644 --- a/tests/sentry/release_health/test_tasks.py +++ b/tests/sentry/release_health/test_tasks.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import time from datetime import timedelta diff --git a/tests/sentry/releases/endpoints/test_organization_release_assemble.py b/tests/sentry/releases/endpoints/test_organization_release_assemble.py index 65bb170b6add86..9bac68352a170b 100644 --- a/tests/sentry/releases/endpoints/test_organization_release_assemble.py +++ b/tests/sentry/releases/endpoints/test_organization_release_assemble.py @@ -1,3 +1,4 @@ +from typing import int from hashlib import sha1 from unittest.mock import MagicMock, patch diff --git a/tests/sentry/releases/endpoints/test_organization_release_commits.py b/tests/sentry/releases/endpoints/test_organization_release_commits.py index 57421712b9876c..a1dc2b828e1de3 100644 --- a/tests/sentry/releases/endpoints/test_organization_release_commits.py +++ b/tests/sentry/releases/endpoints/test_organization_release_commits.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.commit import Commit diff --git a/tests/sentry/releases/endpoints/test_organization_release_details.py b/tests/sentry/releases/endpoints/test_organization_release_details.py index f442c30ac52ea9..ea8054b30b3f19 100644 --- a/tests/sentry/releases/endpoints/test_organization_release_details.py +++ b/tests/sentry/releases/endpoints/test_organization_release_details.py @@ -1,3 +1,4 @@ +from typing import int import unittest from datetime import UTC, datetime, timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/releases/endpoints/test_organization_release_file_details.py b/tests/sentry/releases/endpoints/test_organization_release_file_details.py index cd44002e1b83bf..d7a170c4df84cc 100644 --- a/tests/sentry/releases/endpoints/test_organization_release_file_details.py +++ b/tests/sentry/releases/endpoints/test_organization_release_file_details.py @@ -1,3 +1,4 @@ +from typing import int from base64 import urlsafe_b64encode from django.urls import reverse diff --git a/tests/sentry/releases/endpoints/test_organization_release_files.py b/tests/sentry/releases/endpoints/test_organization_release_files.py index 73a0d909558d81..7d44ef3ce196ba 100644 --- a/tests/sentry/releases/endpoints/test_organization_release_files.py +++ b/tests/sentry/releases/endpoints/test_organization_release_files.py @@ -1,3 +1,4 @@ +from typing import int from django.core.files.base import ContentFile from django.core.files.uploadedfile import SimpleUploadedFile from django.urls import reverse diff --git a/tests/sentry/releases/endpoints/test_organization_release_health_data.py b/tests/sentry/releases/endpoints/test_organization_release_health_data.py index 56c4534154a766..4286de32ae0154 100644 --- a/tests/sentry/releases/endpoints/test_organization_release_health_data.py +++ b/tests/sentry/releases/endpoints/test_organization_release_health_data.py @@ -2,7 +2,7 @@ from datetime import timedelta from functools import partial -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import patch diff --git a/tests/sentry/releases/endpoints/test_organization_release_meta.py b/tests/sentry/releases/endpoints/test_organization_release_meta.py index e068943f50b13d..83d07e6df61127 100644 --- a/tests/sentry/releases/endpoints/test_organization_release_meta.py +++ b/tests/sentry/releases/endpoints/test_organization_release_meta.py @@ -1,3 +1,4 @@ +from typing import int import orjson from django.urls import reverse diff --git a/tests/sentry/releases/endpoints/test_project_release_commits.py b/tests/sentry/releases/endpoints/test_project_release_commits.py index e8c7f04efc9631..21895b0b0df542 100644 --- a/tests/sentry/releases/endpoints/test_project_release_commits.py +++ b/tests/sentry/releases/endpoints/test_project_release_commits.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import ObjectStatus from sentry.models.commit import Commit from sentry.models.release import Release diff --git a/tests/sentry/releases/endpoints/test_project_release_details.py b/tests/sentry/releases/endpoints/test_project_release_details.py index 17e86a71d61474..7e46be312f17ba 100644 --- a/tests/sentry/releases/endpoints/test_project_release_details.py +++ b/tests/sentry/releases/endpoints/test_project_release_details.py @@ -1,3 +1,4 @@ +from typing import int import unittest from datetime import UTC, datetime diff --git a/tests/sentry/releases/endpoints/test_project_release_file_details.py b/tests/sentry/releases/endpoints/test_project_release_file_details.py index 667e9e5ee97840..81e0999fa1df1e 100644 --- a/tests/sentry/releases/endpoints/test_project_release_file_details.py +++ b/tests/sentry/releases/endpoints/test_project_release_file_details.py @@ -1,3 +1,4 @@ +from typing import int import io from base64 import urlsafe_b64decode, urlsafe_b64encode from hashlib import sha1 diff --git a/tests/sentry/releases/endpoints/test_project_release_files.py b/tests/sentry/releases/endpoints/test_project_release_files.py index 4829e6b6e5dc7f..bd0ded8691de22 100644 --- a/tests/sentry/releases/endpoints/test_project_release_files.py +++ b/tests/sentry/releases/endpoints/test_project_release_files.py @@ -1,3 +1,4 @@ +from typing import int import uuid from django.core.files.base import ContentFile diff --git a/tests/sentry/releases/endpoints/test_project_release_setup.py b/tests/sentry/releases/endpoints/test_project_release_setup.py index a066546f090ebd..12db770c624dc3 100644 --- a/tests/sentry/releases/endpoints/test_project_release_setup.py +++ b/tests/sentry/releases/endpoints/test_project_release_setup.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.commit import Commit diff --git a/tests/sentry/releases/endpoints/test_project_release_stats.py b/tests/sentry/releases/endpoints/test_project_release_stats.py index 6b81f9c963b06f..4c9ee9eb050a50 100644 --- a/tests/sentry/releases/endpoints/test_project_release_stats.py +++ b/tests/sentry/releases/endpoints/test_project_release_stats.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime import pytest diff --git a/tests/sentry/releases/endpoints/test_project_releases.py b/tests/sentry/releases/endpoints/test_project_releases.py index 1b0889c2856aaa..df28461aa7f8bb 100644 --- a/tests/sentry/releases/endpoints/test_project_releases.py +++ b/tests/sentry/releases/endpoints/test_project_releases.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from functools import cached_property diff --git a/tests/sentry/releases/endpoints/test_project_releases_token.py b/tests/sentry/releases/endpoints/test_project_releases_token.py index 09bf15d2034fc6..1a59804475a4ef 100644 --- a/tests/sentry/releases/endpoints/test_project_releases_token.py +++ b/tests/sentry/releases/endpoints/test_project_releases_token.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.options.project_option import ProjectOption diff --git a/tests/sentry/releases/endpoints/test_release_deploys.py b/tests/sentry/releases/endpoints/test_release_deploys.py index 343c85bf9e85f4..eae9e06370b629 100644 --- a/tests/sentry/releases/endpoints/test_release_deploys.py +++ b/tests/sentry/releases/endpoints/test_release_deploys.py @@ -1,3 +1,4 @@ +from typing import int import datetime from django.urls import reverse diff --git a/tests/sentry/releases/use_cases/test_release_serializer.py b/tests/sentry/releases/use_cases/test_release_serializer.py index 5ae9b72be28045..7c5034fc78a8da 100644 --- a/tests/sentry/releases/use_cases/test_release_serializer.py +++ b/tests/sentry/releases/use_cases/test_release_serializer.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.models.release import Release from sentry.models.releaseprojectenvironment import ReleaseProjectEnvironment diff --git a/tests/sentry/relocation/api/endpoints/artifacts/test_details.py b/tests/sentry/relocation/api/endpoints/artifacts/test_details.py index 3973f5cda50450..efdafe093610e0 100644 --- a/tests/sentry/relocation/api/endpoints/artifacts/test_details.py +++ b/tests/sentry/relocation/api/endpoints/artifacts/test_details.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from io import BytesIO, StringIO from pathlib import Path diff --git a/tests/sentry/relocation/api/endpoints/artifacts/test_index.py b/tests/sentry/relocation/api/endpoints/artifacts/test_index.py index 0bd0a62698cdf0..12ea439d9a89df 100644 --- a/tests/sentry/relocation/api/endpoints/artifacts/test_index.py +++ b/tests/sentry/relocation/api/endpoints/artifacts/test_index.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from io import StringIO from uuid import uuid4 diff --git a/tests/sentry/relocation/api/endpoints/test_abort.py b/tests/sentry/relocation/api/endpoints/test_abort.py index b2a5654ba6ae44..3c809b6d553a20 100644 --- a/tests/sentry/relocation/api/endpoints/test_abort.py +++ b/tests/sentry/relocation/api/endpoints/test_abort.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from uuid import uuid4 diff --git a/tests/sentry/relocation/api/endpoints/test_cancel.py b/tests/sentry/relocation/api/endpoints/test_cancel.py index be868c6ff45364..7f900f8526d6e7 100644 --- a/tests/sentry/relocation/api/endpoints/test_cancel.py +++ b/tests/sentry/relocation/api/endpoints/test_cancel.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from uuid import uuid4 diff --git a/tests/sentry/relocation/api/endpoints/test_details.py b/tests/sentry/relocation/api/endpoints/test_details.py index c4dbe4ae154155..1f901e9d0f8173 100644 --- a/tests/sentry/relocation/api/endpoints/test_details.py +++ b/tests/sentry/relocation/api/endpoints/test_details.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from uuid import uuid4 diff --git a/tests/sentry/relocation/api/endpoints/test_index.py b/tests/sentry/relocation/api/endpoints/test_index.py index 48c606dff8f2c2..373e198192b34e 100644 --- a/tests/sentry/relocation/api/endpoints/test_index.py +++ b/tests/sentry/relocation/api/endpoints/test_index.py @@ -1,3 +1,4 @@ +from typing import int import tempfile from datetime import datetime, timedelta, timezone from pathlib import Path diff --git a/tests/sentry/relocation/api/endpoints/test_pause.py b/tests/sentry/relocation/api/endpoints/test_pause.py index fb853e7edeb283..067d741b4ef308 100644 --- a/tests/sentry/relocation/api/endpoints/test_pause.py +++ b/tests/sentry/relocation/api/endpoints/test_pause.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from uuid import uuid4 diff --git a/tests/sentry/relocation/api/endpoints/test_public_key.py b/tests/sentry/relocation/api/endpoints/test_public_key.py index 9aabc63664abe3..e8256d0a005189 100644 --- a/tests/sentry/relocation/api/endpoints/test_public_key.py +++ b/tests/sentry/relocation/api/endpoints/test_public_key.py @@ -1,3 +1,4 @@ +from typing import int from types import SimpleNamespace from unittest import mock from unittest.mock import patch diff --git a/tests/sentry/relocation/api/endpoints/test_recover.py b/tests/sentry/relocation/api/endpoints/test_recover.py index 22f9988345dc30..eb848b295fe908 100644 --- a/tests/sentry/relocation/api/endpoints/test_recover.py +++ b/tests/sentry/relocation/api/endpoints/test_recover.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from unittest.mock import Mock, patch from uuid import uuid4 diff --git a/tests/sentry/relocation/api/endpoints/test_retry.py b/tests/sentry/relocation/api/endpoints/test_retry.py index fe13772d782d1a..b86cf92e8087a0 100644 --- a/tests/sentry/relocation/api/endpoints/test_retry.py +++ b/tests/sentry/relocation/api/endpoints/test_retry.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from functools import lru_cache from io import BytesIO diff --git a/tests/sentry/relocation/api/endpoints/test_unpause.py b/tests/sentry/relocation/api/endpoints/test_unpause.py index f6526a7d1da558..4e5d892fa384d9 100644 --- a/tests/sentry/relocation/api/endpoints/test_unpause.py +++ b/tests/sentry/relocation/api/endpoints/test_unpause.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from unittest.mock import Mock, patch from uuid import uuid4 diff --git a/tests/sentry/relocation/api/serializers/test_relocation.py b/tests/sentry/relocation/api/serializers/test_relocation.py index abef3e07f897e2..a6e8cc9a6263a7 100644 --- a/tests/sentry/relocation/api/serializers/test_relocation.py +++ b/tests/sentry/relocation/api/serializers/test_relocation.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from sentry.api.serializers import serialize diff --git a/tests/sentry/relocation/tasks/test_process.py b/tests/sentry/relocation/tasks/test_process.py index e83449d0986d96..a88af2a1208a0e 100644 --- a/tests/sentry/relocation/tasks/test_process.py +++ b/tests/sentry/relocation/tasks/test_process.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from functools import cached_property from io import BytesIO diff --git a/tests/sentry/relocation/tasks/test_transfer.py b/tests/sentry/relocation/tasks/test_transfer.py index 84b7592ce28de2..0a20be0cfbf9f5 100644 --- a/tests/sentry/relocation/tasks/test_transfer.py +++ b/tests/sentry/relocation/tasks/test_transfer.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from io import BytesIO from unittest.mock import MagicMock, patch diff --git a/tests/sentry/relocation/test_utils.py b/tests/sentry/relocation/test_utils.py index e18c70d50106cd..8b67499814dec3 100644 --- a/tests/sentry/relocation/test_utils.py +++ b/tests/sentry/relocation/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch from uuid import uuid4 diff --git a/tests/sentry/replays/conftest.py b/tests/sentry/replays/conftest.py index c404c7ef7d7946..19d6d1f3b75195 100644 --- a/tests/sentry/replays/conftest.py +++ b/tests/sentry/replays/conftest.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import pytest import requests diff --git a/tests/sentry/replays/consumers/test_recording.py b/tests/sentry/replays/consumers/test_recording.py index 89c1c0f09a08c7..d4dae64541ed70 100644 --- a/tests/sentry/replays/consumers/test_recording.py +++ b/tests/sentry/replays/consumers/test_recording.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import time import uuid diff --git a/tests/sentry/replays/endpoints/test_data_export_notifications.py b/tests/sentry/replays/endpoints/test_data_export_notifications.py index d7b304855894a1..b3aa2d70ec51c4 100644 --- a/tests/sentry/replays/endpoints/test_data_export_notifications.py +++ b/tests/sentry/replays/endpoints/test_data_export_notifications.py @@ -1,3 +1,4 @@ +from typing import int import base64 from unittest.mock import patch diff --git a/tests/sentry/replays/endpoints/test_organization_replay_count.py b/tests/sentry/replays/endpoints/test_organization_replay_count.py index 723d868dc05297..9a1e32ed8b3960 100644 --- a/tests/sentry/replays/endpoints/test_organization_replay_count.py +++ b/tests/sentry/replays/endpoints/test_organization_replay_count.py @@ -2,7 +2,7 @@ import datetime import uuid -from typing import Any +from typing import int, Any import pytest from django.db.models import F diff --git a/tests/sentry/replays/endpoints/test_organization_replay_details.py b/tests/sentry/replays/endpoints/test_organization_replay_details.py index 035a078766d38c..ebf4c35b2501de 100644 --- a/tests/sentry/replays/endpoints/test_organization_replay_details.py +++ b/tests/sentry/replays/endpoints/test_organization_replay_details.py @@ -1,3 +1,4 @@ +from typing import int import datetime from uuid import uuid4 diff --git a/tests/sentry/replays/endpoints/test_organization_replay_events_meta.py b/tests/sentry/replays/endpoints/test_organization_replay_events_meta.py index 56d2a8adc591b9..3d4e20a6d0f444 100644 --- a/tests/sentry/replays/endpoints/test_organization_replay_events_meta.py +++ b/tests/sentry/replays/endpoints/test_organization_replay_events_meta.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import patch diff --git a/tests/sentry/replays/endpoints/test_organization_replay_index.py b/tests/sentry/replays/endpoints/test_organization_replay_index.py index 05e308ee574ede..a4270fce7ae7f8 100644 --- a/tests/sentry/replays/endpoints/test_organization_replay_index.py +++ b/tests/sentry/replays/endpoints/test_organization_replay_index.py @@ -1,3 +1,4 @@ +from typing import int import datetime import uuid from unittest import mock diff --git a/tests/sentry/replays/endpoints/test_organization_selector_index.py b/tests/sentry/replays/endpoints/test_organization_selector_index.py index 8a4dfbf7190807..f20192e46863dd 100644 --- a/tests/sentry/replays/endpoints/test_organization_selector_index.py +++ b/tests/sentry/replays/endpoints/test_organization_selector_index.py @@ -1,3 +1,4 @@ +from typing import int import datetime import uuid diff --git a/tests/sentry/replays/endpoints/test_project_replay_clicks_index.py b/tests/sentry/replays/endpoints/test_project_replay_clicks_index.py index 9e3fed1d05adb0..1f211439573d88 100644 --- a/tests/sentry/replays/endpoints/test_project_replay_clicks_index.py +++ b/tests/sentry/replays/endpoints/test_project_replay_clicks_index.py @@ -1,3 +1,4 @@ +from typing import int import datetime from uuid import uuid4 diff --git a/tests/sentry/replays/endpoints/test_project_replay_details.py b/tests/sentry/replays/endpoints/test_project_replay_details.py index 68380b03d5850a..9afca4b997ed35 100644 --- a/tests/sentry/replays/endpoints/test_project_replay_details.py +++ b/tests/sentry/replays/endpoints/test_project_replay_details.py @@ -1,3 +1,4 @@ +from typing import int import datetime from io import BytesIO from unittest.mock import MagicMock, Mock, patch diff --git a/tests/sentry/replays/endpoints/test_project_replay_jobs_delete.py b/tests/sentry/replays/endpoints/test_project_replay_jobs_delete.py index 9d1aab93d603a2..56044b03595379 100644 --- a/tests/sentry/replays/endpoints/test_project_replay_jobs_delete.py +++ b/tests/sentry/replays/endpoints/test_project_replay_jobs_delete.py @@ -1,3 +1,4 @@ +from typing import int import datetime from unittest.mock import MagicMock, patch diff --git a/tests/sentry/replays/endpoints/test_project_replay_recording_segment_details.py b/tests/sentry/replays/endpoints/test_project_replay_recording_segment_details.py index 00e23e15a0176f..ac1e6c76366b8b 100644 --- a/tests/sentry/replays/endpoints/test_project_replay_recording_segment_details.py +++ b/tests/sentry/replays/endpoints/test_project_replay_recording_segment_details.py @@ -1,3 +1,4 @@ +from typing import int import datetime import uuid import zlib diff --git a/tests/sentry/replays/endpoints/test_project_replay_recording_segment_index.py b/tests/sentry/replays/endpoints/test_project_replay_recording_segment_index.py index 4ab230800b3acb..0a92596c18f6c1 100644 --- a/tests/sentry/replays/endpoints/test_project_replay_recording_segment_index.py +++ b/tests/sentry/replays/endpoints/test_project_replay_recording_segment_index.py @@ -1,3 +1,4 @@ +from typing import int import datetime import uuid import zlib diff --git a/tests/sentry/replays/endpoints/test_project_replay_summary.py b/tests/sentry/replays/endpoints/test_project_replay_summary.py index b2e1eadaf0f931..5076661d1c0918 100644 --- a/tests/sentry/replays/endpoints/test_project_replay_summary.py +++ b/tests/sentry/replays/endpoints/test_project_replay_summary.py @@ -1,6 +1,6 @@ import uuid from datetime import UTC, datetime, timedelta -from typing import Any +from typing import int, Any from unittest.mock import Mock, patch import requests diff --git a/tests/sentry/replays/endpoints/test_project_replay_video_details.py b/tests/sentry/replays/endpoints/test_project_replay_video_details.py index 57918bd73e82aa..ea62102cd383a9 100644 --- a/tests/sentry/replays/endpoints/test_project_replay_video_details.py +++ b/tests/sentry/replays/endpoints/test_project_replay_video_details.py @@ -1,3 +1,4 @@ +from typing import int import datetime import uuid import zlib diff --git a/tests/sentry/replays/endpoints/test_project_replay_viewed_by.py b/tests/sentry/replays/endpoints/test_project_replay_viewed_by.py index a521e7b89e3272..95a81655dab4b9 100644 --- a/tests/sentry/replays/endpoints/test_project_replay_viewed_by.py +++ b/tests/sentry/replays/endpoints/test_project_replay_viewed_by.py @@ -1,3 +1,4 @@ +from typing import int import datetime import time from unittest.mock import MagicMock, patch diff --git a/tests/sentry/replays/endpoints/test_query_replay_instance_eap.py b/tests/sentry/replays/endpoints/test_query_replay_instance_eap.py index c3d2041b280bda..3496eee66b6e80 100644 --- a/tests/sentry/replays/endpoints/test_query_replay_instance_eap.py +++ b/tests/sentry/replays/endpoints/test_query_replay_instance_eap.py @@ -1,3 +1,4 @@ +from typing import int import datetime from uuid import uuid4 diff --git a/tests/sentry/replays/integration/__init__.py b/tests/sentry/replays/integration/__init__.py index 6436b0073863bb..c50d679224af35 100644 --- a/tests/sentry/replays/integration/__init__.py +++ b/tests/sentry/replays/integration/__init__.py @@ -1,3 +1,4 @@ +from typing import int """Integration tests cover the intersection between different components or modules. Intended to assert that two pieces of code play nicely together. diff --git a/tests/sentry/replays/integration/consumers/test_recording.py b/tests/sentry/replays/integration/consumers/test_recording.py index d25387ce39a7a7..b8fe809dbfca40 100644 --- a/tests/sentry/replays/integration/consumers/test_recording.py +++ b/tests/sentry/replays/integration/consumers/test_recording.py @@ -2,7 +2,7 @@ import zlib from datetime import datetime -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import MagicMock diff --git a/tests/sentry/replays/integration/test_data_export.py b/tests/sentry/replays/integration/test_data_export.py index 11c639f2f99b1c..a164109574af10 100644 --- a/tests/sentry/replays/integration/test_data_export.py +++ b/tests/sentry/replays/integration/test_data_export.py @@ -1,3 +1,4 @@ +from typing import int import csv import datetime import uuid diff --git a/tests/sentry/replays/integration/test_ingest_cache.py b/tests/sentry/replays/integration/test_ingest_cache.py index a80e606023afd4..c6efa914f7ae95 100644 --- a/tests/sentry/replays/integration/test_ingest_cache.py +++ b/tests/sentry/replays/integration/test_ingest_cache.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.db.models import F diff --git a/tests/sentry/replays/integration/test_ingest_options.py b/tests/sentry/replays/integration/test_ingest_options.py index 6f71c8e2bbbb47..6c270b2e6bacb8 100644 --- a/tests/sentry/replays/integration/test_ingest_options.py +++ b/tests/sentry/replays/integration/test_ingest_options.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.options.project_option import ProjectOption from sentry.models.project import Project from sentry.replays.usecases.ingest.event_logger import ( diff --git a/tests/sentry/replays/lib/test_cache.py b/tests/sentry/replays/lib/test_cache.py index efdea9304524eb..76e450bd13798f 100644 --- a/tests/sentry/replays/lib/test_cache.py +++ b/tests/sentry/replays/lib/test_cache.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.replays.lib.cache import AutoCache, BoundedFifoCache, BoundedLRUCache, TimeLimitedCache diff --git a/tests/sentry/replays/lib/test_event_linking.py b/tests/sentry/replays/lib/test_event_linking.py index 83c09a042d1a9b..c0f66d64de38e0 100644 --- a/tests/sentry/replays/lib/test_event_linking.py +++ b/tests/sentry/replays/lib/test_event_linking.py @@ -1,3 +1,4 @@ +from typing import int import uuid from sentry.replays.lib.event_linking import transform_event_for_linking_payload diff --git a/tests/sentry/replays/scripts/test_delete_replays.py b/tests/sentry/replays/scripts/test_delete_replays.py index 26483063d98877..023884eccfff74 100644 --- a/tests/sentry/replays/scripts/test_delete_replays.py +++ b/tests/sentry/replays/scripts/test_delete_replays.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import datetime from io import BytesIO diff --git a/tests/sentry/replays/tasks/test_delete_replays_bulk.py b/tests/sentry/replays/tasks/test_delete_replays_bulk.py index f3f3b81cf00450..1141fa7510aa34 100644 --- a/tests/sentry/replays/tasks/test_delete_replays_bulk.py +++ b/tests/sentry/replays/tasks/test_delete_replays_bulk.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import datetime import uuid diff --git a/tests/sentry/replays/test_data_export.py b/tests/sentry/replays/test_data_export.py index 1ad1b4da801857..17584f4210d8c4 100644 --- a/tests/sentry/replays/test_data_export.py +++ b/tests/sentry/replays/test_data_export.py @@ -1,3 +1,4 @@ +from typing import int import csv import datetime import io diff --git a/tests/sentry/replays/test_post_process.py b/tests/sentry/replays/test_post_process.py index 56bf22b25ef857..a98edbaf0658be 100644 --- a/tests/sentry/replays/test_post_process.py +++ b/tests/sentry/replays/test_post_process.py @@ -1,3 +1,4 @@ +from typing import int from sentry.replays.post_process import _archived_row from sentry.replays.validators import VALID_FIELD_SET diff --git a/tests/sentry/replays/test_query.py b/tests/sentry/replays/test_query.py index 29cb4baa599fe5..efa78ab145a758 100644 --- a/tests/sentry/replays/test_query.py +++ b/tests/sentry/replays/test_query.py @@ -1,6 +1,6 @@ import uuid from datetime import UTC, datetime, timedelta -from typing import Any +from typing import int, Any from unittest.mock import Mock, patch import pytest diff --git a/tests/sentry/replays/unit/consumers/test_recording.py b/tests/sentry/replays/unit/consumers/test_recording.py index d16a11adcfb554..d830cc6b88d06e 100644 --- a/tests/sentry/replays/unit/consumers/test_recording.py +++ b/tests/sentry/replays/unit/consumers/test_recording.py @@ -1,5 +1,5 @@ import zlib -from typing import Any +from typing import int, Any import msgpack import pytest diff --git a/tests/sentry/replays/unit/lib/eap/test_snuba_transpiler.py b/tests/sentry/replays/unit/lib/eap/test_snuba_transpiler.py index 48772573eb4e0f..2b3d35a25530b3 100644 --- a/tests/sentry/replays/unit/lib/eap/test_snuba_transpiler.py +++ b/tests/sentry/replays/unit/lib/eap/test_snuba_transpiler.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Iterable, Sequence from datetime import datetime diff --git a/tests/sentry/replays/unit/lib/test_http.py b/tests/sentry/replays/unit/lib/test_http.py index 2b96699dc4fa8f..e5ce893e8c44fa 100644 --- a/tests/sentry/replays/unit/lib/test_http.py +++ b/tests/sentry/replays/unit/lib/test_http.py @@ -1,3 +1,4 @@ +from typing import int import io import pytest diff --git a/tests/sentry/replays/unit/test_data_export.py b/tests/sentry/replays/unit/test_data_export.py index 73446a97e684e2..4bccf19026773d 100644 --- a/tests/sentry/replays/unit/test_data_export.py +++ b/tests/sentry/replays/unit/test_data_export.py @@ -1,3 +1,4 @@ +from typing import int import base64 from datetime import datetime, timedelta diff --git a/tests/sentry/replays/unit/test_event_logger.py b/tests/sentry/replays/unit/test_event_logger.py index 0a1b341097dd32..481ff803de5d74 100644 --- a/tests/sentry/replays/unit/test_event_logger.py +++ b/tests/sentry/replays/unit/test_event_logger.py @@ -1,3 +1,4 @@ +from typing import int import uuid from collections.abc import Callable from unittest import mock diff --git a/tests/sentry/replays/unit/test_event_parser.py b/tests/sentry/replays/unit/test_event_parser.py index a997998468c554..68e4810ebc389a 100644 --- a/tests/sentry/replays/unit/test_event_parser.py +++ b/tests/sentry/replays/unit/test_event_parser.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/replays/unit/test_ingest.py b/tests/sentry/replays/unit/test_ingest.py index eaad9f85246df6..13a3ab4be925cc 100644 --- a/tests/sentry/replays/unit/test_ingest.py +++ b/tests/sentry/replays/unit/test_ingest.py @@ -1,3 +1,4 @@ +from typing import int import zlib import pytest diff --git a/tests/sentry/replays/unit/test_issue_creation.py b/tests/sentry/replays/unit/test_issue_creation.py index aa1b35a3a84b3c..58a24e6e080733 100644 --- a/tests/sentry/replays/unit/test_issue_creation.py +++ b/tests/sentry/replays/unit/test_issue_creation.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.issues.grouptype import ReplayHydrationErrorType, ReplayRageClickType diff --git a/tests/sentry/replays/unit/test_retry.py b/tests/sentry/replays/unit/test_retry.py index 063841f295ba4c..4bb878aaf87ee7 100644 --- a/tests/sentry/replays/unit/test_retry.py +++ b/tests/sentry/replays/unit/test_retry.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.retries import sigmoid_delay diff --git a/tests/sentry/replays/unit/usecases/test_delete_seer_replay_data.py b/tests/sentry/replays/unit/usecases/test_delete_seer_replay_data.py index f84572f5e93d6e..de0bb6d8bb4e82 100644 --- a/tests/sentry/replays/unit/usecases/test_delete_seer_replay_data.py +++ b/tests/sentry/replays/unit/usecases/test_delete_seer_replay_data.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch from sentry.replays.usecases.delete import delete_seer_replay_data diff --git a/tests/sentry/replays/unit/usecases/test_events.py b/tests/sentry/replays/unit/usecases/test_events.py index 997e85e0214707..046c13ad01916a 100644 --- a/tests/sentry/replays/unit/usecases/test_events.py +++ b/tests/sentry/replays/unit/usecases/test_events.py @@ -1,3 +1,4 @@ +from typing import int import time from sentry.replays.usecases.events import archive_event, viewed_event diff --git a/tests/sentry/replays/unit/usecases/test_pack.py b/tests/sentry/replays/unit/usecases/test_pack.py index d2a28a2a8730e4..9c99ac381fe9f1 100644 --- a/tests/sentry/replays/unit/usecases/test_pack.py +++ b/tests/sentry/replays/unit/usecases/test_pack.py @@ -1,3 +1,4 @@ +from typing import int from sentry.replays.usecases.pack import HEADER_OFFSET, Encoding, pack, unpack diff --git a/tests/sentry/replays/unit/usecases/test_query.py b/tests/sentry/replays/unit/usecases/test_query.py index c45c267dbf266b..7ed5036336b82e 100644 --- a/tests/sentry/replays/unit/usecases/test_query.py +++ b/tests/sentry/replays/unit/usecases/test_query.py @@ -1,3 +1,4 @@ +from typing import int from sentry.replays.usecases.query import _make_ordered diff --git a/tests/sentry/replays/usecases/test_summarize.py b/tests/sentry/replays/usecases/test_summarize.py index b9195374d04728..7364ba2cf739c3 100644 --- a/tests/sentry/replays/usecases/test_summarize.py +++ b/tests/sentry/replays/usecases/test_summarize.py @@ -2,7 +2,7 @@ import zlib from collections.abc import Generator from datetime import UTC, datetime, timedelta -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, Mock, patch import pytest diff --git a/tests/sentry/roles/test_manager.py b/tests/sentry/roles/test_manager.py index b9d76e37a9fe7d..4ad72510d81cea 100644 --- a/tests/sentry/roles/test_manager.py +++ b/tests/sentry/roles/test_manager.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.roles import default_manager diff --git a/tests/sentry/rules/actions/base/test_event_action.py b/tests/sentry/rules/actions/base/test_event_action.py index fcd1ea1b7b07bd..a220b59ca83343 100644 --- a/tests/sentry/rules/actions/base/test_event_action.py +++ b/tests/sentry/rules/actions/base/test_event_action.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules.actions import EventAction from sentry.testutils.cases import TestCase diff --git a/tests/sentry/rules/actions/test_base.py b/tests/sentry/rules/actions/test_base.py index 430188ef9b515b..9cdcc198ce7d28 100644 --- a/tests/sentry/rules/actions/test_base.py +++ b/tests/sentry/rules/actions/test_base.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from sentry.integrations.slack import SlackNotifyServiceAction diff --git a/tests/sentry/rules/actions/test_create_ticket_utils.py b/tests/sentry/rules/actions/test_create_ticket_utils.py index 6272c65b8bdc44..8b60f4d229c05e 100644 --- a/tests/sentry/rules/actions/test_create_ticket_utils.py +++ b/tests/sentry/rules/actions/test_create_ticket_utils.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock from sentry.rules.actions.integrations.create_ticket.utils import ( diff --git a/tests/sentry/rules/actions/test_notify_event.py b/tests/sentry/rules/actions/test_notify_event.py index 2403c2de7e5aff..46affce0dc8711 100644 --- a/tests/sentry/rules/actions/test_notify_event.py +++ b/tests/sentry/rules/actions/test_notify_event.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock from sentry.rules.actions.notify_event import NotifyEventAction diff --git a/tests/sentry/rules/actions/test_notify_event_sentry_app.py b/tests/sentry/rules/actions/test_notify_event_sentry_app.py index 492eafd8f54e18..d2de8a152c17ec 100644 --- a/tests/sentry/rules/actions/test_notify_event_sentry_app.py +++ b/tests/sentry/rules/actions/test_notify_event_sentry_app.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/rules/actions/test_notify_event_service.py b/tests/sentry/rules/actions/test_notify_event_service.py index ac43f7bc7fb8ad..145eecaabdaa7b 100644 --- a/tests/sentry/rules/actions/test_notify_event_service.py +++ b/tests/sentry/rules/actions/test_notify_event_service.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.utils import timezone diff --git a/tests/sentry/rules/conditions/test_event_attribute.py b/tests/sentry/rules/conditions/test_event_attribute.py index 79aec058999cf4..7d8cc6953741fa 100644 --- a/tests/sentry/rules/conditions/test_event_attribute.py +++ b/tests/sentry/rules/conditions/test_event_attribute.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/rules/conditions/test_every_event.py b/tests/sentry/rules/conditions/test_every_event.py index b65e55022bd3a3..d99658aa98ff2e 100644 --- a/tests/sentry/rules/conditions/test_every_event.py +++ b/tests/sentry/rules/conditions/test_every_event.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules.conditions.every_event import EveryEventCondition from sentry.testutils.cases import RuleTestCase from sentry.testutils.skips import requires_snuba diff --git a/tests/sentry/rules/conditions/test_existing_high_priority_issue.py b/tests/sentry/rules/conditions/test_existing_high_priority_issue.py index 8ce2797c18e774..20e3fb60d6cf42 100644 --- a/tests/sentry/rules/conditions/test_existing_high_priority_issue.py +++ b/tests/sentry/rules/conditions/test_existing_high_priority_issue.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.rule import Rule from sentry.rules.conditions.existing_high_priority_issue import ExistingHighPriorityIssueCondition from sentry.testutils.cases import RuleTestCase diff --git a/tests/sentry/rules/conditions/test_first_seen_event.py b/tests/sentry/rules/conditions/test_first_seen_event.py index b9a8f56fc40154..c04a21c06dadc5 100644 --- a/tests/sentry/rules/conditions/test_first_seen_event.py +++ b/tests/sentry/rules/conditions/test_first_seen_event.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.rule import Rule from sentry.rules.conditions.first_seen_event import FirstSeenEventCondition from sentry.testutils.cases import RuleTestCase diff --git a/tests/sentry/rules/conditions/test_level_event.py b/tests/sentry/rules/conditions/test_level_event.py index eda58c4de745f7..14d752dfa110bb 100644 --- a/tests/sentry/rules/conditions/test_level_event.py +++ b/tests/sentry/rules/conditions/test_level_event.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules.conditions.level import LevelCondition from sentry.rules.match import MatchType from sentry.testutils.cases import RuleTestCase diff --git a/tests/sentry/rules/conditions/test_new_high_priority_issue.py b/tests/sentry/rules/conditions/test_new_high_priority_issue.py index 9e12fccbdca88f..f55ff18354e404 100644 --- a/tests/sentry/rules/conditions/test_new_high_priority_issue.py +++ b/tests/sentry/rules/conditions/test_new_high_priority_issue.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.rule import Rule from sentry.rules.conditions.new_high_priority_issue import NewHighPriorityIssueCondition from sentry.testutils.cases import RuleTestCase diff --git a/tests/sentry/rules/conditions/test_reappeared_event.py b/tests/sentry/rules/conditions/test_reappeared_event.py index 21141d03b668fa..3d36cf348f730f 100644 --- a/tests/sentry/rules/conditions/test_reappeared_event.py +++ b/tests/sentry/rules/conditions/test_reappeared_event.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules.conditions.reappeared_event import ReappearedEventCondition from sentry.testutils.cases import RuleTestCase from sentry.testutils.skips import requires_snuba diff --git a/tests/sentry/rules/conditions/test_regression_event.py b/tests/sentry/rules/conditions/test_regression_event.py index e67f14833fcfa9..5114141580a1dc 100644 --- a/tests/sentry/rules/conditions/test_regression_event.py +++ b/tests/sentry/rules/conditions/test_regression_event.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules.conditions.regression_event import RegressionEventCondition from sentry.testutils.cases import RuleTestCase from sentry.testutils.skips import requires_snuba diff --git a/tests/sentry/rules/conditions/test_tagged_event.py b/tests/sentry/rules/conditions/test_tagged_event.py index 4a551daae8de3d..d83e65e75514c0 100644 --- a/tests/sentry/rules/conditions/test_tagged_event.py +++ b/tests/sentry/rules/conditions/test_tagged_event.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules.conditions.tagged_event import TaggedEventCondition from sentry.rules.match import MatchType from sentry.services.eventstore.models import Event diff --git a/tests/sentry/rules/filters/test_age_comparison.py b/tests/sentry/rules/filters/test_age_comparison.py index ca4f4c46aee1ac..16f91f90cea51f 100644 --- a/tests/sentry/rules/filters/test_age_comparison.py +++ b/tests/sentry/rules/filters/test_age_comparison.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from sentry.rules.filters.age_comparison import AgeComparisonFilter diff --git a/tests/sentry/rules/filters/test_assigned_to.py b/tests/sentry/rules/filters/test_assigned_to.py index bf1afbf3d5ed98..9277db66935a13 100644 --- a/tests/sentry/rules/filters/test_assigned_to.py +++ b/tests/sentry/rules/filters/test_assigned_to.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.groupassignee import GroupAssignee from sentry.rules.filters.assigned_to import AssignedToFilter from sentry.testutils.cases import RuleTestCase diff --git a/tests/sentry/rules/filters/test_issue_category.py b/tests/sentry/rules/filters/test_issue_category.py index 98e9d06531e862..c7d5522c0ac432 100644 --- a/tests/sentry/rules/filters/test_issue_category.py +++ b/tests/sentry/rules/filters/test_issue_category.py @@ -1,3 +1,4 @@ +from typing import int from sentry.issues.grouptype import GroupCategory from sentry.rules.filters.issue_category import IssueCategoryFilter from sentry.testutils.cases import PerformanceIssueTestCase, RuleTestCase, SnubaTestCase diff --git a/tests/sentry/rules/filters/test_issue_occurrences.py b/tests/sentry/rules/filters/test_issue_occurrences.py index 389fdddc77d75f..2c16c11cb0f081 100644 --- a/tests/sentry/rules/filters/test_issue_occurrences.py +++ b/tests/sentry/rules/filters/test_issue_occurrences.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules.filters.issue_occurrences import IssueOccurrencesFilter from sentry.testutils.cases import RuleTestCase from sentry.testutils.skips import requires_snuba diff --git a/tests/sentry/rules/filters/test_latest_adopted_release.py b/tests/sentry/rules/filters/test_latest_adopted_release.py index eca8d1295d75af..0d894b6b63eecc 100644 --- a/tests/sentry/rules/filters/test_latest_adopted_release.py +++ b/tests/sentry/rules/filters/test_latest_adopted_release.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from sentry.rules.filters.latest_adopted_release_filter import LatestAdoptedReleaseFilter diff --git a/tests/sentry/rules/filters/test_latest_release.py b/tests/sentry/rules/filters/test_latest_release.py index 2273636853a4c7..a34cdae2e1d4c1 100644 --- a/tests/sentry/rules/filters/test_latest_release.py +++ b/tests/sentry/rules/filters/test_latest_release.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime import pytest diff --git a/tests/sentry/rules/history/backends/test_postgres.py b/tests/sentry/rules/history/backends/test_postgres.py index 239ce08f657bad..5e8e197bec078f 100644 --- a/tests/sentry/rules/history/backends/test_postgres.py +++ b/tests/sentry/rules/history/backends/test_postgres.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from sentry.models.rule import Rule diff --git a/tests/sentry/rules/history/endpoints/test_project_rule_group_history.py b/tests/sentry/rules/history/endpoints/test_project_rule_group_history.py index 9d6111bc2fc291..d8e435d2658722 100644 --- a/tests/sentry/rules/history/endpoints/test_project_rule_group_history.py +++ b/tests/sentry/rules/history/endpoints/test_project_rule_group_history.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from sentry.api.serializers import serialize diff --git a/tests/sentry/rules/history/endpoints/test_project_rule_preview.py b/tests/sentry/rules/history/endpoints/test_project_rule_preview.py index 52cd0b43b9634c..ae0eb33df7824a 100644 --- a/tests/sentry/rules/history/endpoints/test_project_rule_preview.py +++ b/tests/sentry/rules/history/endpoints/test_project_rule_preview.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from django.utils import timezone diff --git a/tests/sentry/rules/history/endpoints/test_project_rule_stats.py b/tests/sentry/rules/history/endpoints/test_project_rule_stats.py index be4dbd0e0d9d4a..af26ba4a4f2822 100644 --- a/tests/sentry/rules/history/endpoints/test_project_rule_stats.py +++ b/tests/sentry/rules/history/endpoints/test_project_rule_stats.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from django.utils import timezone diff --git a/tests/sentry/rules/history/test_preview.py b/tests/sentry/rules/history/test_preview.py index 3fc3456d31854f..4b5a0c48575905 100644 --- a/tests/sentry/rules/history/test_preview.py +++ b/tests/sentry/rules/history/test_preview.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import timedelta -from typing import Any +from typing import int, Any from django.utils import timezone diff --git a/tests/sentry/rules/processing/test_buffer_processing.py b/tests/sentry/rules/processing/test_buffer_processing.py index d16da90e53c43c..d30630aca15941 100644 --- a/tests/sentry/rules/processing/test_buffer_processing.py +++ b/tests/sentry/rules/processing/test_buffer_processing.py @@ -1,5 +1,5 @@ from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch from uuid import uuid4 diff --git a/tests/sentry/rules/processing/test_delayed_processing.py b/tests/sentry/rules/processing/test_delayed_processing.py index 03d0e44a71d4a5..ba605bbf65ae96 100644 --- a/tests/sentry/rules/processing/test_delayed_processing.py +++ b/tests/sentry/rules/processing/test_delayed_processing.py @@ -2,7 +2,7 @@ from collections.abc import Sequence from copy import deepcopy from datetime import timedelta -from typing import DefaultDict +from typing import int, DefaultDict from unittest.mock import MagicMock, Mock, patch import pytest diff --git a/tests/sentry/rules/processing/test_processor.py b/tests/sentry/rules/processing/test_processor.py index 2984963f351341..ae2bb2f16e00c6 100644 --- a/tests/sentry/rules/processing/test_processor.py +++ b/tests/sentry/rules/processing/test_processor.py @@ -1,5 +1,5 @@ from datetime import UTC, datetime, timedelta -from typing import cast +from typing import int, cast from unittest import mock from unittest.mock import MagicMock, patch diff --git a/tests/sentry/rules/test_match.py b/tests/sentry/rules/test_match.py index 815b86d9b7ca9c..541df72a2a4587 100644 --- a/tests/sentry/rules/test_match.py +++ b/tests/sentry/rules/test_match.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules.match import MatchType, match_values diff --git a/tests/sentry/runner/commands/presenters/test_presenterdelegator.py b/tests/sentry/runner/commands/presenters/test_presenterdelegator.py index b85faec1d078aa..45a7352e43cbb1 100644 --- a/tests/sentry/runner/commands/presenters/test_presenterdelegator.py +++ b/tests/sentry/runner/commands/presenters/test_presenterdelegator.py @@ -1,3 +1,4 @@ +from typing import int import pytest import responses diff --git a/tests/sentry/runner/commands/presenters/test_webhookpresenter.py b/tests/sentry/runner/commands/presenters/test_webhookpresenter.py index c0d7cfa47c88af..9396cfb9fddcbb 100644 --- a/tests/sentry/runner/commands/presenters/test_webhookpresenter.py +++ b/tests/sentry/runner/commands/presenters/test_webhookpresenter.py @@ -1,3 +1,4 @@ +from typing import int import pytest import responses from django.test import override_settings diff --git a/tests/sentry/runner/commands/test_backup.py b/tests/sentry/runner/commands/test_backup.py index 517c7276c71ea0..2f1f0857949610 100644 --- a/tests/sentry/runner/commands/test_backup.py +++ b/tests/sentry/runner/commands/test_backup.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import os from collections.abc import Sequence diff --git a/tests/sentry/runner/commands/test_cleanup.py b/tests/sentry/runner/commands/test_cleanup.py index 0a8e6c6cdebc4c..d4a423a49b8943 100644 --- a/tests/sentry/runner/commands/test_cleanup.py +++ b/tests/sentry/runner/commands/test_cleanup.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from sentry.constants import ObjectStatus from sentry.runner.commands.cleanup import prepare_deletes_by_project diff --git a/tests/sentry/runner/commands/test_config.py b/tests/sentry/runner/commands/test_config.py index e4feff6adc2b13..17206788b794f0 100644 --- a/tests/sentry/runner/commands/test_config.py +++ b/tests/sentry/runner/commands/test_config.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator import pytest diff --git a/tests/sentry/runner/commands/test_configoptions.py b/tests/sentry/runner/commands/test_configoptions.py index 4efc8a9aa270e9..6c28958b0aa85c 100644 --- a/tests/sentry/runner/commands/test_configoptions.py +++ b/tests/sentry/runner/commands/test_configoptions.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from pathlib import Path diff --git a/tests/sentry/runner/commands/test_createflag.py b/tests/sentry/runner/commands/test_createflag.py index 04084e9b4ef3c8..a40e52fd8c77dd 100644 --- a/tests/sentry/runner/commands/test_createflag.py +++ b/tests/sentry/runner/commands/test_createflag.py @@ -1,3 +1,4 @@ +from typing import int from datetime import date from flagpole import Feature diff --git a/tests/sentry/runner/commands/test_createuser.py b/tests/sentry/runner/commands/test_createuser.py index 7a9a6b83ad1ca2..9e476f2bda0caf 100644 --- a/tests/sentry/runner/commands/test_createuser.py +++ b/tests/sentry/runner/commands/test_createuser.py @@ -1,3 +1,4 @@ +from typing import int from sentry import roles from sentry.models.organization import Organization from sentry.models.organizationmember import OrganizationMember diff --git a/tests/sentry/runner/commands/test_init.py b/tests/sentry/runner/commands/test_init.py index 160d52ac924968..babe7c5ba243af 100644 --- a/tests/sentry/runner/commands/test_init.py +++ b/tests/sentry/runner/commands/test_init.py @@ -1,3 +1,4 @@ +from typing import int import os from sentry.runner.commands.init import init diff --git a/tests/sentry/runner/commands/test_killswitches.py b/tests/sentry/runner/commands/test_killswitches.py index 0024cdb6e9dda6..28a458d0f0f537 100644 --- a/tests/sentry/runner/commands/test_killswitches.py +++ b/tests/sentry/runner/commands/test_killswitches.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry import options diff --git a/tests/sentry/runner/commands/test_migrations.py b/tests/sentry/runner/commands/test_migrations.py index eb6bb904244be7..b0ff2f967afc9f 100644 --- a/tests/sentry/runner/commands/test_migrations.py +++ b/tests/sentry/runner/commands/test_migrations.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest.mock import patch diff --git a/tests/sentry/runner/commands/test_run.py b/tests/sentry/runner/commands/test_run.py index d7ca8db5882c7e..d1b08de5672585 100644 --- a/tests/sentry/runner/commands/test_run.py +++ b/tests/sentry/runner/commands/test_run.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/runner/test_initializer.py b/tests/sentry/runner/test_initializer.py index 296187d9985fd1..96695370124f13 100644 --- a/tests/sentry/runner/test_initializer.py +++ b/tests/sentry/runner/test_initializer.py @@ -1,3 +1,4 @@ +from typing import int import types import pytest diff --git a/tests/sentry/search/eap/test_ourlogs.py b/tests/sentry/search/eap/test_ourlogs.py index f538998cfa81e3..5d18286c291256 100644 --- a/tests/sentry/search/eap/test_ourlogs.py +++ b/tests/sentry/search/eap/test_ourlogs.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase import pytest diff --git a/tests/sentry/search/eap/test_spans.py b/tests/sentry/search/eap/test_spans.py index e1ee1ea26f6d87..8b4fd4615cdace 100644 --- a/tests/sentry/search/eap/test_spans.py +++ b/tests/sentry/search/eap/test_spans.py @@ -1,3 +1,4 @@ +from typing import int import os from datetime import datetime diff --git a/tests/sentry/search/eap/test_uptime_results.py b/tests/sentry/search/eap/test_uptime_results.py index ca16a3df1d836c..0156bc1edf0a49 100644 --- a/tests/sentry/search/eap/test_uptime_results.py +++ b/tests/sentry/search/eap/test_uptime_results.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase from sentry_protos.snuba.v1.trace_item_attribute_pb2 import ( diff --git a/tests/sentry/search/events/builder/test_discover.py b/tests/sentry/search/events/builder/test_discover.py index 7abd0fbcd9f216..368bf6de86e20a 100644 --- a/tests/sentry/search/events/builder/test_discover.py +++ b/tests/sentry/search/events/builder/test_discover.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import datetime import re diff --git a/tests/sentry/search/events/builder/test_errors.py b/tests/sentry/search/events/builder/test_errors.py index 6603d506e54517..9c95e0d84482d1 100644 --- a/tests/sentry/search/events/builder/test_errors.py +++ b/tests/sentry/search/events/builder/test_errors.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import pytest from snuba_sdk import Entity, Join, Relationship diff --git a/tests/sentry/search/events/builder/test_metrics.py b/tests/sentry/search/events/builder/test_metrics.py index b7609ee3257d44..fa2177c3830c22 100644 --- a/tests/sentry/search/events/builder/test_metrics.py +++ b/tests/sentry/search/events/builder/test_metrics.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import datetime import math diff --git a/tests/sentry/search/events/builder/test_profile_functions.py b/tests/sentry/search/events/builder/test_profile_functions.py index 3eb0b1a806e793..20886cb09f5503 100644 --- a/tests/sentry/search/events/builder/test_profile_functions.py +++ b/tests/sentry/search/events/builder/test_profile_functions.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone import pytest diff --git a/tests/sentry/search/events/builder/test_span_metrics.py b/tests/sentry/search/events/builder/test_span_metrics.py index e82f32acc0998d..0c3583db55e0d7 100644 --- a/tests/sentry/search/events/builder/test_span_metrics.py +++ b/tests/sentry/search/events/builder/test_span_metrics.py @@ -1,3 +1,4 @@ +from typing import int import datetime from datetime import timezone diff --git a/tests/sentry/search/events/builder/test_spans_indexed.py b/tests/sentry/search/events/builder/test_spans_indexed.py index 38cffc5411cde1..77f4283b5979e7 100644 --- a/tests/sentry/search/events/builder/test_spans_indexed.py +++ b/tests/sentry/search/events/builder/test_spans_indexed.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from itertools import chain diff --git a/tests/sentry/search/events/test_fields.py b/tests/sentry/search/events/test_fields.py index 7ef65c46d9bfc0..e84869d2da3714 100644 --- a/tests/sentry/search/events/test_fields.py +++ b/tests/sentry/search/events/test_fields.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime import pytest diff --git a/tests/sentry/search/events/test_filter.py b/tests/sentry/search/events/test_filter.py index 591ee8fe03542c..ef0d6ffaaca48c 100644 --- a/tests/sentry/search/events/test_filter.py +++ b/tests/sentry/search/events/test_filter.py @@ -1,3 +1,4 @@ +from typing import int import re import unittest from unittest.mock import patch diff --git a/tests/sentry/search/test_utils.py b/tests/sentry/search/test_utils.py index 1e6f2b99e8d0a5..39086d9be9d994 100644 --- a/tests/sentry/search/test_utils.py +++ b/tests/sentry/search/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta import pytest diff --git a/tests/sentry/security/test_csp.py b/tests/sentry/security/test_csp.py index b510204cb0a378..6200b92094be3f 100644 --- a/tests/sentry/security/test_csp.py +++ b/tests/sentry/security/test_csp.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.security import csp diff --git a/tests/sentry/security/test_utils.py b/tests/sentry/security/test_utils.py index 93e99fdbd600cb..16a85ea7f3fe8f 100644 --- a/tests/sentry/security/test_utils.py +++ b/tests/sentry/security/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.security.utils import capture_security_app_activity diff --git a/tests/sentry/seer/anomaly_detection/test_store_data.py b/tests/sentry/seer/anomaly_detection/test_store_data.py index 402e141647d728..1987d745549776 100644 --- a/tests/sentry/seer/anomaly_detection/test_store_data.py +++ b/tests/sentry/seer/anomaly_detection/test_store_data.py @@ -1,6 +1,6 @@ import logging from datetime import UTC, datetime, timedelta -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/seer/assisted_query/test_issues_tools.py b/tests/sentry/seer/assisted_query/test_issues_tools.py index 1bc8051d882d79..6e378cb028313b 100644 --- a/tests/sentry/seer/assisted_query/test_issues_tools.py +++ b/tests/sentry/seer/assisted_query/test_issues_tools.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime import pytest diff --git a/tests/sentry/seer/autofix/test_autofix.py b/tests/sentry/seer/autofix/test_autofix.py index 41494c7fe8e082..be41fcad46fb72 100644 --- a/tests/sentry/seer/autofix/test_autofix.py +++ b/tests/sentry/seer/autofix/test_autofix.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from unittest.mock import Mock, patch diff --git a/tests/sentry/seer/autofix/test_autofix_utils.py b/tests/sentry/seer/autofix/test_autofix_utils.py index 598302b3d38662..628938042e87b8 100644 --- a/tests/sentry/seer/autofix/test_autofix_utils.py +++ b/tests/sentry/seer/autofix/test_autofix_utils.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock, patch import orjson diff --git a/tests/sentry/seer/autofix/test_issue_summary.py b/tests/sentry/seer/autofix/test_issue_summary.py index f2e48cefabe558..0fc1a2e89d0df9 100644 --- a/tests/sentry/seer/autofix/test_issue_summary.py +++ b/tests/sentry/seer/autofix/test_issue_summary.py @@ -1,3 +1,4 @@ +from typing import int import datetime import threading import time diff --git a/tests/sentry/seer/endpoints/test_group_ai_autofix.py b/tests/sentry/seer/endpoints/test_group_ai_autofix.py index d0181f9cdae49d..bb0409c0d95929 100644 --- a/tests/sentry/seer/endpoints/test_group_ai_autofix.py +++ b/tests/sentry/seer/endpoints/test_group_ai_autofix.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from unittest.mock import Mock, patch diff --git a/tests/sentry/seer/endpoints/test_group_ai_summary.py b/tests/sentry/seer/endpoints/test_group_ai_summary.py index d79ec13030bf6a..fec297ec55531b 100644 --- a/tests/sentry/seer/endpoints/test_group_ai_summary.py +++ b/tests/sentry/seer/endpoints/test_group_ai_summary.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import ANY, MagicMock, patch from sentry.seer.autofix.constants import SeerAutomationSource diff --git a/tests/sentry/seer/endpoints/test_group_autofix_setup_check.py b/tests/sentry/seer/endpoints/test_group_autofix_setup_check.py index 548a67a2a01474..c14015237e6cc3 100644 --- a/tests/sentry/seer/endpoints/test_group_autofix_setup_check.py +++ b/tests/sentry/seer/endpoints/test_group_autofix_setup_check.py @@ -1,3 +1,4 @@ +from typing import int import calendar from unittest.mock import MagicMock, patch diff --git a/tests/sentry/seer/endpoints/test_group_autofix_update.py b/tests/sentry/seer/endpoints/test_group_autofix_update.py index e842d3db922be9..3475dcb0315712 100644 --- a/tests/sentry/seer/endpoints/test_group_autofix_update.py +++ b/tests/sentry/seer/endpoints/test_group_autofix_update.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from unittest.mock import MagicMock, patch diff --git a/tests/sentry/seer/endpoints/test_organization_events_anomalies.py b/tests/sentry/seer/endpoints/test_organization_events_anomalies.py index 902b7e7c1127ef..a641942e7b642b 100644 --- a/tests/sentry/seer/endpoints/test_organization_events_anomalies.py +++ b/tests/sentry/seer/endpoints/test_organization_events_anomalies.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/seer/endpoints/test_organization_seer_explorer_chat.py b/tests/sentry/seer/endpoints/test_organization_seer_explorer_chat.py index e2bea4d9aceae2..efa24cf60420d3 100644 --- a/tests/sentry/seer/endpoints/test_organization_seer_explorer_chat.py +++ b/tests/sentry/seer/endpoints/test_organization_seer_explorer_chat.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import ANY, MagicMock, patch from sentry.models.organizationmember import OrganizationMember diff --git a/tests/sentry/seer/endpoints/test_organization_seer_explorer_runs.py b/tests/sentry/seer/endpoints/test_organization_seer_explorer_runs.py index 40bd02175b818f..7c613c376de499 100644 --- a/tests/sentry/seer/endpoints/test_organization_seer_explorer_runs.py +++ b/tests/sentry/seer/endpoints/test_organization_seer_explorer_runs.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from unittest.mock import ANY, MagicMock, patch diff --git a/tests/sentry/seer/endpoints/test_organization_seer_explorer_update.py b/tests/sentry/seer/endpoints/test_organization_seer_explorer_update.py index 84d367c4834d01..3c8fcfb51d9769 100644 --- a/tests/sentry/seer/endpoints/test_organization_seer_explorer_update.py +++ b/tests/sentry/seer/endpoints/test_organization_seer_explorer_update.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/seer/endpoints/test_organization_seer_setup_check.py b/tests/sentry/seer/endpoints/test_organization_seer_setup_check.py index b6004239ef7db3..37d1771da8788c 100644 --- a/tests/sentry/seer/endpoints/test_organization_seer_setup_check.py +++ b/tests/sentry/seer/endpoints/test_organization_seer_setup_check.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import calendar from unittest.mock import MagicMock, patch diff --git a/tests/sentry/seer/endpoints/test_organization_trace_summary.py b/tests/sentry/seer/endpoints/test_organization_trace_summary.py index 5c4f1c2529cad6..997c6f7e028e1f 100644 --- a/tests/sentry/seer/endpoints/test_organization_trace_summary.py +++ b/tests/sentry/seer/endpoints/test_organization_trace_summary.py @@ -1,3 +1,4 @@ +from typing import int import datetime from unittest.mock import ANY, MagicMock, patch diff --git a/tests/sentry/seer/endpoints/test_project_seer_preferences.py b/tests/sentry/seer/endpoints/test_project_seer_preferences.py index 3e29f624fe9813..f80ddf12d81dea 100644 --- a/tests/sentry/seer/endpoints/test_project_seer_preferences.py +++ b/tests/sentry/seer/endpoints/test_project_seer_preferences.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch import orjson diff --git a/tests/sentry/seer/endpoints/test_seer_rpc.py b/tests/sentry/seer/endpoints/test_seer_rpc.py index 6ae64ee3f072ea..c55abb81634c16 100644 --- a/tests/sentry/seer/endpoints/test_seer_rpc.py +++ b/tests/sentry/seer/endpoints/test_seer_rpc.py @@ -1,6 +1,6 @@ import logging from datetime import datetime, timezone -from typing import Any +from typing import int, Any from unittest.mock import patch import orjson diff --git a/tests/sentry/seer/endpoints/test_trace_explorer_ai_translate_agentic.py b/tests/sentry/seer/endpoints/test_trace_explorer_ai_translate_agentic.py index c6070eadc7f13e..8390130af335cc 100644 --- a/tests/sentry/seer/endpoints/test_trace_explorer_ai_translate_agentic.py +++ b/tests/sentry/seer/endpoints/test_trace_explorer_ai_translate_agentic.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from rest_framework import status diff --git a/tests/sentry/seer/explorer/test_custom_tool_utils.py b/tests/sentry/seer/explorer/test_custom_tool_utils.py index fc1b9f717974ee..b72fc6765a797b 100644 --- a/tests/sentry/seer/explorer/test_custom_tool_utils.py +++ b/tests/sentry/seer/explorer/test_custom_tool_utils.py @@ -1,3 +1,4 @@ +from typing import int """ Tests for custom tool utilities. """ diff --git a/tests/sentry/seer/explorer/test_explorer_client.py b/tests/sentry/seer/explorer/test_explorer_client.py index 0e0f25c39f1257..cb4639d62e5f6d 100644 --- a/tests/sentry/seer/explorer/test_explorer_client.py +++ b/tests/sentry/seer/explorer/test_explorer_client.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/seer/explorer/test_explorer_utils.py b/tests/sentry/seer/explorer/test_explorer_utils.py index 9042f55760add7..82508f0848be62 100644 --- a/tests/sentry/seer/explorer/test_explorer_utils.py +++ b/tests/sentry/seer/explorer/test_explorer_utils.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.seer.explorer.utils import convert_profile_to_execution_tree, normalize_description diff --git a/tests/sentry/seer/explorer/test_index_data.py b/tests/sentry/seer/explorer/test_index_data.py index 4363d82f267189..bc4543bd9414a0 100644 --- a/tests/sentry/seer/explorer/test_index_data.py +++ b/tests/sentry/seer/explorer/test_index_data.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import timedelta from unittest import mock diff --git a/tests/sentry/seer/explorer/test_tools.py b/tests/sentry/seer/explorer/test_tools.py index 54a171393674a2..5183d135fcf667 100644 --- a/tests/sentry/seer/explorer/test_tools.py +++ b/tests/sentry/seer/explorer/test_tools.py @@ -1,6 +1,6 @@ import uuid from datetime import UTC, datetime, timedelta -from typing import Literal +from typing import int, Literal from unittest.mock import patch import pytest diff --git a/tests/sentry/seer/fetch_issues/test_by_error_type.py b/tests/sentry/seer/fetch_issues/test_by_error_type.py index 185dabda4e4666..e83088da3ee286 100644 --- a/tests/sentry/seer/fetch_issues/test_by_error_type.py +++ b/tests/sentry/seer/fetch_issues/test_by_error_type.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.group import Group from sentry.seer.fetch_issues import utils from sentry.seer.fetch_issues.by_error_type import _fetch_issues_from_repo_projects, fetch_issues diff --git a/tests/sentry/seer/fetch_issues/test_by_function_name.py b/tests/sentry/seer/fetch_issues/test_by_function_name.py index d4130470f1621f..0474c7ad1acae2 100644 --- a/tests/sentry/seer/fetch_issues/test_by_function_name.py +++ b/tests/sentry/seer/fetch_issues/test_by_function_name.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from unittest.mock import patch diff --git a/tests/sentry/seer/fetch_issues/test_by_text_query.py b/tests/sentry/seer/fetch_issues/test_by_text_query.py index dafd27d73c93e7..82efed32f20c7c 100644 --- a/tests/sentry/seer/fetch_issues/test_by_text_query.py +++ b/tests/sentry/seer/fetch_issues/test_by_text_query.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.github.integration import GitHubIntegrationProvider from sentry.models.group import Group from sentry.models.repository import Repository diff --git a/tests/sentry/seer/fetch_issues/test_utils.py b/tests/sentry/seer/fetch_issues/test_utils.py index 738b806736a80d..b675ce4b0fa08f 100644 --- a/tests/sentry/seer/fetch_issues/test_utils.py +++ b/tests/sentry/seer/fetch_issues/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import pytest diff --git a/tests/sentry/seer/similarity/__init__.py b/tests/sentry/seer/similarity/__init__.py index 1b89bfecd29e1b..3e487375bbad37 100644 --- a/tests/sentry/seer/similarity/__init__.py +++ b/tests/sentry/seer/similarity/__init__.py @@ -1,3 +1,4 @@ +from typing import int # This file is necessary because we have multiple test files named `test_utils.py`, which confuses # pytest unless the folders those files are in are turned into "explicit" namespaces using # `__init__.py` files. Without that, pytest will ignore everything but the test file's basename when diff --git a/tests/sentry/seer/similarity/test_config.py b/tests/sentry/seer/similarity/test_config.py index 6fbf04a5c1b19d..5546cbe84f8f50 100644 --- a/tests/sentry/seer/similarity/test_config.py +++ b/tests/sentry/seer/similarity/test_config.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from sentry.seer.similarity.config import ( diff --git a/tests/sentry/seer/similarity/test_grouping_records.py b/tests/sentry/seer/similarity/test_grouping_records.py index 229b880a75e6a3..0b11692cda3b6d 100644 --- a/tests/sentry/seer/similarity/test_grouping_records.py +++ b/tests/sentry/seer/similarity/test_grouping_records.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from unittest.mock import MagicMock diff --git a/tests/sentry/seer/similarity/test_similar_issues.py b/tests/sentry/seer/similarity/test_similar_issues.py index 824b2f5230b439..09c314083e5ab7 100644 --- a/tests/sentry/seer/similarity/test_similar_issues.py +++ b/tests/sentry/seer/similarity/test_similar_issues.py @@ -1,5 +1,5 @@ from datetime import timedelta -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import ANY, MagicMock diff --git a/tests/sentry/seer/similarity/test_types.py b/tests/sentry/seer/similarity/test_types.py index d0b8d78591b4e5..f6474afaa811e4 100644 --- a/tests/sentry/seer/similarity/test_types.py +++ b/tests/sentry/seer/similarity/test_types.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/seer/similarity/test_utils.py b/tests/sentry/seer/similarity/test_utils.py index 2eea035cfbc83d..a84bfe76e46b5e 100644 --- a/tests/sentry/seer/similarity/test_utils.py +++ b/tests/sentry/seer/similarity/test_utils.py @@ -1,6 +1,6 @@ import copy from collections.abc import Callable -from typing import Any, Literal, cast +from typing import Any, Literal, cast, int from unittest.mock import MagicMock, Mock, patch from sentry.grouping.api import get_contributing_variant_and_component diff --git a/tests/sentry/seer/test_breakpoints.py b/tests/sentry/seer/test_breakpoints.py index 5ef998e86e1258..cae68c9caa5fbe 100644 --- a/tests/sentry/seer/test_breakpoints.py +++ b/tests/sentry/seer/test_breakpoints.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/seer/test_math.py b/tests/sentry/seer/test_math.py index dab69a62c2f98a..1a63f3bb6476a1 100644 --- a/tests/sentry/seer/test_math.py +++ b/tests/sentry/seer/test_math.py @@ -1,3 +1,4 @@ +from typing import int import math from sentry.seer.math import ( diff --git a/tests/sentry/seer/test_signed_seer_api.py b/tests/sentry/seer/test_signed_seer_api.py index 27fda273931d0b..884a2c11842222 100644 --- a/tests/sentry/seer/test_signed_seer_api.py +++ b/tests/sentry/seer/test_signed_seer_api.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch import pytest diff --git a/tests/sentry/seer/test_test_generation.py b/tests/sentry/seer/test_test_generation.py index 30212ca353cdb0..cffae63311c6b2 100644 --- a/tests/sentry/seer/test_test_generation.py +++ b/tests/sentry/seer/test_test_generation.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch import requests diff --git a/tests/sentry/seer/test_trace_summary.py b/tests/sentry/seer/test_trace_summary.py index dc42da0c17d8e8..cd039faff67268 100644 --- a/tests/sentry/seer/test_trace_summary.py +++ b/tests/sentry/seer/test_trace_summary.py @@ -1,3 +1,4 @@ +from typing import int import datetime from unittest.mock import MagicMock, patch diff --git a/tests/sentry/seer/workflows/test_compare.py b/tests/sentry/seer/workflows/test_compare.py index 78580542dac6ae..e29a13bb9ad656 100644 --- a/tests/sentry/seer/workflows/test_compare.py +++ b/tests/sentry/seer/workflows/test_compare.py @@ -1,3 +1,4 @@ +from typing import int import math from sentry.seer.workflows.compare import ( diff --git a/tests/sentry/sentry_apps/api/bases/test_sentryapps.py b/tests/sentry/sentry_apps/api/bases/test_sentryapps.py index 9ede3727f5e462..b8abcc14fc2255 100644 --- a/tests/sentry/sentry_apps/api/bases/test_sentryapps.py +++ b/tests/sentry/sentry_apps/api/bases/test_sentryapps.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.contrib.auth.models import AnonymousUser from django.test.utils import override_settings diff --git a/tests/sentry/sentry_apps/api/endpoints/test_group_external_issue_details.py b/tests/sentry/sentry_apps/api/endpoints/test_group_external_issue_details.py index 36ee3589f8c70e..fa0e615ab67b13 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_group_external_issue_details.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_group_external_issue_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.models.platformexternalissue import PlatformExternalIssue from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/sentry_apps/api/endpoints/test_installation_service_hook_projects.py b/tests/sentry/sentry_apps/api/endpoints/test_installation_service_hook_projects.py index 8f6b405ce9f515..0b09b32d361263 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_installation_service_hook_projects.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_installation_service_hook_projects.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.sentry_apps.models.servicehook import ServiceHook, ServiceHookProject diff --git a/tests/sentry/sentry_apps/api/endpoints/test_organization_sentry_app_installation_details.py b/tests/sentry/sentry_apps/api/endpoints/test_organization_sentry_app_installation_details.py index e9dee153af5eae..8268ae9e62e598 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_organization_sentry_app_installation_details.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_organization_sentry_app_installation_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import responses diff --git a/tests/sentry/sentry_apps/api/endpoints/test_organization_sentry_app_installations.py b/tests/sentry/sentry_apps/api/endpoints/test_organization_sentry_app_installations.py index bb9d627282da55..eba53db57865c8 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_organization_sentry_app_installations.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_organization_sentry_app_installations.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from django.test import override_settings diff --git a/tests/sentry/sentry_apps/api/endpoints/test_organization_sentry_apps.py b/tests/sentry/sentry_apps/api/endpoints/test_organization_sentry_apps.py index b5cf28d0eb3ab1..6d994b464c6e34 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_organization_sentry_apps.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_organization_sentry_apps.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import orjson from django.urls import reverse diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_authorizations.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_authorizations.py index 1ddcea4bc7f077..c758815bc381ab 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_authorizations.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_authorizations.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from uuid import uuid4 diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_avatar.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_avatar.py index a431c85db82a06..84835360854593 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_avatar.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_avatar.py @@ -1,3 +1,4 @@ +from typing import int from base64 import b64encode from rest_framework.response import Response diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_components.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_components.py index 843212bad32170..edfb830f19ae73 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_components.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_components.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from unittest.mock import MagicMock, patch diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_details.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_details.py index 4b034819926f2e..226c546f39851f 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_details.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_features.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_features.py index c7b3cdac63b123..b33cedb95f4d34 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_features.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_features.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.integrations.models.integration_feature import ( diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_issue_actions.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_issue_actions.py index 3b8560ec40e3f5..aa7c64d8942964 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_issue_actions.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_issue_actions.py @@ -1,3 +1,4 @@ +from typing import int import responses from django.urls import reverse diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_issue_details.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_issue_details.py index 73eecb66f7af43..a3aa722388c72e 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_issue_details.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_issue_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.models.platformexternalissue import PlatformExternalIssue from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_issues.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_issues.py index 4d9b29263e8142..cd25052efa7c52 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_issues.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_issues.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.urls import reverse diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_requests.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_requests.py index fb800c68b5f12a..968e4e3b6777fc 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_requests.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_requests.py @@ -1,3 +1,4 @@ +from typing import int import orjson import responses from django.urls import reverse diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_interaction.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_interaction.py index deabe59172d972..795672b5fdbd8d 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_interaction.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_interaction.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework import status from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_publish_request.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_publish_request.py index 98b141d459bb36..f993fc015691e4 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_publish_request.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_publish_request.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.urls import reverse diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_requests.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_requests.py index 5fa6920659cad4..18b8ddbb0e9fc6 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_requests.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_requests.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from django.urls import reverse diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_rotate_secret.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_rotate_secret.py index 6964cceb3534dd..f00beccf1ad8c2 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_rotate_secret.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_rotate_secret.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.models.apiapplication import ApiApplication diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_stats.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_stats.py index e5b90f43e89348..200257a9f001a2 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_stats.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_stats.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_webhook_requests.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_webhook_requests.py index 03c77ae74616d1..e12a2104bfab36 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_webhook_requests.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_app_webhook_requests.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from unittest.mock import Mock diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_apps.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_apps.py index c75790652b8f99..986a0798eac279 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_apps.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_apps.py @@ -2,7 +2,7 @@ import re from collections.abc import Mapping -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch import orjson diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_apps_stats.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_apps_stats.py index 06882cb8e4dfa8..78307b562165eb 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_apps_stats.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_apps_stats.py @@ -1,3 +1,4 @@ +from typing import int import orjson from rest_framework.response import Response diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_internal_app_token_details.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_internal_app_token_details.py index e84667f04815aa..090a5319c2e619 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_internal_app_token_details.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_internal_app_token_details.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from rest_framework import status diff --git a/tests/sentry/sentry_apps/api/endpoints/test_sentry_internal_app_tokens.py b/tests/sentry/sentry_apps/api/endpoints/test_sentry_internal_app_tokens.py index b8f139c54342e5..91ee09d06a36ea 100644 --- a/tests/sentry/sentry_apps/api/endpoints/test_sentry_internal_app_tokens.py +++ b/tests/sentry/sentry_apps/api/endpoints/test_sentry_internal_app_tokens.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from rest_framework import status diff --git a/tests/sentry/sentry_apps/api/parsers/test_alert_rule_action.py b/tests/sentry/sentry_apps/api/parsers/test_alert_rule_action.py index 5cbc102b34d9da..d2d361fdc9f064 100644 --- a/tests/sentry/sentry_apps/api/parsers/test_alert_rule_action.py +++ b/tests/sentry/sentry_apps/api/parsers/test_alert_rule_action.py @@ -1,7 +1,7 @@ from __future__ import annotations import unittest -from typing import Any +from typing import int, Any from fixtures.schema_validation import invalid_schema from sentry.sentry_apps.api.parsers.schema import validate_component diff --git a/tests/sentry/sentry_apps/api/parsers/test_header.py b/tests/sentry/sentry_apps/api/parsers/test_header.py index 960ecc4b912ee5..bf8303bec5cadc 100644 --- a/tests/sentry/sentry_apps/api/parsers/test_header.py +++ b/tests/sentry/sentry_apps/api/parsers/test_header.py @@ -1,7 +1,7 @@ from __future__ import annotations import unittest -from typing import Any +from typing import int, Any from fixtures.schema_validation import invalid_schema from sentry.sentry_apps.api.parsers.schema import validate_component diff --git a/tests/sentry/sentry_apps/api/parsers/test_image.py b/tests/sentry/sentry_apps/api/parsers/test_image.py index 3d6f7ba3f81c22..439c3877f047c6 100644 --- a/tests/sentry/sentry_apps/api/parsers/test_image.py +++ b/tests/sentry/sentry_apps/api/parsers/test_image.py @@ -1,7 +1,7 @@ from __future__ import annotations import unittest -from typing import Any +from typing import int, Any from fixtures.schema_validation import invalid_schema from sentry.sentry_apps.api.parsers.schema import validate_component diff --git a/tests/sentry/sentry_apps/api/parsers/test_issue_link.py b/tests/sentry/sentry_apps/api/parsers/test_issue_link.py index 14d127bac920d0..09336ae8e2b908 100644 --- a/tests/sentry/sentry_apps/api/parsers/test_issue_link.py +++ b/tests/sentry/sentry_apps/api/parsers/test_issue_link.py @@ -1,7 +1,7 @@ from __future__ import annotations import unittest -from typing import Any +from typing import int, Any from fixtures.schema_validation import invalid_schema from sentry.sentry_apps.api.parsers.schema import validate_component diff --git a/tests/sentry/sentry_apps/api/parsers/test_issue_media.py b/tests/sentry/sentry_apps/api/parsers/test_issue_media.py index f324ab24afeb9d..1ed9e5bbbe251c 100644 --- a/tests/sentry/sentry_apps/api/parsers/test_issue_media.py +++ b/tests/sentry/sentry_apps/api/parsers/test_issue_media.py @@ -1,7 +1,7 @@ from __future__ import annotations import unittest -from typing import Any +from typing import int, Any from fixtures.schema_validation import invalid_schema from sentry.sentry_apps.api.parsers.schema import validate_component diff --git a/tests/sentry/sentry_apps/api/parsers/test_markdown.py b/tests/sentry/sentry_apps/api/parsers/test_markdown.py index 24af3aa52ac556..58cef5230fb06e 100644 --- a/tests/sentry/sentry_apps/api/parsers/test_markdown.py +++ b/tests/sentry/sentry_apps/api/parsers/test_markdown.py @@ -1,7 +1,7 @@ from __future__ import annotations import unittest -from typing import Any +from typing import int, Any from fixtures.schema_validation import invalid_schema from sentry.sentry_apps.api.parsers.schema import validate_component diff --git a/tests/sentry/sentry_apps/api/parsers/test_schema.py b/tests/sentry/sentry_apps/api/parsers/test_schema.py index 704be5978fad77..d7890910764180 100644 --- a/tests/sentry/sentry_apps/api/parsers/test_schema.py +++ b/tests/sentry/sentry_apps/api/parsers/test_schema.py @@ -1,3 +1,4 @@ +from typing import int import unittest from fixtures.schema_validation import invalid_schema_with_error_message diff --git a/tests/sentry/sentry_apps/api/parsers/test_select.py b/tests/sentry/sentry_apps/api/parsers/test_select.py index 54cf4b2a0ba9bd..857c5438f2b9ed 100644 --- a/tests/sentry/sentry_apps/api/parsers/test_select.py +++ b/tests/sentry/sentry_apps/api/parsers/test_select.py @@ -1,7 +1,7 @@ from __future__ import annotations import unittest -from typing import Any +from typing import int, Any from fixtures.schema_validation import invalid_schema from sentry.sentry_apps.api.parsers.schema import validate_component diff --git a/tests/sentry/sentry_apps/api/parsers/test_stacktrace_link.py b/tests/sentry/sentry_apps/api/parsers/test_stacktrace_link.py index 0edcf91ab9294f..903bf99c13019f 100644 --- a/tests/sentry/sentry_apps/api/parsers/test_stacktrace_link.py +++ b/tests/sentry/sentry_apps/api/parsers/test_stacktrace_link.py @@ -1,3 +1,4 @@ +from typing import int import unittest from fixtures.schema_validation import invalid_schema diff --git a/tests/sentry/sentry_apps/api/parsers/test_text.py b/tests/sentry/sentry_apps/api/parsers/test_text.py index 95cd6ac7e6993a..1f15e81ed66663 100644 --- a/tests/sentry/sentry_apps/api/parsers/test_text.py +++ b/tests/sentry/sentry_apps/api/parsers/test_text.py @@ -1,7 +1,7 @@ from __future__ import annotations import unittest -from typing import Any +from typing import int, Any from fixtures.schema_validation import invalid_schema from sentry.sentry_apps.api.parsers.schema import validate_component diff --git a/tests/sentry/sentry_apps/api/parsers/test_textarea.py b/tests/sentry/sentry_apps/api/parsers/test_textarea.py index ebd13f1ffdfbef..ff385d47637b93 100644 --- a/tests/sentry/sentry_apps/api/parsers/test_textarea.py +++ b/tests/sentry/sentry_apps/api/parsers/test_textarea.py @@ -1,7 +1,7 @@ from __future__ import annotations import unittest -from typing import Any +from typing import int, Any from fixtures.schema_validation import invalid_schema from sentry.sentry_apps.api.parsers.schema import validate_component diff --git a/tests/sentry/sentry_apps/api/parsers/test_video.py b/tests/sentry/sentry_apps/api/parsers/test_video.py index 29b994b9b4ac6c..56b5b5d19caac6 100644 --- a/tests/sentry/sentry_apps/api/parsers/test_video.py +++ b/tests/sentry/sentry_apps/api/parsers/test_video.py @@ -1,3 +1,4 @@ +from typing import int import unittest from fixtures.schema_validation import invalid_schema diff --git a/tests/sentry/sentry_apps/api/serializers/test_app_platform_event.py b/tests/sentry/sentry_apps/api/serializers/test_app_platform_event.py index 0d777077b33c8a..5fb23df7157272 100644 --- a/tests/sentry/sentry_apps/api/serializers/test_app_platform_event.py +++ b/tests/sentry/sentry_apps/api/serializers/test_app_platform_event.py @@ -1,5 +1,5 @@ import datetime -from typing import Any +from typing import int, Any import orjson diff --git a/tests/sentry/sentry_apps/api/serializers/test_sentry_app.py b/tests/sentry/sentry_apps/api/serializers/test_sentry_app.py index 3027faea6d2291..47daa3e701fcc8 100644 --- a/tests/sentry/sentry_apps/api/serializers/test_sentry_app.py +++ b/tests/sentry/sentry_apps/api/serializers/test_sentry_app.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from sentry.api.serializers import serialize diff --git a/tests/sentry/sentry_apps/api/serializers/test_sentry_app_avatar.py b/tests/sentry/sentry_apps/api/serializers/test_sentry_app_avatar.py index cf54e275953370..594fb68155c550 100644 --- a/tests/sentry/sentry_apps/api/serializers/test_sentry_app_avatar.py +++ b/tests/sentry/sentry_apps/api/serializers/test_sentry_app_avatar.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.sentry_apps.api.serializers.sentry_app_avatar import SentryAppAvatarSerializer from sentry.sentry_apps.services.app.serial import serialize_sentry_app_avatar diff --git a/tests/sentry/sentry_apps/external_issues/test_external_issue_creator.py b/tests/sentry/sentry_apps/external_issues/test_external_issue_creator.py index 86067b8a15c156..44caa65cc3a6dc 100644 --- a/tests/sentry/sentry_apps/external_issues/test_external_issue_creator.py +++ b/tests/sentry/sentry_apps/external_issues/test_external_issue_creator.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.external_issues.external_issue_creator import ExternalIssueCreator from sentry.sentry_apps.models.platformexternalissue import PlatformExternalIssue from sentry.sentry_apps.services.app import app_service diff --git a/tests/sentry/sentry_apps/external_issues/test_issue_link_creator.py b/tests/sentry/sentry_apps/external_issues/test_issue_link_creator.py index 21c8ab070128b4..f54c9daabc01c3 100644 --- a/tests/sentry/sentry_apps/external_issues/test_issue_link_creator.py +++ b/tests/sentry/sentry_apps/external_issues/test_issue_link_creator.py @@ -1,3 +1,4 @@ +from typing import int import pytest import responses diff --git a/tests/sentry/sentry_apps/external_requests/test_alert_rule_action_requester.py b/tests/sentry/sentry_apps/external_requests/test_alert_rule_action_requester.py index 3f42c42f9aeb62..96dbdd605c5b4c 100644 --- a/tests/sentry/sentry_apps/external_requests/test_alert_rule_action_requester.py +++ b/tests/sentry/sentry_apps/external_requests/test_alert_rule_action_requester.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping from unittest.mock import MagicMock, patch diff --git a/tests/sentry/sentry_apps/external_requests/test_issue_link_requester.py b/tests/sentry/sentry_apps/external_requests/test_issue_link_requester.py index bd05505704eb04..40fffb116d0ce5 100644 --- a/tests/sentry/sentry_apps/external_requests/test_issue_link_requester.py +++ b/tests/sentry/sentry_apps/external_requests/test_issue_link_requester.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/sentry_apps/external_requests/test_select_requester.py b/tests/sentry/sentry_apps/external_requests/test_select_requester.py index 60bd949840a060..b638268ea8af17 100644 --- a/tests/sentry/sentry_apps/external_requests/test_select_requester.py +++ b/tests/sentry/sentry_apps/external_requests/test_select_requester.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/sentry_apps/models/test_sentryapp.py b/tests/sentry/sentry_apps/models/test_sentryapp.py index d2a80a63275151..38c7f8ac3b4708 100644 --- a/tests/sentry/sentry_apps/models/test_sentryapp.py +++ b/tests/sentry/sentry_apps/models/test_sentryapp.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import SentryAppStatus from sentry.hybridcloud.models.outbox import ControlOutbox from sentry.hybridcloud.outbox.category import OutboxCategory diff --git a/tests/sentry/sentry_apps/models/test_sentryappinstallation.py b/tests/sentry/sentry_apps/models/test_sentryappinstallation.py index a963efac7e5961..6073fe6ec48466 100644 --- a/tests/sentry/sentry_apps/models/test_sentryappinstallation.py +++ b/tests/sentry/sentry_apps/models/test_sentryappinstallation.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import sentry.hybridcloud.rpc.caching as caching_module diff --git a/tests/sentry/sentry_apps/models/test_sentryappinstallationtoken.py b/tests/sentry/sentry_apps/models/test_sentryappinstallationtoken.py index 811e46edabb5b1..e974c5dd1bf0dc 100644 --- a/tests/sentry/sentry_apps/models/test_sentryappinstallationtoken.py +++ b/tests/sentry/sentry_apps/models/test_sentryappinstallationtoken.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.apiapplication import ApiApplication from sentry.models.apitoken import ApiToken from sentry.sentry_apps.models.sentry_app_installation import SentryAppInstallation diff --git a/tests/sentry/sentry_apps/services/test_app.py b/tests/sentry/sentry_apps/services/test_app.py index a9c295d72cbcf6..d84061802e9d2b 100644 --- a/tests/sentry/sentry_apps/services/test_app.py +++ b/tests/sentry/sentry_apps/services/test_app.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import SentryAppInstallationStatus from sentry.sentry_apps.models.sentry_app_installation import SentryAppInstallation from sentry.sentry_apps.services.app import app_service diff --git a/tests/sentry/sentry_apps/services/test_app_request.py b/tests/sentry/sentry_apps/services/test_app_request.py index 9c78f717be85eb..057a9987317bae 100644 --- a/tests/sentry/sentry_apps/services/test_app_request.py +++ b/tests/sentry/sentry_apps/services/test_app_request.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock from requests.models import Response diff --git a/tests/sentry/sentry_apps/services/test_hook_service.py b/tests/sentry/sentry_apps/services/test_hook_service.py index a7f66862fc2b8d..cebfabbe87cac2 100644 --- a/tests/sentry/sentry_apps/services/test_hook_service.py +++ b/tests/sentry/sentry_apps/services/test_hook_service.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.logic import consolidate_events, expand_events from sentry.sentry_apps.models.servicehook import ServiceHook from sentry.sentry_apps.services.hook import RpcServiceHook, hook_service diff --git a/tests/sentry/sentry_apps/services/test_model.py b/tests/sentry/sentry_apps/services/test_model.py index 3f53e50c5d3d32..7138ec844aecce 100644 --- a/tests/sentry/sentry_apps/services/test_model.py +++ b/tests/sentry/sentry_apps/services/test_model.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.services.app.serial import ( serialize_sentry_app_avatar, serialize_sentry_app_installation, diff --git a/tests/sentry/sentry_apps/tasks/test_sentry_apps.py b/tests/sentry/sentry_apps/tasks/test_sentry_apps.py index 08ea22c354767a..8c684ceb9cf59c 100644 --- a/tests/sentry/sentry_apps/tasks/test_sentry_apps.py +++ b/tests/sentry/sentry_apps/tasks/test_sentry_apps.py @@ -1,3 +1,4 @@ +from typing import int from collections import namedtuple from unittest.mock import ANY, MagicMock, patch diff --git a/tests/sentry/sentry_apps/tasks/test_servicehooks.py b/tests/sentry/sentry_apps/tasks/test_servicehooks.py index 1d2feda009ae62..208a898d84a632 100644 --- a/tests/sentry/sentry_apps/tasks/test_servicehooks.py +++ b/tests/sentry/sentry_apps/tasks/test_servicehooks.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import responses diff --git a/tests/sentry/sentry_apps/test_sentry_app_component_preparer.py b/tests/sentry/sentry_apps/test_sentry_app_component_preparer.py index 65dc2742061cf5..d04374e7d54439 100644 --- a/tests/sentry/sentry_apps/test_sentry_app_component_preparer.py +++ b/tests/sentry/sentry_apps/test_sentry_app_component_preparer.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping import responses diff --git a/tests/sentry/sentry_apps/test_sentry_app_creator.py b/tests/sentry/sentry_apps/test_sentry_app_creator.py index 91ec0b0ec0bf49..e1733802810dee 100644 --- a/tests/sentry/sentry_apps/test_sentry_app_creator.py +++ b/tests/sentry/sentry_apps/test_sentry_app_creator.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.db import IntegrityError diff --git a/tests/sentry/sentry_apps/test_sentry_app_installation_creator.py b/tests/sentry/sentry_apps/test_sentry_app_installation_creator.py index 67a4374ea91195..b784950aae38ed 100644 --- a/tests/sentry/sentry_apps/test_sentry_app_installation_creator.py +++ b/tests/sentry/sentry_apps/test_sentry_app_installation_creator.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import responses diff --git a/tests/sentry/sentry_apps/test_sentry_app_installation_notifier.py b/tests/sentry/sentry_apps/test_sentry_app_installation_notifier.py index 0d45a59c9af839..c1b8cbd87d1c0a 100644 --- a/tests/sentry/sentry_apps/test_sentry_app_installation_notifier.py +++ b/tests/sentry/sentry_apps/test_sentry_app_installation_notifier.py @@ -1,3 +1,4 @@ +from typing import int from collections import namedtuple from unittest.mock import MagicMock, patch diff --git a/tests/sentry/sentry_apps/test_sentry_app_installation_token_creator.py b/tests/sentry/sentry_apps/test_sentry_app_installation_token_creator.py index 83b8b268758cc8..07b6c93d3137b1 100644 --- a/tests/sentry/sentry_apps/test_sentry_app_installation_token_creator.py +++ b/tests/sentry/sentry_apps/test_sentry_app_installation_token_creator.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime from unittest.mock import MagicMock, patch diff --git a/tests/sentry/sentry_apps/test_sentry_app_updater.py b/tests/sentry/sentry_apps/test_sentry_app_updater.py index 1e97058b270fd6..a545ff35e981af 100644 --- a/tests/sentry/sentry_apps/test_sentry_app_updater.py +++ b/tests/sentry/sentry_apps/test_sentry_app_updater.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/sentry_apps/test_webhooks.py b/tests/sentry/sentry_apps/test_webhooks.py index ffe260d6c415e4..390a2c99ddeb1f 100644 --- a/tests/sentry/sentry_apps/test_webhooks.py +++ b/tests/sentry/sentry_apps/test_webhooks.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import Mock, patch import pytest diff --git a/tests/sentry/sentry_apps/token_exchange/test_grant_exchanger.py b/tests/sentry/sentry_apps/token_exchange/test_grant_exchanger.py index 6f357a529d0e6a..948bcd3917c6f3 100644 --- a/tests/sentry/sentry_apps/token_exchange/test_grant_exchanger.py +++ b/tests/sentry/sentry_apps/token_exchange/test_grant_exchanger.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from unittest.mock import MagicMock, PropertyMock, patch diff --git a/tests/sentry/sentry_apps/token_exchange/test_manual_refresher.py b/tests/sentry/sentry_apps/token_exchange/test_manual_refresher.py index 34656784507ca2..161c0f1b5b107e 100644 --- a/tests/sentry/sentry_apps/token_exchange/test_manual_refresher.py +++ b/tests/sentry/sentry_apps/token_exchange/test_manual_refresher.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, PropertyMock, patch import pytest diff --git a/tests/sentry/sentry_apps/token_exchange/test_refresher.py b/tests/sentry/sentry_apps/token_exchange/test_refresher.py index a9fab12f18a9a2..4675125e0196c2 100644 --- a/tests/sentry/sentry_apps/token_exchange/test_refresher.py +++ b/tests/sentry/sentry_apps/token_exchange/test_refresher.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, PropertyMock, patch import pytest diff --git a/tests/sentry/sentry_apps/token_exchange/test_validator.py b/tests/sentry/sentry_apps/token_exchange/test_validator.py index 81e904bb32dbca..07b7587f686a8a 100644 --- a/tests/sentry/sentry_apps/token_exchange/test_validator.py +++ b/tests/sentry/sentry_apps/token_exchange/test_validator.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, PropertyMock, patch import pytest diff --git a/tests/sentry/sentry_apps/utils/test_errors.py b/tests/sentry/sentry_apps/utils/test_errors.py index b8194c4c985ca3..bdc96e77693904 100644 --- a/tests/sentry/sentry_apps/utils/test_errors.py +++ b/tests/sentry/sentry_apps/utils/test_errors.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_apps.utils.errors import SentryAppError, SentryAppIntegratorError from sentry.testutils.cases import TestCase diff --git a/tests/sentry/sentry_apps/web/test_sentryapp_avatar.py b/tests/sentry/sentry_apps/web/test_sentryapp_avatar.py index 8482d0847b109b..fa3ead65111bd1 100644 --- a/tests/sentry/sentry_apps/web/test_sentryapp_avatar.py +++ b/tests/sentry/sentry_apps/web/test_sentryapp_avatar.py @@ -1,3 +1,4 @@ +from typing import int from io import BytesIO from django.urls import reverse diff --git a/tests/sentry/sentry_metrics/consumers/test_last_seen_updater.py b/tests/sentry/sentry_metrics/consumers/test_last_seen_updater.py index c541cd4037e000..55701d0583dcb8 100644 --- a/tests/sentry/sentry_metrics/consumers/test_last_seen_updater.py +++ b/tests/sentry/sentry_metrics/consumers/test_last_seen_updater.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from unittest.mock import Mock diff --git a/tests/sentry/sentry_metrics/consumers/test_routing_producer.py b/tests/sentry/sentry_metrics/consumers/test_routing_producer.py index d1f61592a1624e..a74202aab40638 100644 --- a/tests/sentry/sentry_metrics/consumers/test_routing_producer.py +++ b/tests/sentry/sentry_metrics/consumers/test_routing_producer.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import MutableSequence, Sequence from datetime import datetime from unittest import mock diff --git a/tests/sentry/sentry_metrics/consumers/test_schema_validator.py b/tests/sentry/sentry_metrics/consumers/test_schema_validator.py index e6879aa476462a..b76be047b56735 100644 --- a/tests/sentry/sentry_metrics/consumers/test_schema_validator.py +++ b/tests/sentry/sentry_metrics/consumers/test_schema_validator.py @@ -1,5 +1,5 @@ from collections.abc import Mapping -from typing import Any +from typing import int, Any import pytest from sentry_kafka_schemas.codecs import Codec, ValidationError diff --git a/tests/sentry/sentry_metrics/consumers/test_slicing_router.py b/tests/sentry/sentry_metrics/consumers/test_slicing_router.py index 1a4f9062c7c2bd..0256ef5c521567 100644 --- a/tests/sentry/sentry_metrics/consumers/test_slicing_router.py +++ b/tests/sentry/sentry_metrics/consumers/test_slicing_router.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from datetime import datetime from unittest import mock diff --git a/tests/sentry/sentry_metrics/consumers/test_tags_validator.py b/tests/sentry/sentry_metrics/consumers/test_tags_validator.py index 14df58fdae1a1e..1ea620546fd03d 100644 --- a/tests/sentry/sentry_metrics/consumers/test_tags_validator.py +++ b/tests/sentry/sentry_metrics/consumers/test_tags_validator.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.sentry_metrics.consumers.indexer.tags_validator import ( diff --git a/tests/sentry/sentry_metrics/limiters/test_writes_limiter.py b/tests/sentry/sentry_metrics/limiters/test_writes_limiter.py index e8f987cda7fc5c..2a5c9fdae242f8 100644 --- a/tests/sentry/sentry_metrics/limiters/test_writes_limiter.py +++ b/tests/sentry/sentry_metrics/limiters/test_writes_limiter.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from sentry.sentry_metrics.configuration import ( diff --git a/tests/sentry/sentry_metrics/querying/data/test_api.py b/tests/sentry/sentry_metrics/querying/data/test_api.py index 9582f3931368ea..6ab9f600319a52 100644 --- a/tests/sentry/sentry_metrics/querying/data/test_api.py +++ b/tests/sentry/sentry_metrics/querying/data/test_api.py @@ -1,6 +1,6 @@ from collections.abc import Mapping, Sequence from datetime import datetime, timedelta -from typing import Any +from typing import int, Any from unittest.mock import patch import pytest diff --git a/tests/sentry/sentry_metrics/querying/data/test_query.py b/tests/sentry/sentry_metrics/querying/data/test_query.py index 192e2ce5093f4a..6e3e84151d5e8b 100644 --- a/tests/sentry/sentry_metrics/querying/data/test_query.py +++ b/tests/sentry/sentry_metrics/querying/data/test_query.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.sentry_metrics.querying.data import MQLQuery diff --git a/tests/sentry/sentry_metrics/test_all_indexers.py b/tests/sentry/sentry_metrics/test_all_indexers.py index c2f6423b21e672..d1068eed22d68a 100644 --- a/tests/sentry/sentry_metrics/test_all_indexers.py +++ b/tests/sentry/sentry_metrics/test_all_indexers.py @@ -1,3 +1,4 @@ +from typing import int """ Generic testsuite that runs against all productionized indexer backends. diff --git a/tests/sentry/sentry_metrics/test_base_indexer.py b/tests/sentry/sentry_metrics/test_base_indexer.py index e88aefbb21961c..915e9dad7b8d6a 100644 --- a/tests/sentry/sentry_metrics/test_base_indexer.py +++ b/tests/sentry/sentry_metrics/test_base_indexer.py @@ -1,3 +1,4 @@ +from typing import int from collections import defaultdict from collections.abc import Mapping from unittest import TestCase diff --git a/tests/sentry/sentry_metrics/test_batch.py b/tests/sentry/sentry_metrics/test_batch.py index c203790775f1f3..59a8955e6148b1 100644 --- a/tests/sentry/sentry_metrics/test_batch.py +++ b/tests/sentry/sentry_metrics/test_batch.py @@ -1,3 +1,4 @@ +from typing import int import logging from collections.abc import MutableMapping from datetime import datetime, timezone diff --git a/tests/sentry/sentry_metrics/test_configuration.py b/tests/sentry/sentry_metrics/test_configuration.py index fae5d63a90d38c..f2f2d8998b0818 100644 --- a/tests/sentry/sentry_metrics/test_configuration.py +++ b/tests/sentry/sentry_metrics/test_configuration.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_metrics.configuration import ( _METRICS_INGEST_CONFIG_BY_USE_CASE, IndexerStorage, diff --git a/tests/sentry/sentry_metrics/test_gen_metrics_multiprocess_steps.py b/tests/sentry/sentry_metrics/test_gen_metrics_multiprocess_steps.py index 9ecc92a41b96c6..c02156bbfe178c 100644 --- a/tests/sentry/sentry_metrics/test_gen_metrics_multiprocess_steps.py +++ b/tests/sentry/sentry_metrics/test_gen_metrics_multiprocess_steps.py @@ -7,7 +7,7 @@ from collections.abc import Callable, MutableMapping, Sequence from copy import deepcopy from datetime import datetime, timezone -from typing import Any +from typing import int, Any from unittest.mock import Mock, call import pytest diff --git a/tests/sentry/sentry_metrics/test_indexer.py b/tests/sentry/sentry_metrics/test_indexer.py index 8271ccdae0e860..c3485b3b896500 100644 --- a/tests/sentry/sentry_metrics/test_indexer.py +++ b/tests/sentry/sentry_metrics/test_indexer.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_metrics.indexer.mock import MockIndexer from sentry.sentry_metrics.indexer.strings import SHARED_STRINGS from sentry.sentry_metrics.use_case_id_registry import UseCaseID diff --git a/tests/sentry/sentry_metrics/test_indexer_cache.py b/tests/sentry/sentry_metrics/test_indexer_cache.py index a1b62771843131..87189a9733a728 100644 --- a/tests/sentry/sentry_metrics/test_indexer_cache.py +++ b/tests/sentry/sentry_metrics/test_indexer_cache.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/sentry/sentry_metrics/test_kafka.py b/tests/sentry/sentry_metrics/test_kafka.py index f0b4f9c591020d..be874fc1449149 100644 --- a/tests/sentry/sentry_metrics/test_kafka.py +++ b/tests/sentry/sentry_metrics/test_kafka.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from unittest import TestCase diff --git a/tests/sentry/sentry_metrics/test_parallel_indexer.py b/tests/sentry/sentry_metrics/test_parallel_indexer.py index 6d91f565968af0..5c69ea8fe88dfc 100644 --- a/tests/sentry/sentry_metrics/test_parallel_indexer.py +++ b/tests/sentry/sentry_metrics/test_parallel_indexer.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone import pytest diff --git a/tests/sentry/sentry_metrics/test_postgres_indexer.py b/tests/sentry/sentry_metrics/test_postgres_indexer.py index 738275c9995acc..4dc5d93679f583 100644 --- a/tests/sentry/sentry_metrics/test_postgres_indexer.py +++ b/tests/sentry/sentry_metrics/test_postgres_indexer.py @@ -1,3 +1,4 @@ +from typing import int from sentry.sentry_metrics.configuration import UseCaseKey from sentry.sentry_metrics.indexer.base import UseCaseKeyCollection from sentry.sentry_metrics.indexer.cache import CachingIndexer diff --git a/tests/sentry/sentry_metrics/test_prevent_modifications_to_indexer_strings.py b/tests/sentry/sentry_metrics/test_prevent_modifications_to_indexer_strings.py index 1de790e8dc4792..f16fb9e0c3df73 100644 --- a/tests/sentry/sentry_metrics/test_prevent_modifications_to_indexer_strings.py +++ b/tests/sentry/sentry_metrics/test_prevent_modifications_to_indexer_strings.py @@ -1,3 +1,4 @@ +from typing import int from hashlib import sha256 LOCKED_FILE = "src/sentry/sentry_metrics/indexer/strings.py" diff --git a/tests/sentry/sentry_metrics/test_rh_metrics_multiprocess_steps.py b/tests/sentry/sentry_metrics/test_rh_metrics_multiprocess_steps.py index 02a8ac08c5be31..7fdcd2ffc85346 100644 --- a/tests/sentry/sentry_metrics/test_rh_metrics_multiprocess_steps.py +++ b/tests/sentry/sentry_metrics/test_rh_metrics_multiprocess_steps.py @@ -6,7 +6,7 @@ from collections.abc import MutableMapping, Sequence from copy import deepcopy from datetime import datetime, timezone -from typing import Any +from typing import int, Any from unittest.mock import Mock, call import pytest diff --git a/tests/sentry/sentry_metrics/test_snuba.py b/tests/sentry/sentry_metrics/test_snuba.py index ca48c8034247ad..89d80b53b42a80 100644 --- a/tests/sentry/sentry_metrics/test_snuba.py +++ b/tests/sentry/sentry_metrics/test_snuba.py @@ -1,3 +1,4 @@ +from typing import int import pytest from snuba_sdk import Limit, Offset diff --git a/tests/sentry/sentry_metrics/test_strings.py b/tests/sentry/sentry_metrics/test_strings.py index 8583d8d85c35c6..3cf1a993c83848 100644 --- a/tests/sentry/sentry_metrics/test_strings.py +++ b/tests/sentry/sentry_metrics/test_strings.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.test import override_settings diff --git a/tests/sentry/services/eventstore/processing/test_redis_cluster.py b/tests/sentry/services/eventstore/processing/test_redis_cluster.py index 8ab0626ec6fd89..024b9e1d4edf1b 100644 --- a/tests/sentry/services/eventstore/processing/test_redis_cluster.py +++ b/tests/sentry/services/eventstore/processing/test_redis_cluster.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from sentry.services.eventstore.reprocessing.redis import RedisReprocessingStore diff --git a/tests/sentry/services/eventstore/snuba/test_backend.py b/tests/sentry/services/eventstore/snuba/test_backend.py index e75e99fdefff43..cf5043b15af135 100644 --- a/tests/sentry/services/eventstore/snuba/test_backend.py +++ b/tests/sentry/services/eventstore/snuba/test_backend.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from unittest.mock import MagicMock diff --git a/tests/sentry/services/eventstore/test_base.py b/tests/sentry/services/eventstore/test_base.py index 7a4847e2aa9b90..153e196731b5ae 100644 --- a/tests/sentry/services/eventstore/test_base.py +++ b/tests/sentry/services/eventstore/test_base.py @@ -1,3 +1,4 @@ +from typing import int from sentry.services.eventstore.base import EventStorage from sentry.services.eventstore.models import Event from sentry.snuba.dataset import Dataset diff --git a/tests/sentry/services/eventstore/test_models.py b/tests/sentry/services/eventstore/test_models.py index f04a598ca0951a..2d9d45605ce18c 100644 --- a/tests/sentry/services/eventstore/test_models.py +++ b/tests/sentry/services/eventstore/test_models.py @@ -1,3 +1,4 @@ +from typing import int import pickle from unittest import mock diff --git a/tests/sentry/services/eventstore/test_query_preprocessing.py b/tests/sentry/services/eventstore/test_query_preprocessing.py index 5ca73a2fb26eb5..3ac2076d5c722f 100644 --- a/tests/sentry/services/eventstore/test_query_preprocessing.py +++ b/tests/sentry/services/eventstore/test_query_preprocessing.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from sentry.models.groupredirect import GroupRedirect diff --git a/tests/sentry/services/nodestore/bigtable/test_backend.py b/tests/sentry/services/nodestore/bigtable/test_backend.py index 5f1404c9753da4..dc15c266ba75ea 100644 --- a/tests/sentry/services/nodestore/bigtable/test_backend.py +++ b/tests/sentry/services/nodestore/bigtable/test_backend.py @@ -3,7 +3,7 @@ import os from collections.abc import Generator from contextlib import contextmanager -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/services/nodestore/django/test_backend.py b/tests/sentry/services/nodestore/django/test_backend.py index dcdc29a9a5f348..59e1d110d2582e 100644 --- a/tests/sentry/services/nodestore/django/test_backend.py +++ b/tests/sentry/services/nodestore/django/test_backend.py @@ -1,3 +1,4 @@ +from typing import int import pickle from datetime import timedelta from unittest import mock diff --git a/tests/sentry/services/nodestore/test_common.py b/tests/sentry/services/nodestore/test_common.py index f3913238b28282..e93fb321f5307e 100644 --- a/tests/sentry/services/nodestore/test_common.py +++ b/tests/sentry/services/nodestore/test_common.py @@ -5,7 +5,7 @@ from collections.abc import Callable, Generator from contextlib import nullcontext -from typing import ContextManager +from typing import int, ContextManager import pytest diff --git a/tests/sentry/services/test_http.py b/tests/sentry/services/test_http.py index 30e6405cbf23fa..137c285c054f51 100644 --- a/tests/sentry/services/test_http.py +++ b/tests/sentry/services/test_http.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from django.test.utils import override_settings diff --git a/tests/sentry/services/test_organization_actions.py b/tests/sentry/services/test_organization_actions.py index 39e1779a98b93d..dd07dd2fa2e7c8 100644 --- a/tests/sentry/services/test_organization_actions.py +++ b/tests/sentry/services/test_organization_actions.py @@ -1,3 +1,4 @@ +from typing import int import re import pytest diff --git a/tests/sentry/shared_integrations/client/test_base.py b/tests/sentry/shared_integrations/client/test_base.py index add051a599835e..a1a665ca43c469 100644 --- a/tests/sentry/shared_integrations/client/test_base.py +++ b/tests/sentry/shared_integrations/client/test_base.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import responses diff --git a/tests/sentry/shared_integrations/client/test_proxy.py b/tests/sentry/shared_integrations/client/test_proxy.py index d992c39cdf9525..48e24028507062 100644 --- a/tests/sentry/shared_integrations/client/test_proxy.py +++ b/tests/sentry/shared_integrations/client/test_proxy.py @@ -1,3 +1,4 @@ +from typing import int import ipaddress from unittest.mock import MagicMock, patch diff --git a/tests/sentry/silo/test_base.py b/tests/sentry/silo/test_base.py index 5f793754740add..48a6e5e2a2e17b 100644 --- a/tests/sentry/silo/test_base.py +++ b/tests/sentry/silo/test_base.py @@ -1,3 +1,4 @@ +from typing import int import django.apps import django.urls diff --git a/tests/sentry/silo/test_client.py b/tests/sentry/silo/test_client.py index 4ff5486d5f2bdf..a21a1aa4635cd2 100644 --- a/tests/sentry/silo/test_client.py +++ b/tests/sentry/silo/test_client.py @@ -1,3 +1,4 @@ +from typing import int import ipaddress import socket from hashlib import sha256 diff --git a/tests/sentry/silo/test_silo_aware_transaction_patch.py b/tests/sentry/silo/test_silo_aware_transaction_patch.py index ba8b190100c80c..4b6fc5e63e2131 100644 --- a/tests/sentry/silo/test_silo_aware_transaction_patch.py +++ b/tests/sentry/silo/test_silo_aware_transaction_patch.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.db import router from django.test import override_settings diff --git a/tests/sentry/silo/test_util.py b/tests/sentry/silo/test_util.py index f3c746ef8ff5f4..5705107c40f9fc 100644 --- a/tests/sentry/silo/test_util.py +++ b/tests/sentry/silo/test_util.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest import TestCase from wsgiref.util import is_hop_by_hop diff --git a/tests/sentry/similarity/backends/test_redis.py b/tests/sentry/similarity/backends/test_redis.py index e6ba5db6c6315b..39cd6824e3ab7d 100644 --- a/tests/sentry/similarity/backends/test_redis.py +++ b/tests/sentry/similarity/backends/test_redis.py @@ -1,3 +1,4 @@ +from typing import int import time from functools import cached_property diff --git a/tests/sentry/similarity/test_encoder.py b/tests/sentry/similarity/test_encoder.py index ac074614f04d82..81f93a6075120f 100644 --- a/tests/sentry/similarity/test_encoder.py +++ b/tests/sentry/similarity/test_encoder.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.similarity.encoder import Encoder diff --git a/tests/sentry/similarity/test_signatures.py b/tests/sentry/similarity/test_signatures.py index 4ec55e34cb38d4..25241a3b6dae02 100644 --- a/tests/sentry/similarity/test_signatures.py +++ b/tests/sentry/similarity/test_signatures.py @@ -1,3 +1,4 @@ +from typing import int from collections import Counter import pytest diff --git a/tests/sentry/snuba/metrics/fields/test_base.py b/tests/sentry/snuba/metrics/fields/test_base.py index a7fe497a44e796..ec99898e169a44 100644 --- a/tests/sentry/snuba/metrics/fields/test_base.py +++ b/tests/sentry/snuba/metrics/fields/test_base.py @@ -1,3 +1,4 @@ +from typing import int import copy from functools import partial from unittest import mock diff --git a/tests/sentry/snuba/metrics/fields/test_histogram.py b/tests/sentry/snuba/metrics/fields/test_histogram.py index cf6acd7cbee368..a367024e2eb63e 100644 --- a/tests/sentry/snuba/metrics/fields/test_histogram.py +++ b/tests/sentry/snuba/metrics/fields/test_histogram.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.snuba.metrics.fields.histogram import rebucket_histogram diff --git a/tests/sentry/snuba/metrics/test_datasource.py b/tests/sentry/snuba/metrics/test_datasource.py index 334fb124b79524..e45f47b47fba45 100644 --- a/tests/sentry/snuba/metrics/test_datasource.py +++ b/tests/sentry/snuba/metrics/test_datasource.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime import pytest diff --git a/tests/sentry/snuba/metrics/test_extraction.py b/tests/sentry/snuba/metrics/test_extraction.py index 09cd1c5aff920d..7cb5b0b02ada75 100644 --- a/tests/sentry/snuba/metrics/test_extraction.py +++ b/tests/sentry/snuba/metrics/test_extraction.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import pytest diff --git a/tests/sentry/snuba/metrics/test_metrics_layer/test_metrics_enhanced_performance.py b/tests/sentry/snuba/metrics/test_metrics_layer/test_metrics_enhanced_performance.py index f771a4a5e46ce4..058e23253af154 100644 --- a/tests/sentry/snuba/metrics/test_metrics_layer/test_metrics_enhanced_performance.py +++ b/tests/sentry/snuba/metrics/test_metrics_layer/test_metrics_enhanced_performance.py @@ -1,3 +1,4 @@ +from typing import int """ Metrics Service Layer Tests for Performance """ diff --git a/tests/sentry/snuba/metrics/test_metrics_layer/test_release_health.py b/tests/sentry/snuba/metrics/test_metrics_layer/test_release_health.py index 316c51a10bf073..ac1b1d74f80781 100644 --- a/tests/sentry/snuba/metrics/test_metrics_layer/test_release_health.py +++ b/tests/sentry/snuba/metrics/test_metrics_layer/test_release_health.py @@ -1,3 +1,4 @@ +from typing import int """ Metrics Service Layer Tests for Release Health """ diff --git a/tests/sentry/snuba/metrics/test_metrics_query_layer/test_metrics_query_layer.py b/tests/sentry/snuba/metrics/test_metrics_query_layer/test_metrics_query_layer.py index 6fe0c19ff40a34..b56476b3a6e6b7 100644 --- a/tests/sentry/snuba/metrics/test_metrics_query_layer/test_metrics_query_layer.py +++ b/tests/sentry/snuba/metrics/test_metrics_query_layer/test_metrics_query_layer.py @@ -1,3 +1,4 @@ +from typing import int """ Metrics Service Layer Tests for Performance """ diff --git a/tests/sentry/snuba/metrics/test_mqb_query_transformer.py b/tests/sentry/snuba/metrics/test_mqb_query_transformer.py index 684d0467727823..bf87bbee6dec5f 100644 --- a/tests/sentry/snuba/metrics/test_mqb_query_transformer.py +++ b/tests/sentry/snuba/metrics/test_mqb_query_transformer.py @@ -1,3 +1,4 @@ +from typing import int import datetime import re diff --git a/tests/sentry/snuba/metrics/test_naming_layer.py b/tests/sentry/snuba/metrics/test_naming_layer.py index 1c1a4f752d4d9d..92cc3f111ba5e3 100644 --- a/tests/sentry/snuba/metrics/test_naming_layer.py +++ b/tests/sentry/snuba/metrics/test_naming_layer.py @@ -1,3 +1,4 @@ +from typing import int import re import pytest diff --git a/tests/sentry/snuba/metrics/test_query.py b/tests/sentry/snuba/metrics/test_query.py index d1a562d5679366..3c846a12d97e95 100644 --- a/tests/sentry/snuba/metrics/test_query.py +++ b/tests/sentry/snuba/metrics/test_query.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import re from collections.abc import Sequence diff --git a/tests/sentry/snuba/metrics/test_query_builder.py b/tests/sentry/snuba/metrics/test_query_builder.py index 8351cf2d17d964..a8b663fb26fe59 100644 --- a/tests/sentry/snuba/metrics/test_query_builder.py +++ b/tests/sentry/snuba/metrics/test_query_builder.py @@ -4,7 +4,7 @@ import types from dataclasses import replace from datetime import datetime, timedelta, timezone -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/snuba/metrics/test_snql.py b/tests/sentry/snuba/metrics/test_snql.py index a24d0997829e3f..ab5aff51e1c67f 100644 --- a/tests/sentry/snuba/metrics/test_snql.py +++ b/tests/sentry/snuba/metrics/test_snql.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/snuba/metrics/test_utils.py b/tests/sentry/snuba/metrics/test_utils.py index f573b672e832f6..2f48e21f306640 100644 --- a/tests/sentry/snuba/metrics/test_utils.py +++ b/tests/sentry/snuba/metrics/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone import pytest diff --git a/tests/sentry/snuba/test_discover_facets_query.py b/tests/sentry/snuba/test_discover_facets_query.py index d41401a6192af4..f2726fe9bd6ae7 100644 --- a/tests/sentry/snuba/test_discover_facets_query.py +++ b/tests/sentry/snuba/test_discover_facets_query.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.exceptions import InvalidSearchQuery diff --git a/tests/sentry/snuba/test_discover_query.py b/tests/sentry/snuba/test_discover_query.py index 68b236c23693ef..ad47d1bbb06198 100644 --- a/tests/sentry/snuba/test_discover_query.py +++ b/tests/sentry/snuba/test_discover_query.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import timedelta diff --git a/tests/sentry/snuba/test_discover_timeseries_query.py b/tests/sentry/snuba/test_discover_timeseries_query.py index b6722ffae13dea..bed8bcf6152c0d 100644 --- a/tests/sentry/snuba/test_discover_timeseries_query.py +++ b/tests/sentry/snuba/test_discover_timeseries_query.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/sentry/snuba/test_entity_subscriptions.py b/tests/sentry/snuba/test_entity_subscriptions.py index 6729173ecf07eb..37f545c5411ee1 100644 --- a/tests/sentry/snuba/test_entity_subscriptions.py +++ b/tests/sentry/snuba/test_entity_subscriptions.py @@ -1,3 +1,4 @@ +from typing import int import pytest from snuba_sdk import And, Column, Condition, Entity, Function, Join, Op, Relationship diff --git a/tests/sentry/snuba/test_errors.py b/tests/sentry/snuba/test_errors.py index a3592f1bb584ea..bd9e29ea1c4e2c 100644 --- a/tests/sentry/snuba/test_errors.py +++ b/tests/sentry/snuba/test_errors.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import timedelta diff --git a/tests/sentry/snuba/test_metrics_enhanced_performance.py b/tests/sentry/snuba/test_metrics_enhanced_performance.py index 97ed0504523a35..726111b9023e8d 100644 --- a/tests/sentry/snuba/test_metrics_enhanced_performance.py +++ b/tests/sentry/snuba/test_metrics_enhanced_performance.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from functools import cached_property from unittest import mock diff --git a/tests/sentry/snuba/test_metrics_performance.py b/tests/sentry/snuba/test_metrics_performance.py index 34b9f6c1d5376c..a75668c07eaf70 100644 --- a/tests/sentry/snuba/test_metrics_performance.py +++ b/tests/sentry/snuba/test_metrics_performance.py @@ -1,3 +1,4 @@ +from typing import int import datetime from datetime import timezone diff --git a/tests/sentry/snuba/test_models.py b/tests/sentry/snuba/test_models.py index 8b8f2a12ea1a24..0eac052f95b23e 100644 --- a/tests/sentry/snuba/test_models.py +++ b/tests/sentry/snuba/test_models.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/snuba/test_outcomes.py b/tests/sentry/snuba/test_outcomes.py index b5d3d6e1fc923c..87d7ab0e7c02cf 100644 --- a/tests/sentry/snuba/test_outcomes.py +++ b/tests/sentry/snuba/test_outcomes.py @@ -1,3 +1,4 @@ +from typing import int import urllib.parse from datetime import timedelta diff --git a/tests/sentry/snuba/test_profiles.py b/tests/sentry/snuba/test_profiles.py index d82d7224e3fac5..6610d0306fb924 100644 --- a/tests/sentry/snuba/test_profiles.py +++ b/tests/sentry/snuba/test_profiles.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone import pytest diff --git a/tests/sentry/snuba/test_query_subscription_consumer.py b/tests/sentry/snuba/test_query_subscription_consumer.py index 0059c98ee2f34d..63d9fe2706f394 100644 --- a/tests/sentry/snuba/test_query_subscription_consumer.py +++ b/tests/sentry/snuba/test_query_subscription_consumer.py @@ -1,3 +1,4 @@ +from typing import int import unittest from copy import deepcopy from datetime import datetime, timedelta, timezone diff --git a/tests/sentry/snuba/test_rpc_dataset_common.py b/tests/sentry/snuba/test_rpc_dataset_common.py index 52cd0e544d486e..dc62f650cabb4c 100644 --- a/tests/sentry/snuba/test_rpc_dataset_common.py +++ b/tests/sentry/snuba/test_rpc_dataset_common.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone import pytest diff --git a/tests/sentry/snuba/test_subscriptions.py b/tests/sentry/snuba/test_subscriptions.py index 8f5dd22f715829..389823b69aeae7 100644 --- a/tests/sentry/snuba/test_subscriptions.py +++ b/tests/sentry/snuba/test_subscriptions.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/snuba/test_tasks.py b/tests/sentry/snuba/test_tasks.py index 576200da7ab15d..f79431dd100fc5 100644 --- a/tests/sentry/snuba/test_tasks.py +++ b/tests/sentry/snuba/test_tasks.py @@ -3,7 +3,7 @@ import abc from datetime import timedelta from functools import partial -from typing import Any +from typing import int, Any from unittest.mock import Mock, patch from uuid import uuid4 diff --git a/tests/sentry/snuba/test_transactions.py b/tests/sentry/snuba/test_transactions.py index 0225df9f81a8cd..1e37a666cf3d5d 100644 --- a/tests/sentry/snuba/test_transactions.py +++ b/tests/sentry/snuba/test_transactions.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import timedelta diff --git a/tests/sentry/snuba/test_transactions_timeseries_query.py b/tests/sentry/snuba/test_transactions_timeseries_query.py index 67a5eb8adb4a7d..4d4faafdf0a4e6 100644 --- a/tests/sentry/snuba/test_transactions_timeseries_query.py +++ b/tests/sentry/snuba/test_transactions_timeseries_query.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/sentry/snuba/test_validators.py b/tests/sentry/snuba/test_validators.py index 4324da6cd68605..6905c956be417c 100644 --- a/tests/sentry/snuba/test_validators.py +++ b/tests/sentry/snuba/test_validators.py @@ -1,3 +1,4 @@ +from typing import int import pytest from rest_framework import serializers from rest_framework.exceptions import ErrorDetail diff --git a/tests/sentry/spans/consumers/process/__init__.py b/tests/sentry/spans/consumers/process/__init__.py index 47bd13548d0234..c0eb3ae80c1546 100644 --- a/tests/sentry/spans/consumers/process/__init__.py +++ b/tests/sentry/spans/consumers/process/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry_kafka_schemas.schema_types.ingest_spans_v1 import SpanEvent diff --git a/tests/sentry/spans/consumers/process/test_consumer.py b/tests/sentry/spans/consumers/process/test_consumer.py index 793d5a1c7aab5a..cbf58ac6e55562 100644 --- a/tests/sentry/spans/consumers/process/test_consumer.py +++ b/tests/sentry/spans/consumers/process/test_consumer.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from time import sleep as real_sleep # Import before monkeypatch from unittest import mock diff --git a/tests/sentry/spans/consumers/process/test_flusher.py b/tests/sentry/spans/consumers/process/test_flusher.py index 3fa01c36f05b52..0ed20030061d17 100644 --- a/tests/sentry/spans/consumers/process/test_flusher.py +++ b/tests/sentry/spans/consumers/process/test_flusher.py @@ -1,6 +1,6 @@ import time from time import sleep -from typing import Any +from typing import int, Any from unittest import mock import orjson diff --git a/tests/sentry/spans/consumers/process_segments/test_convert.py b/tests/sentry/spans/consumers/process_segments/test_convert.py index 056935fc9547a0..be81f89f5ed0ab 100644 --- a/tests/sentry/spans/consumers/process_segments/test_convert.py +++ b/tests/sentry/spans/consumers/process_segments/test_convert.py @@ -1,4 +1,4 @@ -from typing import cast +from typing import int, cast import orjson from google.protobuf.timestamp_pb2 import Timestamp diff --git a/tests/sentry/spans/consumers/process_segments/test_enrichment.py b/tests/sentry/spans/consumers/process_segments/test_enrichment.py index 494c4adf8b36a2..0122fd077b5b03 100644 --- a/tests/sentry/spans/consumers/process_segments/test_enrichment.py +++ b/tests/sentry/spans/consumers/process_segments/test_enrichment.py @@ -1,4 +1,4 @@ -from typing import cast +from typing import int, cast from sentry_kafka_schemas.schema_types.ingest_spans_v1 import SpanEvent diff --git a/tests/sentry/spans/consumers/process_segments/test_factory.py b/tests/sentry/spans/consumers/process_segments/test_factory.py index 528e30b7080b78..e1381ccc08aa46 100644 --- a/tests/sentry/spans/consumers/process_segments/test_factory.py +++ b/tests/sentry/spans/consumers/process_segments/test_factory.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from unittest import mock diff --git a/tests/sentry/spans/consumers/process_segments/test_message.py b/tests/sentry/spans/consumers/process_segments/test_message.py index f1ca46aa955b31..afacae577e0bf8 100644 --- a/tests/sentry/spans/consumers/process_segments/test_message.py +++ b/tests/sentry/spans/consumers/process_segments/test_message.py @@ -1,6 +1,6 @@ import uuid from hashlib import md5 -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/spans/consumers/process_segments/test_shim.py b/tests/sentry/spans/consumers/process_segments/test_shim.py index 77404ab0fe0a73..83fa48f1fcb700 100644 --- a/tests/sentry/spans/consumers/process_segments/test_shim.py +++ b/tests/sentry/spans/consumers/process_segments/test_shim.py @@ -1,4 +1,4 @@ -from typing import cast +from typing import int, cast from sentry_kafka_schemas.schema_types.ingest_spans_v1 import SpanEvent diff --git a/tests/sentry/spans/grouping/test_strategy.py b/tests/sentry/spans/grouping/test_strategy.py index 33e2dd86f4589d..0957003ce9e87f 100644 --- a/tests/sentry/spans/grouping/test_strategy.py +++ b/tests/sentry/spans/grouping/test_strategy.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Mapping import pytest diff --git a/tests/sentry/spans/grouping/test_utils.py b/tests/sentry/spans/grouping/test_utils.py index 3a13be0a32e70d..8758e13971fcd7 100644 --- a/tests/sentry/spans/grouping/test_utils.py +++ b/tests/sentry/spans/grouping/test_utils.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.spans.grouping.utils import parse_fingerprint_var diff --git a/tests/sentry/spans/test_buffer.py b/tests/sentry/spans/test_buffer.py index f975bd61117684..bcd71116d2731f 100644 --- a/tests/sentry/spans/test_buffer.py +++ b/tests/sentry/spans/test_buffer.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import itertools from collections.abc import Sequence diff --git a/tests/sentry/stacktraces/test_filename.py b/tests/sentry/stacktraces/test_filename.py index 8694c9a3482261..bb28047b4b4331 100644 --- a/tests/sentry/stacktraces/test_filename.py +++ b/tests/sentry/stacktraces/test_filename.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import TestCase from sentry.stacktraces.processing import normalize_stacktraces_for_grouping diff --git a/tests/sentry/stacktraces/test_functions.py b/tests/sentry/stacktraces/test_functions.py index 8311be5f5a604f..2cf7f3d0eda52f 100644 --- a/tests/sentry/stacktraces/test_functions.py +++ b/tests/sentry/stacktraces/test_functions.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.interfaces.stacktrace import Frame diff --git a/tests/sentry/stacktraces/test_in_app_normalization.py b/tests/sentry/stacktraces/test_in_app_normalization.py index 862a1f06c5c5b7..d7d58c9d9504de 100644 --- a/tests/sentry/stacktraces/test_in_app_normalization.py +++ b/tests/sentry/stacktraces/test_in_app_normalization.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from sentry.grouping.api import get_default_grouping_config_dict, load_grouping_config from sentry.stacktraces.processing import normalize_stacktraces_for_grouping diff --git a/tests/sentry/stacktraces/test_platform.py b/tests/sentry/stacktraces/test_platform.py index 8ba10454b83f85..3fc0187cf1d2e9 100644 --- a/tests/sentry/stacktraces/test_platform.py +++ b/tests/sentry/stacktraces/test_platform.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.stacktraces.platform import get_behavior_family_for_platform diff --git a/tests/sentry/statistical_detectors/test_algorithm.py b/tests/sentry/statistical_detectors/test_algorithm.py index a1ac484fbd2a4d..cdfe98f287dcdf 100644 --- a/tests/sentry/statistical_detectors/test_algorithm.py +++ b/tests/sentry/statistical_detectors/test_algorithm.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from collections.abc import Mapping from datetime import datetime, timedelta, timezone diff --git a/tests/sentry/statistical_detectors/test_issue_platform_adapter.py b/tests/sentry/statistical_detectors/test_issue_platform_adapter.py index 367023e3561ced..5b87459e330cbc 100644 --- a/tests/sentry/statistical_detectors/test_issue_platform_adapter.py +++ b/tests/sentry/statistical_detectors/test_issue_platform_adapter.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.issues.grouptype import PerformanceP95EndpointRegressionGroupType diff --git a/tests/sentry/sudo/test_forms.py b/tests/sentry/sudo/test_forms.py index b9fabec2a9fe08..48e7a07dc33964 100644 --- a/tests/sentry/sudo/test_forms.py +++ b/tests/sentry/sudo/test_forms.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.forms import ValidationError from django.test import override_settings diff --git a/tests/sentry/sudo/test_middleware.py b/tests/sentry/sudo/test_middleware.py index 2c7e7e84c14577..5b7255c85c688d 100644 --- a/tests/sentry/sudo/test_middleware.py +++ b/tests/sentry/sudo/test_middleware.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.http import HttpResponse diff --git a/tests/sentry/sudo/test_signals.py b/tests/sentry/sudo/test_signals.py index 55f8b48b60a08d..ffaa26b27f9223 100644 --- a/tests/sentry/sudo/test_signals.py +++ b/tests/sentry/sudo/test_signals.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.auth.models import User from django.contrib.auth.signals import user_logged_in, user_logged_out diff --git a/tests/sentry/sudo/test_utils.py b/tests/sentry/sudo/test_utils.py index 15593c1d2a6242..f87a49d97205dd 100644 --- a/tests/sentry/sudo/test_utils.py +++ b/tests/sentry/sudo/test_utils.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.core.signing import BadSignature diff --git a/tests/sentry/sudo/test_views.py b/tests/sentry/sudo/test_views.py index 7b706873295ab6..ecd51ec37c00af 100644 --- a/tests/sentry/sudo/test_views.py +++ b/tests/sentry/sudo/test_views.py @@ -1,3 +1,4 @@ +from typing import int from django.template.response import TemplateResponse from django.test import override_settings diff --git a/tests/sentry/tagstore/test_types.py b/tests/sentry/tagstore/test_types.py index bdd1f6edd0ef8b..5766f44eb730df 100644 --- a/tests/sentry/tagstore/test_types.py +++ b/tests/sentry/tagstore/test_types.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import pickle diff --git a/tests/sentry/tasks/conftest.py b/tests/sentry/tasks/conftest.py index a05d50602cc5a8..88554e635c5c1c 100644 --- a/tests/sentry/tasks/conftest.py +++ b/tests/sentry/tasks/conftest.py @@ -1,6 +1,6 @@ import contextlib from collections.abc import Callable, Generator -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/tasks/test_activity.py b/tests/sentry/tasks/test_activity.py index 3e63047db38207..3b3b27b13c437e 100644 --- a/tests/sentry/tasks/test_activity.py +++ b/tests/sentry/tasks/test_activity.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.models.activity import Activity diff --git a/tests/sentry/tasks/test_ai_agent_monitoring.py b/tests/sentry/tasks/test_ai_agent_monitoring.py index 39c10c08bb9a47..1bb17448ba695a 100644 --- a/tests/sentry/tasks/test_ai_agent_monitoring.py +++ b/tests/sentry/tasks/test_ai_agent_monitoring.py @@ -1,3 +1,4 @@ +from typing import int import pytest import responses diff --git a/tests/sentry/tasks/test_assemble.py b/tests/sentry/tasks/test_assemble.py index 4d12379d1980cc..78016967381061 100644 --- a/tests/sentry/tasks/test_assemble.py +++ b/tests/sentry/tasks/test_assemble.py @@ -1,3 +1,4 @@ +from typing import int import io import os import uuid diff --git a/tests/sentry/tasks/test_auth.py b/tests/sentry/tasks/test_auth.py index 6ef44baf53b7e2..bf7966aac6b92d 100644 --- a/tests/sentry/tasks/test_auth.py +++ b/tests/sentry/tasks/test_auth.py @@ -1,3 +1,4 @@ +from typing import int from django.core import mail from sentry.models.authprovider import AuthProvider diff --git a/tests/sentry/tasks/test_auto_enable_codecov.py b/tests/sentry/tasks/test_auto_enable_codecov.py index 5b0b0cb3713709..4dab59e2fb90e5 100644 --- a/tests/sentry/tasks/test_auto_enable_codecov.py +++ b/tests/sentry/tasks/test_auto_enable_codecov.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import responses diff --git a/tests/sentry/tasks/test_auto_ongoing_issues.py b/tests/sentry/tasks/test_auto_ongoing_issues.py index 63212e7bcca25e..578ea29c3b4ec2 100644 --- a/tests/sentry/tasks/test_auto_ongoing_issues.py +++ b/tests/sentry/tasks/test_auto_ongoing_issues.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from unittest import mock diff --git a/tests/sentry/tasks/test_auto_remove_inbox.py b/tests/sentry/tasks/test_auto_remove_inbox.py index 056d65689dcd0c..5152aa006401f0 100644 --- a/tests/sentry/tasks/test_auto_remove_inbox.py +++ b/tests/sentry/tasks/test_auto_remove_inbox.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/tasks/test_auto_resolve_issues.py b/tests/sentry/tasks/test_auto_resolve_issues.py index 234c18ef4d0f0c..8ed419b1084b01 100644 --- a/tests/sentry/tasks/test_auto_resolve_issues.py +++ b/tests/sentry/tasks/test_auto_resolve_issues.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from time import time from unittest.mock import MagicMock, patch diff --git a/tests/sentry/tasks/test_autofix.py b/tests/sentry/tasks/test_autofix.py index 940331f108baf5..f1e01134f536a2 100644 --- a/tests/sentry/tasks/test_autofix.py +++ b/tests/sentry/tasks/test_autofix.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/tasks/test_base.py b/tests/sentry/tasks/test_base.py index 1f979e997f87ed..da45555c957e93 100644 --- a/tests/sentry/tasks/test_base.py +++ b/tests/sentry/tasks/test_base.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/tasks/test_beacon.py b/tests/sentry/tasks/test_beacon.py index 0b6037bd00e329..c7592e911ec108 100644 --- a/tests/sentry/tasks/test_beacon.py +++ b/tests/sentry/tasks/test_beacon.py @@ -1,3 +1,4 @@ +from typing import int import platform from datetime import timedelta from types import SimpleNamespace diff --git a/tests/sentry/tasks/test_check_am2_compatibility.py b/tests/sentry/tasks/test_check_am2_compatibility.py index 47ff458fd7cb55..3ccdfc50a3c3c2 100644 --- a/tests/sentry/tasks/test_check_am2_compatibility.py +++ b/tests/sentry/tasks/test_check_am2_compatibility.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/tasks/test_check_auth.py b/tests/sentry/tasks/test_check_auth.py index 6a29d46242e0b5..1135e50c608c82 100644 --- a/tests/sentry/tasks/test_check_auth.py +++ b/tests/sentry/tasks/test_check_auth.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/tasks/test_clear_expired_resolutions.py b/tests/sentry/tasks/test_clear_expired_resolutions.py index c34d77b0732ff0..b7a2ce3361de51 100644 --- a/tests/sentry/tasks/test_clear_expired_resolutions.py +++ b/tests/sentry/tasks/test_clear_expired_resolutions.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/tasks/test_clear_expired_rulesnoozes.py b/tests/sentry/tasks/test_clear_expired_rulesnoozes.py index 584be92e7e1647..05e9caa8c7a592 100644 --- a/tests/sentry/tasks/test_clear_expired_rulesnoozes.py +++ b/tests/sentry/tasks/test_clear_expired_rulesnoozes.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from sentry.models.rule import Rule diff --git a/tests/sentry/tasks/test_clear_expired_snoozes.py b/tests/sentry/tasks/test_clear_expired_snoozes.py index e8c3212d84acee..8084c6251e87b4 100644 --- a/tests/sentry/tasks/test_clear_expired_snoozes.py +++ b/tests/sentry/tasks/test_clear_expired_snoozes.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/tasks/test_code_owners.py b/tests/sentry/tasks/test_code_owners.py index f347fbc7bf14f4..3954cbc62bdc7e 100644 --- a/tests/sentry/tasks/test_code_owners.py +++ b/tests/sentry/tasks/test_code_owners.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.integrations.models.external_actor import ExternalActor diff --git a/tests/sentry/tasks/test_collect_project_platforms.py b/tests/sentry/tasks/test_collect_project_platforms.py index c6b4bdc931d947..dd616757706bde 100644 --- a/tests/sentry/tasks/test_collect_project_platforms.py +++ b/tests/sentry/tasks/test_collect_project_platforms.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from sentry.models.projectplatform import ProjectPlatform diff --git a/tests/sentry/tasks/test_commit_context.py b/tests/sentry/tasks/test_commit_context.py index 28bae8fbeadb30..d899719e832a09 100644 --- a/tests/sentry/tasks/test_commit_context.py +++ b/tests/sentry/tasks/test_commit_context.py @@ -1,3 +1,4 @@ +from typing import int import logging from datetime import datetime, timedelta from datetime import timezone as datetime_timezone diff --git a/tests/sentry/tasks/test_commits.py b/tests/sentry/tasks/test_commits.py index 96736c5fab418a..ef9af7118fd4af 100644 --- a/tests/sentry/tasks/test_commits.py +++ b/tests/sentry/tasks/test_commits.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.core import mail diff --git a/tests/sentry/tasks/test_daily_summary.py b/tests/sentry/tasks/test_daily_summary.py index c7ed3647d5986a..749a7cf0cb0039 100644 --- a/tests/sentry/tasks/test_daily_summary.py +++ b/tests/sentry/tasks/test_daily_summary.py @@ -1,5 +1,5 @@ from datetime import UTC, datetime, timedelta -from typing import cast +from typing import int, cast from unittest import mock from urllib.parse import urlencode diff --git a/tests/sentry/tasks/test_delete_seer_grouping_records.py b/tests/sentry/tasks/test_delete_seer_grouping_records.py index ac8be04ecd7a74..2cf19767c8b9f8 100644 --- a/tests/sentry/tasks/test_delete_seer_grouping_records.py +++ b/tests/sentry/tasks/test_delete_seer_grouping_records.py @@ -1,3 +1,4 @@ +from typing import int from time import time from unittest.mock import MagicMock, patch diff --git a/tests/sentry/tasks/test_digests.py b/tests/sentry/tasks/test_digests.py index 26335163040666..104656e05d6a81 100644 --- a/tests/sentry/tasks/test_digests.py +++ b/tests/sentry/tasks/test_digests.py @@ -1,3 +1,4 @@ +from typing import int import uuid from unittest import mock diff --git a/tests/sentry/tasks/test_email.py b/tests/sentry/tasks/test_email.py index 78fbcd185fed28..f7be654547391b 100644 --- a/tests/sentry/tasks/test_email.py +++ b/tests/sentry/tasks/test_email.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.activity import Activity from sentry.tasks.email import process_inbound_email from sentry.testutils.cases import TestCase diff --git a/tests/sentry/tasks/test_groupowner.py b/tests/sentry/tasks/test_groupowner.py index 0e63492808f5c1..215987577cb79e 100644 --- a/tests/sentry/tasks/test_groupowner.py +++ b/tests/sentry/tasks/test_groupowner.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from django.utils import timezone diff --git a/tests/sentry/tasks/test_llm_issue_detection.py b/tests/sentry/tasks/test_llm_issue_detection.py index 17e6bf5640d8c7..826118b0d9c12d 100644 --- a/tests/sentry/tasks/test_llm_issue_detection.py +++ b/tests/sentry/tasks/test_llm_issue_detection.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock, patch from sentry.issues.grouptype import LLMDetectedExperimentalGroupType diff --git a/tests/sentry/tasks/test_merge.py b/tests/sentry/tasks/test_merge.py index 8847eedaa10449..91020b65825def 100644 --- a/tests/sentry/tasks/test_merge.py +++ b/tests/sentry/tasks/test_merge.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import patch from sentry import buffer, eventstream diff --git a/tests/sentry/tasks/test_on_demand_metrics.py b/tests/sentry/tasks/test_on_demand_metrics.py index eec03b848353fe..c531bbccd69e04 100644 --- a/tests/sentry/tasks/test_on_demand_metrics.py +++ b/tests/sentry/tasks/test_on_demand_metrics.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/tasks/test_options.py b/tests/sentry/tasks/test_options.py index 80d444a5400b65..68fdbb65736273 100644 --- a/tests/sentry/tasks/test_options.py +++ b/tests/sentry/tasks/test_options.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/tasks/test_post_process.py b/tests/sentry/tasks/test_post_process.py index 357424102c6e68..6b8f869c989023 100644 --- a/tests/sentry/tasks/test_post_process.py +++ b/tests/sentry/tasks/test_post_process.py @@ -5,7 +5,7 @@ import uuid from datetime import datetime, timedelta from hashlib import md5 -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import MagicMock, Mock, patch diff --git a/tests/sentry/tasks/test_process_buffer.py b/tests/sentry/tasks/test_process_buffer.py index 1d42caa07a4ff7..1e6d902e52cbf2 100644 --- a/tests/sentry/tasks/test_process_buffer.py +++ b/tests/sentry/tasks/test_process_buffer.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/tasks/test_relay.py b/tests/sentry/tasks/test_relay.py index 2a032d5379bc92..e3afb2e2e486cb 100644 --- a/tests/sentry/tasks/test_relay.py +++ b/tests/sentry/tasks/test_relay.py @@ -1,3 +1,4 @@ +from typing import int import contextlib from unittest import mock diff --git a/tests/sentry/tasks/test_reprocessing2.py b/tests/sentry/tasks/test_reprocessing2.py index b8edddec0f2c8c..48dd0a50c9d201 100644 --- a/tests/sentry/tasks/test_reprocessing2.py +++ b/tests/sentry/tasks/test_reprocessing2.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import uuid from time import time diff --git a/tests/sentry/tasks/test_seer.py b/tests/sentry/tasks/test_seer.py index 6521fdebe4c579..87086f17b22698 100644 --- a/tests/sentry/tasks/test_seer.py +++ b/tests/sentry/tasks/test_seer.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import orjson import pytest diff --git a/tests/sentry/tasks/test_statistical_detectors.py b/tests/sentry/tasks/test_statistical_detectors.py index e53ccc82d96d39..b5bae866ae5024 100644 --- a/tests/sentry/tasks/test_statistical_detectors.py +++ b/tests/sentry/tasks/test_statistical_detectors.py @@ -1,3 +1,4 @@ +from typing import int import itertools import uuid from datetime import UTC, datetime, timedelta diff --git a/tests/sentry/tasks/test_store.py b/tests/sentry/tasks/test_store.py index 02cb1178c5f231..d4570127f3ce1a 100644 --- a/tests/sentry/tasks/test_store.py +++ b/tests/sentry/tasks/test_store.py @@ -1,3 +1,4 @@ +from typing import int from time import time from unittest import mock diff --git a/tests/sentry/tasks/test_symbolication.py b/tests/sentry/tasks/test_symbolication.py index 8288bc80956c81..0105daccfdff4f 100644 --- a/tests/sentry/tasks/test_symbolication.py +++ b/tests/sentry/tasks/test_symbolication.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/tasks/test_update_code_owners_schema.py b/tests/sentry/tasks/test_update_code_owners_schema.py index 0ec0cf2ed89c8d..685e92df965a3e 100644 --- a/tests/sentry/tasks/test_update_code_owners_schema.py +++ b/tests/sentry/tasks/test_update_code_owners_schema.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from unittest import mock diff --git a/tests/sentry/tasks/test_user_report.py b/tests/sentry/tasks/test_user_report.py index 4a85de1b4f801e..a591fc4450e1fc 100644 --- a/tests/sentry/tasks/test_user_report.py +++ b/tests/sentry/tasks/test_user_report.py @@ -1,3 +1,4 @@ +from typing import int from sentry.tasks.user_report import user_report from sentry.testutils.cases import TestCase from sentry.testutils.silo import control_silo_test diff --git a/tests/sentry/tasks/test_web_vitals_issue_detection.py b/tests/sentry/tasks/test_web_vitals_issue_detection.py index 77293333993e24..14f8c5167b01b7 100644 --- a/tests/sentry/tasks/test_web_vitals_issue_detection.py +++ b/tests/sentry/tasks/test_web_vitals_issue_detection.py @@ -1,3 +1,4 @@ +from typing import int from contextlib import contextmanager from unittest.mock import patch diff --git a/tests/sentry/tasks/test_weekly_escalating_forecast.py b/tests/sentry/tasks/test_weekly_escalating_forecast.py index aba58fb7ca1cb2..7e2c69fa00f29b 100644 --- a/tests/sentry/tasks/test_weekly_escalating_forecast.py +++ b/tests/sentry/tasks/test_weekly_escalating_forecast.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from unittest.mock import MagicMock, patch diff --git a/tests/sentry/tasks/test_weekly_reports.py b/tests/sentry/tasks/test_weekly_reports.py index 7db28158e3e7d0..b78339f4fb97af 100644 --- a/tests/sentry/tasks/test_weekly_reports.py +++ b/tests/sentry/tasks/test_weekly_reports.py @@ -1,6 +1,6 @@ import zoneinfo from datetime import timedelta -from typing import cast +from typing import int, cast from unittest import mock import pytest diff --git a/tests/sentry/taskworker/scheduler/test_runner.py b/tests/sentry/taskworker/scheduler/test_runner.py index dc3ceacb3e3759..bdbcab43eb27a3 100644 --- a/tests/sentry/taskworker/scheduler/test_runner.py +++ b/tests/sentry/taskworker/scheduler/test_runner.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from unittest.mock import Mock, patch diff --git a/tests/sentry/taskworker/scheduler/test_schedules.py b/tests/sentry/taskworker/scheduler/test_schedules.py index 2540be9a90590f..87dc859f0782e9 100644 --- a/tests/sentry/taskworker/scheduler/test_schedules.py +++ b/tests/sentry/taskworker/scheduler/test_schedules.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta import pytest diff --git a/tests/sentry/taskworker/test_app.py b/tests/sentry/taskworker/test_app.py index 52955dd9a702e5..7010aa91826bb1 100644 --- a/tests/sentry/taskworker/test_app.py +++ b/tests/sentry/taskworker/test_app.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.core.cache import cache from sentry_protos.taskbroker.v1.taskbroker_pb2 import TaskActivation diff --git a/tests/sentry/taskworker/test_client.py b/tests/sentry/taskworker/test_client.py index dac1abb8692cbf..0f69549fbb828a 100644 --- a/tests/sentry/taskworker/test_client.py +++ b/tests/sentry/taskworker/test_client.py @@ -5,7 +5,7 @@ from collections import defaultdict from collections.abc import Callable from pathlib import Path -from typing import Any +from typing import int, Any from unittest.mock import Mock, patch import grpc diff --git a/tests/sentry/taskworker/test_config.py b/tests/sentry/taskworker/test_config.py index bb1c9af5177b28..d760510fb7f089 100644 --- a/tests/sentry/taskworker/test_config.py +++ b/tests/sentry/taskworker/test_config.py @@ -1,6 +1,6 @@ import inspect from datetime import timedelta -from typing import Any +from typing import int, Any import pytest from django.conf import settings diff --git a/tests/sentry/taskworker/test_registry.py b/tests/sentry/taskworker/test_registry.py index 061af16175a629..f9e0ef073c8189 100644 --- a/tests/sentry/taskworker/test_registry.py +++ b/tests/sentry/taskworker/test_registry.py @@ -1,3 +1,4 @@ +from typing import int import base64 from concurrent.futures import Future from unittest.mock import Mock diff --git a/tests/sentry/taskworker/test_retry.py b/tests/sentry/taskworker/test_retry.py index 01d02e6bd546e2..d99f32c9eb2055 100644 --- a/tests/sentry/taskworker/test_retry.py +++ b/tests/sentry/taskworker/test_retry.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from multiprocessing.context import TimeoutError diff --git a/tests/sentry/taskworker/test_router.py b/tests/sentry/taskworker/test_router.py index 977768c242e870..aad76cbf6a6a22 100644 --- a/tests/sentry/taskworker/test_router.py +++ b/tests/sentry/taskworker/test_router.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.test.utils import override_settings diff --git a/tests/sentry/taskworker/test_task.py b/tests/sentry/taskworker/test_task.py index 631ec925a137db..d4139f976726fd 100644 --- a/tests/sentry/taskworker/test_task.py +++ b/tests/sentry/taskworker/test_task.py @@ -1,5 +1,5 @@ import datetime -from typing import Any +from typing import int, Any from unittest.mock import patch import pytest diff --git a/tests/sentry/taskworker/test_worker.py b/tests/sentry/taskworker/test_worker.py index a2a5297014babc..ce7a6b70343bf0 100644 --- a/tests/sentry/taskworker/test_worker.py +++ b/tests/sentry/taskworker/test_worker.py @@ -1,3 +1,4 @@ +from typing import int import base64 import queue import time diff --git a/tests/sentry/tempest/endpoints/test_tempest_credentials.py b/tests/sentry/tempest/endpoints/test_tempest_credentials.py index 1f62fb2a2d1efc..a4b2c8d5398483 100644 --- a/tests/sentry/tempest/endpoints/test_tempest_credentials.py +++ b/tests/sentry/tempest/endpoints/test_tempest_credentials.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.tempest.models import TempestCredentials diff --git a/tests/sentry/tempest/endpoints/test_tempest_credentials_details.py b/tests/sentry/tempest/endpoints/test_tempest_credentials_details.py index 1d9c8317019782..c6471c7856fcd3 100644 --- a/tests/sentry/tempest/endpoints/test_tempest_credentials_details.py +++ b/tests/sentry/tempest/endpoints/test_tempest_credentials_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.tempest.models import TempestCredentials diff --git a/tests/sentry/tempest/endpoints/test_tempest_ips.py b/tests/sentry/tempest/endpoints/test_tempest_ips.py index b9fac94d5fadc5..e0dc2657e2a3ef 100644 --- a/tests/sentry/tempest/endpoints/test_tempest_ips.py +++ b/tests/sentry/tempest/endpoints/test_tempest_ips.py @@ -1,3 +1,4 @@ +from typing import int from ipaddress import ip_address from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/tempest/test_tempest.py b/tests/sentry/tempest/test_tempest.py index 76bfd0daf34a12..db07b594023c5e 100644 --- a/tests/sentry/tempest/test_tempest.py +++ b/tests/sentry/tempest/test_tempest.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch from sentry.models.projectkey import ProjectKey, UseCase diff --git a/tests/sentry/templatetags/test_sentry_api.py b/tests/sentry/templatetags/test_sentry_api.py index 15c2480a2df26a..c9f93a316c4ad5 100644 --- a/tests/sentry/templatetags/test_sentry_api.py +++ b/tests/sentry/templatetags/test_sentry_api.py @@ -1,3 +1,4 @@ +from typing import int from django.template import engines from sentry.testutils.cases import TestCase diff --git a/tests/sentry/templatetags/test_sentry_assets.py b/tests/sentry/templatetags/test_sentry_assets.py index 20103d3875b498..e09549236c09ed 100644 --- a/tests/sentry/templatetags/test_sentry_assets.py +++ b/tests/sentry/templatetags/test_sentry_assets.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.template import engines from django.test import RequestFactory diff --git a/tests/sentry/templatetags/test_sentry_features.py b/tests/sentry/templatetags/test_sentry_features.py index d38dfcc11758bd..491a88db7a181b 100644 --- a/tests/sentry/templatetags/test_sentry_features.py +++ b/tests/sentry/templatetags/test_sentry_features.py @@ -1,3 +1,4 @@ +from typing import int from django.template import engines from sentry.testutils.cases import TestCase diff --git a/tests/sentry/templatetags/test_sentry_helpers.py b/tests/sentry/templatetags/test_sentry_helpers.py index 8c7ad5d4b2acb6..2d17bc60af5302 100644 --- a/tests/sentry/templatetags/test_sentry_helpers.py +++ b/tests/sentry/templatetags/test_sentry_helpers.py @@ -1,3 +1,4 @@ +from typing import int import datetime import pytest diff --git a/tests/sentry/test_constants.py b/tests/sentry/test_constants.py index 9812e04e949063..bfdf1a534b8c3c 100644 --- a/tests/sentry/test_constants.py +++ b/tests/sentry/test_constants.py @@ -1,3 +1,4 @@ +from typing import int from contextlib import AbstractContextManager from unittest import mock diff --git a/tests/sentry/test_culprit.py b/tests/sentry/test_culprit.py index e9761e7b68261e..0281138a04a548 100644 --- a/tests/sentry/test_culprit.py +++ b/tests/sentry/test_culprit.py @@ -1,3 +1,4 @@ +from typing import int from sentry.event_manager import EventManager from sentry.event_manager import get_culprit as get_culprit_impl diff --git a/tests/sentry/test_dependencies.py b/tests/sentry/test_dependencies.py index 45e124751c0bc4..b72ef27e16bc5e 100644 --- a/tests/sentry/test_dependencies.py +++ b/tests/sentry/test_dependencies.py @@ -1,3 +1,4 @@ +from typing import int import pydantic import pytest diff --git a/tests/sentry/test_devimports.py b/tests/sentry/test_devimports.py index 025239f5c9ebc1..d40c7ed11c6665 100644 --- a/tests/sentry/test_devimports.py +++ b/tests/sentry/test_devimports.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import functools import importlib.metadata diff --git a/tests/sentry/test_http.py b/tests/sentry/test_http.py index bd909eaa705aaa..d9667747ba2241 100644 --- a/tests/sentry/test_http.py +++ b/tests/sentry/test_http.py @@ -1,3 +1,4 @@ +from typing import int import platform from unittest.mock import MagicMock, patch diff --git a/tests/sentry/test_killswitches.py b/tests/sentry/test_killswitches.py index bcc987aefb4912..10d39b4f41da1c 100644 --- a/tests/sentry/test_killswitches.py +++ b/tests/sentry/test_killswitches.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import pytest diff --git a/tests/sentry/test_mypy_stronglist.py b/tests/sentry/test_mypy_stronglist.py index 36294a52eadd5a..17d0f5008d990f 100644 --- a/tests/sentry/test_mypy_stronglist.py +++ b/tests/sentry/test_mypy_stronglist.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import os.path import subprocess diff --git a/tests/sentry/test_no_create_or_update_usage.py b/tests/sentry/test_no_create_or_update_usage.py index 08a83b969439d9..ec9f15b72bc2bc 100644 --- a/tests/sentry/test_no_create_or_update_usage.py +++ b/tests/sentry/test_no_create_or_update_usage.py @@ -4,7 +4,7 @@ from collections.abc import Iterable from dataclasses import dataclass from pathlib import Path -from typing import Any +from typing import int, Any # Allowlist of files (relative to repo root) that may still use legacy method # create_or_update. Instead, use Django's update_or_create. diff --git a/tests/sentry/test_sdk_updates.py b/tests/sentry/test_sdk_updates.py index cb6ec32bccc05a..e185042e49217a 100644 --- a/tests/sentry/test_sdk_updates.py +++ b/tests/sentry/test_sdk_updates.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.sdk_updates import SdkIndexState, SdkSetupState, get_suggested_updates diff --git a/tests/sentry/test_stacktraces.py b/tests/sentry/test_stacktraces.py index 3df96da8d27933..4a3599833345a6 100644 --- a/tests/sentry/test_stacktraces.py +++ b/tests/sentry/test_stacktraces.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/test_unmerge.py b/tests/sentry/test_unmerge.py index ca4ff9887b943a..b1fc4efa5223e2 100644 --- a/tests/sentry/test_unmerge.py +++ b/tests/sentry/test_unmerge.py @@ -1,3 +1,4 @@ +from typing import int from sentry.unmerge import ( InitialUnmergeArgs, PrimaryHashUnmergeReplacement, diff --git a/tests/sentry/test_wsgi.py b/tests/sentry/test_wsgi.py index 5b0791fafe1232..74a4bc1273e100 100644 --- a/tests/sentry/test_wsgi.py +++ b/tests/sentry/test_wsgi.py @@ -1,3 +1,4 @@ +from typing import int import subprocess import sys diff --git a/tests/sentry/testutils/helpers/test_features.py b/tests/sentry/testutils/helpers/test_features.py index 8e17865eded969..6d7d176aadf7f9 100644 --- a/tests/sentry/testutils/helpers/test_features.py +++ b/tests/sentry/testutils/helpers/test_features.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry import features diff --git a/tests/sentry/testutils/pytest/mocking/animals/__init__.py b/tests/sentry/testutils/pytest/mocking/animals/__init__.py index c05a86e2ce6a7e..3f9dcd789fe89f 100644 --- a/tests/sentry/testutils/pytest/mocking/animals/__init__.py +++ b/tests/sentry/testutils/pytest/mocking/animals/__init__.py @@ -1,3 +1,4 @@ +from typing import int def get_dog() -> str: return "maisey" diff --git a/tests/sentry/testutils/pytest/mocking/test_mocking.py b/tests/sentry/testutils/pytest/mocking/test_mocking.py index bbcc9635be8d5a..052c94a834d6be 100644 --- a/tests/sentry/testutils/pytest/mocking/test_mocking.py +++ b/tests/sentry/testutils/pytest/mocking/test_mocking.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import TestCase, mock from sentry.testutils.pytest.mocking import capture_results diff --git a/tests/sentry/testutils/test_abstract.py b/tests/sentry/testutils/test_abstract.py index 6d8e5131d846b7..60866bacfe33d2 100644 --- a/tests/sentry/testutils/test_abstract.py +++ b/tests/sentry/testutils/test_abstract.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.abstract import Abstract diff --git a/tests/sentry/testutils/test_silo.py b/tests/sentry/testutils/test_silo.py index 540bb0e1dea6d7..34922e859e14b4 100644 --- a/tests/sentry/testutils/test_silo.py +++ b/tests/sentry/testutils/test_silo.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.testutils.silo import strip_silo_mode_test_suffix, validate_protected_queries diff --git a/tests/sentry/testutils/thread_leaks/conftest.py b/tests/sentry/testutils/thread_leaks/conftest.py index 527c0b77b10daf..d4ff3e7e4e2f6d 100644 --- a/tests/sentry/testutils/thread_leaks/conftest.py +++ b/tests/sentry/testutils/thread_leaks/conftest.py @@ -1,3 +1,4 @@ +from typing import int """Test configuration for thread leak tests.""" from collections.abc import Generator diff --git a/tests/sentry/testutils/thread_leaks/test_assertion.py b/tests/sentry/testutils/thread_leaks/test_assertion.py index a520ad4a962d3d..00289795f23955 100644 --- a/tests/sentry/testutils/thread_leaks/test_assertion.py +++ b/tests/sentry/testutils/thread_leaks/test_assertion.py @@ -1,3 +1,4 @@ +from typing import int """Integration tests for thread leak assertion utilities.""" import builtins diff --git a/tests/sentry/testutils/thread_leaks/test_diff.py b/tests/sentry/testutils/thread_leaks/test_diff.py index fbab474a983190..a7647c0799015e 100644 --- a/tests/sentry/testutils/thread_leaks/test_diff.py +++ b/tests/sentry/testutils/thread_leaks/test_diff.py @@ -1,3 +1,4 @@ +from typing import int from traceback import FrameSummary from sentry.testutils.thread_leaks import diff diff --git a/tests/sentry/testutils/thread_leaks/test_pytest.py b/tests/sentry/testutils/thread_leaks/test_pytest.py index 9cdc9e900171c8..a477e561a3bd32 100644 --- a/tests/sentry/testutils/thread_leaks/test_pytest.py +++ b/tests/sentry/testutils/thread_leaks/test_pytest.py @@ -1,3 +1,4 @@ +from typing import int """Tests for pytest plugin thread leak detection and Sentry integration.""" import builtins diff --git a/tests/sentry/testutils/thread_leaks/test_sentry.py b/tests/sentry/testutils/thread_leaks/test_sentry.py index e560e894e4ff83..c3cece810b8fb3 100644 --- a/tests/sentry/testutils/thread_leaks/test_sentry.py +++ b/tests/sentry/testutils/thread_leaks/test_sentry.py @@ -3,7 +3,7 @@ from collections.abc import Iterable from threading import Thread from traceback import FrameSummary -from typing import Any +from typing import int, Any from unittest.mock import Mock from sentry.testutils.thread_leaks.sentry import event_from_stack diff --git a/tests/sentry/toolbar/utils/test_url.py b/tests/sentry/toolbar/utils/test_url.py index 20d4ebaa4435d4..883a2df657f6b4 100644 --- a/tests/sentry/toolbar/utils/test_url.py +++ b/tests/sentry/toolbar/utils/test_url.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import urlparse import pytest diff --git a/tests/sentry/toolbar/views/test_iframe_view.py b/tests/sentry/toolbar/views/test_iframe_view.py index 7a48b52a186f87..5cd737ffcf0896 100644 --- a/tests/sentry/toolbar/views/test_iframe_view.py +++ b/tests/sentry/toolbar/views/test_iframe_view.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from django.urls import reverse from django.utils.html import escapejs diff --git a/tests/sentry/toolbar/views/test_login_success_view.py b/tests/sentry/toolbar/views/test_login_success_view.py index 51764b8dd740e0..757cab398cd45c 100644 --- a/tests/sentry/toolbar/views/test_login_success_view.py +++ b/tests/sentry/toolbar/views/test_login_success_view.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from django.urls import reverse diff --git a/tests/sentry/tsdb/test_base.py b/tests/sentry/tsdb/test_base.py index 12555b589298dc..7d63b673df1992 100644 --- a/tests/sentry/tsdb/test_base.py +++ b/tests/sentry/tsdb/test_base.py @@ -1,3 +1,4 @@ +from typing import int import itertools from datetime import datetime, timedelta, timezone from unittest import TestCase diff --git a/tests/sentry/tsdb/test_redis.py b/tests/sentry/tsdb/test_redis.py index fe7fda345713ea..3e1e8a6a26c5e7 100644 --- a/tests/sentry/tsdb/test_redis.py +++ b/tests/sentry/tsdb/test_redis.py @@ -1,3 +1,4 @@ +from typing import int from contextlib import contextmanager from datetime import datetime, timedelta, timezone diff --git a/tests/sentry/tsdb/test_redissnuba.py b/tests/sentry/tsdb/test_redissnuba.py index cb9aaa1da7787e..6724a963f2ba00 100644 --- a/tests/sentry/tsdb/test_redissnuba.py +++ b/tests/sentry/tsdb/test_redissnuba.py @@ -1,3 +1,4 @@ +from typing import int from sentry.tsdb.base import TSDBModel from sentry.tsdb.redissnuba import READ, method_specifications, selector_func from sentry.tsdb.snuba import SnubaTSDB diff --git a/tests/sentry/tsdb/test_snuba.py b/tests/sentry/tsdb/test_snuba.py index 2a22d2ca9e4050..c9d80b067983d8 100644 --- a/tests/sentry/tsdb/test_snuba.py +++ b/tests/sentry/tsdb/test_snuba.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from sentry.constants import DataCategory diff --git a/tests/sentry/types/test_actor.py b/tests/sentry/types/test_actor.py index fee0abbc5cc25b..751de0039a2209 100644 --- a/tests/sentry/types/test_actor.py +++ b/tests/sentry/types/test_actor.py @@ -1,3 +1,4 @@ +from typing import int import pytest from rest_framework import serializers diff --git a/tests/sentry/types/test_region.py b/tests/sentry/types/test_region.py index 7b9950a28e60ac..a25082af02662e 100644 --- a/tests/sentry/types/test_region.py +++ b/tests/sentry/types/test_region.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from contextlib import contextmanager from unittest.mock import MagicMock, patch diff --git a/tests/sentry/uptime/autodetect/test_detector.py b/tests/sentry/uptime/autodetect/test_detector.py index e65ac77c897c99..6a942735683fcf 100644 --- a/tests/sentry/uptime/autodetect/test_detector.py +++ b/tests/sentry/uptime/autodetect/test_detector.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.organization import Organization from sentry.testutils.cases import UptimeTestCase from sentry.testutils.helpers.options import override_options diff --git a/tests/sentry/uptime/autodetect/test_notifications.py b/tests/sentry/uptime/autodetect/test_notifications.py index 78254a76724b3b..5511281cbf166c 100644 --- a/tests/sentry/uptime/autodetect/test_notifications.py +++ b/tests/sentry/uptime/autodetect/test_notifications.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock, patch from sentry.silo.base import SiloMode diff --git a/tests/sentry/uptime/autodetect/test_ranking.py b/tests/sentry/uptime/autodetect/test_ranking.py index 477bcac7ee6b6b..4011a4b415ce7c 100644 --- a/tests/sentry/uptime/autodetect/test_ranking.py +++ b/tests/sentry/uptime/autodetect/test_ranking.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from unittest import mock diff --git a/tests/sentry/uptime/autodetect/test_tasks.py b/tests/sentry/uptime/autodetect/test_tasks.py index fc7d34ba44c1a8..66490925d6056f 100644 --- a/tests/sentry/uptime/autodetect/test_tasks.py +++ b/tests/sentry/uptime/autodetect/test_tasks.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import uuid from datetime import datetime, timedelta diff --git a/tests/sentry/uptime/autodetect/test_url_extraction.py b/tests/sentry/uptime/autodetect/test_url_extraction.py index 3f71fcec5cb0d3..7e858fa851dd0c 100644 --- a/tests/sentry/uptime/autodetect/test_url_extraction.py +++ b/tests/sentry/uptime/autodetect/test_url_extraction.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import UptimeTestCase from sentry.uptime.autodetect.url_extraction import extract_base_url diff --git a/tests/sentry/uptime/consumers/test_eap_converter.py b/tests/sentry/uptime/consumers/test_eap_converter.py index 37a6ec9ec284ea..e7b7cd8846d637 100644 --- a/tests/sentry/uptime/consumers/test_eap_converter.py +++ b/tests/sentry/uptime/consumers/test_eap_converter.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase import pytest diff --git a/tests/sentry/uptime/consumers/test_eap_producer.py b/tests/sentry/uptime/consumers/test_eap_producer.py index fe8692b630ac1a..cf82b825f10a0d 100644 --- a/tests/sentry/uptime/consumers/test_eap_producer.py +++ b/tests/sentry/uptime/consumers/test_eap_producer.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import datetime, timezone from unittest.mock import MagicMock, patch diff --git a/tests/sentry/uptime/consumers/test_results_consumer.py b/tests/sentry/uptime/consumers/test_results_consumer.py index 1444162679ca42..c8f01363083614 100644 --- a/tests/sentry/uptime/consumers/test_results_consumer.py +++ b/tests/sentry/uptime/consumers/test_results_consumer.py @@ -2,7 +2,7 @@ import uuid from datetime import datetime, timedelta, timezone from hashlib import md5 -from typing import Literal +from typing import int, Literal from unittest import mock from unittest.mock import MagicMock, call diff --git a/tests/sentry/uptime/endpoints/__init__.py b/tests/sentry/uptime/endpoints/__init__.py index 79461740c5e804..2376c93410a046 100644 --- a/tests/sentry/uptime/endpoints/__init__.py +++ b/tests/sentry/uptime/endpoints/__init__.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/uptime/endpoints/test_detector.py b/tests/sentry/uptime/endpoints/test_detector.py index 89923c9e3ad232..486c7753ee96e0 100644 --- a/tests/sentry/uptime/endpoints/test_detector.py +++ b/tests/sentry/uptime/endpoints/test_detector.py @@ -1,3 +1,4 @@ +from typing import int from django.utils import timezone from rest_framework import status diff --git a/tests/sentry/uptime/endpoints/test_organization_uptime_alert_index.py b/tests/sentry/uptime/endpoints/test_organization_uptime_alert_index.py index b30968be64c758..8a14299e1f01b7 100644 --- a/tests/sentry/uptime/endpoints/test_organization_uptime_alert_index.py +++ b/tests/sentry/uptime/endpoints/test_organization_uptime_alert_index.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.constants import ObjectStatus from sentry.uptime.endpoints.serializers import UptimeDetectorSerializer diff --git a/tests/sentry/uptime/endpoints/test_organization_uptime_alert_index_count.py b/tests/sentry/uptime/endpoints/test_organization_uptime_alert_index_count.py index 8d9931061b17f7..477ff4fab10783 100644 --- a/tests/sentry/uptime/endpoints/test_organization_uptime_alert_index_count.py +++ b/tests/sentry/uptime/endpoints/test_organization_uptime_alert_index_count.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from tests.sentry.uptime.endpoints import UptimeAlertBaseEndpointTest diff --git a/tests/sentry/uptime/endpoints/test_organization_uptime_stats.py b/tests/sentry/uptime/endpoints/test_organization_uptime_stats.py index f267bde6634b85..3a80287e414c3d 100644 --- a/tests/sentry/uptime/endpoints/test_organization_uptime_stats.py +++ b/tests/sentry/uptime/endpoints/test_organization_uptime_stats.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import datetime, timedelta, timezone diff --git a/tests/sentry/uptime/endpoints/test_organization_uptime_summary.py b/tests/sentry/uptime/endpoints/test_organization_uptime_summary.py index f447eaa71b798f..51413cc9b80e52 100644 --- a/tests/sentry/uptime/endpoints/test_organization_uptime_summary.py +++ b/tests/sentry/uptime/endpoints/test_organization_uptime_summary.py @@ -1,6 +1,6 @@ import uuid from datetime import datetime, timedelta, timezone -from typing import Any +from typing import int, Any from sentry.testutils.cases import APITestCase, UptimeResultEAPTestCase from sentry.testutils.helpers.datetime import freeze_time diff --git a/tests/sentry/uptime/endpoints/test_project_uptime_alert_check_index.py b/tests/sentry/uptime/endpoints/test_project_uptime_alert_check_index.py index ff582c5c292144..552070edba049f 100644 --- a/tests/sentry/uptime/endpoints/test_project_uptime_alert_check_index.py +++ b/tests/sentry/uptime/endpoints/test_project_uptime_alert_check_index.py @@ -1,3 +1,4 @@ +from typing import int import uuid from abc import abstractmethod from datetime import datetime, timedelta, timezone diff --git a/tests/sentry/uptime/endpoints/test_project_uptime_alert_details.py b/tests/sentry/uptime/endpoints/test_project_uptime_alert_details.py index 211c222cfb9537..c02904657df345 100644 --- a/tests/sentry/uptime/endpoints/test_project_uptime_alert_details.py +++ b/tests/sentry/uptime/endpoints/test_project_uptime_alert_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/uptime/endpoints/test_project_uptime_alert_index.py b/tests/sentry/uptime/endpoints/test_project_uptime_alert_index.py index 6872148c4cb810..19333b3a7b6b9f 100644 --- a/tests/sentry/uptime/endpoints/test_project_uptime_alert_index.py +++ b/tests/sentry/uptime/endpoints/test_project_uptime_alert_index.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from rest_framework.exceptions import ErrorDetail diff --git a/tests/sentry/uptime/endpoints/test_serializers.py b/tests/sentry/uptime/endpoints/test_serializers.py index 97197b530d72e4..eabb296305fc64 100644 --- a/tests/sentry/uptime/endpoints/test_serializers.py +++ b/tests/sentry/uptime/endpoints/test_serializers.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.testutils.cases import UptimeTestCase from sentry.uptime.endpoints.serializers import UptimeDetectorSerializer diff --git a/tests/sentry/uptime/endpoints/test_uptime_ips.py b/tests/sentry/uptime/endpoints/test_uptime_ips.py index 3fde53e197878b..2e5f3aea8e8e47 100644 --- a/tests/sentry/uptime/endpoints/test_uptime_ips.py +++ b/tests/sentry/uptime/endpoints/test_uptime_ips.py @@ -1,3 +1,4 @@ +from typing import int from ipaddress import ip_address from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/uptime/endpoints/test_utils.py b/tests/sentry/uptime/endpoints/test_utils.py index 40aba84fbc675e..158717bfae217b 100644 --- a/tests/sentry/uptime/endpoints/test_utils.py +++ b/tests/sentry/uptime/endpoints/test_utils.py @@ -1,3 +1,4 @@ +from typing import int import uuid from pytest import raises diff --git a/tests/sentry/uptime/endpoints/test_validators.py b/tests/sentry/uptime/endpoints/test_validators.py index adb4526372ea64..80bdc03d8f0e08 100644 --- a/tests/sentry/uptime/endpoints/test_validators.py +++ b/tests/sentry/uptime/endpoints/test_validators.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.constants import DataCategory diff --git a/tests/sentry/uptime/migrations/test_0045_backfill_detector_thresholds.py b/tests/sentry/uptime/migrations/test_0045_backfill_detector_thresholds.py index b67d97f81278ce..875661fb7005a5 100644 --- a/tests/sentry/uptime/migrations/test_0045_backfill_detector_thresholds.py +++ b/tests/sentry/uptime/migrations/test_0045_backfill_detector_thresholds.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.testutils.cases import TestMigrations diff --git a/tests/sentry/uptime/rdap/test_query.py b/tests/sentry/uptime/rdap/test_query.py index ee95019e0c1a2f..741b48d1cc0fc4 100644 --- a/tests/sentry/uptime/rdap/test_query.py +++ b/tests/sentry/uptime/rdap/test_query.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/uptime/rdap/test_tasks.py b/tests/sentry/uptime/rdap/test_tasks.py index 99965169523a8a..e6fbfc13311bd9 100644 --- a/tests/sentry/uptime/rdap/test_tasks.py +++ b/tests/sentry/uptime/rdap/test_tasks.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.testutils.cases import UptimeTestCase diff --git a/tests/sentry/uptime/subscriptions/test_regions.py b/tests/sentry/uptime/subscriptions/test_regions.py index f5d3a36071ac31..10264750767007 100644 --- a/tests/sentry/uptime/subscriptions/test_regions.py +++ b/tests/sentry/uptime/subscriptions/test_regions.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from django.test import TestCase, override_settings diff --git a/tests/sentry/uptime/subscriptions/test_subscriptions.py b/tests/sentry/uptime/subscriptions/test_subscriptions.py index 297d1af423d30f..e668f4f62561f9 100644 --- a/tests/sentry/uptime/subscriptions/test_subscriptions.py +++ b/tests/sentry/uptime/subscriptions/test_subscriptions.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/uptime/subscriptions/test_tasks.py b/tests/sentry/uptime/subscriptions/test_tasks.py index 67b964c979422c..20551df5162c44 100644 --- a/tests/sentry/uptime/subscriptions/test_tasks.py +++ b/tests/sentry/uptime/subscriptions/test_tasks.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import abc import uuid diff --git a/tests/sentry/uptime/test_grouptype.py b/tests/sentry/uptime/test_grouptype.py index 7c47a740e2f20b..e614a6d86ffbd8 100644 --- a/tests/sentry/uptime/test_grouptype.py +++ b/tests/sentry/uptime/test_grouptype.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import datetime, timedelta, timezone from hashlib import md5 diff --git a/tests/sentry/uptime/test_models.py b/tests/sentry/uptime/test_models.py index 854dbc1e51bba8..1b2f0db3cf47bf 100644 --- a/tests/sentry/uptime/test_models.py +++ b/tests/sentry/uptime/test_models.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/usage_accountant/test_accountant.py b/tests/sentry/usage_accountant/test_accountant.py index 6403d96489a8ac..ff167e265062c4 100644 --- a/tests/sentry/usage_accountant/test_accountant.py +++ b/tests/sentry/usage_accountant/test_accountant.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from arroyo.backends.kafka.consumer import KafkaPayload diff --git a/tests/sentry/users/api/bases/test_user.py b/tests/sentry/users/api/bases/test_user.py index 8895a3d14db125..0d02ccc433012d 100644 --- a/tests/sentry/users/api/bases/test_user.py +++ b/tests/sentry/users/api/bases/test_user.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import pytest from django.test import override_settings diff --git a/tests/sentry/users/api/endpoints/test_auth_index.py b/tests/sentry/users/api/endpoints/test_auth_index.py index 429333f6ba0b82..b2abcbf9e277ad 100644 --- a/tests/sentry/users/api/endpoints/test_auth_index.py +++ b/tests/sentry/users/api/endpoints/test_auth_index.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from unittest import mock from urllib.parse import urlencode diff --git a/tests/sentry/users/api/endpoints/test_user_authenticator_details.py b/tests/sentry/users/api/endpoints/test_user_authenticator_details.py index ebbca8deb9b4ae..b8c74d27b07407 100644 --- a/tests/sentry/users/api/endpoints/test_user_authenticator_details.py +++ b/tests/sentry/users/api/endpoints/test_user_authenticator_details.py @@ -1,3 +1,4 @@ +from typing import int import datetime from unittest import mock diff --git a/tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py b/tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py index 5b78244703e440..8ffac6258a9c04 100644 --- a/tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py +++ b/tests/sentry/users/api/endpoints/test_user_authenticator_enroll.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.core import mail diff --git a/tests/sentry/users/api/endpoints/test_user_authenticator_index.py b/tests/sentry/users/api/endpoints/test_user_authenticator_index.py index cf37a022c537ba..0db2fbbaa54731 100644 --- a/tests/sentry/users/api/endpoints/test_user_authenticator_index.py +++ b/tests/sentry/users/api/endpoints/test_user_authenticator_index.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.auth.authenticators.totp import TotpInterface diff --git a/tests/sentry/users/api/endpoints/test_user_authenticators_index.py b/tests/sentry/users/api/endpoints/test_user_authenticators_index.py index 0492b0768319ff..bab12a7e9f93b8 100644 --- a/tests/sentry/users/api/endpoints/test_user_authenticators_index.py +++ b/tests/sentry/users/api/endpoints/test_user_authenticators_index.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/users/api/endpoints/test_user_avatar.py b/tests/sentry/users/api/endpoints/test_user_avatar.py index 9b5e2ba6783530..6c3d6fcbcfdad5 100644 --- a/tests/sentry/users/api/endpoints/test_user_avatar.py +++ b/tests/sentry/users/api/endpoints/test_user_avatar.py @@ -1,3 +1,4 @@ +from typing import int from base64 import b64encode from io import BytesIO diff --git a/tests/sentry/users/api/endpoints/test_user_details.py b/tests/sentry/users/api/endpoints/test_user_details.py index ca74af1d22f8fe..069bbcd237de05 100644 --- a/tests/sentry/users/api/endpoints/test_user_details.py +++ b/tests/sentry/users/api/endpoints/test_user_details.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Generator from django.test import override_settings diff --git a/tests/sentry/users/api/endpoints/test_user_emails.py b/tests/sentry/users/api/endpoints/test_user_emails.py index 16e5ee13b5bf7e..8a970ef66915ab 100644 --- a/tests/sentry/users/api/endpoints/test_user_emails.py +++ b/tests/sentry/users/api/endpoints/test_user_emails.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/users/api/endpoints/test_user_emails_confirm.py b/tests/sentry/users/api/endpoints/test_user_emails_confirm.py index 890f9cebe99a3c..1a80404dd296ea 100644 --- a/tests/sentry/users/api/endpoints/test_user_emails_confirm.py +++ b/tests/sentry/users/api/endpoints/test_user_emails_confirm.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.urls import reverse diff --git a/tests/sentry/users/api/endpoints/test_user_identity.py b/tests/sentry/users/api/endpoints/test_user_identity.py index b75f25d3bf42f6..a7589c6f849c02 100644 --- a/tests/sentry/users/api/endpoints/test_user_identity.py +++ b/tests/sentry/users/api/endpoints/test_user_identity.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.silo import control_silo_test from sentry.users.models.identity import Identity, IdentityStatus diff --git a/tests/sentry/users/api/endpoints/test_user_identity_config.py b/tests/sentry/users/api/endpoints/test_user_identity_config.py index 8642b637f63ebf..dae7816064607e 100644 --- a/tests/sentry/users/api/endpoints/test_user_identity_config.py +++ b/tests/sentry/users/api/endpoints/test_user_identity_config.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.models.authidentity import AuthIdentity diff --git a/tests/sentry/users/api/endpoints/test_user_identity_details.py b/tests/sentry/users/api/endpoints/test_user_identity_details.py index fd79f2b8bb0f40..44e40e538f38d2 100644 --- a/tests/sentry/users/api/endpoints/test_user_identity_details.py +++ b/tests/sentry/users/api/endpoints/test_user_identity_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.authidentity import AuthIdentity from sentry.models.authprovider import AuthProvider from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/users/api/endpoints/test_user_index.py b/tests/sentry/users/api/endpoints/test_user_index.py index 47efeccb373ac9..bc9f546f28e042 100644 --- a/tests/sentry/users/api/endpoints/test_user_index.py +++ b/tests/sentry/users/api/endpoints/test_user_index.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.helpers.options import override_options from sentry.testutils.silo import control_silo_test diff --git a/tests/sentry/users/api/endpoints/test_user_ips.py b/tests/sentry/users/api/endpoints/test_user_ips.py index 097287b57f527a..6232ecb449e07d 100644 --- a/tests/sentry/users/api/endpoints/test_user_ips.py +++ b/tests/sentry/users/api/endpoints/test_user_ips.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/users/api/endpoints/test_user_password.py b/tests/sentry/users/api/endpoints/test_user_password.py index efbbb429322091..2e1fdc7423ab81 100644 --- a/tests/sentry/users/api/endpoints/test_user_password.py +++ b/tests/sentry/users/api/endpoints/test_user_password.py @@ -1,3 +1,4 @@ +from typing import int from django.test import override_settings from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/users/api/endpoints/test_user_permission_details.py b/tests/sentry/users/api/endpoints/test_user_permission_details.py index 76a13b29a20da7..3f44f513e1d37e 100644 --- a/tests/sentry/users/api/endpoints/test_user_permission_details.py +++ b/tests/sentry/users/api/endpoints/test_user_permission_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.api.permissions import StaffPermission diff --git a/tests/sentry/users/api/endpoints/test_user_permissions.py b/tests/sentry/users/api/endpoints/test_user_permissions.py index ba01ffbc109822..1236da979e1d5b 100644 --- a/tests/sentry/users/api/endpoints/test_user_permissions.py +++ b/tests/sentry/users/api/endpoints/test_user_permissions.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.api.permissions import StaffPermission diff --git a/tests/sentry/users/api/endpoints/test_user_permissions_config.py b/tests/sentry/users/api/endpoints/test_user_permissions_config.py index f1031116c1d1ee..c21fc88ed6d05a 100644 --- a/tests/sentry/users/api/endpoints/test_user_permissions_config.py +++ b/tests/sentry/users/api/endpoints/test_user_permissions_config.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.api.permissions import StaffPermission diff --git a/tests/sentry/users/api/endpoints/test_user_regions.py b/tests/sentry/users/api/endpoints/test_user_regions.py index fc9ab4be44d681..aebb7de1596036 100644 --- a/tests/sentry/users/api/endpoints/test_user_regions.py +++ b/tests/sentry/users/api/endpoints/test_user_regions.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.region import override_regions from sentry.testutils.silo import control_silo_test diff --git a/tests/sentry/users/api/endpoints/test_user_role_details.py b/tests/sentry/users/api/endpoints/test_user_role_details.py index c2dc926da60986..cfe0e7cd0cd83e 100644 --- a/tests/sentry/users/api/endpoints/test_user_role_details.py +++ b/tests/sentry/users/api/endpoints/test_user_role_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.silo import control_silo_test from sentry.users.models.userrole import UserRole diff --git a/tests/sentry/users/api/endpoints/test_user_roles.py b/tests/sentry/users/api/endpoints/test_user_roles.py index 61b0fbf72f05af..c1314b00e49733 100644 --- a/tests/sentry/users/api/endpoints/test_user_roles.py +++ b/tests/sentry/users/api/endpoints/test_user_roles.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.silo import control_silo_test from sentry.users.models.userrole import UserRole diff --git a/tests/sentry/users/api/endpoints/test_userroles_details.py b/tests/sentry/users/api/endpoints/test_userroles_details.py index c1c6265dad7ee5..18d59dc6142610 100644 --- a/tests/sentry/users/api/endpoints/test_userroles_details.py +++ b/tests/sentry/users/api/endpoints/test_userroles_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.silo import control_silo_test from sentry.users.models.userrole import UserRole diff --git a/tests/sentry/users/api/endpoints/test_userroles_index.py b/tests/sentry/users/api/endpoints/test_userroles_index.py index 4a8b12875deaad..7a2ea6f5661543 100644 --- a/tests/sentry/users/api/endpoints/test_userroles_index.py +++ b/tests/sentry/users/api/endpoints/test_userroles_index.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import APITestCase from sentry.testutils.silo import control_silo_test from sentry.users.models.userrole import UserRole diff --git a/tests/sentry/users/api/serializers/test_user.py b/tests/sentry/users/api/serializers/test_user.py index 0b561d8198d541..6fb294a38b51ff 100644 --- a/tests/sentry/users/api/serializers/test_user.py +++ b/tests/sentry/users/api/serializers/test_user.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.auth.authenticators import available_authenticators from sentry.models.authidentity import AuthIdentity diff --git a/tests/sentry/users/api/serializers/test_user_identity_config.py b/tests/sentry/users/api/serializers/test_user_identity_config.py index 4a3ab27f21754f..de420c516448d7 100644 --- a/tests/sentry/users/api/serializers/test_user_identity_config.py +++ b/tests/sentry/users/api/serializers/test_user_identity_config.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/users/models/test_authenticator.py b/tests/sentry/users/models/test_authenticator.py index 4955dda2c95091..62f3758a123270 100644 --- a/tests/sentry/users/models/test_authenticator.py +++ b/tests/sentry/users/models/test_authenticator.py @@ -1,3 +1,4 @@ +from typing import int from django.db import connection from django.db.models.expressions import Expression from fido2.ctap2 import AuthenticatorData diff --git a/tests/sentry/users/models/test_identity.py b/tests/sentry/users/models/test_identity.py index 727f49626da39f..49522f0e689053 100644 --- a/tests/sentry/users/models/test_identity.py +++ b/tests/sentry/users/models/test_identity.py @@ -1,3 +1,4 @@ +from typing import int from sentry.identity import register from sentry.identity.providers.dummy import DummyProvider from sentry.testutils.cases import TestCase diff --git a/tests/sentry/users/models/test_lostpasswordhash.py b/tests/sentry/users/models/test_lostpasswordhash.py index 1da78da17d7331..2ba1af288aaf3e 100644 --- a/tests/sentry/users/models/test_lostpasswordhash.py +++ b/tests/sentry/users/models/test_lostpasswordhash.py @@ -1,3 +1,4 @@ +from typing import int from django.core import mail from django.urls import reverse diff --git a/tests/sentry/users/models/test_user.py b/tests/sentry/users/models/test_user.py index f10154b671cccb..6d39e74039b565 100644 --- a/tests/sentry/users/models/test_user.py +++ b/tests/sentry/users/models/test_user.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from django.db.models import Q diff --git a/tests/sentry/users/models/test_user_avatar.py b/tests/sentry/users/models/test_user_avatar.py index 7ed18679a0c6c6..b17d8c4b34ee5f 100644 --- a/tests/sentry/users/models/test_user_avatar.py +++ b/tests/sentry/users/models/test_user_avatar.py @@ -1,3 +1,4 @@ +from typing import int from sentry import options as options_store from sentry.models.files.control_file import ControlFile from sentry.testutils.cases import TestCase diff --git a/tests/sentry/users/models/test_user_merge_verification_code.py b/tests/sentry/users/models/test_user_merge_verification_code.py index 68e15c82780f12..7d9ab53fef83d0 100644 --- a/tests/sentry/users/models/test_user_merge_verification_code.py +++ b/tests/sentry/users/models/test_user_merge_verification_code.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from django.core import mail diff --git a/tests/sentry/users/models/test_useremail.py b/tests/sentry/users/models/test_useremail.py index c6a9ff6e6e654a..a5eff6a4765bfd 100644 --- a/tests/sentry/users/models/test_useremail.py +++ b/tests/sentry/users/models/test_useremail.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestCase from sentry.testutils.silo import control_silo_test from sentry.users.models.useremail import UserEmail diff --git a/tests/sentry/users/models/test_userpermission.py b/tests/sentry/users/models/test_userpermission.py index 2eb99b2480ed54..5493f50d34a895 100644 --- a/tests/sentry/users/models/test_userpermission.py +++ b/tests/sentry/users/models/test_userpermission.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestCase from sentry.testutils.silo import control_silo_test from sentry.users.models.userpermission import UserPermission diff --git a/tests/sentry/users/models/test_userrole.py b/tests/sentry/users/models/test_userrole.py index d17b341ec3ad09..2568ed812cda66 100644 --- a/tests/sentry/users/models/test_userrole.py +++ b/tests/sentry/users/models/test_userrole.py @@ -1,3 +1,4 @@ +from typing import int from django.conf import settings from sentry.testutils.cases import TestCase diff --git a/tests/sentry/users/services/test_user.py b/tests/sentry/users/services/test_user.py index 233179e4d4ce05..0552df06670e10 100644 --- a/tests/sentry/users/services/test_user.py +++ b/tests/sentry/users/services/test_user.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TransactionTestCase from sentry.testutils.silo import all_silo_test from sentry.users.services.user.service import user_service diff --git a/tests/sentry/users/services/test_user_impl.py b/tests/sentry/users/services/test_user_impl.py index 810aa2c735a31f..3e5a3f6835bba6 100644 --- a/tests/sentry/users/services/test_user_impl.py +++ b/tests/sentry/users/services/test_user_impl.py @@ -1,3 +1,4 @@ +from typing import int from sentry.auth.providers.fly.provider import FlyOAuth2Provider from sentry.models.authidentity import AuthIdentity from sentry.models.authprovider import AuthProvider diff --git a/tests/sentry/users/services/test_user_option.py b/tests/sentry/users/services/test_user_option.py index ff714d854c8a50..f2a37f6c074d5b 100644 --- a/tests/sentry/users/services/test_user_option.py +++ b/tests/sentry/users/services/test_user_option.py @@ -1,3 +1,4 @@ +from typing import int import time from sentry.testutils.factories import Factories diff --git a/tests/sentry/users/web/test_account_identity.py b/tests/sentry/users/web/test_account_identity.py index 5fb658819b6835..9cc5d43d85bfad 100644 --- a/tests/sentry/users/web/test_account_identity.py +++ b/tests/sentry/users/web/test_account_identity.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.urls import reverse diff --git a/tests/sentry/users/web/test_accounts.py b/tests/sentry/users/web/test_accounts.py index 4d1cf1628878fa..78794d1f3ade1a 100644 --- a/tests/sentry/users/web/test_accounts.py +++ b/tests/sentry/users/web/test_accounts.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from functools import cached_property from unittest.mock import MagicMock, call, patch diff --git a/tests/sentry/users/web/test_accounts_form.py b/tests/sentry/users/web/test_accounts_form.py index 417514509c72ef..ba0ff7206094a6 100644 --- a/tests/sentry/users/web/test_accounts_form.py +++ b/tests/sentry/users/web/test_accounts_form.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestCase from sentry.testutils.silo import control_silo_test from sentry.users.web.accounts_form import RelocationForm diff --git a/tests/sentry/users/web/test_user_avatar.py b/tests/sentry/users/web/test_user_avatar.py index d429c07f5fa2f1..752dfab7c16527 100644 --- a/tests/sentry/users/web/test_user_avatar.py +++ b/tests/sentry/users/web/test_user_avatar.py @@ -1,3 +1,4 @@ +from typing import int from io import BytesIO from django.urls import reverse diff --git a/tests/sentry/utils/email/test_address.py b/tests/sentry/utils/email/test_address.py index 11c10fd35b6b75..6b5fcfe2d9ef93 100644 --- a/tests/sentry/utils/email/test_address.py +++ b/tests/sentry/utils/email/test_address.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.core.signing import BadSignature diff --git a/tests/sentry/utils/email/test_backend.py b/tests/sentry/utils/email/test_backend.py index db8c4f2e67d36e..622bb2f1f9df66 100644 --- a/tests/sentry/utils/email/test_backend.py +++ b/tests/sentry/utils/email/test_backend.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestCase from sentry.utils.email.backend import get_mail_backend diff --git a/tests/sentry/utils/email/test_list_resolver.py b/tests/sentry/utils/email/test_list_resolver.py index 7a961c8308f5f5..bb89f3364f45d6 100644 --- a/tests/sentry/utils/email/test_list_resolver.py +++ b/tests/sentry/utils/email/test_list_resolver.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.models.project import Project diff --git a/tests/sentry/utils/email/test_message_builder.py b/tests/sentry/utils/email/test_message_builder.py index 2c0400b913ef1f..85f31da5c753f5 100644 --- a/tests/sentry/utils/email/test_message_builder.py +++ b/tests/sentry/utils/email/test_message_builder.py @@ -1,3 +1,4 @@ +from typing import int import functools from unittest.mock import MagicMock, patch diff --git a/tests/sentry/utils/email/test_send_mail.py b/tests/sentry/utils/email/test_send_mail.py index 6a4ba3ab502743..695e442b3ce85f 100644 --- a/tests/sentry/utils/email/test_send_mail.py +++ b/tests/sentry/utils/email/test_send_mail.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from sentry.testutils.cases import TestCase diff --git a/tests/sentry/utils/email/test_signer.py b/tests/sentry/utils/email/test_signer.py index 2ecb0aa7d0e506..070a4734b38839 100644 --- a/tests/sentry/utils/email/test_signer.py +++ b/tests/sentry/utils/email/test_signer.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestCase from sentry.utils.email.signer import _CaseInsensitiveSigner diff --git a/tests/sentry/utils/kafka/test_rebalance_delay.py b/tests/sentry/utils/kafka/test_rebalance_delay.py index 85fa7b3db0f6a1..9b22c002e72702 100644 --- a/tests/sentry/utils/kafka/test_rebalance_delay.py +++ b/tests/sentry/utils/kafka/test_rebalance_delay.py @@ -1,3 +1,4 @@ +from typing import int import time from unittest import mock diff --git a/tests/sentry/utils/kvstore/test_bigtable.py b/tests/sentry/utils/kvstore/test_bigtable.py index 2f6526c2739273..ac2a626b5021d5 100644 --- a/tests/sentry/utils/kvstore/test_bigtable.py +++ b/tests/sentry/utils/kvstore/test_bigtable.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import functools import os diff --git a/tests/sentry/utils/kvstore/test_common.py b/tests/sentry/utils/kvstore/test_common.py index 553b0f85f33ffd..01c3d58802f87c 100644 --- a/tests/sentry/utils/kvstore/test_common.py +++ b/tests/sentry/utils/kvstore/test_common.py @@ -4,7 +4,7 @@ from collections.abc import Iterator from dataclasses import dataclass from datetime import timedelta -from typing import Generic +from typing import int, Generic import pytest diff --git a/tests/sentry/utils/kvstore/test_compat.py b/tests/sentry/utils/kvstore/test_compat.py index cce5bda83b6583..bdd21a4482859f 100644 --- a/tests/sentry/utils/kvstore/test_compat.py +++ b/tests/sentry/utils/kvstore/test_compat.py @@ -1,3 +1,4 @@ +from typing import int from redis import Redis from sentry.cache.redis import CommonRedisCache diff --git a/tests/sentry/utils/kvstore/test_encoding.py b/tests/sentry/utils/kvstore/test_encoding.py index 220cacdf4ea2b0..43f8951cb836d0 100644 --- a/tests/sentry/utils/kvstore/test_encoding.py +++ b/tests/sentry/utils/kvstore/test_encoding.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Iterator import pytest diff --git a/tests/sentry/utils/locking/backends/test_migration.py b/tests/sentry/utils/locking/backends/test_migration.py index 0307948c728a77..190d1f80f7ff12 100644 --- a/tests/sentry/utils/locking/backends/test_migration.py +++ b/tests/sentry/utils/locking/backends/test_migration.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase import pytest diff --git a/tests/sentry/utils/locking/backends/test_redis.py b/tests/sentry/utils/locking/backends/test_redis.py index f351e80df9db51..a82f10a318a0a5 100644 --- a/tests/sentry/utils/locking/backends/test_redis.py +++ b/tests/sentry/utils/locking/backends/test_redis.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from functools import cached_property from unittest import TestCase diff --git a/tests/sentry/utils/locking/test_lock.py b/tests/sentry/utils/locking/test_lock.py index c2700d58239b0a..7c3c605121328f 100644 --- a/tests/sentry/utils/locking/test_lock.py +++ b/tests/sentry/utils/locking/test_lock.py @@ -1,3 +1,4 @@ +from typing import int import unittest from unittest import mock from unittest.mock import MagicMock, call, patch diff --git a/tests/sentry/utils/mockdata/test_core.py b/tests/sentry/utils/mockdata/test_core.py index e162db2ecfe6ff..87744300ed53bd 100644 --- a/tests/sentry/utils/mockdata/test_core.py +++ b/tests/sentry/utils/mockdata/test_core.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.models.broadcast import Broadcast diff --git a/tests/sentry/utils/sdk_crashes/conftest.py b/tests/sentry/utils/sdk_crashes/conftest.py index 60ad067cec65b2..a2ea1eedf6a1cf 100644 --- a/tests/sentry/utils/sdk_crashes/conftest.py +++ b/tests/sentry/utils/sdk_crashes/conftest.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Callable, Collection from types import ModuleType diff --git a/tests/sentry/utils/sdk_crashes/test_build_sdk_crash_detection_configs.py b/tests/sentry/utils/sdk_crashes/test_build_sdk_crash_detection_configs.py index 334f0c4071a3eb..dad8458d009611 100644 --- a/tests/sentry/utils/sdk_crashes/test_build_sdk_crash_detection_configs.py +++ b/tests/sentry/utils/sdk_crashes/test_build_sdk_crash_detection_configs.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.helpers.options import override_options from sentry.utils.sdk_crashes.sdk_crash_detection_config import ( SdkName, diff --git a/tests/sentry/utils/sdk_crashes/test_event_stripper.py b/tests/sentry/utils/sdk_crashes/test_event_stripper.py index 295c9cb6c3d7df..ada8937db94223 100644 --- a/tests/sentry/utils/sdk_crashes/test_event_stripper.py +++ b/tests/sentry/utils/sdk_crashes/test_event_stripper.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence import pytest diff --git a/tests/sentry/utils/sdk_crashes/test_path_replacer.py b/tests/sentry/utils/sdk_crashes/test_path_replacer.py index dc922ae5d13e00..48eb93f4aa736e 100644 --- a/tests/sentry/utils/sdk_crashes/test_path_replacer.py +++ b/tests/sentry/utils/sdk_crashes/test_path_replacer.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.utils.sdk_crashes.path_replacer import ( diff --git a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection.py b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection.py index 87cb6e081cd826..ae16aed23ec388 100644 --- a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection.py +++ b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection.py @@ -1,3 +1,4 @@ +from typing import int import abc from collections.abc import Callable, Collection, Sequence from unittest.mock import MagicMock, call, patch diff --git a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_cocoa.py b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_cocoa.py index 887c0b3b62c484..2e4b949ebac69d 100644 --- a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_cocoa.py +++ b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_cocoa.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Collection from unittest.mock import MagicMock, patch diff --git a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_dart.py b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_dart.py index 95c44077c373fc..3fac18214e2774 100644 --- a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_dart.py +++ b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_dart.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from functools import wraps from unittest.mock import patch diff --git a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_dotnet.py b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_dotnet.py index fb0f08ad793abf..bb6c321bc8dbcc 100644 --- a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_dotnet.py +++ b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_dotnet.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from functools import wraps from unittest.mock import patch diff --git a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_java.py b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_java.py index 52a8fd523dd7f1..1832a41dcc17f7 100644 --- a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_java.py +++ b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_java.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from functools import wraps from unittest.mock import patch diff --git a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_native.py b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_native.py index 83a8bb97922dab..e75a5b1737ee96 100644 --- a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_native.py +++ b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_native.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from functools import wraps from unittest.mock import patch diff --git a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_react_native.py b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_react_native.py index 70210cb0fdc90e..c57ced02246187 100644 --- a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_react_native.py +++ b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detection_react_native.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from functools import wraps from unittest.mock import patch diff --git a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detector.py b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detector.py index 75e4de8df480c6..2bfc2dd7149bdf 100644 --- a/tests/sentry/utils/sdk_crashes/test_sdk_crash_detector.py +++ b/tests/sentry/utils/sdk_crashes/test_sdk_crash_detector.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.utils.sdk_crashes.sdk_crash_detection_config import ( diff --git a/tests/sentry/utils/security/test_orgauthtoken_token.py b/tests/sentry/utils/security/test_orgauthtoken_token.py index 8e85f90b59e96e..049ff2026130fc 100644 --- a/tests/sentry/utils/security/test_orgauthtoken_token.py +++ b/tests/sentry/utils/security/test_orgauthtoken_token.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase from sentry.utils import json diff --git a/tests/sentry/utils/test_arroyo_producer.py b/tests/sentry/utils/test_arroyo_producer.py index 53a5b25b16abbe..6bf763577fd765 100644 --- a/tests/sentry/utils/test_arroyo_producer.py +++ b/tests/sentry/utils/test_arroyo_producer.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock from arroyo.backends.kafka import KafkaProducer diff --git a/tests/sentry/utils/test_assets.py b/tests/sentry/utils/test_assets.py index b3a7ee537e21a0..52b0d97710b9de 100644 --- a/tests/sentry/utils/test_assets.py +++ b/tests/sentry/utils/test_assets.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import pathlib from collections.abc import Generator diff --git a/tests/sentry/utils/test_audit.py b/tests/sentry/utils/test_audit.py index e856f51098d4eb..d48fa73ccb7715 100644 --- a/tests/sentry/utils/test_audit.py +++ b/tests/sentry/utils/test_audit.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.auth.models import AnonymousUser from django.http.request import HttpRequest diff --git a/tests/sentry/utils/test_auth.py b/tests/sentry/utils/test_auth.py index 92c3ffb468eba9..02ab5fe21f53d9 100644 --- a/tests/sentry/utils/test_auth.py +++ b/tests/sentry/utils/test_auth.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.contrib.auth.models import AnonymousUser diff --git a/tests/sentry/utils/test_circuit_breaker.py b/tests/sentry/utils/test_circuit_breaker.py index ff3a868e3ca621..5890d2a918891f 100644 --- a/tests/sentry/utils/test_circuit_breaker.py +++ b/tests/sentry/utils/test_circuit_breaker.py @@ -1,3 +1,4 @@ +from typing import int import time from unittest.mock import MagicMock, patch diff --git a/tests/sentry/utils/test_circuit_breaker2.py b/tests/sentry/utils/test_circuit_breaker2.py index 6eff9e4b53d093..de76a51d89e7b5 100644 --- a/tests/sentry/utils/test_circuit_breaker2.py +++ b/tests/sentry/utils/test_circuit_breaker2.py @@ -1,5 +1,5 @@ import time -from typing import Any +from typing import int, Any from unittest import TestCase from unittest.mock import ANY, MagicMock, patch diff --git a/tests/sentry/utils/test_codecs.py b/tests/sentry/utils/test_codecs.py index e27e5e870279b4..3988396fbf65cb 100644 --- a/tests/sentry/utils/test_codecs.py +++ b/tests/sentry/utils/test_codecs.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/utils/test_committers.py b/tests/sentry/utils/test_committers.py index cd2ad3dd7aa84b..224a785a867727 100644 --- a/tests/sentry/utils/test_committers.py +++ b/tests/sentry/utils/test_committers.py @@ -1,3 +1,4 @@ +from typing import int import unittest from datetime import timedelta from unittest.mock import Mock diff --git a/tests/sentry/utils/test_concurrent.py b/tests/sentry/utils/test_concurrent.py index 253fe01fdbf21e..481bdb7d2da6de 100644 --- a/tests/sentry/utils/test_concurrent.py +++ b/tests/sentry/utils/test_concurrent.py @@ -1,3 +1,4 @@ +from typing import int import _thread from concurrent.futures import CancelledError, Future from contextlib import contextmanager diff --git a/tests/sentry/utils/test_confluent_producer.py b/tests/sentry/utils/test_confluent_producer.py index 8ff84068935480..14f37a825681cb 100644 --- a/tests/sentry/utils/test_confluent_producer.py +++ b/tests/sentry/utils/test_confluent_producer.py @@ -1,3 +1,4 @@ +from typing import int from arroyo.backends.kafka import ConfluentProducer from confluent_kafka import Producer diff --git a/tests/sentry/utils/test_cursors.py b/tests/sentry/utils/test_cursors.py index a3a0de93a9f72e..4bcaada56b91be 100644 --- a/tests/sentry/utils/test_cursors.py +++ b/tests/sentry/utils/test_cursors.py @@ -1,6 +1,6 @@ import math from types import SimpleNamespace -from typing import TypedDict +from typing import int, TypedDict from sentry.utils.cursors import Cursor, KeyCallable, build_cursor diff --git a/tests/sentry/utils/test_datastructures.py b/tests/sentry/utils/test_datastructures.py index a82eea0c088db9..ba3b67ac6c5550 100644 --- a/tests/sentry/utils/test_datastructures.py +++ b/tests/sentry/utils/test_datastructures.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.utils.datastructures import BidirectionalMapping diff --git a/tests/sentry/utils/test_dates.py b/tests/sentry/utils/test_dates.py index 004139077e5827..a9ed70c6a79243 100644 --- a/tests/sentry/utils/test_dates.py +++ b/tests/sentry/utils/test_dates.py @@ -1,3 +1,4 @@ +from typing import int import datetime import pytest diff --git a/tests/sentry/utils/test_event.py b/tests/sentry/utils/test_event.py index ba2d6343e4702f..055e9efc55085f 100644 --- a/tests/sentry/utils/test_event.py +++ b/tests/sentry/utils/test_event.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import int, Any from unittest import TestCase from sentry.utils.event import has_stacktrace, is_handled diff --git a/tests/sentry/utils/test_event_frames.py b/tests/sentry/utils/test_event_frames.py index 3745ba74322d0a..5180ea3a855793 100644 --- a/tests/sentry/utils/test_event_frames.py +++ b/tests/sentry/utils/test_event_frames.py @@ -1,3 +1,4 @@ +from typing import int import unittest from sentry.testutils.cases import TestCase diff --git a/tests/sentry/utils/test_event_tracker.py b/tests/sentry/utils/test_event_tracker.py index e31558de9f64b1..0613d54a120ab8 100644 --- a/tests/sentry/utils/test_event_tracker.py +++ b/tests/sentry/utils/test_event_tracker.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.ingest.types import ConsumerType diff --git a/tests/sentry/utils/test_eventuser.py b/tests/sentry/utils/test_eventuser.py index 04a1188a00ad5d..80e6b5d74bc473 100644 --- a/tests/sentry/utils/test_eventuser.py +++ b/tests/sentry/utils/test_eventuser.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/utils/test_exceptions.py b/tests/sentry/utils/test_exceptions.py index 8b7f83bcc480b2..f6ca394bb6595a 100644 --- a/tests/sentry/utils/test_exceptions.py +++ b/tests/sentry/utils/test_exceptions.py @@ -1,5 +1,5 @@ from collections.abc import Callable -from typing import Any +from typing import int, Any from unittest.mock import Mock, patch from rediscluster.exceptions import RedisClusterException # type: ignore[attr-defined] diff --git a/tests/sentry/utils/test_function_cache.py b/tests/sentry/utils/test_function_cache.py index 9a4f2883a6cd45..425dd7aed16c9e 100644 --- a/tests/sentry/utils/test_function_cache.py +++ b/tests/sentry/utils/test_function_cache.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import create_autospec from django.db import models diff --git a/tests/sentry/utils/test_geo.py b/tests/sentry/utils/test_geo.py index fafe9727c39891..686a8fbe0e93d7 100644 --- a/tests/sentry/utils/test_geo.py +++ b/tests/sentry/utils/test_geo.py @@ -1,3 +1,4 @@ +from typing import int from django.test.utils import override_settings from sentry.testutils.cases import TestCase diff --git a/tests/sentry/utils/test_github.py b/tests/sentry/utils/test_github.py index 16a2eaef11cb23..db27bd1d9df533 100644 --- a/tests/sentry/utils/test_github.py +++ b/tests/sentry/utils/test_github.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase import pytest diff --git a/tests/sentry/utils/test_glob.py b/tests/sentry/utils/test_glob.py index 0e2105b106113f..196e6c8cdec647 100644 --- a/tests/sentry/utils/test_glob.py +++ b/tests/sentry/utils/test_glob.py @@ -1,4 +1,4 @@ -from typing import NamedTuple, Self +from typing import NamedTuple, Self, int import pytest diff --git a/tests/sentry/utils/test_hashlib.py b/tests/sentry/utils/test_hashlib.py index 84b32c517e4ab9..184a06effee364 100644 --- a/tests/sentry/utils/test_hashlib.py +++ b/tests/sentry/utils/test_hashlib.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase import pytest diff --git a/tests/sentry/utils/test_http.py b/tests/sentry/utils/test_http.py index f70649af584d5d..f5d976508ba62f 100644 --- a/tests/sentry/utils/test_http.py +++ b/tests/sentry/utils/test_http.py @@ -1,3 +1,4 @@ +from typing import int import unittest from unittest import mock diff --git a/tests/sentry/utils/test_integrationdocs.py b/tests/sentry/utils/test_integrationdocs.py index 939b7cb3c21574..1456de450c90d1 100644 --- a/tests/sentry/utils/test_integrationdocs.py +++ b/tests/sentry/utils/test_integrationdocs.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.utils.integrationdocs import SuspiciousDocPathOperation, load_doc diff --git a/tests/sentry/utils/test_iterators.py b/tests/sentry/utils/test_iterators.py index d7d0ad2f6d1b92..1a52b5ca8246aa 100644 --- a/tests/sentry/utils/test_iterators.py +++ b/tests/sentry/utils/test_iterators.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.utils.iterators import advance, chunked, shingle diff --git a/tests/sentry/utils/test_json.py b/tests/sentry/utils/test_json.py index 675c4302f3663c..6b99527cc3b5a8 100644 --- a/tests/sentry/utils/test_json.py +++ b/tests/sentry/utils/test_json.py @@ -1,3 +1,4 @@ +from typing import int import datetime import uuid from enum import Enum diff --git a/tests/sentry/utils/test_jwt.py b/tests/sentry/utils/test_jwt.py index b274628e346b5d..ece8960c1adbb3 100644 --- a/tests/sentry/utils/test_jwt.py +++ b/tests/sentry/utils/test_jwt.py @@ -1,3 +1,4 @@ +from typing import int import jwt as pyjwt import pytest diff --git a/tests/sentry/utils/test_kafka_config.py b/tests/sentry/utils/test_kafka_config.py index 343bb48b7a91db..a68b865eafeae9 100644 --- a/tests/sentry/utils/test_kafka_config.py +++ b/tests/sentry/utils/test_kafka_config.py @@ -1,3 +1,4 @@ +from typing import int import os import pytest diff --git a/tests/sentry/utils/test_letter_avatar.py b/tests/sentry/utils/test_letter_avatar.py index 3a9b7d2796ecdc..73c4258cd80cb0 100644 --- a/tests/sentry/utils/test_letter_avatar.py +++ b/tests/sentry/utils/test_letter_avatar.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.avatar import get_letter_avatar diff --git a/tests/sentry/utils/test_linksign.py b/tests/sentry/utils/test_linksign.py index c0b97cf06b2c56..9584b0486ab18d 100644 --- a/tests/sentry/utils/test_linksign.py +++ b/tests/sentry/utils/test_linksign.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import urlparse from django.test.client import RequestFactory diff --git a/tests/sentry/utils/test_math.py b/tests/sentry/utils/test_math.py index b39fbc67ef6bff..8f33d7ec2624a1 100644 --- a/tests/sentry/utils/test_math.py +++ b/tests/sentry/utils/test_math.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.utils.math import ExponentialMovingAverage, nice_int diff --git a/tests/sentry/utils/test_meta.py b/tests/sentry/utils/test_meta.py index 22c9f6d3fed1dc..b7ea5d8bfc69e6 100644 --- a/tests/sentry/utils/test_meta.py +++ b/tests/sentry/utils/test_meta.py @@ -1,7 +1,7 @@ from __future__ import annotations from copy import deepcopy -from typing import Any +from typing import int, Any from unittest import TestCase from sentry.utils.meta import Meta diff --git a/tests/sentry/utils/test_metrics.py b/tests/sentry/utils/test_metrics.py index 7328145c1f2379..814a1a017601d8 100644 --- a/tests/sentry/utils/test_metrics.py +++ b/tests/sentry/utils/test_metrics.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/utils/test_not_set.py b/tests/sentry/utils/test_not_set.py index 3057ab1603288b..493af49eea2876 100644 --- a/tests/sentry/utils/test_not_set.py +++ b/tests/sentry/utils/test_not_set.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestCase from sentry.utils.not_set import NOT_SET, default_if_not_set diff --git a/tests/sentry/utils/test_numbers.py b/tests/sentry/utils/test_numbers.py index 5a9fbbf85a6158..b287324eeaf394 100644 --- a/tests/sentry/utils/test_numbers.py +++ b/tests/sentry/utils/test_numbers.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.numbers import ( base32_decode, base32_encode, diff --git a/tests/sentry/utils/test_outcome_aggregator.py b/tests/sentry/utils/test_outcome_aggregator.py index 1291c76b24da8d..ce505995b066d6 100644 --- a/tests/sentry/utils/test_outcome_aggregator.py +++ b/tests/sentry/utils/test_outcome_aggregator.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/utils/test_outcomes.py b/tests/sentry/utils/test_outcomes.py index 81a3488ef4a929..38a840085ced30 100644 --- a/tests/sentry/utils/test_outcomes.py +++ b/tests/sentry/utils/test_outcomes.py @@ -1,3 +1,4 @@ +from typing import int import types from datetime import datetime, timedelta from unittest import mock diff --git a/tests/sentry/utils/test_patch_set.py b/tests/sentry/utils/test_patch_set.py index 300de7a2fa253a..e741d9e6054b14 100644 --- a/tests/sentry/utils/test_patch_set.py +++ b/tests/sentry/utils/test_patch_set.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.utils.patch_set import ( diff --git a/tests/sentry/utils/test_projectflags.py b/tests/sentry/utils/test_projectflags.py index 06d6e223db7a1e..887ba619188a4a 100644 --- a/tests/sentry/utils/test_projectflags.py +++ b/tests/sentry/utils/test_projectflags.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock, patch from django.db.models import F diff --git a/tests/sentry/utils/test_query.py b/tests/sentry/utils/test_query.py index 70f251171f6688..ffc0ebc26f814c 100644 --- a/tests/sentry/utils/test_query.py +++ b/tests/sentry/utils/test_query.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import pytest diff --git a/tests/sentry/utils/test_ratelimits.py b/tests/sentry/utils/test_ratelimits.py index eb67ca8c44eb9c..0dae9fa2a55244 100644 --- a/tests/sentry/utils/test_ratelimits.py +++ b/tests/sentry/utils/test_ratelimits.py @@ -1,3 +1,4 @@ +from typing import int from random import randint from sentry import ratelimits diff --git a/tests/sentry/utils/test_redis.py b/tests/sentry/utils/test_redis.py index f00a15f99718ef..717727856e5ec1 100644 --- a/tests/sentry/utils/test_redis.py +++ b/tests/sentry/utils/test_redis.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from unittest import TestCase, mock diff --git a/tests/sentry/utils/test_registry.py b/tests/sentry/utils/test_registry.py index a128b459ffb333..72e9275c8c89d1 100644 --- a/tests/sentry/utils/test_registry.py +++ b/tests/sentry/utils/test_registry.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Callable import pytest diff --git a/tests/sentry/utils/test_retries.py b/tests/sentry/utils/test_retries.py index a979211f1f72a7..afed1aaf4a7546 100644 --- a/tests/sentry/utils/test_retries.py +++ b/tests/sentry/utils/test_retries.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase, mock import pytest diff --git a/tests/sentry/utils/test_rust.py b/tests/sentry/utils/test_rust.py index e9ca4245c45346..454c78f0c41ba5 100644 --- a/tests/sentry/utils/test_rust.py +++ b/tests/sentry/utils/test_rust.py @@ -1,3 +1,4 @@ +from typing import int from symbolic.exceptions import SymbolicError from sentry.utils.rust import merge_rust_info_frames, starts_with, strip_symbol diff --git a/tests/sentry/utils/test_safe.py b/tests/sentry/utils/test_safe.py index b06179be2fb2a4..f0c8953a43f2b6 100644 --- a/tests/sentry/utils/test_safe.py +++ b/tests/sentry/utils/test_safe.py @@ -3,7 +3,7 @@ import unittest from collections.abc import MutableMapping from functools import partial -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/utils/test_samples.py b/tests/sentry/utils/test_samples.py index fef47675b2ece7..be16a1f631bdcd 100644 --- a/tests/sentry/utils/test_samples.py +++ b/tests/sentry/utils/test_samples.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/utils/test_sdk.py b/tests/sentry/utils/test_sdk.py index 43f00bad016a6a..c84f9327926f81 100644 --- a/tests/sentry/utils/test_sdk.py +++ b/tests/sentry/utils/test_sdk.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import contextlib from unittest.mock import MagicMock, patch diff --git a/tests/sentry/utils/test_sentryappwebhookrequests.py b/tests/sentry/utils/test_sentryappwebhookrequests.py index 526f68b31adcbf..5d7955cb3940b1 100644 --- a/tests/sentry/utils/test_sentryappwebhookrequests.py +++ b/tests/sentry/utils/test_sentryappwebhookrequests.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestCase from sentry.utils.sentry_apps import SentryAppWebhookRequestsBuffer diff --git a/tests/sentry/utils/test_services.py b/tests/sentry/utils/test_services.py index 2e647816400a25..e0eca11ec0fb4a 100644 --- a/tests/sentry/utils/test_services.py +++ b/tests/sentry/utils/test_services.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from abc import ABC, abstractmethod from unittest.mock import Mock diff --git a/tests/sentry/utils/test_session_store.py b/tests/sentry/utils/test_session_store.py index f91802d327e2c4..8c777041535b1a 100644 --- a/tests/sentry/utils/test_session_store.py +++ b/tests/sentry/utils/test_session_store.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase from django.test import Client, RequestFactory diff --git a/tests/sentry/utils/test_signing.py b/tests/sentry/utils/test_signing.py index 5f62428df2ce74..780008c6c48525 100644 --- a/tests/sentry/utils/test_signing.py +++ b/tests/sentry/utils/test_signing.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.core.signing import BadSignature diff --git a/tests/sentry/utils/test_snowflake.py b/tests/sentry/utils/test_snowflake.py index 0560948f227f35..d5ecd2e698604d 100644 --- a/tests/sentry/utils/test_snowflake.py +++ b/tests/sentry/utils/test_snowflake.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime import pytest diff --git a/tests/sentry/utils/test_snuba.py b/tests/sentry/utils/test_snuba.py index a275d59d35e5ba..fd664f8ba787ec 100644 --- a/tests/sentry/utils/test_snuba.py +++ b/tests/sentry/utils/test_snuba.py @@ -1,3 +1,4 @@ +from typing import int import unittest from datetime import datetime, timedelta from unittest import mock diff --git a/tests/sentry/utils/test_strings.py b/tests/sentry/utils/test_strings.py index 2e1a6bbcadf151..1ee56f5bccccc1 100644 --- a/tests/sentry/utils/test_strings.py +++ b/tests/sentry/utils/test_strings.py @@ -1,3 +1,4 @@ +from typing import int import functools import pytest diff --git a/tests/sentry/utils/test_tag_normalization.py b/tests/sentry/utils/test_tag_normalization.py index cc8de8ad5af9d1..ba7db6b8d18906 100644 --- a/tests/sentry/utils/test_tag_normalization.py +++ b/tests/sentry/utils/test_tag_normalization.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/utils/test_time_window.py b/tests/sentry/utils/test_time_window.py index 26d3de19a5685a..53c232ccd9537a 100644 --- a/tests/sentry/utils/test_time_window.py +++ b/tests/sentry/utils/test_time_window.py @@ -1,3 +1,4 @@ +from typing import int import random import pytest diff --git a/tests/sentry/utils/test_types.py b/tests/sentry/utils/test_types.py index 45a392c872fe2d..a80f6e6eba24e4 100644 --- a/tests/sentry/utils/test_types.py +++ b/tests/sentry/utils/test_types.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase import pytest diff --git a/tests/sentry/utils/test_urls.py b/tests/sentry/utils/test_urls.py index 0fd51c6732f75a..2efa11dbbc3cac 100644 --- a/tests/sentry/utils/test_urls.py +++ b/tests/sentry/utils/test_urls.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase import pytest diff --git a/tests/sentry/utils/test_validators.py b/tests/sentry/utils/test_validators.py index 46dc0ed49fc255..b24224f6beb38b 100644 --- a/tests/sentry/utils/test_validators.py +++ b/tests/sentry/utils/test_validators.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.validators import is_event_id, is_span_id, normalize_event_id diff --git a/tests/sentry/utils/test_zip.py b/tests/sentry/utils/test_zip.py index dfa5a9d6f19900..f6675ec2a00ccc 100644 --- a/tests/sentry/utils/test_zip.py +++ b/tests/sentry/utils/test_zip.py @@ -1,3 +1,4 @@ +from typing import int from sentry.utils.zip import is_unsafe_path diff --git a/tests/sentry/web/forms/test_accounts.py b/tests/sentry/web/forms/test_accounts.py index 4d3bd1a68fb968..73befe58a2801e 100644 --- a/tests/sentry/web/forms/test_accounts.py +++ b/tests/sentry/web/forms/test_accounts.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.pytest.fixtures import django_db_all from sentry.testutils.silo import no_silo_test from sentry.users.models.user_option import UserOption diff --git a/tests/sentry/web/frontend/generic/test_static_media.py b/tests/sentry/web/frontend/generic/test_static_media.py index 05617d7c1ab7f5..085eb882a65a2f 100644 --- a/tests/sentry/web/frontend/generic/test_static_media.py +++ b/tests/sentry/web/frontend/generic/test_static_media.py @@ -1,3 +1,4 @@ +from typing import int import os from django.test.utils import override_settings diff --git a/tests/sentry/web/frontend/test_auth_channel_login.py b/tests/sentry/web/frontend/test_auth_channel_login.py index b618467f63d152..c905aab7e7e7e9 100644 --- a/tests/sentry/web/frontend/test_auth_channel_login.py +++ b/tests/sentry/web/frontend/test_auth_channel_login.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.auth.providers.fly.provider import FlyOAuth2Provider diff --git a/tests/sentry/web/frontend/test_auth_close.py b/tests/sentry/web/frontend/test_auth_close.py index 072f2fc14b601b..576101523151c5 100644 --- a/tests/sentry/web/frontend/test_auth_close.py +++ b/tests/sentry/web/frontend/test_auth_close.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from urllib.parse import quote as urlquote diff --git a/tests/sentry/web/frontend/test_auth_login.py b/tests/sentry/web/frontend/test_auth_login.py index 37b2f42ed03ad2..2caaa68f5d9ba3 100644 --- a/tests/sentry/web/frontend/test_auth_login.py +++ b/tests/sentry/web/frontend/test_auth_login.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from functools import cached_property from unittest import mock diff --git a/tests/sentry/web/frontend/test_auth_logout.py b/tests/sentry/web/frontend/test_auth_logout.py index f086c278da42ea..a59b226530acb1 100644 --- a/tests/sentry/web/frontend/test_auth_logout.py +++ b/tests/sentry/web/frontend/test_auth_logout.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from urllib.parse import quote diff --git a/tests/sentry/web/frontend/test_auth_oauth2.py b/tests/sentry/web/frontend/test_auth_oauth2.py index 03d5b6420f7a44..7be208938c49a3 100644 --- a/tests/sentry/web/frontend/test_auth_oauth2.py +++ b/tests/sentry/web/frontend/test_auth_oauth2.py @@ -1,3 +1,4 @@ +from typing import int from collections import namedtuple from functools import cached_property from unittest import mock diff --git a/tests/sentry/web/frontend/test_auth_organization_login.py b/tests/sentry/web/frontend/test_auth_organization_login.py index 506d4fbffbbd6e..fb90fe364741ff 100644 --- a/tests/sentry/web/frontend/test_auth_organization_login.py +++ b/tests/sentry/web/frontend/test_auth_organization_login.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest import mock from urllib.parse import quote as urlquote diff --git a/tests/sentry/web/frontend/test_auth_saml2.py b/tests/sentry/web/frontend/test_auth_saml2.py index 8b88f6eca06b46..cb50ec54172822 100644 --- a/tests/sentry/web/frontend/test_auth_saml2.py +++ b/tests/sentry/web/frontend/test_auth_saml2.py @@ -1,3 +1,4 @@ +from typing import int import base64 import contextlib from functools import cached_property diff --git a/tests/sentry/web/frontend/test_cli.py b/tests/sentry/web/frontend/test_cli.py index 3dae7f9e88e3c2..6145baede6d366 100644 --- a/tests/sentry/web/frontend/test_cli.py +++ b/tests/sentry/web/frontend/test_cli.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import TestCase diff --git a/tests/sentry/web/frontend/test_csrf_failure.py b/tests/sentry/web/frontend/test_csrf_failure.py index 4dcbe91c85d802..08d37502f42dbe 100644 --- a/tests/sentry/web/frontend/test_csrf_failure.py +++ b/tests/sentry/web/frontend/test_csrf_failure.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import TestCase diff --git a/tests/sentry/web/frontend/test_data_secrecy_error.py b/tests/sentry/web/frontend/test_data_secrecy_error.py index 7bda40bdfeeddc..a183e7a5280ea8 100644 --- a/tests/sentry/web/frontend/test_data_secrecy_error.py +++ b/tests/sentry/web/frontend/test_data_secrecy_error.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.silo.base import SiloMode diff --git a/tests/sentry/web/frontend/test_disabled_member_view.py b/tests/sentry/web/frontend/test_disabled_member_view.py index 2722b92828033e..b2b92d81663e99 100644 --- a/tests/sentry/web/frontend/test_disabled_member_view.py +++ b/tests/sentry/web/frontend/test_disabled_member_view.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from django.urls import reverse diff --git a/tests/sentry/web/frontend/test_doc_integration_avatar.py b/tests/sentry/web/frontend/test_doc_integration_avatar.py index 60fba902a8c550..1c4a964706ccdf 100644 --- a/tests/sentry/web/frontend/test_doc_integration_avatar.py +++ b/tests/sentry/web/frontend/test_doc_integration_avatar.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/web/frontend/test_error_404.py b/tests/sentry/web/frontend/test_error_404.py index 4e285bc5bd4a2e..1c47311d11c94f 100644 --- a/tests/sentry/web/frontend/test_error_404.py +++ b/tests/sentry/web/frontend/test_error_404.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import TestCase diff --git a/tests/sentry/web/frontend/test_error_500.py b/tests/sentry/web/frontend/test_error_500.py index 7fde3f161d6a89..680600ab6ed52b 100644 --- a/tests/sentry/web/frontend/test_error_500.py +++ b/tests/sentry/web/frontend/test_error_500.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import TestCase diff --git a/tests/sentry/web/frontend/test_group_event_json.py b/tests/sentry/web/frontend/test_group_event_json.py index 5d51117def2b8b..cb256f961133b9 100644 --- a/tests/sentry/web/frontend/test_group_event_json.py +++ b/tests/sentry/web/frontend/test_group_event_json.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from sentry.testutils.cases import TestCase diff --git a/tests/sentry/web/frontend/test_group_tag_export.py b/tests/sentry/web/frontend/test_group_tag_export.py index 149386d14faf0f..19745a2a130c93 100644 --- a/tests/sentry/web/frontend/test_group_tag_export.py +++ b/tests/sentry/web/frontend/test_group_tag_export.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from django.test import override_settings diff --git a/tests/sentry/web/frontend/test_home.py b/tests/sentry/web/frontend/test_home.py index 7bd6bc6f0803ad..d1627254bd57a8 100644 --- a/tests/sentry/web/frontend/test_home.py +++ b/tests/sentry/web/frontend/test_home.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from django.urls import reverse diff --git a/tests/sentry/web/frontend/test_integration_setup.py b/tests/sentry/web/frontend/test_integration_setup.py index 81a1431052e227..89cb97430179c6 100644 --- a/tests/sentry/web/frontend/test_integration_setup.py +++ b/tests/sentry/web/frontend/test_integration_setup.py @@ -1,3 +1,4 @@ +from typing import int from sentry.integrations.example import ExampleIntegrationProvider, ExampleSetupView from sentry.integrations.models.integration import Integration from sentry.integrations.models.organization_integration import OrganizationIntegration diff --git a/tests/sentry/web/frontend/test_js_sdk_loader.py b/tests/sentry/web/frontend/test_js_sdk_loader.py index 4890ab8c08f531..35f38b0e189d25 100644 --- a/tests/sentry/web/frontend/test_js_sdk_loader.py +++ b/tests/sentry/web/frontend/test_js_sdk_loader.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest import mock from unittest.mock import MagicMock, patch diff --git a/tests/sentry/web/frontend/test_mailgun_inbound_webhook.py b/tests/sentry/web/frontend/test_mailgun_inbound_webhook.py index 352ddcd9dd1f5b..b028b2e44d55e4 100644 --- a/tests/sentry/web/frontend/test_mailgun_inbound_webhook.py +++ b/tests/sentry/web/frontend/test_mailgun_inbound_webhook.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.hybridcloud.models.outbox import ControlOutbox diff --git a/tests/sentry/web/frontend/test_oauth_authorize.py b/tests/sentry/web/frontend/test_oauth_authorize.py index e2ed66e49c9851..c39cd37b09c644 100644 --- a/tests/sentry/web/frontend/test_oauth_authorize.py +++ b/tests/sentry/web/frontend/test_oauth_authorize.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from urllib.parse import parse_qs, urlparse diff --git a/tests/sentry/web/frontend/test_oauth_token.py b/tests/sentry/web/frontend/test_oauth_token.py index 6d603e8f8f7366..b56719d90d11c4 100644 --- a/tests/sentry/web/frontend/test_oauth_token.py +++ b/tests/sentry/web/frontend/test_oauth_token.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from django.utils import timezone diff --git a/tests/sentry/web/frontend/test_openidtoken.py b/tests/sentry/web/frontend/test_openidtoken.py index 1715bd0d26130d..4c4b5d30c75c44 100644 --- a/tests/sentry/web/frontend/test_openidtoken.py +++ b/tests/sentry/web/frontend/test_openidtoken.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from sentry.models.apiapplication import ApiApplication diff --git a/tests/sentry/web/frontend/test_organization_auth_settings.py b/tests/sentry/web/frontend/test_organization_auth_settings.py index 4db8eeaf5f856e..811ee5a6b187a3 100644 --- a/tests/sentry/web/frontend/test_organization_auth_settings.py +++ b/tests/sentry/web/frontend/test_organization_auth_settings.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/web/frontend/test_organization_avatar.py b/tests/sentry/web/frontend/test_organization_avatar.py index 6c5e0f98b71476..64943631d60fef 100644 --- a/tests/sentry/web/frontend/test_organization_avatar.py +++ b/tests/sentry/web/frontend/test_organization_avatar.py @@ -1,3 +1,4 @@ +from typing import int from io import BytesIO from django.urls import reverse diff --git a/tests/sentry/web/frontend/test_project_event.py b/tests/sentry/web/frontend/test_project_event.py index 8a845c94cdfd4e..c7bdce48511c4f 100644 --- a/tests/sentry/web/frontend/test_project_event.py +++ b/tests/sentry/web/frontend/test_project_event.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import SnubaTestCase, TestCase diff --git a/tests/sentry/web/frontend/test_react_page.py b/tests/sentry/web/frontend/test_react_page.py index 35e8f311e26fda..1d960aacebf352 100644 --- a/tests/sentry/web/frontend/test_react_page.py +++ b/tests/sentry/web/frontend/test_react_page.py @@ -1,3 +1,4 @@ +from typing import int from fnmatch import fnmatch from django.urls import URLResolver, get_resolver, reverse diff --git a/tests/sentry/web/frontend/test_reactivate_account.py b/tests/sentry/web/frontend/test_reactivate_account.py index 089204714ea8d0..55e53432c06635 100644 --- a/tests/sentry/web/frontend/test_reactivate_account.py +++ b/tests/sentry/web/frontend/test_reactivate_account.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from django.urls import reverse diff --git a/tests/sentry/web/frontend/test_release_webhook.py b/tests/sentry/web/frontend/test_release_webhook.py index bbcfe06c1e8191..30f01c5f1a71f9 100644 --- a/tests/sentry/web/frontend/test_release_webhook.py +++ b/tests/sentry/web/frontend/test_release_webhook.py @@ -1,3 +1,4 @@ +from typing import int import hmac from functools import cached_property from hashlib import sha256 diff --git a/tests/sentry/web/frontend/test_security_txt.py b/tests/sentry/web/frontend/test_security_txt.py index 6bf402c467a188..9fff06f3726815 100644 --- a/tests/sentry/web/frontend/test_security_txt.py +++ b/tests/sentry/web/frontend/test_security_txt.py @@ -1,3 +1,4 @@ +from typing import int from django.test.utils import override_settings from django.urls import reverse diff --git a/tests/sentry/web/frontend/test_setup_wizard.py b/tests/sentry/web/frontend/test_setup_wizard.py index 488d41fae9901e..131dd040ebc104 100644 --- a/tests/sentry/web/frontend/test_setup_wizard.py +++ b/tests/sentry/web/frontend/test_setup_wizard.py @@ -1,3 +1,4 @@ +from typing import int from django.test.utils import override_settings from django.urls import reverse diff --git a/tests/sentry/web/frontend/test_shared_group_details.py b/tests/sentry/web/frontend/test_shared_group_details.py index 3c722e0edabea5..015b16cce7149c 100644 --- a/tests/sentry/web/frontend/test_shared_group_details.py +++ b/tests/sentry/web/frontend/test_shared_group_details.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.models.groupshare import GroupShare from sentry.silo.base import SiloMode diff --git a/tests/sentry/web/frontend/test_twofactor.py b/tests/sentry/web/frontend/test_twofactor.py index f82b7f68e5eb03..aa5cb5fb761bd1 100644 --- a/tests/sentry/web/frontend/test_twofactor.py +++ b/tests/sentry/web/frontend/test_twofactor.py @@ -1,3 +1,4 @@ +from typing import int from time import time from unittest import mock diff --git a/tests/sentry/web/frontend/test_vercel_extension_configuration.py b/tests/sentry/web/frontend/test_vercel_extension_configuration.py index 87d775943b6c4c..fe050034d1de0e 100644 --- a/tests/sentry/web/frontend/test_vercel_extension_configuration.py +++ b/tests/sentry/web/frontend/test_vercel_extension_configuration.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import parse_qs, urlparse import responses diff --git a/tests/sentry/web/frontend/test_vsts_extension_configuration.py b/tests/sentry/web/frontend/test_vsts_extension_configuration.py index 11ed12b268525b..d0242f4121afce 100644 --- a/tests/sentry/web/frontend/test_vsts_extension_configuration.py +++ b/tests/sentry/web/frontend/test_vsts_extension_configuration.py @@ -1,3 +1,4 @@ +from typing import int from urllib.parse import parse_qsl, urlparse from django.test import override_settings diff --git a/tests/sentry/web/test_api.py b/tests/sentry/web/test_api.py index 59a4d08b051b93..9f66aed9862529 100644 --- a/tests/sentry/web/test_api.py +++ b/tests/sentry/web/test_api.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest import mock diff --git a/tests/sentry/web/test_client_config.py b/tests/sentry/web/test_client_config.py index 3a1068d08a71ae..19668759cdb765 100644 --- a/tests/sentry/web/test_client_config.py +++ b/tests/sentry/web/test_client_config.py @@ -1,7 +1,7 @@ from __future__ import annotations import urllib.parse -from typing import Any +from typing import int, Any import pytest from django.conf import settings diff --git a/tests/sentry/web/test_urls.py b/tests/sentry/web/test_urls.py index 55e7a2d8d48d3b..6969022ec6c814 100644 --- a/tests/sentry/web/test_urls.py +++ b/tests/sentry/web/test_urls.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import TestCase diff --git a/tests/sentry/workflow_engine/buffer/test_batch_client.py b/tests/sentry/workflow_engine/buffer/test_batch_client.py index 62ee1e25e531c9..7de55883a90ead 100644 --- a/tests/sentry/workflow_engine/buffer/test_batch_client.py +++ b/tests/sentry/workflow_engine/buffer/test_batch_client.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import Mock import pytest diff --git a/tests/sentry/workflow_engine/buffer/test_redis_hash_sorted_set_buffer.py b/tests/sentry/workflow_engine/buffer/test_redis_hash_sorted_set_buffer.py index 5d336b336daefe..ef33fafb6c4275 100644 --- a/tests/sentry/workflow_engine/buffer/test_redis_hash_sorted_set_buffer.py +++ b/tests/sentry/workflow_engine/buffer/test_redis_hash_sorted_set_buffer.py @@ -1,3 +1,4 @@ +from typing import int import copy import time from collections.abc import Mapping diff --git a/tests/sentry/workflow_engine/detectors/test_error_detector.py b/tests/sentry/workflow_engine/detectors/test_error_detector.py index 1a42e688ed6d42..de846cceef2e53 100644 --- a/tests/sentry/workflow_engine/detectors/test_error_detector.py +++ b/tests/sentry/workflow_engine/detectors/test_error_detector.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch from rest_framework.exceptions import ErrorDetail diff --git a/tests/sentry/workflow_engine/endpoints/serializers/test_action_serializer.py b/tests/sentry/workflow_engine/endpoints/serializers/test_action_serializer.py index e546ae36dcfba3..51ef74e1103843 100644 --- a/tests/sentry/workflow_engine/endpoints/serializers/test_action_serializer.py +++ b/tests/sentry/workflow_engine/endpoints/serializers/test_action_serializer.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.constants import ObjectStatus from sentry.notifications.models.notificationaction import ActionTarget diff --git a/tests/sentry/workflow_engine/endpoints/serializers/test_data_condition_group_serializer.py b/tests/sentry/workflow_engine/endpoints/serializers/test_data_condition_group_serializer.py index 3a9f08ff985128..648381ca56a4af 100644 --- a/tests/sentry/workflow_engine/endpoints/serializers/test_data_condition_group_serializer.py +++ b/tests/sentry/workflow_engine/endpoints/serializers/test_data_condition_group_serializer.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.notifications.models.notificationaction import ActionTarget from sentry.testutils.cases import TestCase diff --git a/tests/sentry/workflow_engine/endpoints/serializers/test_data_condition_serializer.py b/tests/sentry/workflow_engine/endpoints/serializers/test_data_condition_serializer.py index 754aef57f5f6c8..e3d52b7b78405f 100644 --- a/tests/sentry/workflow_engine/endpoints/serializers/test_data_condition_serializer.py +++ b/tests/sentry/workflow_engine/endpoints/serializers/test_data_condition_serializer.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.testutils.cases import TestCase from sentry.testutils.skips import requires_snuba diff --git a/tests/sentry/workflow_engine/endpoints/serializers/test_data_source_serializer.py b/tests/sentry/workflow_engine/endpoints/serializers/test_data_source_serializer.py index 5ec8970e592b20..2608f64cde4bdc 100644 --- a/tests/sentry/workflow_engine/endpoints/serializers/test_data_source_serializer.py +++ b/tests/sentry/workflow_engine/endpoints/serializers/test_data_source_serializer.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from sentry.api.serializers import serialize diff --git a/tests/sentry/workflow_engine/endpoints/serializers/test_detector_serializer.py b/tests/sentry/workflow_engine/endpoints/serializers/test_detector_serializer.py index 4950a10fa5a539..b116e305bcb800 100644 --- a/tests/sentry/workflow_engine/endpoints/serializers/test_detector_serializer.py +++ b/tests/sentry/workflow_engine/endpoints/serializers/test_detector_serializer.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/workflow_engine/endpoints/serializers/test_timeseries_value_serializer.py b/tests/sentry/workflow_engine/endpoints/serializers/test_timeseries_value_serializer.py index 662d2c951bc6e6..d68b04fad36f0e 100644 --- a/tests/sentry/workflow_engine/endpoints/serializers/test_timeseries_value_serializer.py +++ b/tests/sentry/workflow_engine/endpoints/serializers/test_timeseries_value_serializer.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from sentry.api.serializers import serialize diff --git a/tests/sentry/workflow_engine/endpoints/serializers/test_workflow_group_history_serializer.py b/tests/sentry/workflow_engine/endpoints/serializers/test_workflow_group_history_serializer.py index 4e1beb00d41601..5b7a3142ba17e5 100644 --- a/tests/sentry/workflow_engine/endpoints/serializers/test_workflow_group_history_serializer.py +++ b/tests/sentry/workflow_engine/endpoints/serializers/test_workflow_group_history_serializer.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from uuid import uuid4 diff --git a/tests/sentry/workflow_engine/endpoints/serializers/test_workflow_serializer.py b/tests/sentry/workflow_engine/endpoints/serializers/test_workflow_serializer.py index 4681418dce4af2..bd7feca0c5e202 100644 --- a/tests/sentry/workflow_engine/endpoints/serializers/test_workflow_serializer.py +++ b/tests/sentry/workflow_engine/endpoints/serializers/test_workflow_serializer.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from sentry.api.serializers import serialize diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_alertrule_workflow.py b/tests/sentry/workflow_engine/endpoints/test_organization_alertrule_workflow.py index a61b5b727cc3d3..815b447c42e910 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_alertrule_workflow.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_alertrule_workflow.py @@ -1,3 +1,4 @@ +from typing import int from sentry.api.serializers import serialize from sentry.testutils.cases import APITestCase from sentry.testutils.silo import region_silo_test diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_available_action_index.py b/tests/sentry/workflow_engine/endpoints/test_organization_available_action_index.py index ca463b7d6bcaff..de03248efa388a 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_available_action_index.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_available_action_index.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass from unittest.mock import MagicMock, patch diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_data_condition_index.py b/tests/sentry/workflow_engine/endpoints/test_organization_data_condition_index.py index da3aad07caa11a..550617192ba7a5 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_data_condition_index.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_data_condition_index.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import Any +from typing import int, Any from unittest.mock import patch from sentry.testutils.cases import APITestCase diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_detector_count.py b/tests/sentry/workflow_engine/endpoints/test_organization_detector_count.py index be57ccd5a2c27f..1ea1faa162c0de 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_detector_count.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_detector_count.py @@ -1,3 +1,4 @@ +from typing import int from sentry.grouping.grouptype import ErrorGroupType from sentry.incidents.grouptype import MetricIssue from sentry.incidents.models.alert_rule import AlertRuleDetectionType diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_detector_details.py b/tests/sentry/workflow_engine/endpoints/test_organization_detector_details.py index a66669ac26d980..84c14b107ba47f 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_detector_details.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_detector_details.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_detector_index.py b/tests/sentry/workflow_engine/endpoints/test_organization_detector_index.py index 730f210855b7af..bb73eea565f6ec 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_detector_index.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_detector_index.py @@ -1,3 +1,4 @@ +from typing import int from collections.abc import Sequence from unittest import mock diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_detector_types.py b/tests/sentry/workflow_engine/endpoints/test_organization_detector_types.py index 172201bf35be08..dea4fa9c2f1222 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_detector_types.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_detector_types.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from typing import Never +from typing import int, Never from unittest.mock import patch from sentry.incidents.grouptype import MetricIssue diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_detector_workflow_details.py b/tests/sentry/workflow_engine/endpoints/test_organization_detector_workflow_details.py index e99b83aacf8bb5..c3c2cb8fa67b70 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_detector_workflow_details.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_detector_workflow_details.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry import audit_log diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_detector_workflow_index.py b/tests/sentry/workflow_engine/endpoints/test_organization_detector_workflow_index.py index 5663af5fa0a554..8cdae068b98de3 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_detector_workflow_index.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_detector_workflow_index.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from unittest.mock import MagicMock, call diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_open_periods.py b/tests/sentry/workflow_engine/endpoints/test_organization_open_periods.py index 482000d6f12dfb..c6c91ea60e48d5 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_open_periods.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_open_periods.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_test_fire_action.py b/tests/sentry/workflow_engine/endpoints/test_organization_test_fire_action.py index 3233e04c634007..8c38470227930d 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_test_fire_action.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_test_fire_action.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import sentry_sdk diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_workflow_details.py b/tests/sentry/workflow_engine/endpoints/test_organization_workflow_details.py index af001f4af86742..e341a9e8c31c7a 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_workflow_details.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_workflow_details.py @@ -1,3 +1,4 @@ +from typing import int from contextlib import AbstractContextManager from sentry import audit_log diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_workflow_group_history.py b/tests/sentry/workflow_engine/endpoints/test_organization_workflow_group_history.py index 9e927aa7f82b95..0db01395337af9 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_workflow_group_history.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_workflow_group_history.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from sentry.api.serializers import serialize diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_workflow_index.py b/tests/sentry/workflow_engine/endpoints/test_organization_workflow_index.py index 7be55e0da9b579..799f1d067261d4 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_workflow_index.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_workflow_index.py @@ -1,5 +1,5 @@ from collections.abc import Sequence -from typing import Any +from typing import int, Any from unittest import mock from sentry import audit_log diff --git a/tests/sentry/workflow_engine/endpoints/test_organization_workflow_stats.py b/tests/sentry/workflow_engine/endpoints/test_organization_workflow_stats.py index 27b3f77631f44f..804c8cf502478e 100644 --- a/tests/sentry/workflow_engine/endpoints/test_organization_workflow_stats.py +++ b/tests/sentry/workflow_engine/endpoints/test_organization_workflow_stats.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.utils import timezone diff --git a/tests/sentry/workflow_engine/endpoints/test_validators.py b/tests/sentry/workflow_engine/endpoints/test_validators.py index 14caa136c7c2bd..9f8142c6a61d69 100644 --- a/tests/sentry/workflow_engine/endpoints/test_validators.py +++ b/tests/sentry/workflow_engine/endpoints/test_validators.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/sentry/workflow_engine/endpoints/utils/test_sortby.py b/tests/sentry/workflow_engine/endpoints/utils/test_sortby.py index 5659bb2c4d9044..d9c2d799a3a75f 100644 --- a/tests/sentry/workflow_engine/endpoints/utils/test_sortby.py +++ b/tests/sentry/workflow_engine/endpoints/utils/test_sortby.py @@ -1,3 +1,4 @@ +from typing import int import pytest from rest_framework.exceptions import ValidationError diff --git a/tests/sentry/workflow_engine/endpoints/validators/actions/test_discord.py b/tests/sentry/workflow_engine/endpoints/validators/actions/test_discord.py index d992b4491c6b81..f9e482488a04a3 100644 --- a/tests/sentry/workflow_engine/endpoints/validators/actions/test_discord.py +++ b/tests/sentry/workflow_engine/endpoints/validators/actions/test_discord.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.core.exceptions import ValidationError diff --git a/tests/sentry/workflow_engine/endpoints/validators/actions/test_email_validator.py b/tests/sentry/workflow_engine/endpoints/validators/actions/test_email_validator.py index ee9bbf82cf5af6..1f7c338555be2d 100644 --- a/tests/sentry/workflow_engine/endpoints/validators/actions/test_email_validator.py +++ b/tests/sentry/workflow_engine/endpoints/validators/actions/test_email_validator.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestCase from sentry.workflow_engine.endpoints.validators.base import BaseActionValidator from sentry.workflow_engine.models import Action diff --git a/tests/sentry/workflow_engine/endpoints/validators/actions/test_msteams.py b/tests/sentry/workflow_engine/endpoints/validators/actions/test_msteams.py index ce8507f307f35e..13d52f1aa72fe5 100644 --- a/tests/sentry/workflow_engine/endpoints/validators/actions/test_msteams.py +++ b/tests/sentry/workflow_engine/endpoints/validators/actions/test_msteams.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from rest_framework.exceptions import ErrorDetail diff --git a/tests/sentry/workflow_engine/endpoints/validators/actions/test_opsgenie.py b/tests/sentry/workflow_engine/endpoints/validators/actions/test_opsgenie.py index 6e358cda71a0ae..cdb393e9562034 100644 --- a/tests/sentry/workflow_engine/endpoints/validators/actions/test_opsgenie.py +++ b/tests/sentry/workflow_engine/endpoints/validators/actions/test_opsgenie.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.exceptions import ErrorDetail from sentry.silo.base import SiloMode diff --git a/tests/sentry/workflow_engine/endpoints/validators/actions/test_pagerduty.py b/tests/sentry/workflow_engine/endpoints/validators/actions/test_pagerduty.py index 89ab64c09ea67f..cd77b633d8e962 100644 --- a/tests/sentry/workflow_engine/endpoints/validators/actions/test_pagerduty.py +++ b/tests/sentry/workflow_engine/endpoints/validators/actions/test_pagerduty.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.exceptions import ErrorDetail from sentry.silo.base import SiloMode diff --git a/tests/sentry/workflow_engine/endpoints/validators/actions/test_sentry_app.py b/tests/sentry/workflow_engine/endpoints/validators/actions/test_sentry_app.py index 3defaf2719fa5f..6da62633b04933 100644 --- a/tests/sentry/workflow_engine/endpoints/validators/actions/test_sentry_app.py +++ b/tests/sentry/workflow_engine/endpoints/validators/actions/test_sentry_app.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from rest_framework.serializers import ErrorDetail diff --git a/tests/sentry/workflow_engine/endpoints/validators/actions/test_slack.py b/tests/sentry/workflow_engine/endpoints/validators/actions/test_slack.py index a6df508cbe825f..85a2a92c5dcfc8 100644 --- a/tests/sentry/workflow_engine/endpoints/validators/actions/test_slack.py +++ b/tests/sentry/workflow_engine/endpoints/validators/actions/test_slack.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from django.core.exceptions import ValidationError diff --git a/tests/sentry/workflow_engine/endpoints/validators/actions/test_ticketing.py b/tests/sentry/workflow_engine/endpoints/validators/actions/test_ticketing.py index bb9adbd1441efc..3cee369cfddb91 100644 --- a/tests/sentry/workflow_engine/endpoints/validators/actions/test_ticketing.py +++ b/tests/sentry/workflow_engine/endpoints/validators/actions/test_ticketing.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestCase from sentry.workflow_engine.endpoints.validators.base import BaseActionValidator from sentry.workflow_engine.models import Action diff --git a/tests/sentry/workflow_engine/endpoints/validators/actions/test_webhook.py b/tests/sentry/workflow_engine/endpoints/validators/actions/test_webhook.py index 333c2f517e8e51..206293879471b2 100644 --- a/tests/sentry/workflow_engine/endpoints/validators/actions/test_webhook.py +++ b/tests/sentry/workflow_engine/endpoints/validators/actions/test_webhook.py @@ -1,3 +1,4 @@ +from typing import int from rest_framework.exceptions import ErrorDetail from sentry.plugins.base import plugins diff --git a/tests/sentry/workflow_engine/endpoints/validators/test_base_action.py b/tests/sentry/workflow_engine/endpoints/validators/test_base_action.py index 228712039ec000..3e2d69c09d85c4 100644 --- a/tests/sentry/workflow_engine/endpoints/validators/test_base_action.py +++ b/tests/sentry/workflow_engine/endpoints/validators/test_base_action.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from rest_framework.serializers import ErrorDetail diff --git a/tests/sentry/workflow_engine/endpoints/validators/test_base_data_condition.py b/tests/sentry/workflow_engine/endpoints/validators/test_base_data_condition.py index e8732ae1ff54e5..983cfc252fca1f 100644 --- a/tests/sentry/workflow_engine/endpoints/validators/test_base_data_condition.py +++ b/tests/sentry/workflow_engine/endpoints/validators/test_base_data_condition.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import mock from rest_framework.serializers import ValidationError diff --git a/tests/sentry/workflow_engine/endpoints/validators/test_base_data_condition_group.py b/tests/sentry/workflow_engine/endpoints/validators/test_base_data_condition_group.py index 4c04bf6653fdc2..cd794478affccc 100644 --- a/tests/sentry/workflow_engine/endpoints/validators/test_base_data_condition_group.py +++ b/tests/sentry/workflow_engine/endpoints/validators/test_base_data_condition_group.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestCase from sentry.workflow_engine.endpoints.validators.base import BaseDataConditionGroupValidator from sentry.workflow_engine.models import Condition, DataConditionGroup diff --git a/tests/sentry/workflow_engine/endpoints/validators/test_base_workflow.py b/tests/sentry/workflow_engine/endpoints/validators/test_base_workflow.py index adec1cfad4ac76..d04fb460526e38 100644 --- a/tests/sentry/workflow_engine/endpoints/validators/test_base_workflow.py +++ b/tests/sentry/workflow_engine/endpoints/validators/test_base_workflow.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/workflow_engine/handlers/action/test_action_handlers.py b/tests/sentry/workflow_engine/handlers/action/test_action_handlers.py index 93ff8903b1d444..67758e96a47142 100644 --- a/tests/sentry/workflow_engine/handlers/action/test_action_handlers.py +++ b/tests/sentry/workflow_engine/handlers/action/test_action_handlers.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.grouping.grouptype import ErrorGroupType diff --git a/tests/sentry/workflow_engine/handlers/condition/test_age_comparison_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_age_comparison_handler.py index 7d286b85b06e28..0026b3f358b24e 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_age_comparison_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_age_comparison_handler.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone import pytest diff --git a/tests/sentry/workflow_engine/handlers/condition/test_assigned_to_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_assigned_to_handler.py index 5499f6517a4923..33ffe8b79b3e09 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_assigned_to_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_assigned_to_handler.py @@ -1,3 +1,4 @@ +from typing import int import pytest from jsonschema import ValidationError diff --git a/tests/sentry/workflow_engine/handlers/condition/test_base.py b/tests/sentry/workflow_engine/handlers/condition/test_base.py index 68ba4bad1ae341..2494d74516e4ec 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_base.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_base.py @@ -1,5 +1,5 @@ from datetime import timedelta -from typing import Any +from typing import int, Any from uuid import uuid4 from sentry.issues.grouptype import PerformanceNPlusOneGroupType diff --git a/tests/sentry/workflow_engine/handlers/condition/test_event_attribute_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_event_attribute_handler.py index 2195bdab4c4b13..2a9bcae3f799c1 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_event_attribute_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_event_attribute_handler.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/workflow_engine/handlers/condition/test_event_frequency_handlers.py b/tests/sentry/workflow_engine/handlers/condition/test_event_frequency_handlers.py index ab3cb41eb23772..df801c5cf06a86 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_event_frequency_handlers.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_event_frequency_handlers.py @@ -1,3 +1,4 @@ +from typing import int import pytest from jsonschema import ValidationError diff --git a/tests/sentry/workflow_engine/handlers/condition/test_event_frequency_query_handlers.py b/tests/sentry/workflow_engine/handlers/condition/test_event_frequency_query_handlers.py index 795aa8dbde2dc2..f99f8db995fe92 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_event_frequency_query_handlers.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_event_frequency_query_handlers.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import patch diff --git a/tests/sentry/workflow_engine/handlers/condition/test_every_event.py b/tests/sentry/workflow_engine/handlers/condition/test_every_event.py index 5a80d6d68b7216..784c23d7898112 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_every_event.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_every_event.py @@ -1,3 +1,4 @@ +from typing import int from sentry.rules.conditions.every_event import EveryEventCondition from sentry.workflow_engine.models.data_condition import Condition from tests.sentry.workflow_engine.handlers.condition.test_base import ConditionTestCase diff --git a/tests/sentry/workflow_engine/handlers/condition/test_existing_high_priority_issue_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_existing_high_priority_issue_handler.py index 8499ce1051c970..d150ad245efa1e 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_existing_high_priority_issue_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_existing_high_priority_issue_handler.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import replace import pytest diff --git a/tests/sentry/workflow_engine/handlers/condition/test_first_seen_event_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_first_seen_event_handler.py index 8f9a8afb92f3a5..c433cf2fbe7a78 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_first_seen_event_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_first_seen_event_handler.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import replace import pytest diff --git a/tests/sentry/workflow_engine/handlers/condition/test_issue_category_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_issue_category_handler.py index 59db6b14ef41c9..d97394396cb2e8 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_issue_category_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_issue_category_handler.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/workflow_engine/handlers/condition/test_issue_occurrences_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_issue_occurrences_handler.py index 876accb9891373..8790395844ce9d 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_issue_occurrences_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_issue_occurrences_handler.py @@ -1,3 +1,4 @@ +from typing import int import pytest from jsonschema import ValidationError diff --git a/tests/sentry/workflow_engine/handlers/condition/test_issue_priority_deescalating_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_issue_priority_deescalating_handler.py index 7f18fdcf23935c..07bfb23ebd0a40 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_issue_priority_deescalating_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_issue_priority_deescalating_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.incidents.grouptype import MetricIssue from sentry.models.group import GroupStatus from sentry.models.groupopenperiod import GroupOpenPeriod diff --git a/tests/sentry/workflow_engine/handlers/condition/test_issue_priority_equals.py b/tests/sentry/workflow_engine/handlers/condition/test_issue_priority_equals.py index 290077cf37257a..0621a1fefe76e6 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_issue_priority_equals.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_issue_priority_equals.py @@ -1,3 +1,4 @@ +from typing import int from sentry.types.group import PriorityLevel from sentry.users.services.user.service import user_service from sentry.workflow_engine.migration_helpers.alert_rule import ( diff --git a/tests/sentry/workflow_engine/handlers/condition/test_issue_priority_greater_or_equal.py b/tests/sentry/workflow_engine/handlers/condition/test_issue_priority_greater_or_equal.py index 0523e83af904ac..81c7da6738fd73 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_issue_priority_greater_or_equal.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_issue_priority_greater_or_equal.py @@ -1,3 +1,4 @@ +from typing import int from sentry.types.group import PriorityLevel from sentry.users.services.user.service import user_service from sentry.workflow_engine.migration_helpers.alert_rule import ( diff --git a/tests/sentry/workflow_engine/handlers/condition/test_issue_resolution_condition_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_issue_resolution_condition_handler.py index 31186ad62beed6..0c05c628a20855 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_issue_resolution_condition_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_issue_resolution_condition_handler.py @@ -1,3 +1,4 @@ +from typing import int from sentry.workflow_engine.models.data_condition import Condition from sentry.workflow_engine.types import WorkflowEventData from tests.sentry.workflow_engine.handlers.condition.test_base import ConditionTestCase diff --git a/tests/sentry/workflow_engine/handlers/condition/test_latest_adopted_release_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_latest_adopted_release_handler.py index 5c3a42480aed17..ce6a9befd8b4a4 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_latest_adopted_release_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_latest_adopted_release_handler.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/workflow_engine/handlers/condition/test_latest_release_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_latest_release_handler.py index 12458b4e28be6a..249fada9a0d66b 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_latest_release_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_latest_release_handler.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime from unittest.mock import MagicMock, patch diff --git a/tests/sentry/workflow_engine/handlers/condition/test_level_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_level_handler.py index 61b5097abe9153..57da92642191c7 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_level_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_level_handler.py @@ -1,3 +1,4 @@ +from typing import int import pytest from jsonschema import ValidationError diff --git a/tests/sentry/workflow_engine/handlers/condition/test_new_high_priority_issue_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_new_high_priority_issue_handler.py index 2a9e371dec00c2..8fbbe5f6afae7f 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_new_high_priority_issue_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_new_high_priority_issue_handler.py @@ -1,3 +1,4 @@ +from typing import int import pytest from jsonschema import ValidationError diff --git a/tests/sentry/workflow_engine/handlers/condition/test_reappeared_event_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_reappeared_event_handler.py index 708f74a224c5b2..07ab1d65862d76 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_reappeared_event_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_reappeared_event_handler.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import replace import pytest diff --git a/tests/sentry/workflow_engine/handlers/condition/test_regression_event_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_regression_event_handler.py index f8a821876f02c6..bb6c1b9229ce95 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_regression_event_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_regression_event_handler.py @@ -1,3 +1,4 @@ +from typing import int import pytest from jsonschema import ValidationError diff --git a/tests/sentry/workflow_engine/handlers/condition/test_tagged_event_handler.py b/tests/sentry/workflow_engine/handlers/condition/test_tagged_event_handler.py index 0e552751b86574..df8745ac5813ce 100644 --- a/tests/sentry/workflow_engine/handlers/condition/test_tagged_event_handler.py +++ b/tests/sentry/workflow_engine/handlers/condition/test_tagged_event_handler.py @@ -1,3 +1,4 @@ +from typing import int import pytest from jsonschema import ValidationError diff --git a/tests/sentry/workflow_engine/handlers/detector/test_base.py b/tests/sentry/workflow_engine/handlers/detector/test_base.py index a3f8f936944481..e56a031f1836e3 100644 --- a/tests/sentry/workflow_engine/handlers/detector/test_base.py +++ b/tests/sentry/workflow_engine/handlers/detector/test_base.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import mock from sentry.issues.grouptype import GroupCategory, GroupType diff --git a/tests/sentry/workflow_engine/handlers/detector/test_stateful.py b/tests/sentry/workflow_engine/handlers/detector/test_stateful.py index 907a6e358cebb5..9200b49770631a 100644 --- a/tests/sentry/workflow_engine/handlers/detector/test_stateful.py +++ b/tests/sentry/workflow_engine/handlers/detector/test_stateful.py @@ -1,3 +1,4 @@ +from typing import int import unittest.mock as mock from sentry.issues.issue_occurrence import IssueOccurrence diff --git a/tests/sentry/workflow_engine/migration_helpers/test_issue_alert_dual_write.py b/tests/sentry/workflow_engine/migration_helpers/test_issue_alert_dual_write.py index 2cb3ca565917ae..dc24aa35450a1b 100644 --- a/tests/sentry/workflow_engine/migration_helpers/test_issue_alert_dual_write.py +++ b/tests/sentry/workflow_engine/migration_helpers/test_issue_alert_dual_write.py @@ -1,3 +1,4 @@ +from typing import int import pytest from jsonschema.exceptions import ValidationError diff --git a/tests/sentry/workflow_engine/migration_helpers/test_issue_alert_migration.py b/tests/sentry/workflow_engine/migration_helpers/test_issue_alert_migration.py index e6751ea7df886a..834e61c78f505b 100644 --- a/tests/sentry/workflow_engine/migration_helpers/test_issue_alert_migration.py +++ b/tests/sentry/workflow_engine/migration_helpers/test_issue_alert_migration.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/workflow_engine/migration_helpers/test_migrate_alert_rule.py b/tests/sentry/workflow_engine/migration_helpers/test_migrate_alert_rule.py index c2d581d617d138..15245a8890e379 100644 --- a/tests/sentry/workflow_engine/migration_helpers/test_migrate_alert_rule.py +++ b/tests/sentry/workflow_engine/migration_helpers/test_migrate_alert_rule.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import mock import orjson diff --git a/tests/sentry/workflow_engine/migration_helpers/test_migrate_rule_action.py b/tests/sentry/workflow_engine/migration_helpers/test_migrate_rule_action.py index 353d90e6b26a85..a974833f169f32 100644 --- a/tests/sentry/workflow_engine/migration_helpers/test_migrate_rule_action.py +++ b/tests/sentry/workflow_engine/migration_helpers/test_migrate_rule_action.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, patch import pytest diff --git a/tests/sentry/workflow_engine/migration_helpers/test_rule_conditions.py b/tests/sentry/workflow_engine/migration_helpers/test_rule_conditions.py index 258bed36b11e09..18793c2be54d8d 100644 --- a/tests/sentry/workflow_engine/migration_helpers/test_rule_conditions.py +++ b/tests/sentry/workflow_engine/migration_helpers/test_rule_conditions.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from sentry.workflow_engine.migration_helpers.issue_alert_conditions import ( create_event_unique_user_frequency_condition_with_conditions, diff --git a/tests/sentry/workflow_engine/migration_helpers/test_utils.py b/tests/sentry/workflow_engine/migration_helpers/test_utils.py index e8d71ea1ac195c..2db63727b750b7 100644 --- a/tests/sentry/workflow_engine/migration_helpers/test_utils.py +++ b/tests/sentry/workflow_engine/migration_helpers/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from sentry.incidents.models.alert_rule import AlertRuleTriggerAction from sentry.integrations.models.integration import Integration from sentry.integrations.models.organization_integration import OrganizationIntegration diff --git a/tests/sentry/workflow_engine/migrations/test_0069_rename_error_detectors.py b/tests/sentry/workflow_engine/migrations/test_0069_rename_error_detectors.py index bae2d7255d858b..5a4cd2aacae3d9 100644 --- a/tests/sentry/workflow_engine/migrations/test_0069_rename_error_detectors.py +++ b/tests/sentry/workflow_engine/migrations/test_0069_rename_error_detectors.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestMigrations diff --git a/tests/sentry/workflow_engine/migrations/test_0078_update_metric_detector_config_fields.py b/tests/sentry/workflow_engine/migrations/test_0078_update_metric_detector_config_fields.py index ab975e04193a61..4b43d5450c1b8e 100644 --- a/tests/sentry/workflow_engine/migrations/test_0078_update_metric_detector_config_fields.py +++ b/tests/sentry/workflow_engine/migrations/test_0078_update_metric_detector_config_fields.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.testutils.cases import TestMigrations diff --git a/tests/sentry/workflow_engine/migrations/test_0082_disconnect_error_detector_cron_workflows.py b/tests/sentry/workflow_engine/migrations/test_0082_disconnect_error_detector_cron_workflows.py index dd5b6613376c6c..b6c4239e24fabf 100644 --- a/tests/sentry/workflow_engine/migrations/test_0082_disconnect_error_detector_cron_workflows.py +++ b/tests/sentry/workflow_engine/migrations/test_0082_disconnect_error_detector_cron_workflows.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.models.rule import RuleSource diff --git a/tests/sentry/workflow_engine/migrations/test_0084_crons_dedupe_workflows.py b/tests/sentry/workflow_engine/migrations/test_0084_crons_dedupe_workflows.py index 6b2fd8d22a51c8..e3b897b60efbd6 100644 --- a/tests/sentry/workflow_engine/migrations/test_0084_crons_dedupe_workflows.py +++ b/tests/sentry/workflow_engine/migrations/test_0084_crons_dedupe_workflows.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.models.rule import Rule, RuleSource diff --git a/tests/sentry/workflow_engine/migrations/test_0085_crons_link_detectors_to_all_workflows.py b/tests/sentry/workflow_engine/migrations/test_0085_crons_link_detectors_to_all_workflows.py index 3f4aaf923f9798..4ccc4259995773 100644 --- a/tests/sentry/workflow_engine/migrations/test_0085_crons_link_detectors_to_all_workflows.py +++ b/tests/sentry/workflow_engine/migrations/test_0085_crons_link_detectors_to_all_workflows.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.testutils.cases import TestMigrations diff --git a/tests/sentry/workflow_engine/migrations/test_0086_fix_cron_to_cron_workflow_links.py b/tests/sentry/workflow_engine/migrations/test_0086_fix_cron_to_cron_workflow_links.py index 49f3c0f1b674e9..ce12fc2f61633b 100644 --- a/tests/sentry/workflow_engine/migrations/test_0086_fix_cron_to_cron_workflow_links.py +++ b/tests/sentry/workflow_engine/migrations/test_0086_fix_cron_to_cron_workflow_links.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.rule import Rule, RuleSource from sentry.testutils.cases import TestMigrations from sentry.workflow_engine.migration_helpers.issue_alert_migration import IssueAlertMigrator diff --git a/tests/sentry/workflow_engine/migrations/test_0087_relink_crons_to_compatible_issue_workflows.py b/tests/sentry/workflow_engine/migrations/test_0087_relink_crons_to_compatible_issue_workflows.py index fc0d64f6c4f3d9..f33f00a46d6285 100644 --- a/tests/sentry/workflow_engine/migrations/test_0087_relink_crons_to_compatible_issue_workflows.py +++ b/tests/sentry/workflow_engine/migrations/test_0087_relink_crons_to_compatible_issue_workflows.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.rule import Rule, RuleSource from sentry.testutils.cases import TestMigrations from sentry.workflow_engine.migration_helpers.issue_alert_migration import IssueAlertMigrator diff --git a/tests/sentry/workflow_engine/migrations/test_0088_remove_monitor_slug_conditions.py b/tests/sentry/workflow_engine/migrations/test_0088_remove_monitor_slug_conditions.py index f9dc2272dc264c..8d4a2a4eee0b0f 100644 --- a/tests/sentry/workflow_engine/migrations/test_0088_remove_monitor_slug_conditions.py +++ b/tests/sentry/workflow_engine/migrations/test_0088_remove_monitor_slug_conditions.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestMigrations from sentry.workflow_engine.models import DataCondition, DataConditionGroup diff --git a/tests/sentry/workflow_engine/migrations/test_0089_update_cron_workflow_names.py b/tests/sentry/workflow_engine/migrations/test_0089_update_cron_workflow_names.py index 76b0c2335df793..d6d76a6dc1120a 100644 --- a/tests/sentry/workflow_engine/migrations/test_0089_update_cron_workflow_names.py +++ b/tests/sentry/workflow_engine/migrations/test_0089_update_cron_workflow_names.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestMigrations from sentry.workflow_engine.models import ( Action, diff --git a/tests/sentry/workflow_engine/migrations/test_0091_fix_email_notification_names.py b/tests/sentry/workflow_engine/migrations/test_0091_fix_email_notification_names.py index 7675f83c089df6..f12eb93d3b8f37 100644 --- a/tests/sentry/workflow_engine/migrations/test_0091_fix_email_notification_names.py +++ b/tests/sentry/workflow_engine/migrations/test_0091_fix_email_notification_names.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestMigrations from sentry.workflow_engine.models import ( Action, diff --git a/tests/sentry/workflow_engine/migrations/test_0094_backfill_issue_stream_detector_workflows.py b/tests/sentry/workflow_engine/migrations/test_0094_backfill_issue_stream_detector_workflows.py index 86fdb22547cf02..b8fa6653fc3341 100644 --- a/tests/sentry/workflow_engine/migrations/test_0094_backfill_issue_stream_detector_workflows.py +++ b/tests/sentry/workflow_engine/migrations/test_0094_backfill_issue_stream_detector_workflows.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestMigrations from sentry.workflow_engine.models import Detector, DetectorWorkflow diff --git a/tests/sentry/workflow_engine/migrations/test_0096_delete_non_single_written_fire_history.py b/tests/sentry/workflow_engine/migrations/test_0096_delete_non_single_written_fire_history.py index 4cca5eb263b0dd..21b8a1efdfb888 100644 --- a/tests/sentry/workflow_engine/migrations/test_0096_delete_non_single_written_fire_history.py +++ b/tests/sentry/workflow_engine/migrations/test_0096_delete_non_single_written_fire_history.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestMigrations from sentry.workflow_engine.models import Detector, Workflow, WorkflowFireHistory diff --git a/tests/sentry/workflow_engine/models/test_action.py b/tests/sentry/workflow_engine/models/test_action.py index 3bc4eb1f827406..6dfd96ff11e07f 100644 --- a/tests/sentry/workflow_engine/models/test_action.py +++ b/tests/sentry/workflow_engine/models/test_action.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import MagicMock, Mock, patch import pytest diff --git a/tests/sentry/workflow_engine/models/test_data_condition.py b/tests/sentry/workflow_engine/models/test_data_condition.py index 23f58a3e402542..7c3b44e71b0f49 100644 --- a/tests/sentry/workflow_engine/models/test_data_condition.py +++ b/tests/sentry/workflow_engine/models/test_data_condition.py @@ -1,3 +1,4 @@ +from typing import int from enum import IntEnum from unittest import mock diff --git a/tests/sentry/workflow_engine/models/test_data_source.py b/tests/sentry/workflow_engine/models/test_data_source.py index 9f3d11cd4a66e0..008e880f7f3fb3 100644 --- a/tests/sentry/workflow_engine/models/test_data_source.py +++ b/tests/sentry/workflow_engine/models/test_data_source.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/sentry/workflow_engine/models/test_detector.py b/tests/sentry/workflow_engine/models/test_detector.py index e5890b6f1e1d28..5df0faaf2df0ed 100644 --- a/tests/sentry/workflow_engine/models/test_detector.py +++ b/tests/sentry/workflow_engine/models/test_detector.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import pytest diff --git a/tests/sentry/workflow_engine/models/test_detector_state.py b/tests/sentry/workflow_engine/models/test_detector_state.py index 945155fbaef250..110a51799c6e64 100644 --- a/tests/sentry/workflow_engine/models/test_detector_state.py +++ b/tests/sentry/workflow_engine/models/test_detector_state.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestCase from sentry.workflow_engine.models.detector_state import DetectorState from sentry.workflow_engine.types import DetectorPriorityLevel diff --git a/tests/sentry/workflow_engine/models/test_incident_groupopenperiod.py b/tests/sentry/workflow_engine/models/test_incident_groupopenperiod.py index 60d57806754b5b..d2852f55f168c5 100644 --- a/tests/sentry/workflow_engine/models/test_incident_groupopenperiod.py +++ b/tests/sentry/workflow_engine/models/test_incident_groupopenperiod.py @@ -1,6 +1,6 @@ import uuid from datetime import timedelta -from typing import Any +from typing import int, Any from unittest.mock import patch from django.utils import timezone diff --git a/tests/sentry/workflow_engine/models/test_json_config_base.py b/tests/sentry/workflow_engine/models/test_json_config_base.py index b6324228a21b6c..e882b80ba1c68d 100644 --- a/tests/sentry/workflow_engine/models/test_json_config_base.py +++ b/tests/sentry/workflow_engine/models/test_json_config_base.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import dataclass import pytest diff --git a/tests/sentry/workflow_engine/models/test_workflow.py b/tests/sentry/workflow_engine/models/test_workflow.py index fb323240ba1c07..3110e2ae3d14d6 100644 --- a/tests/sentry/workflow_engine/models/test_workflow.py +++ b/tests/sentry/workflow_engine/models/test_workflow.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.core.exceptions import ValidationError diff --git a/tests/sentry/workflow_engine/processors/contexts/test_workflow_event_context.py b/tests/sentry/workflow_engine/processors/contexts/test_workflow_event_context.py index 7e1677b1b21589..033a0ea0185db7 100644 --- a/tests/sentry/workflow_engine/processors/contexts/test_workflow_event_context.py +++ b/tests/sentry/workflow_engine/processors/contexts/test_workflow_event_context.py @@ -1,3 +1,4 @@ +from typing import int from contextvars import Token from sentry.testutils.cases import TestCase diff --git a/tests/sentry/workflow_engine/processors/test_action.py b/tests/sentry/workflow_engine/processors/test_action.py index acef8e820ed4c6..0338ee7015768b 100644 --- a/tests/sentry/workflow_engine/processors/test_action.py +++ b/tests/sentry/workflow_engine/processors/test_action.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/sentry/workflow_engine/processors/test_action_deduplication.py b/tests/sentry/workflow_engine/processors/test_action_deduplication.py index 90ea747db6b8dd..6bdf22810d3b22 100644 --- a/tests/sentry/workflow_engine/processors/test_action_deduplication.py +++ b/tests/sentry/workflow_engine/processors/test_action_deduplication.py @@ -1,3 +1,4 @@ +from typing import int from django.db import models from django.db.models import Value diff --git a/tests/sentry/workflow_engine/processors/test_data_condition.py b/tests/sentry/workflow_engine/processors/test_data_condition.py index 3cf6320f1eb1cd..3ef71b2fad8766 100644 --- a/tests/sentry/workflow_engine/processors/test_data_condition.py +++ b/tests/sentry/workflow_engine/processors/test_data_condition.py @@ -1,3 +1,4 @@ +from typing import int from sentry.testutils.cases import TestCase from sentry.workflow_engine.models.data_condition import Condition, DataCondition from sentry.workflow_engine.processors.data_condition import split_conditions_by_speed diff --git a/tests/sentry/workflow_engine/processors/test_data_condition_group.py b/tests/sentry/workflow_engine/processors/test_data_condition_group.py index 00fcbbefd7c3e5..eaffa63c142433 100644 --- a/tests/sentry/workflow_engine/processors/test_data_condition_group.py +++ b/tests/sentry/workflow_engine/processors/test_data_condition_group.py @@ -1,3 +1,4 @@ +from typing import int import unittest from unittest import mock diff --git a/tests/sentry/workflow_engine/processors/test_data_packet.py b/tests/sentry/workflow_engine/processors/test_data_packet.py index 3cb06d0582a7fb..3e21b19e8faabf 100644 --- a/tests/sentry/workflow_engine/processors/test_data_packet.py +++ b/tests/sentry/workflow_engine/processors/test_data_packet.py @@ -1,3 +1,4 @@ +from typing import int from sentry.incidents.utils.types import DATA_SOURCE_SNUBA_QUERY_SUBSCRIPTION from sentry.workflow_engine.processors.data_packet import process_data_packet from sentry.workflow_engine.types import DetectorPriorityLevel diff --git a/tests/sentry/workflow_engine/processors/test_data_sources.py b/tests/sentry/workflow_engine/processors/test_data_sources.py index 2150d355c78152..bf52937bf8d548 100644 --- a/tests/sentry/workflow_engine/processors/test_data_sources.py +++ b/tests/sentry/workflow_engine/processors/test_data_sources.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.workflow_engine.models import DataPacket diff --git a/tests/sentry/workflow_engine/processors/test_delayed_workflow.py b/tests/sentry/workflow_engine/processors/test_delayed_workflow.py index 113ab9d1cbebb2..b388f75427ff60 100644 --- a/tests/sentry/workflow_engine/processors/test_delayed_workflow.py +++ b/tests/sentry/workflow_engine/processors/test_delayed_workflow.py @@ -1,3 +1,4 @@ +from typing import int from dataclasses import asdict from datetime import datetime, timedelta from unittest.mock import ANY, MagicMock, Mock, patch diff --git a/tests/sentry/workflow_engine/processors/test_detector.py b/tests/sentry/workflow_engine/processors/test_detector.py index 7509117ecd7389..df4131d4cc5343 100644 --- a/tests/sentry/workflow_engine/processors/test_detector.py +++ b/tests/sentry/workflow_engine/processors/test_detector.py @@ -1,6 +1,6 @@ import unittest import uuid -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import MagicMock, call diff --git a/tests/sentry/workflow_engine/processors/test_log_util.py b/tests/sentry/workflow_engine/processors/test_log_util.py index c1efb4e1f4498d..0306fa6aee651e 100644 --- a/tests/sentry/workflow_engine/processors/test_log_util.py +++ b/tests/sentry/workflow_engine/processors/test_log_util.py @@ -1,3 +1,4 @@ +from typing import int import logging import unittest from datetime import timedelta diff --git a/tests/sentry/workflow_engine/processors/test_schedule.py b/tests/sentry/workflow_engine/processors/test_schedule.py index 2bc002401adcc5..339359a2695191 100644 --- a/tests/sentry/workflow_engine/processors/test_schedule.py +++ b/tests/sentry/workflow_engine/processors/test_schedule.py @@ -1,3 +1,4 @@ +from typing import int import random from datetime import datetime, timedelta from unittest.mock import MagicMock, Mock, patch diff --git a/tests/sentry/workflow_engine/processors/test_workflow.py b/tests/sentry/workflow_engine/processors/test_workflow.py index 38454be69ca619..4b3f786ed110bc 100644 --- a/tests/sentry/workflow_engine/processors/test_workflow.py +++ b/tests/sentry/workflow_engine/processors/test_workflow.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, Mock, patch diff --git a/tests/sentry/workflow_engine/processors/test_workflow_fire_history.py b/tests/sentry/workflow_engine/processors/test_workflow_fire_history.py index 3f3c41e4185dfa..3c9e141376fe2f 100644 --- a/tests/sentry/workflow_engine/processors/test_workflow_fire_history.py +++ b/tests/sentry/workflow_engine/processors/test_workflow_fire_history.py @@ -1,3 +1,4 @@ +from typing import int from sentry.workflow_engine.models import Action, WorkflowFireHistory from sentry.workflow_engine.processors.workflow_fire_history import create_workflow_fire_histories from sentry.workflow_engine.types import WorkflowEventData diff --git a/tests/sentry/workflow_engine/service/test_action_service.py b/tests/sentry/workflow_engine/service/test_action_service.py index 0ebe7c8913e318..a4d3a2b039ca87 100644 --- a/tests/sentry/workflow_engine/service/test_action_service.py +++ b/tests/sentry/workflow_engine/service/test_action_service.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import ObjectStatus from sentry.notifications.models.notificationaction import ActionTarget from sentry.silo.base import SiloMode diff --git a/tests/sentry/workflow_engine/tasks/test_delayed_workflows.py b/tests/sentry/workflow_engine/tasks/test_delayed_workflows.py index ab32b56f5ee5c5..16b24eb2ce5eea 100644 --- a/tests/sentry/workflow_engine/tasks/test_delayed_workflows.py +++ b/tests/sentry/workflow_engine/tasks/test_delayed_workflows.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime from unittest.mock import MagicMock, patch diff --git a/tests/sentry/workflow_engine/tasks/test_workflows.py b/tests/sentry/workflow_engine/tasks/test_workflows.py index a53ae2394cb2ec..0301187834de55 100644 --- a/tests/sentry/workflow_engine/tasks/test_workflows.py +++ b/tests/sentry/workflow_engine/tasks/test_workflows.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase, mock from unittest.mock import MagicMock, patch diff --git a/tests/sentry/workflow_engine/test_base.py b/tests/sentry/workflow_engine/test_base.py index 917329517bba0a..6f369b449952e1 100644 --- a/tests/sentry/workflow_engine/test_base.py +++ b/tests/sentry/workflow_engine/test_base.py @@ -1,6 +1,6 @@ from collections.abc import Callable from datetime import UTC, datetime, timedelta -from typing import Any +from typing import int, Any from unittest import mock from uuid import uuid4 diff --git a/tests/sentry/workflow_engine/test_integration.py b/tests/sentry/workflow_engine/test_integration.py index eea42c4b269603..6a7d3c3cdb24b0 100644 --- a/tests/sentry/workflow_engine/test_integration.py +++ b/tests/sentry/workflow_engine/test_integration.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from unittest import mock from unittest.mock import MagicMock, patch diff --git a/tests/sentry/workflow_engine/test_task.py b/tests/sentry/workflow_engine/test_task.py index c633741dcc245d..0dd54a3c718f31 100644 --- a/tests/sentry/workflow_engine/test_task.py +++ b/tests/sentry/workflow_engine/test_task.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import sentry_sdk diff --git a/tests/sentry/workflow_engine/test_task_integration.py b/tests/sentry/workflow_engine/test_task_integration.py index 446a39c51080ce..01cf5e898ab750 100644 --- a/tests/sentry/workflow_engine/test_task_integration.py +++ b/tests/sentry/workflow_engine/test_task_integration.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.issues.ingest import hash_fingerprint diff --git a/tests/sentry/workflow_engine/test_transformers.py b/tests/sentry/workflow_engine/test_transformers.py index f0c25e340b7a9e..59513cc3ed5d03 100644 --- a/tests/sentry/workflow_engine/test_transformers.py +++ b/tests/sentry/workflow_engine/test_transformers.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase import pytest diff --git a/tests/sentry/workflow_engine/utils/test_dictpath.py b/tests/sentry/workflow_engine/utils/test_dictpath.py index 2d9dc706b22928..ce26cb066d996f 100644 --- a/tests/sentry/workflow_engine/utils/test_dictpath.py +++ b/tests/sentry/workflow_engine/utils/test_dictpath.py @@ -1,3 +1,4 @@ +from typing import int from sentry.workflow_engine.utils import dictpath diff --git a/tests/sentry/workflow_engine/utils/test_log_context.py b/tests/sentry/workflow_engine/utils/test_log_context.py index ca990ec1154f90..391793032ed986 100644 --- a/tests/sentry/workflow_engine/utils/test_log_context.py +++ b/tests/sentry/workflow_engine/utils/test_log_context.py @@ -1,5 +1,5 @@ import logging -from typing import Any +from typing import int, Any from unittest.mock import patch from sentry.testutils.cases import TestCase diff --git a/tests/sentry/workflow_engine/utils/test_scopedstats.py b/tests/sentry/workflow_engine/utils/test_scopedstats.py index 65896b5962d1ef..3955a51c571c83 100644 --- a/tests/sentry/workflow_engine/utils/test_scopedstats.py +++ b/tests/sentry/workflow_engine/utils/test_scopedstats.py @@ -1,6 +1,6 @@ import time from collections.abc import Callable -from typing import Any +from typing import int, Any import pytest diff --git a/tests/sentry/workflow_engine/utils/test_workflow_metrics.py b/tests/sentry/workflow_engine/utils/test_workflow_metrics.py index f7589825e3fd74..0648bae601d3dd 100644 --- a/tests/sentry/workflow_engine/utils/test_workflow_metrics.py +++ b/tests/sentry/workflow_engine/utils/test_workflow_metrics.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from sentry.workflow_engine.processors.contexts.workflow_event_context import ( diff --git a/tests/sentry_plugins/amazon_sqs/test_plugin.py b/tests/sentry_plugins/amazon_sqs/test_plugin.py index e4c0dd5e1e8e87..f5c9e64028139e 100644 --- a/tests/sentry_plugins/amazon_sqs/test_plugin.py +++ b/tests/sentry_plugins/amazon_sqs/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import MagicMock, patch diff --git a/tests/sentry_plugins/asana/test_plugin.py b/tests/sentry_plugins/asana/test_plugin.py index 6fc42f1a0ca35d..3f0bfef01fbda7 100644 --- a/tests/sentry_plugins/asana/test_plugin.py +++ b/tests/sentry_plugins/asana/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import orjson diff --git a/tests/sentry_plugins/bitbucket/endpoints/test_webhooks.py b/tests/sentry_plugins/bitbucket/endpoints/test_webhooks.py index c18f9548f80683..e1489901c216be 100644 --- a/tests/sentry_plugins/bitbucket/endpoints/test_webhooks.py +++ b/tests/sentry_plugins/bitbucket/endpoints/test_webhooks.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from sentry.models.commit import Commit diff --git a/tests/sentry_plugins/bitbucket/test_plugin.py b/tests/sentry_plugins/bitbucket/test_plugin.py index 222822685a1398..5dd659e65bd5c9 100644 --- a/tests/sentry_plugins/bitbucket/test_plugin.py +++ b/tests/sentry_plugins/bitbucket/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import pytest diff --git a/tests/sentry_plugins/bitbucket/test_repository_provider.py b/tests/sentry_plugins/bitbucket/test_repository_provider.py index 67212072807737..947bffd82a9662 100644 --- a/tests/sentry_plugins/bitbucket/test_repository_provider.py +++ b/tests/sentry_plugins/bitbucket/test_repository_provider.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import responses diff --git a/tests/sentry_plugins/github/endpoints/test_installation_install_event.py b/tests/sentry_plugins/github/endpoints/test_installation_install_event.py index 73df97813bcb90..9d9402d0bd26d7 100644 --- a/tests/sentry_plugins/github/endpoints/test_installation_install_event.py +++ b/tests/sentry_plugins/github/endpoints/test_installation_install_event.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from sentry.integrations.models.integration import Integration diff --git a/tests/sentry_plugins/github/endpoints/test_installation_push_event.py b/tests/sentry_plugins/github/endpoints/test_installation_push_event.py index 693eb409af9899..41b2ac467c97d0 100644 --- a/tests/sentry_plugins/github/endpoints/test_installation_push_event.py +++ b/tests/sentry_plugins/github/endpoints/test_installation_push_event.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timezone from uuid import uuid4 diff --git a/tests/sentry_plugins/github/endpoints/test_installation_repo_install_event.py b/tests/sentry_plugins/github/endpoints/test_installation_repo_install_event.py index b8a3093c9ac9f3..8d20efa118dd2b 100644 --- a/tests/sentry_plugins/github/endpoints/test_installation_repo_install_event.py +++ b/tests/sentry_plugins/github/endpoints/test_installation_repo_install_event.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from sentry.models.repository import Repository diff --git a/tests/sentry_plugins/github/endpoints/test_pull_request_event.py b/tests/sentry_plugins/github/endpoints/test_pull_request_event.py index 3b768630259cad..1fee67876db4b2 100644 --- a/tests/sentry_plugins/github/endpoints/test_pull_request_event.py +++ b/tests/sentry_plugins/github/endpoints/test_pull_request_event.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from sentry.models.options.organization_option import OrganizationOption diff --git a/tests/sentry_plugins/github/endpoints/test_push_event.py b/tests/sentry_plugins/github/endpoints/test_push_event.py index f8f2840a4f4bf8..95336c94b369c7 100644 --- a/tests/sentry_plugins/github/endpoints/test_push_event.py +++ b/tests/sentry_plugins/github/endpoints/test_push_event.py @@ -1,3 +1,4 @@ +from typing import int import contextlib from collections.abc import Generator from datetime import datetime, timezone diff --git a/tests/sentry_plugins/github/endpoints/test_webhooks.py b/tests/sentry_plugins/github/endpoints/test_webhooks.py index 409e8352566757..333310341013fc 100644 --- a/tests/sentry_plugins/github/endpoints/test_webhooks.py +++ b/tests/sentry_plugins/github/endpoints/test_webhooks.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 from sentry.models.options.organization_option import OrganizationOption diff --git a/tests/sentry_plugins/github/test_plugin.py b/tests/sentry_plugins/github/test_plugin.py index 32207ca73e6ba6..a73a7267ca18cc 100644 --- a/tests/sentry_plugins/github/test_plugin.py +++ b/tests/sentry_plugins/github/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import orjson diff --git a/tests/sentry_plugins/github/test_provider.py b/tests/sentry_plugins/github/test_provider.py index e5fb8bfea5efaf..d8b66cb3f1cb6a 100644 --- a/tests/sentry_plugins/github/test_provider.py +++ b/tests/sentry_plugins/github/test_provider.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from unittest.mock import MagicMock, patch diff --git a/tests/sentry_plugins/gitlab/test_plugin.py b/tests/sentry_plugins/gitlab/test_plugin.py index b1e24a762cf914..ae1b065c584423 100644 --- a/tests/sentry_plugins/gitlab/test_plugin.py +++ b/tests/sentry_plugins/gitlab/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import orjson diff --git a/tests/sentry_plugins/heroku/test_plugin.py b/tests/sentry_plugins/heroku/test_plugin.py index 9aadb27851a9a7..ed09e7b7484675 100644 --- a/tests/sentry_plugins/heroku/test_plugin.py +++ b/tests/sentry_plugins/heroku/test_plugin.py @@ -2,7 +2,7 @@ from collections.abc import Generator from datetime import timedelta -from typing import Any +from typing import int, Any from unittest.mock import MagicMock, Mock, patch import orjson diff --git a/tests/sentry_plugins/jira/test_plugin.py b/tests/sentry_plugins/jira/test_plugin.py index b2436f6e25c4b8..36007a65c1fd22 100644 --- a/tests/sentry_plugins/jira/test_plugin.py +++ b/tests/sentry_plugins/jira/test_plugin.py @@ -1,7 +1,7 @@ from __future__ import annotations from functools import cached_property -from typing import Any +from typing import int, Any import orjson import responses diff --git a/tests/sentry_plugins/opgsenie/test_plugin.py b/tests/sentry_plugins/opgsenie/test_plugin.py index 3659660f4efea5..2d08f5e3b1600d 100644 --- a/tests/sentry_plugins/opgsenie/test_plugin.py +++ b/tests/sentry_plugins/opgsenie/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import orjson diff --git a/tests/sentry_plugins/pagerduty/test_plugin.py b/tests/sentry_plugins/pagerduty/test_plugin.py index 089fee5a6bb2a2..63fd3302b05f36 100644 --- a/tests/sentry_plugins/pagerduty/test_plugin.py +++ b/tests/sentry_plugins/pagerduty/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import orjson diff --git a/tests/sentry_plugins/pivotal/test_pivotal_plugin.py b/tests/sentry_plugins/pivotal/test_pivotal_plugin.py index 286b2a401b46e9..a63ed8e8b3f828 100644 --- a/tests/sentry_plugins/pivotal/test_pivotal_plugin.py +++ b/tests/sentry_plugins/pivotal/test_pivotal_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import orjson diff --git a/tests/sentry_plugins/pushover/test_plugin.py b/tests/sentry_plugins/pushover/test_plugin.py index ab1d2594953a69..1133748ccd1ffc 100644 --- a/tests/sentry_plugins/pushover/test_plugin.py +++ b/tests/sentry_plugins/pushover/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from urllib.parse import parse_qs diff --git a/tests/sentry_plugins/redmine/test_plugin.py b/tests/sentry_plugins/redmine/test_plugin.py index 19e4af011bab6a..283185bd2db62d 100644 --- a/tests/sentry_plugins/redmine/test_plugin.py +++ b/tests/sentry_plugins/redmine/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import orjson diff --git a/tests/sentry_plugins/segment/test_plugin.py b/tests/sentry_plugins/segment/test_plugin.py index 3ecfb8fc5c14e0..5b0527f09fcb77 100644 --- a/tests/sentry_plugins/segment/test_plugin.py +++ b/tests/sentry_plugins/segment/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import orjson diff --git a/tests/sentry_plugins/sessionstack/test_plugin.py b/tests/sentry_plugins/sessionstack/test_plugin.py index d3e40b2521ee12..1f40f65a74e34b 100644 --- a/tests/sentry_plugins/sessionstack/test_plugin.py +++ b/tests/sentry_plugins/sessionstack/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import orjson diff --git a/tests/sentry_plugins/slack/test_plugin.py b/tests/sentry_plugins/slack/test_plugin.py index 71d03961081405..63c5aa1f79224c 100644 --- a/tests/sentry_plugins/slack/test_plugin.py +++ b/tests/sentry_plugins/slack/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from urllib.parse import parse_qs diff --git a/tests/sentry_plugins/splunk/test_plugin.py b/tests/sentry_plugins/splunk/test_plugin.py index cd4581109bc259..98a73fae662e28 100644 --- a/tests/sentry_plugins/splunk/test_plugin.py +++ b/tests/sentry_plugins/splunk/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import orjson diff --git a/tests/sentry_plugins/test_anonymizeip.py b/tests/sentry_plugins/test_anonymizeip.py index 947a879b04dc84..4e6d3c3481ac86 100644 --- a/tests/sentry_plugins/test_anonymizeip.py +++ b/tests/sentry_plugins/test_anonymizeip.py @@ -1,3 +1,4 @@ +from typing import int from sentry_plugins.anonymizeip import anonymize_ip diff --git a/tests/sentry_plugins/test_client.py b/tests/sentry_plugins/test_client.py index ddf32ddc1761e9..988aa7398124bb 100644 --- a/tests/sentry_plugins/test_client.py +++ b/tests/sentry_plugins/test_client.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch import pytest diff --git a/tests/sentry_plugins/trello/test_plugin.py b/tests/sentry_plugins/trello/test_plugin.py index 48942736a006b3..6027fec8462b43 100644 --- a/tests/sentry_plugins/trello/test_plugin.py +++ b/tests/sentry_plugins/trello/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from urllib.parse import parse_qsl, urlparse diff --git a/tests/sentry_plugins/twilio/test_plugin.py b/tests/sentry_plugins/twilio/test_plugin.py index 5ccd3eb467abdb..64be2414fb23f1 100644 --- a/tests/sentry_plugins/twilio/test_plugin.py +++ b/tests/sentry_plugins/twilio/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property from urllib.parse import parse_qs diff --git a/tests/sentry_plugins/victorops/test_plugin.py b/tests/sentry_plugins/victorops/test_plugin.py index 427dc3012ebef3..c7586bdb5b2d07 100644 --- a/tests/sentry_plugins/victorops/test_plugin.py +++ b/tests/sentry_plugins/victorops/test_plugin.py @@ -1,3 +1,4 @@ +from typing import int from functools import cached_property import orjson diff --git a/tests/snuba/api/endpoints/test_discover_homepage_query.py b/tests/snuba/api/endpoints/test_discover_homepage_query.py index a0ff1866f902ec..faf076bcf44d2c 100644 --- a/tests/snuba/api/endpoints/test_discover_homepage_query.py +++ b/tests/snuba/api/endpoints/test_discover_homepage_query.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.urls import reverse diff --git a/tests/snuba/api/endpoints/test_discover_key_transactions.py b/tests/snuba/api/endpoints/test_discover_key_transactions.py index eab2fc271c6b88..3b34de3949adf3 100644 --- a/tests/snuba/api/endpoints/test_discover_key_transactions.py +++ b/tests/snuba/api/endpoints/test_discover_key_transactions.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, Protocol +from typing import Any, Protocol, int from django.http.response import HttpResponse from django.urls import reverse diff --git a/tests/snuba/api/endpoints/test_discover_saved_queries.py b/tests/snuba/api/endpoints/test_discover_saved_queries.py index 69c74a66b7c8fd..69deb1305526e6 100644 --- a/tests/snuba/api/endpoints/test_discover_saved_queries.py +++ b/tests/snuba/api/endpoints/test_discover_saved_queries.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.discover.models import DiscoverSavedQuery, DiscoverSavedQueryTypes diff --git a/tests/snuba/api/endpoints/test_discover_saved_query_detail.py b/tests/snuba/api/endpoints/test_discover_saved_query_detail.py index 5fe9b8fc82bf09..efc44a3de6e4b5 100644 --- a/tests/snuba/api/endpoints/test_discover_saved_query_detail.py +++ b/tests/snuba/api/endpoints/test_discover_saved_query_detail.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.urls import NoReverseMatch, reverse diff --git a/tests/snuba/api/endpoints/test_group_details.py b/tests/snuba/api/endpoints/test_group_details.py index 287b84a61fba9c..57d824966745a5 100644 --- a/tests/snuba/api/endpoints/test_group_details.py +++ b/tests/snuba/api/endpoints/test_group_details.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import mock from unittest.mock import patch diff --git a/tests/snuba/api/endpoints/test_group_event_details.py b/tests/snuba/api/endpoints/test_group_event_details.py index 29ca1159b9683b..024cf66467eb91 100644 --- a/tests/snuba/api/endpoints/test_group_event_details.py +++ b/tests/snuba/api/endpoints/test_group_event_details.py @@ -1,3 +1,4 @@ +from typing import int from sentry.models.group import Group from sentry.testutils.cases import APITestCase, PerformanceIssueTestCase, SnubaTestCase from sentry.testutils.helpers.datetime import before_now diff --git a/tests/snuba/api/endpoints/test_organization_event_details.py b/tests/snuba/api/endpoints/test_organization_event_details.py index 8c91a47f3af7ca..d83422509ae77a 100644 --- a/tests/snuba/api/endpoints/test_organization_event_details.py +++ b/tests/snuba/api/endpoints/test_organization_event_details.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/snuba/api/endpoints/test_organization_eventid.py b/tests/snuba/api/endpoints/test_organization_eventid.py index ec22540293b08e..d07897e70eaca4 100644 --- a/tests/snuba/api/endpoints/test_organization_eventid.py +++ b/tests/snuba/api/endpoints/test_organization_eventid.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.test import override_settings from django.urls import NoReverseMatch, reverse diff --git a/tests/snuba/api/endpoints/test_organization_events.py b/tests/snuba/api/endpoints/test_organization_events.py index e29ef3b259c27a..0c3177376789b0 100644 --- a/tests/snuba/api/endpoints/test_organization_events.py +++ b/tests/snuba/api/endpoints/test_organization_events.py @@ -1,7 +1,7 @@ import math import uuid from datetime import timedelta -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/snuba/api/endpoints/test_organization_events_cross_trace.py b/tests/snuba/api/endpoints/test_organization_events_cross_trace.py index a2f5f6a9649da8..22509fa47c39f5 100644 --- a/tests/snuba/api/endpoints/test_organization_events_cross_trace.py +++ b/tests/snuba/api/endpoints/test_organization_events_cross_trace.py @@ -1,3 +1,4 @@ +from typing import int import uuid from tests.snuba.api.endpoints.test_organization_events import OrganizationEventsEndpointTestBase diff --git a/tests/snuba/api/endpoints/test_organization_events_facets.py b/tests/snuba/api/endpoints/test_organization_events_facets.py index fd8b6d45c58682..9500f5fecab0cc 100644 --- a/tests/snuba/api/endpoints/test_organization_events_facets.py +++ b/tests/snuba/api/endpoints/test_organization_events_facets.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock from uuid import uuid4 diff --git a/tests/snuba/api/endpoints/test_organization_events_facets_performance.py b/tests/snuba/api/endpoints/test_organization_events_facets_performance.py index 8a807df41b3440..9125cc18af2cf2 100644 --- a/tests/snuba/api/endpoints/test_organization_events_facets_performance.py +++ b/tests/snuba/api/endpoints/test_organization_events_facets_performance.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.urls import reverse diff --git a/tests/snuba/api/endpoints/test_organization_events_facets_performance_histogram.py b/tests/snuba/api/endpoints/test_organization_events_facets_performance_histogram.py index c64649dbf475da..250049da9532c7 100644 --- a/tests/snuba/api/endpoints/test_organization_events_facets_performance_histogram.py +++ b/tests/snuba/api/endpoints/test_organization_events_facets_performance_histogram.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.urls import reverse diff --git a/tests/snuba/api/endpoints/test_organization_events_has_measurements.py b/tests/snuba/api/endpoints/test_organization_events_has_measurements.py index 765a698799b0f2..853da167310334 100644 --- a/tests/snuba/api/endpoints/test_organization_events_has_measurements.py +++ b/tests/snuba/api/endpoints/test_organization_events_has_measurements.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from rest_framework.exceptions import ErrorDetail diff --git a/tests/snuba/api/endpoints/test_organization_events_histogram.py b/tests/snuba/api/endpoints/test_organization_events_histogram.py index 456e7f0c41dfc2..b136eedd836a14 100644 --- a/tests/snuba/api/endpoints/test_organization_events_histogram.py +++ b/tests/snuba/api/endpoints/test_organization_events_histogram.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import random from collections import namedtuple diff --git a/tests/snuba/api/endpoints/test_organization_events_mep.py b/tests/snuba/api/endpoints/test_organization_events_mep.py index d9750c239802b2..24bd1aa24d7614 100644 --- a/tests/snuba/api/endpoints/test_organization_events_mep.py +++ b/tests/snuba/api/endpoints/test_organization_events_mep.py @@ -1,4 +1,4 @@ -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/snuba/api/endpoints/test_organization_events_meta.py b/tests/snuba/api/endpoints/test_organization_events_meta.py index bb6cdac6d4eb61..a4cdf311b77cfe 100644 --- a/tests/snuba/api/endpoints/test_organization_events_meta.py +++ b/tests/snuba/api/endpoints/test_organization_events_meta.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/snuba/api/endpoints/test_organization_events_ourlogs.py b/tests/snuba/api/endpoints/test_organization_events_ourlogs.py index 79b043412b84f3..7ed18b1abbc53c 100644 --- a/tests/snuba/api/endpoints/test_organization_events_ourlogs.py +++ b/tests/snuba/api/endpoints/test_organization_events_ourlogs.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta, timezone from uuid import UUID, uuid4 diff --git a/tests/snuba/api/endpoints/test_organization_events_profile_functions.py b/tests/snuba/api/endpoints/test_organization_events_profile_functions.py index 0730670f1003a0..3a4e87e3e94ff4 100644 --- a/tests/snuba/api/endpoints/test_organization_events_profile_functions.py +++ b/tests/snuba/api/endpoints/test_organization_events_profile_functions.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock from tests.snuba.api.endpoints.test_organization_events import OrganizationEventsEndpointTestBase diff --git a/tests/snuba/api/endpoints/test_organization_events_span_indexed.py b/tests/snuba/api/endpoints/test_organization_events_span_indexed.py index 2af2b2615291b6..f4a478e0634f1e 100644 --- a/tests/snuba/api/endpoints/test_organization_events_span_indexed.py +++ b/tests/snuba/api/endpoints/test_organization_events_span_indexed.py @@ -1,3 +1,4 @@ +from typing import int import uuid from datetime import datetime, timezone from unittest import mock diff --git a/tests/snuba/api/endpoints/test_organization_events_span_metrics.py b/tests/snuba/api/endpoints/test_organization_events_span_metrics.py index d2fe7b3fedfff3..e5e98bec61c2cd 100644 --- a/tests/snuba/api/endpoints/test_organization_events_span_metrics.py +++ b/tests/snuba/api/endpoints/test_organization_events_span_metrics.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/snuba/api/endpoints/test_organization_events_span_ops.py b/tests/snuba/api/endpoints/test_organization_events_span_ops.py index c580817f7ea5a7..bcf277476b150c 100644 --- a/tests/snuba/api/endpoints/test_organization_events_span_ops.py +++ b/tests/snuba/api/endpoints/test_organization_events_span_ops.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/snuba/api/endpoints/test_organization_events_spans_histogram.py b/tests/snuba/api/endpoints/test_organization_events_spans_histogram.py index a744ce9c0a899d..331f89e12a0e28 100644 --- a/tests/snuba/api/endpoints/test_organization_events_spans_histogram.py +++ b/tests/snuba/api/endpoints/test_organization_events_spans_histogram.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.urls import reverse diff --git a/tests/snuba/api/endpoints/test_organization_events_spans_performance.py b/tests/snuba/api/endpoints/test_organization_events_spans_performance.py index 8cbd16da440ad0..bfefa9dcff4aa0 100644 --- a/tests/snuba/api/endpoints/test_organization_events_spans_performance.py +++ b/tests/snuba/api/endpoints/test_organization_events_spans_performance.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/snuba/api/endpoints/test_organization_events_stats.py b/tests/snuba/api/endpoints/test_organization_events_stats.py index 379428306dd0cb..039828684cff8c 100644 --- a/tests/snuba/api/endpoints/test_organization_events_stats.py +++ b/tests/snuba/api/endpoints/test_organization_events_stats.py @@ -3,7 +3,7 @@ import uuid from collections import defaultdict from datetime import timedelta -from typing import Any, DefaultDict, TypedDict +from typing import Any, DefaultDict, TypedDict, int from unittest import mock from uuid import uuid4 diff --git a/tests/snuba/api/endpoints/test_organization_events_stats_mep.py b/tests/snuba/api/endpoints/test_organization_events_stats_mep.py index a8f1a097d68243..1e431854c32205 100644 --- a/tests/snuba/api/endpoints/test_organization_events_stats_mep.py +++ b/tests/snuba/api/endpoints/test_organization_events_stats_mep.py @@ -1,7 +1,7 @@ from __future__ import annotations from datetime import timedelta -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/snuba/api/endpoints/test_organization_events_stats_ourlogs.py b/tests/snuba/api/endpoints/test_organization_events_stats_ourlogs.py index cbc06620b97cdd..2484127acf2323 100644 --- a/tests/snuba/api/endpoints/test_organization_events_stats_ourlogs.py +++ b/tests/snuba/api/endpoints/test_organization_events_stats_ourlogs.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.urls import reverse diff --git a/tests/snuba/api/endpoints/test_organization_events_stats_profile_functions.py b/tests/snuba/api/endpoints/test_organization_events_stats_profile_functions.py index 479e7ba832646b..b3a5b3328514c4 100644 --- a/tests/snuba/api/endpoints/test_organization_events_stats_profile_functions.py +++ b/tests/snuba/api/endpoints/test_organization_events_stats_profile_functions.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from sentry.testutils.helpers.datetime import before_now diff --git a/tests/snuba/api/endpoints/test_organization_events_stats_span_indexed.py b/tests/snuba/api/endpoints/test_organization_events_stats_span_indexed.py index 77de0f8179f488..450bccabdcf414 100644 --- a/tests/snuba/api/endpoints/test_organization_events_stats_span_indexed.py +++ b/tests/snuba/api/endpoints/test_organization_events_stats_span_indexed.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/snuba/api/endpoints/test_organization_events_stats_span_metrics.py b/tests/snuba/api/endpoints/test_organization_events_stats_span_metrics.py index 4b65ba554c5b52..e6731dd6f6e786 100644 --- a/tests/snuba/api/endpoints/test_organization_events_stats_span_metrics.py +++ b/tests/snuba/api/endpoints/test_organization_events_stats_span_metrics.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest.mock import MagicMock, patch diff --git a/tests/snuba/api/endpoints/test_organization_events_stats_trace_metrics.py b/tests/snuba/api/endpoints/test_organization_events_stats_trace_metrics.py index aac749a89f4870..62eeb6c8532c7c 100644 --- a/tests/snuba/api/endpoints/test_organization_events_stats_trace_metrics.py +++ b/tests/snuba/api/endpoints/test_organization_events_stats_trace_metrics.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/snuba/api/endpoints/test_organization_events_timeseries.py b/tests/snuba/api/endpoints/test_organization_events_timeseries.py index aaab4bb36243bf..fc0fa5f9b64cac 100644 --- a/tests/snuba/api/endpoints/test_organization_events_timeseries.py +++ b/tests/snuba/api/endpoints/test_organization_events_timeseries.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from datetime import timedelta diff --git a/tests/snuba/api/endpoints/test_organization_events_timeseries_logs.py b/tests/snuba/api/endpoints/test_organization_events_timeseries_logs.py index 79375f9789a279..442d801d400658 100644 --- a/tests/snuba/api/endpoints/test_organization_events_timeseries_logs.py +++ b/tests/snuba/api/endpoints/test_organization_events_timeseries_logs.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.urls import reverse diff --git a/tests/snuba/api/endpoints/test_organization_events_timeseries_spans.py b/tests/snuba/api/endpoints/test_organization_events_timeseries_spans.py index 3654af08139eb1..c7cd1cba2bd203 100644 --- a/tests/snuba/api/endpoints/test_organization_events_timeseries_spans.py +++ b/tests/snuba/api/endpoints/test_organization_events_timeseries_spans.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/snuba/api/endpoints/test_organization_events_timeseries_trace_metrics.py b/tests/snuba/api/endpoints/test_organization_events_timeseries_trace_metrics.py index ea50f958c60956..92bf4e384becb5 100644 --- a/tests/snuba/api/endpoints/test_organization_events_timeseries_trace_metrics.py +++ b/tests/snuba/api/endpoints/test_organization_events_timeseries_trace_metrics.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.urls import reverse diff --git a/tests/snuba/api/endpoints/test_organization_events_trace.py b/tests/snuba/api/endpoints/test_organization_events_trace.py index 1a2b48792c4b15..cd112958d76cbe 100644 --- a/tests/snuba/api/endpoints/test_organization_events_trace.py +++ b/tests/snuba/api/endpoints/test_organization_events_trace.py @@ -1,3 +1,4 @@ +from typing import int from datetime import datetime, timedelta from unittest import mock from uuid import uuid4 diff --git a/tests/snuba/api/endpoints/test_organization_events_trace_metrics.py b/tests/snuba/api/endpoints/test_organization_events_trace_metrics.py index 56d7a83405b223..de85754cf3d5b4 100644 --- a/tests/snuba/api/endpoints/test_organization_events_trace_metrics.py +++ b/tests/snuba/api/endpoints/test_organization_events_trace_metrics.py @@ -1,3 +1,4 @@ +from typing import int from unittest import mock import pytest diff --git a/tests/snuba/api/endpoints/test_organization_events_trends.py b/tests/snuba/api/endpoints/test_organization_events_trends.py index 4e38fed9d906a5..04e23f9c6a8da0 100644 --- a/tests/snuba/api/endpoints/test_organization_events_trends.py +++ b/tests/snuba/api/endpoints/test_organization_events_trends.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from django.urls import reverse diff --git a/tests/snuba/api/endpoints/test_organization_events_uptime_results.py b/tests/snuba/api/endpoints/test_organization_events_uptime_results.py index f927b05335d5ae..4c61052eac103e 100644 --- a/tests/snuba/api/endpoints/test_organization_events_uptime_results.py +++ b/tests/snuba/api/endpoints/test_organization_events_uptime_results.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from uuid import uuid4 diff --git a/tests/snuba/api/endpoints/test_organization_events_vitals.py b/tests/snuba/api/endpoints/test_organization_events_vitals.py index 24b962b8e863df..19d5c2bfa14b5b 100644 --- a/tests/snuba/api/endpoints/test_organization_events_vitals.py +++ b/tests/snuba/api/endpoints/test_organization_events_vitals.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/snuba/api/endpoints/test_organization_group_index_stats.py b/tests/snuba/api/endpoints/test_organization_group_index_stats.py index d4015ea46654ae..d6f2302f0870a0 100644 --- a/tests/snuba/api/endpoints/test_organization_group_index_stats.py +++ b/tests/snuba/api/endpoints/test_organization_group_index_stats.py @@ -1,3 +1,4 @@ +from typing import int import uuid from sentry.issues.grouptype import ProfileFileIOGroupType diff --git a/tests/snuba/api/endpoints/test_organization_issues_resolved_in_release.py b/tests/snuba/api/endpoints/test_organization_issues_resolved_in_release.py index 016715d16f81de..affbcf7b875218 100644 --- a/tests/snuba/api/endpoints/test_organization_issues_resolved_in_release.py +++ b/tests/snuba/api/endpoints/test_organization_issues_resolved_in_release.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid1 from sentry.models.commit import Commit diff --git a/tests/snuba/api/endpoints/test_organization_measurements_meta.py b/tests/snuba/api/endpoints/test_organization_measurements_meta.py index dee844284e6487..56df17d26d8370 100644 --- a/tests/snuba/api/endpoints/test_organization_measurements_meta.py +++ b/tests/snuba/api/endpoints/test_organization_measurements_meta.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta import pytest diff --git a/tests/snuba/api/endpoints/test_organization_metrics_meta.py b/tests/snuba/api/endpoints/test_organization_metrics_meta.py index af34323903bb7e..07babda7cf6ae1 100644 --- a/tests/snuba/api/endpoints/test_organization_metrics_meta.py +++ b/tests/snuba/api/endpoints/test_organization_metrics_meta.py @@ -1,3 +1,4 @@ +from typing import int import pytest from django.urls import reverse diff --git a/tests/snuba/api/endpoints/test_organization_sessions.py b/tests/snuba/api/endpoints/test_organization_sessions.py index 11398b8c0c320d..e3a9cce6bf8b9a 100644 --- a/tests/snuba/api/endpoints/test_organization_sessions.py +++ b/tests/snuba/api/endpoints/test_organization_sessions.py @@ -1,3 +1,4 @@ +from typing import int import datetime from unittest.mock import patch from uuid import uuid4 diff --git a/tests/snuba/api/endpoints/test_organization_stats_summary.py b/tests/snuba/api/endpoints/test_organization_stats_summary.py index ed6ce6ee9b9427..512b350a9ed7e3 100644 --- a/tests/snuba/api/endpoints/test_organization_stats_summary.py +++ b/tests/snuba/api/endpoints/test_organization_stats_summary.py @@ -2,7 +2,7 @@ import functools from datetime import UTC, datetime, timedelta -from typing import Any +from typing import int, Any from django.urls import reverse diff --git a/tests/snuba/api/endpoints/test_organization_stats_v2.py b/tests/snuba/api/endpoints/test_organization_stats_v2.py index 9bf670cd9bf938..0b503d9b3be7f2 100644 --- a/tests/snuba/api/endpoints/test_organization_stats_v2.py +++ b/tests/snuba/api/endpoints/test_organization_stats_v2.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from sentry.constants import DataCategory diff --git a/tests/snuba/api/endpoints/test_organization_tagkey_values.py b/tests/snuba/api/endpoints/test_organization_tagkey_values.py index 35677951ebe5bd..789355a36fb970 100644 --- a/tests/snuba/api/endpoints/test_organization_tagkey_values.py +++ b/tests/snuba/api/endpoints/test_organization_tagkey_values.py @@ -1,3 +1,4 @@ +from typing import int import datetime import uuid from datetime import timedelta, timezone diff --git a/tests/snuba/api/endpoints/test_organization_tags.py b/tests/snuba/api/endpoints/test_organization_tags.py index 6f86744422ce0c..9905903aa0c603 100644 --- a/tests/snuba/api/endpoints/test_organization_tags.py +++ b/tests/snuba/api/endpoints/test_organization_tags.py @@ -1,3 +1,4 @@ +from typing import int import uuid from unittest import mock diff --git a/tests/snuba/api/endpoints/test_organization_trace.py b/tests/snuba/api/endpoints/test_organization_trace.py index 39b6649e3a9fa0..72696a2208ad52 100644 --- a/tests/snuba/api/endpoints/test_organization_trace.py +++ b/tests/snuba/api/endpoints/test_organization_trace.py @@ -1,3 +1,4 @@ +from typing import int import logging from unittest import mock from uuid import uuid4 diff --git a/tests/snuba/api/endpoints/test_organization_trace_item_attributes.py b/tests/snuba/api/endpoints/test_organization_trace_item_attributes.py index 8d68931855a924..11f35e4a776617 100644 --- a/tests/snuba/api/endpoints/test_organization_trace_item_attributes.py +++ b/tests/snuba/api/endpoints/test_organization_trace_item_attributes.py @@ -1,3 +1,4 @@ +from typing import int from operator import itemgetter from unittest import mock from uuid import uuid4 diff --git a/tests/snuba/api/endpoints/test_organization_trace_item_attributes_ranked.py b/tests/snuba/api/endpoints/test_organization_trace_item_attributes_ranked.py index 7d5d7941588e7a..0755ffde7fc304 100644 --- a/tests/snuba/api/endpoints/test_organization_trace_item_attributes_ranked.py +++ b/tests/snuba/api/endpoints/test_organization_trace_item_attributes_ranked.py @@ -1,3 +1,4 @@ +from typing import int from unittest.mock import patch from django.urls import reverse diff --git a/tests/snuba/api/endpoints/test_organization_trace_item_stats.py b/tests/snuba/api/endpoints/test_organization_trace_item_stats.py index cf31f2226a952c..e17c3ad7bf9003 100644 --- a/tests/snuba/api/endpoints/test_organization_trace_item_stats.py +++ b/tests/snuba/api/endpoints/test_organization_trace_item_stats.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITransactionTestCase, SnubaTestCase, SpanTestCase diff --git a/tests/snuba/api/endpoints/test_organization_trace_logs.py b/tests/snuba/api/endpoints/test_organization_trace_logs.py index 8cfa10529fe2df..d166765e9dd1ce 100644 --- a/tests/snuba/api/endpoints/test_organization_trace_logs.py +++ b/tests/snuba/api/endpoints/test_organization_trace_logs.py @@ -1,3 +1,4 @@ +from typing import int import logging from unittest.mock import patch from uuid import uuid4 diff --git a/tests/snuba/api/endpoints/test_organization_trace_meta.py b/tests/snuba/api/endpoints/test_organization_trace_meta.py index 721e70d7d8d590..b918a01f87d91b 100644 --- a/tests/snuba/api/endpoints/test_organization_trace_meta.py +++ b/tests/snuba/api/endpoints/test_organization_trace_meta.py @@ -1,3 +1,4 @@ +from typing import int from uuid import uuid4 import pytest diff --git a/tests/snuba/api/endpoints/test_project_event_details.py b/tests/snuba/api/endpoints/test_project_event_details.py index a163a4bbec3139..aeac9d3c6f80b9 100644 --- a/tests/snuba/api/endpoints/test_project_event_details.py +++ b/tests/snuba/api/endpoints/test_project_event_details.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase, PerformanceIssueTestCase, SnubaTestCase diff --git a/tests/snuba/api/endpoints/test_project_events.py b/tests/snuba/api/endpoints/test_project_events.py index 3dba330ffe31f7..5f6da44fba4d84 100644 --- a/tests/snuba/api/endpoints/test_project_events.py +++ b/tests/snuba/api/endpoints/test_project_events.py @@ -1,3 +1,4 @@ +from typing import int from django.urls import reverse from sentry.testutils.cases import APITestCase, SnubaTestCase diff --git a/tests/snuba/api/endpoints/test_project_group_index.py b/tests/snuba/api/endpoints/test_project_group_index.py index 97aa85077b4766..eafd2cf59e9c24 100644 --- a/tests/snuba/api/endpoints/test_project_group_index.py +++ b/tests/snuba/api/endpoints/test_project_group_index.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import datetime import time diff --git a/tests/snuba/api/endpoints/test_project_tags.py b/tests/snuba/api/endpoints/test_project_tags.py index ea402ef4d0c10f..b62adf66bca138 100644 --- a/tests/snuba/api/endpoints/test_project_tags.py +++ b/tests/snuba/api/endpoints/test_project_tags.py @@ -1,3 +1,4 @@ +from typing import int from sentry.constants import DS_DENYLIST from sentry.testutils.cases import APITestCase, SnubaTestCase from sentry.testutils.helpers.datetime import before_now diff --git a/tests/snuba/api/endpoints/test_project_trace_item_details.py b/tests/snuba/api/endpoints/test_project_trace_item_details.py index 2f9d06a538dec2..45bd751fc43fb1 100644 --- a/tests/snuba/api/endpoints/test_project_trace_item_details.py +++ b/tests/snuba/api/endpoints/test_project_trace_item_details.py @@ -1,3 +1,4 @@ +from typing import int import uuid import pytest diff --git a/tests/snuba/api/endpoints/test_seer_attributes.py b/tests/snuba/api/endpoints/test_seer_attributes.py index 553c33f7e88175..30c5d0cfd8fc8a 100644 --- a/tests/snuba/api/endpoints/test_seer_attributes.py +++ b/tests/snuba/api/endpoints/test_seer_attributes.py @@ -1,3 +1,4 @@ +from typing import int from concurrent.futures import TimeoutError from unittest.mock import Mock, patch from uuid import uuid4 diff --git a/tests/snuba/api/serializers/test_group.py b/tests/snuba/api/serializers/test_group.py index 0cea89616c320e..a692012fe5a487 100644 --- a/tests/snuba/api/serializers/test_group.py +++ b/tests/snuba/api/serializers/test_group.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from unittest import mock diff --git a/tests/snuba/api/serializers/test_group_stream.py b/tests/snuba/api/serializers/test_group_stream.py index b198dac28499fd..428029061639d6 100644 --- a/tests/snuba/api/serializers/test_group_stream.py +++ b/tests/snuba/api/serializers/test_group_stream.py @@ -1,3 +1,4 @@ +from typing import int import time from datetime import timedelta from unittest import mock diff --git a/tests/snuba/incidents/test_tasks.py b/tests/snuba/incidents/test_tasks.py index e52bbf57367f97..601808f885158a 100644 --- a/tests/snuba/incidents/test_tasks.py +++ b/tests/snuba/incidents/test_tasks.py @@ -1,3 +1,4 @@ +from typing import int from copy import deepcopy from functools import cached_property diff --git a/tests/snuba/metrics/naming_layer/test_mri.py b/tests/snuba/metrics/naming_layer/test_mri.py index 234ee2914ae53e..48d65d49cb189c 100644 --- a/tests/snuba/metrics/naming_layer/test_mri.py +++ b/tests/snuba/metrics/naming_layer/test_mri.py @@ -1,4 +1,4 @@ -from typing import cast +from typing import int, cast import pytest diff --git a/tests/snuba/metrics/test_units.py b/tests/snuba/metrics/test_units.py index 6f8e9c7722a1a6..4614b3f7741fb1 100644 --- a/tests/snuba/metrics/test_units.py +++ b/tests/snuba/metrics/test_units.py @@ -1,3 +1,4 @@ +from typing import int import pytest from sentry.snuba.metrics.units import format_value_using_unit diff --git a/tests/snuba/models/test_group.py b/tests/snuba/models/test_group.py index cf93a7908e534f..c0740846f574e2 100644 --- a/tests/snuba/models/test_group.py +++ b/tests/snuba/models/test_group.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import uuid from collections.abc import Sequence diff --git a/tests/snuba/rules/conditions/test_event_frequency.py b/tests/snuba/rules/conditions/test_event_frequency.py index ccbdaf53110f45..69a72c5282161c 100644 --- a/tests/snuba/rules/conditions/test_event_frequency.py +++ b/tests/snuba/rules/conditions/test_event_frequency.py @@ -1,3 +1,4 @@ +from typing import int import time from copy import deepcopy from datetime import timedelta diff --git a/tests/snuba/search/test_backend.py b/tests/snuba/search/test_backend.py index fb52887128c702..56a12f50060ad6 100644 --- a/tests/snuba/search/test_backend.py +++ b/tests/snuba/search/test_backend.py @@ -1,6 +1,6 @@ import uuid from datetime import UTC, datetime, timedelta -from typing import Any +from typing import int, Any from unittest import mock import pytest diff --git a/tests/snuba/sessions/test_sessions.py b/tests/snuba/sessions/test_sessions.py index 04f11c8eec0060..2ce9af908edb51 100644 --- a/tests/snuba/sessions/test_sessions.py +++ b/tests/snuba/sessions/test_sessions.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import time from datetime import datetime, timedelta diff --git a/tests/snuba/sessions/test_sessions_v2.py b/tests/snuba/sessions/test_sessions_v2.py index 7f12b16be417b0..a310b023f8d186 100644 --- a/tests/snuba/sessions/test_sessions_v2.py +++ b/tests/snuba/sessions/test_sessions_v2.py @@ -1,3 +1,4 @@ +from typing import int import math from datetime import datetime, timezone diff --git a/tests/snuba/tagstore/test_tagstore_backend.py b/tests/snuba/tagstore/test_tagstore_backend.py index f8358d6feed35f..26ac577118784f 100644 --- a/tests/snuba/tagstore/test_tagstore_backend.py +++ b/tests/snuba/tagstore/test_tagstore_backend.py @@ -1,3 +1,4 @@ +from typing import int from datetime import timedelta from functools import cached_property from unittest import mock diff --git a/tests/snuba/tasks/test_unmerge.py b/tests/snuba/tasks/test_unmerge.py index 291cc146a3f46f..9d3eb7f7b18d19 100644 --- a/tests/snuba/tasks/test_unmerge.py +++ b/tests/snuba/tasks/test_unmerge.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import functools import hashlib diff --git a/tests/snuba/test_metrics_layer.py b/tests/snuba/test_metrics_layer.py index d5b85b798e137c..b121863e2d5e38 100644 --- a/tests/snuba/test_metrics_layer.py +++ b/tests/snuba/test_metrics_layer.py @@ -2,7 +2,7 @@ from collections.abc import Mapping from datetime import datetime, timedelta, timezone -from typing import Literal +from typing import int, Literal import pytest from snuba_sdk import ( diff --git a/tests/snuba/test_referrer.py b/tests/snuba/test_referrer.py index cb12ccdbaf533b..ff19efae7097b4 100644 --- a/tests/snuba/test_referrer.py +++ b/tests/snuba/test_referrer.py @@ -1,3 +1,4 @@ +from typing import int from unittest import TestCase from unittest.mock import MagicMock, patch diff --git a/tests/snuba/test_snql_snuba.py b/tests/snuba/test_snql_snuba.py index 31aefdc2b8aecf..5f0855074b0629 100644 --- a/tests/snuba/test_snql_snuba.py +++ b/tests/snuba/test_snql_snuba.py @@ -1,3 +1,4 @@ +from typing import int import time import uuid from datetime import datetime, timedelta diff --git a/tests/snuba/test_snuba.py b/tests/snuba/test_snuba.py index 5219af988c9750..67bd9b716b57b7 100644 --- a/tests/snuba/test_snuba.py +++ b/tests/snuba/test_snuba.py @@ -1,3 +1,4 @@ +from typing import int import copy import time import uuid diff --git a/tests/snuba/test_util.py b/tests/snuba/test_util.py index 10b9b1bd118fc3..91546784097b47 100644 --- a/tests/snuba/test_util.py +++ b/tests/snuba/test_util.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from sentry.models.grouphash import GroupHash diff --git a/tests/snuba/tsdb/test_tsdb_backend.py b/tests/snuba/tsdb/test_tsdb_backend.py index 01acf45dfb931b..b18746b97ec310 100644 --- a/tests/snuba/tsdb/test_tsdb_backend.py +++ b/tests/snuba/tsdb/test_tsdb_backend.py @@ -1,3 +1,4 @@ +from typing import int from datetime import UTC, datetime, timedelta from unittest.mock import patch diff --git a/tests/social_auth/test_utils.py b/tests/social_auth/test_utils.py index c0dc5ea438662f..c65a445322e819 100644 --- a/tests/social_auth/test_utils.py +++ b/tests/social_auth/test_utils.py @@ -1,3 +1,4 @@ +from typing import int from django.contrib.contenttypes.models import ContentType from sentry.testutils.cases import TestCase diff --git a/tests/symbolicator/__init__.py b/tests/symbolicator/__init__.py index 7252529533af3a..252b08a805b9c2 100644 --- a/tests/symbolicator/__init__.py +++ b/tests/symbolicator/__init__.py @@ -1,3 +1,4 @@ +from typing import int import re from sentry.utils.safe import get_path diff --git a/tests/symbolicator/test_minidump_full.py b/tests/symbolicator/test_minidump_full.py index 5e84ddd79e940c..0ce1d685c6d3ee 100644 --- a/tests/symbolicator/test_minidump_full.py +++ b/tests/symbolicator/test_minidump_full.py @@ -1,3 +1,4 @@ +from typing import int import zipfile from io import BytesIO from unittest.mock import patch diff --git a/tests/symbolicator/test_payload_full.py b/tests/symbolicator/test_payload_full.py index 550bf06646b7ae..1a269789fb42fd 100644 --- a/tests/symbolicator/test_payload_full.py +++ b/tests/symbolicator/test_payload_full.py @@ -1,3 +1,4 @@ +from typing import int import os.path import zipfile from io import BytesIO diff --git a/tests/symbolicator/test_unreal_full.py b/tests/symbolicator/test_unreal_full.py index 8d3d1c2692e1eb..83ecbf69fe7a31 100644 --- a/tests/symbolicator/test_unreal_full.py +++ b/tests/symbolicator/test_unreal_full.py @@ -1,3 +1,4 @@ +from typing import int import zipfile from io import BytesIO from unittest.mock import patch diff --git a/tests/tools/mypy_helpers/test_check_stronglist.py b/tests/tools/mypy_helpers/test_check_stronglist.py index 0c8535ce105dec..e99d916832c339 100644 --- a/tests/tools/mypy_helpers/test_check_stronglist.py +++ b/tests/tools/mypy_helpers/test_check_stronglist.py @@ -1,3 +1,4 @@ +from typing import int import re from tools.mypy_helpers.check_stronglist import _glob_to_re, main diff --git a/tests/tools/mypy_helpers/test_plugin.py b/tests/tools/mypy_helpers/test_plugin.py index 2373907004b1db..f82b7b34d2a41c 100644 --- a/tests/tools/mypy_helpers/test_plugin.py +++ b/tests/tools/mypy_helpers/test_plugin.py @@ -239,7 +239,7 @@ def test_csp_response_attribute() -> None: def test_lazy_service_wrapper() -> None: src = """\ -from typing import assert_type, Literal +from typing import assert_type, Literal, int from sentry.utils.lazy_service_wrapper import LazyServiceWrapper, Service, _EmptyType class MyService(Service): diff --git a/tests/tools/mypy_helpers/test_sort_stronger_modules.py b/tests/tools/mypy_helpers/test_sort_stronger_modules.py index f93d7344a836c7..de9ec5e21a5e28 100644 --- a/tests/tools/mypy_helpers/test_sort_stronger_modules.py +++ b/tests/tools/mypy_helpers/test_sort_stronger_modules.py @@ -1,3 +1,4 @@ +from typing import int from pathlib import Path from tools.mypy_helpers.sort_stronger_modules import main diff --git a/tests/tools/test_api_urls_to_typescript.py b/tests/tools/test_api_urls_to_typescript.py index dc5532d5ab210a..3e253a3aa843bd 100644 --- a/tests/tools/test_api_urls_to_typescript.py +++ b/tests/tools/test_api_urls_to_typescript.py @@ -1,3 +1,4 @@ +from typing import int import pytest from tools.api_urls_to_typescript import regexp_to_routes diff --git a/tests/tools/test_bump_action.py b/tests/tools/test_bump_action.py index f483c0b60710c3..e534968d2bc449 100644 --- a/tests/tools/test_bump_action.py +++ b/tests/tools/test_bump_action.py @@ -1,3 +1,4 @@ +from typing import int import subprocess from unittest import mock diff --git a/tests/tools/test_docker_memory_check.py b/tests/tools/test_docker_memory_check.py index 6edb8aa1789523..0038df6a0706d8 100644 --- a/tests/tools/test_docker_memory_check.py +++ b/tests/tools/test_docker_memory_check.py @@ -1,3 +1,4 @@ +from typing import int import os from unittest import mock diff --git a/tests/tools/test_flake8_plugin.py b/tests/tools/test_flake8_plugin.py index d6aaf48f40ab08..21896fe9653278 100644 --- a/tests/tools/test_flake8_plugin.py +++ b/tests/tools/test_flake8_plugin.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import ast diff --git a/tests/tools/test_lint_requirements.py b/tests/tools/test_lint_requirements.py index 1ceb97f52ec99e..06031bba13f385 100644 --- a/tests/tools/test_lint_requirements.py +++ b/tests/tools/test_lint_requirements.py @@ -1,3 +1,4 @@ +from typing import int import pytest from tools import lint_requirements diff --git a/tests/tools/test_pin_github_action.py b/tests/tools/test_pin_github_action.py index 73e1cfa5133a5e..c97c9c93eb37bb 100644 --- a/tests/tools/test_pin_github_action.py +++ b/tests/tools/test_pin_github_action.py @@ -1,3 +1,4 @@ +from typing import int import pytest from tools.pin_github_action import ACTION_VERSION_RE diff --git a/tools/api_urls_to_typescript.py b/tools/api_urls_to_typescript.py index 5525f2cbf06729..fc890af304e8d5 100644 --- a/tools/api_urls_to_typescript.py +++ b/tools/api_urls_to_typescript.py @@ -2,7 +2,7 @@ # flake8: noqa: S002 import re -from typing import Any +from typing import int, Any from django.urls import URLPattern, URLResolver diff --git a/tools/bump_action.py b/tools/bump_action.py index 8909b29b075479..3e31e38abeae6f 100644 --- a/tools/bump_action.py +++ b/tools/bump_action.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import argparse import glob diff --git a/tools/bump_version.py b/tools/bump_version.py index a7460230767eb5..798aff2a5b75a1 100644 --- a/tools/bump_version.py +++ b/tools/bump_version.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import argparse import subprocess diff --git a/tools/docker_memory_check.py b/tools/docker_memory_check.py index 66c6e99e32e8e6..74adaffea71580 100644 --- a/tools/docker_memory_check.py +++ b/tools/docker_memory_check.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import argparse import json diff --git a/tools/fast_editable.py b/tools/fast_editable.py index 6afdf110c6ef8c..a3f08079b46157 100644 --- a/tools/fast_editable.py +++ b/tools/fast_editable.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 from __future__ import annotations +from typing import int import argparse import configparser diff --git a/tools/flake8_plugin.py b/tools/flake8_plugin.py index 245192fe3dfe18..cba886a8f07372 100644 --- a/tools/flake8_plugin.py +++ b/tools/flake8_plugin.py @@ -2,7 +2,7 @@ import ast from collections.abc import Generator -from typing import Any +from typing import int, Any S001_fmt = ( "S001 Avoid using the {} mock call as it is " diff --git a/tools/lib.py b/tools/lib.py index 556d5a85573cab..ba9ccc54ef7bf9 100644 --- a/tools/lib.py +++ b/tools/lib.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int from functools import cache diff --git a/tools/lint_requirements.py b/tools/lint_requirements.py index 5a6441eb03aeeb..d103f1ebf0294a 100644 --- a/tools/lint_requirements.py +++ b/tools/lint_requirements.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import argparse import tomllib diff --git a/tools/migrations/compare.py b/tools/migrations/compare.py index 86fa82bde4f958..e449f34fea7afd 100644 --- a/tools/migrations/compare.py +++ b/tools/migrations/compare.py @@ -1,3 +1,4 @@ +from typing import int import argparse import collections import difflib diff --git a/tools/migrations/quick_drift_compare.py b/tools/migrations/quick_drift_compare.py index 57390d51a9ca1a..147790c734ab99 100644 --- a/tools/migrations/quick_drift_compare.py +++ b/tools/migrations/quick_drift_compare.py @@ -6,7 +6,7 @@ import shlex import subprocess import sys -from typing import IO, NoReturn +from typing import IO, NoReturn, int def _get_repo() -> str: diff --git a/tools/migrations/squash.py b/tools/migrations/squash.py index faf1a94da539bb..5b99a679c3bd27 100644 --- a/tools/migrations/squash.py +++ b/tools/migrations/squash.py @@ -3,7 +3,7 @@ import os.path import subprocess from collections.abc import Generator -from typing import NamedTuple +from typing import int, NamedTuple # for squash _SAFE_RUN_SQL_IMPORT = "from sentry.new_migrations.monkey.special import SafeRunSQL\n" diff --git a/tools/mypy_helpers/check_stronglist.py b/tools/mypy_helpers/check_stronglist.py index 2c2b8279a14617..d129ebe65a69f0 100644 --- a/tools/mypy_helpers/check_stronglist.py +++ b/tools/mypy_helpers/check_stronglist.py @@ -1,3 +1,4 @@ +from typing import int import argparse import glob import os.path diff --git a/tools/mypy_helpers/find_easiest_modules.py b/tools/mypy_helpers/find_easiest_modules.py index 4e89178997f0e9..5af10aba730fdf 100644 --- a/tools/mypy_helpers/find_easiest_modules.py +++ b/tools/mypy_helpers/find_easiest_modules.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import collections import subprocess diff --git a/tools/mypy_helpers/make_module_ignores.py b/tools/mypy_helpers/make_module_ignores.py index 414f12080525c9..d5eb2aa2533216 100644 --- a/tools/mypy_helpers/make_module_ignores.py +++ b/tools/mypy_helpers/make_module_ignores.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import os import re diff --git a/tools/mypy_helpers/make_stub_ignores.py b/tools/mypy_helpers/make_stub_ignores.py index 51749aed4a9d2c..658ef719133d97 100644 --- a/tools/mypy_helpers/make_stub_ignores.py +++ b/tools/mypy_helpers/make_stub_ignores.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import os.path import re diff --git a/tools/mypy_helpers/mypy_without_ignores.py b/tools/mypy_helpers/mypy_without_ignores.py index d4c74c5bf91d54..93feaee89e2e07 100644 --- a/tools/mypy_helpers/mypy_without_ignores.py +++ b/tools/mypy_helpers/mypy_without_ignores.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import os.path import subprocess diff --git a/tools/mypy_helpers/plugin.py b/tools/mypy_helpers/plugin.py index 2ea88295ca260e..f39d14eb175e08 100644 --- a/tools/mypy_helpers/plugin.py +++ b/tools/mypy_helpers/plugin.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import functools from collections.abc import Callable diff --git a/tools/mypy_helpers/sort_stronger_modules.py b/tools/mypy_helpers/sort_stronger_modules.py index dff07db60fdf4e..832b0cfc3ec157 100644 --- a/tools/mypy_helpers/sort_stronger_modules.py +++ b/tools/mypy_helpers/sort_stronger_modules.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import argparse from collections.abc import Sequence diff --git a/tools/pin_github_action.py b/tools/pin_github_action.py index b3e93beaf63e90..54ad0aacaf66de 100644 --- a/tools/pin_github_action.py +++ b/tools/pin_github_action.py @@ -1,4 +1,5 @@ from __future__ import annotations +from typing import int import argparse import re