pyproject.toml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. [tool.black]
  2. # File filtering is taken care of in pre-commit.
  3. line-length = 100
  4. target-version = ['py311']
  5. [tool.isort]
  6. profile = "black"
  7. line_length = 100
  8. lines_between_sections = 1
  9. known_first_party = "sentry"
  10. skip = "migrations"
  11. [tool.pytest.ini_options]
  12. python_files = "test_*.py sentry/testutils/*"
  13. # note: When updating the traceback format, make sure to update .github/pytest.json
  14. # We don't use the celery pytest plugin.
  15. addopts = "--tb=short -p no:celery --nomigrations"
  16. # TODO: --import-mode=importlib will become the default soon,
  17. # currently we have a few relative imports that don't work with that.
  18. markers = [
  19. "snuba: test requires access to snuba",
  20. "snuba_ci: test is run in snuba ci",
  21. "sentry_metrics: test requires access to sentry metrics",
  22. "symbolicator: test requires access to symbolicator",
  23. "querybuilder: smoke tests for QueryBuilders",
  24. ]
  25. filterwarnings = [
  26. # Consider all warnings to be errors other than the ignored ones.
  27. "error",
  28. # phabricator uses `pkg_resources` apis
  29. "ignore:pkg_resources is deprecated as an API",
  30. # this warning in protobuf causes a segfault in 3.12+ protocolbuffers/protobuf#15077
  31. "ignore:Type google\\._upb.*",
  32. # The following warning filters are for pytest only.
  33. "ignore:.*sentry.digests.backends.dummy.DummyBackend.*:sentry.utils.warnings.UnsupportedBackend",
  34. # pytest has not yet implemented the replacement for this yet
  35. "ignore:The --looponfail command line argument.*",
  36. ]
  37. looponfailroots = ["src", "tests"]
  38. [tool.mypy]
  39. python_version = "3.11"
  40. mypy_path = ["fixtures/stubs-for-mypy"]
  41. plugins = [
  42. "pydantic.mypy",
  43. "mypy_django_plugin.main",
  44. "tools.mypy_helpers.plugin",
  45. ]
  46. files = ["."]
  47. exclude = ["^.venv/", "^venv/", "^self-hosted/"]
  48. # minimal strictness settings
  49. check_untyped_defs = true
  50. no_implicit_reexport = true
  51. warn_unreachable = true
  52. warn_unused_configs = true
  53. warn_unused_ignores = true
  54. warn_redundant_casts = true
  55. enable_error_code = ["ignore-without-code", "redundant-self"]
  56. [tool.django-stubs]
  57. django_settings_module = "sentry.conf.server_mypy"
  58. # these have py.typed but incorrect types
  59. [[tool.mypy.overrides]]
  60. module = [
  61. # TODO: these cause type errors when followed
  62. "snuba_sdk.*",
  63. ]
  64. follow_imports = "skip"
  65. # python3 -m tools.mypy_helpers.make_stub_ignores
  66. # begin: missing 3rd party stubs
  67. # - add .pyi files to fixtures/stubs-for-mypy
  68. # - or find a 3rd party stub
  69. [[tool.mypy.overrides]]
  70. module = [
  71. "boto3.*",
  72. "botocore.client.*",
  73. "botocore.exceptions.*",
  74. "celery.*",
  75. "confluent_kafka.*",
  76. "cssselect.*",
  77. "django_zero_downtime_migrations.backends.postgres.schema.*",
  78. "docker.*",
  79. "fido2.*",
  80. "google.auth.*",
  81. "google.cloud.*",
  82. "google.resumable_media.common.*",
  83. "google.rpc.status_pb2.*",
  84. "kombu.*",
  85. "mistune.*",
  86. "onelogin.saml2.auth.*",
  87. "onelogin.saml2.constants.*",
  88. "onelogin.saml2.idp_metadata_parser.*",
  89. "phabricator.*",
  90. "rb.*",
  91. "requests_oauthlib.*",
  92. "sqlparse.*",
  93. "statsd.*",
  94. "u2flib_server.model.*",
  95. "unidiff.*",
  96. ]
  97. ignore_missing_imports = true
  98. # end: missing 3rd party stubs
  99. # python3 -m tools.mypy_helpers.make_module_ignores
  100. # begin: sentry modules with typing issues
  101. # - remove the module from the list and fix the issues!
  102. # - python3 -m tools.mypy_helpers.find_easiest_modules
  103. [[tool.mypy.overrides]]
  104. module = [
  105. "sentry.api.base",
  106. "sentry.api.bases.external_actor",
  107. "sentry.api.bases.integration",
  108. "sentry.api.bases.organization_events",
  109. "sentry.api.bases.organization_request_change",
  110. "sentry.api.bases.organizationmember",
  111. "sentry.api.bases.project",
  112. "sentry.api.bases.project_request_change",
  113. "sentry.api.bases.sentryapps",
  114. "sentry.api.bases.team",
  115. "sentry.api.endpoints.accept_organization_invite",
  116. "sentry.api.endpoints.auth_config",
  117. "sentry.api.endpoints.auth_login",
  118. "sentry.api.endpoints.chunk",
  119. "sentry.api.endpoints.codeowners",
  120. "sentry.api.endpoints.codeowners.index",
  121. "sentry.api.endpoints.event_attachments",
  122. "sentry.api.endpoints.group_integration_details",
  123. "sentry.api.endpoints.group_integrations",
  124. "sentry.api.endpoints.index",
  125. "sentry.api.endpoints.integrations.install_request",
  126. "sentry.api.endpoints.integrations.sentry_apps.details",
  127. "sentry.api.endpoints.integrations.sentry_apps.index",
  128. "sentry.api.endpoints.integrations.sentry_apps.installation.index",
  129. "sentry.api.endpoints.integrations.sentry_apps.internal_app_token.index",
  130. "sentry.api.endpoints.integrations.sentry_apps.publish_request",
  131. "sentry.api.endpoints.integrations.sentry_apps.requests",
  132. "sentry.api.endpoints.integrations.sentry_apps.stats.details",
  133. "sentry.api.endpoints.internal.mail",
  134. "sentry.api.endpoints.organization_code_mapping_codeowners",
  135. "sentry.api.endpoints.organization_code_mappings",
  136. "sentry.api.endpoints.organization_details",
  137. "sentry.api.endpoints.organization_events",
  138. "sentry.api.endpoints.organization_events_facets",
  139. "sentry.api.endpoints.organization_events_facets_performance",
  140. "sentry.api.endpoints.organization_events_meta",
  141. "sentry.api.endpoints.organization_events_spans_performance",
  142. "sentry.api.endpoints.organization_events_stats",
  143. "sentry.api.endpoints.organization_events_trace",
  144. "sentry.api.endpoints.organization_events_trends",
  145. "sentry.api.endpoints.organization_index",
  146. "sentry.api.endpoints.organization_issues_count",
  147. "sentry.api.endpoints.organization_member.details",
  148. "sentry.api.endpoints.organization_member.index",
  149. "sentry.api.endpoints.organization_member.requests.invite.details",
  150. "sentry.api.endpoints.organization_member_unreleased_commits",
  151. "sentry.api.endpoints.organization_metrics_meta",
  152. "sentry.api.endpoints.organization_metrics_samples",
  153. "sentry.api.endpoints.organization_onboarding_continuation_email",
  154. "sentry.api.endpoints.organization_projects",
  155. "sentry.api.endpoints.organization_projects_experiment",
  156. "sentry.api.endpoints.organization_releases",
  157. "sentry.api.endpoints.organization_repositories",
  158. "sentry.api.endpoints.organization_request_project_creation",
  159. "sentry.api.endpoints.organization_search_details",
  160. "sentry.api.endpoints.organization_sessions",
  161. "sentry.api.endpoints.organization_stats",
  162. "sentry.api.endpoints.organization_teams",
  163. "sentry.api.endpoints.project_artifact_bundle_file_details",
  164. "sentry.api.endpoints.project_group_index",
  165. "sentry.api.endpoints.project_index",
  166. "sentry.api.endpoints.project_ownership",
  167. "sentry.api.endpoints.project_release_files",
  168. "sentry.api.endpoints.project_repo_path_parsing",
  169. "sentry.api.endpoints.project_rule_preview",
  170. "sentry.api.endpoints.project_rules_configuration",
  171. "sentry.api.endpoints.project_servicehook_stats",
  172. "sentry.api.endpoints.project_transaction_names",
  173. "sentry.api.endpoints.rule_snooze",
  174. "sentry.api.endpoints.team_details",
  175. "sentry.api.endpoints.team_release_count",
  176. "sentry.api.endpoints.team_time_to_resolution",
  177. "sentry.api.endpoints.user_details",
  178. "sentry.api.endpoints.user_subscriptions",
  179. "sentry.api.event_search",
  180. "sentry.api.helpers.deprecation",
  181. "sentry.api.helpers.group_index.index",
  182. "sentry.api.helpers.group_index.update",
  183. "sentry.api.invite_helper",
  184. "sentry.api.issue_search",
  185. "sentry.api.paginator",
  186. "sentry.api.permissions",
  187. "sentry.api.serializers.models.auth_provider",
  188. "sentry.api.serializers.models.dashboard",
  189. "sentry.api.serializers.models.doc_integration",
  190. "sentry.api.serializers.models.environment",
  191. "sentry.api.serializers.models.event",
  192. "sentry.api.serializers.models.external_actor",
  193. "sentry.api.serializers.models.group",
  194. "sentry.api.serializers.models.group_stream",
  195. "sentry.api.serializers.models.integration",
  196. "sentry.api.serializers.models.integration_feature",
  197. "sentry.api.serializers.models.notification_action",
  198. "sentry.api.serializers.models.organization",
  199. "sentry.api.serializers.models.plugin",
  200. "sentry.api.serializers.models.project",
  201. "sentry.api.serializers.models.role",
  202. "sentry.api.serializers.models.rule",
  203. "sentry.api.serializers.models.sentry_app",
  204. "sentry.api.serializers.models.team",
  205. "sentry.api.serializers.models.user",
  206. "sentry.api.serializers.models.user_identity_config",
  207. "sentry.api.serializers.rest_framework.doc_integration",
  208. "sentry.api.serializers.rest_framework.mentions",
  209. "sentry.api.serializers.rest_framework.notification_action",
  210. "sentry.api.serializers.rest_framework.rule",
  211. "sentry.api.serializers.rest_framework.sentry_app_request",
  212. "sentry.api.serializers.snuba",
  213. "sentry.api.validators.email",
  214. "sentry.auth.helper",
  215. "sentry.auth.provider",
  216. "sentry.auth.providers.dummy",
  217. "sentry.auth.providers.github.views",
  218. "sentry.auth.providers.google.views",
  219. "sentry.auth.providers.oauth2",
  220. "sentry.auth.providers.saml2.generic.views",
  221. "sentry.auth.providers.saml2.provider",
  222. "sentry.auth.providers.saml2.rippling.provider",
  223. "sentry.auth.providers.saml2.views",
  224. "sentry.auth.system",
  225. "sentry.auth.view",
  226. "sentry.db.mixin",
  227. "sentry.db.postgres.base",
  228. "sentry.db.router",
  229. "sentry.digests.notifications",
  230. "sentry.discover.endpoints.discover_key_transactions",
  231. "sentry.eventstore.models",
  232. "sentry.features.handler",
  233. "sentry.features.manager",
  234. "sentry.grouping.strategies.hierarchical",
  235. "sentry.grouping.strategies.legacy",
  236. "sentry.identity.bitbucket.provider",
  237. "sentry.identity.github_enterprise.provider",
  238. "sentry.identity.gitlab.provider",
  239. "sentry.identity.oauth2",
  240. "sentry.identity.pipeline",
  241. "sentry.identity.providers.dummy",
  242. "sentry.identity.slack.provider",
  243. "sentry.incidents.endpoints.bases",
  244. "sentry.incidents.endpoints.organization_alert_rule_details",
  245. "sentry.incidents.endpoints.organization_alert_rule_index",
  246. "sentry.incidents.endpoints.organization_incident_comment_details",
  247. "sentry.incidents.endpoints.organization_incident_index",
  248. "sentry.incidents.logic",
  249. "sentry.incidents.subscription_processor",
  250. "sentry.incidents.tasks",
  251. "sentry.integrations.aws_lambda.integration",
  252. "sentry.integrations.base",
  253. "sentry.integrations.bitbucket.client",
  254. "sentry.integrations.bitbucket.installed",
  255. "sentry.integrations.bitbucket.integration",
  256. "sentry.integrations.bitbucket.issues",
  257. "sentry.integrations.bitbucket.uninstalled",
  258. "sentry.integrations.bitbucket.webhook",
  259. "sentry.integrations.bitbucket_server.client",
  260. "sentry.integrations.bitbucket_server.integration",
  261. "sentry.integrations.bitbucket_server.webhook",
  262. "sentry.integrations.example.integration",
  263. "sentry.integrations.example.repository",
  264. "sentry.integrations.github.client",
  265. "sentry.integrations.github.integration",
  266. "sentry.integrations.github.issues",
  267. "sentry.integrations.github.repository",
  268. "sentry.integrations.github.webhook",
  269. "sentry.integrations.github_enterprise.integration",
  270. "sentry.integrations.github_enterprise.webhook",
  271. "sentry.integrations.gitlab.client",
  272. "sentry.integrations.gitlab.integration",
  273. "sentry.integrations.gitlab.issues",
  274. "sentry.integrations.gitlab.webhooks",
  275. "sentry.integrations.jira.actions.form",
  276. "sentry.integrations.jira.client",
  277. "sentry.integrations.jira.integration",
  278. "sentry.integrations.jira.views.base",
  279. "sentry.integrations.jira.webhooks.base",
  280. "sentry.integrations.jira.webhooks.issue_updated",
  281. "sentry.integrations.jira_server.client",
  282. "sentry.integrations.jira_server.integration",
  283. "sentry.integrations.jira_server.webhooks",
  284. "sentry.integrations.manager",
  285. "sentry.integrations.message_builder",
  286. "sentry.integrations.metric_alerts",
  287. "sentry.integrations.mixins.issues",
  288. "sentry.integrations.mixins.notifications",
  289. "sentry.integrations.mixins.repositories",
  290. "sentry.integrations.msteams.actions.form",
  291. "sentry.integrations.msteams.client",
  292. "sentry.integrations.msteams.integration",
  293. "sentry.integrations.msteams.link_identity",
  294. "sentry.integrations.msteams.notifications",
  295. "sentry.integrations.msteams.webhook",
  296. "sentry.integrations.notifications",
  297. "sentry.integrations.pagerduty.actions.form",
  298. "sentry.integrations.pagerduty.client",
  299. "sentry.integrations.pagerduty.integration",
  300. "sentry.integrations.pipeline",
  301. "sentry.integrations.slack.actions.form",
  302. "sentry.integrations.slack.client",
  303. "sentry.integrations.slack.integration",
  304. "sentry.integrations.slack.message_builder.issues",
  305. "sentry.integrations.slack.message_builder.notifications.digest",
  306. "sentry.integrations.slack.message_builder.notifications.issues",
  307. "sentry.integrations.slack.notifications",
  308. "sentry.integrations.slack.unfurl.discover",
  309. "sentry.integrations.slack.utils.channel",
  310. "sentry.integrations.slack.utils.users",
  311. "sentry.integrations.slack.views.link_identity",
  312. "sentry.integrations.slack.views.link_team",
  313. "sentry.integrations.slack.views.unlink_team",
  314. "sentry.integrations.slack.webhooks.action",
  315. "sentry.integrations.slack.webhooks.command",
  316. "sentry.integrations.slack.webhooks.event",
  317. "sentry.integrations.utils.commit_context",
  318. "sentry.integrations.utils.sync",
  319. "sentry.integrations.vercel.client",
  320. "sentry.integrations.vercel.integration",
  321. "sentry.integrations.vercel.webhook",
  322. "sentry.integrations.vsts.client",
  323. "sentry.integrations.vsts.integration",
  324. "sentry.integrations.vsts.issues",
  325. "sentry.integrations.vsts.repository",
  326. "sentry.integrations.vsts_extension.integration",
  327. "sentry.issues.search",
  328. "sentry.middleware.access_log",
  329. "sentry.middleware.auth",
  330. "sentry.middleware.ratelimit",
  331. "sentry.middleware.superuser",
  332. "sentry.models.integrations.external_issue",
  333. "sentry.models.integrations.sentry_app_installation",
  334. "sentry.models.organizationaccessrequest",
  335. "sentry.monitors.consumers.monitor_consumer",
  336. "sentry.monitors.endpoints.base",
  337. "sentry.monitors.endpoints.monitor_ingest_checkin_attachment",
  338. "sentry.monitors.endpoints.organization_monitor_index",
  339. "sentry.net.http",
  340. "sentry.net.socket",
  341. "sentry.notifications.notifications.activity.base",
  342. "sentry.notifications.notifications.activity.release",
  343. "sentry.notifications.notifications.integration_nudge",
  344. "sentry.ownership.grammar",
  345. "sentry.pipeline.base",
  346. "sentry.pipeline.views.base",
  347. "sentry.pipeline.views.nested",
  348. "sentry.plugins.bases.data_forwarding",
  349. "sentry.plugins.bases.issue",
  350. "sentry.plugins.bases.issue2",
  351. "sentry.plugins.bases.notify",
  352. "sentry.plugins.config",
  353. "sentry.plugins.endpoints",
  354. "sentry.plugins.providers.repository",
  355. "sentry.receivers.releases",
  356. "sentry.release_health.metrics_sessions_v2",
  357. "sentry.replays.endpoints.project_replay_clicks_index",
  358. "sentry.replays.lib.query",
  359. "sentry.rules.actions.integrations.base",
  360. "sentry.rules.actions.integrations.create_ticket.form",
  361. "sentry.rules.actions.integrations.create_ticket.utils",
  362. "sentry.rules.filters.assigned_to",
  363. "sentry.rules.history.preview",
  364. "sentry.scim.endpoints.members",
  365. "sentry.scim.endpoints.teams",
  366. "sentry.scim.endpoints.utils",
  367. "sentry.search.events.builder.errors",
  368. "sentry.search.events.builder.metrics",
  369. "sentry.search.events.datasets.discover",
  370. "sentry.search.events.datasets.filter_aliases",
  371. "sentry.search.events.datasets.function_aliases",
  372. "sentry.search.events.datasets.metrics",
  373. "sentry.search.events.datasets.metrics_layer",
  374. "sentry.search.events.fields",
  375. "sentry.search.events.filter",
  376. "sentry.search.snuba.backend",
  377. "sentry.search.snuba.executors",
  378. "sentry.search.utils",
  379. "sentry.sentry_apps.apps",
  380. "sentry.sentry_apps.installations",
  381. "sentry.sentry_metrics.consumers.indexer.slicing_router",
  382. "sentry.sentry_metrics.indexer.postgres.postgres_v2",
  383. "sentry.shared_integrations.client.base",
  384. "sentry.shared_integrations.client.proxy",
  385. "sentry.similarity.features",
  386. "sentry.snuba.discover",
  387. "sentry.snuba.errors",
  388. "sentry.snuba.issue_platform",
  389. "sentry.snuba.metrics.datasource",
  390. "sentry.snuba.metrics.fields.base",
  391. "sentry.snuba.metrics.query_builder",
  392. "sentry.snuba.sessions_v2",
  393. "sentry.snuba.spans_indexed",
  394. "sentry.snuba.spans_metrics",
  395. "sentry.tagstore.snuba.backend",
  396. "sentry.tagstore.types",
  397. "sentry.tasks.auth",
  398. "sentry.tasks.base",
  399. "sentry.tasks.integrations",
  400. "sentry.tasks.integrations.migrate_issues",
  401. "sentry.tasks.integrations.migrate_repo",
  402. "sentry.tasks.integrations.slack.find_channel_id_for_rule",
  403. "sentry.tasks.integrations.slack.link_slack_user_identities",
  404. "sentry.tasks.integrations.sync_assignee_outbound_impl",
  405. "sentry.tasks.integrations.sync_status_inbound",
  406. "sentry.tasks.integrations.sync_status_outbound",
  407. "sentry.tasks.process_buffer",
  408. "sentry.tasks.sentry_apps",
  409. "sentry.templatetags.sentry_assets",
  410. "sentry.templatetags.sentry_helpers",
  411. "sentry.templatetags.sentry_plugins",
  412. "sentry.testutils.asserts",
  413. "sentry.testutils.cases",
  414. "sentry.testutils.fixtures",
  415. "sentry.testutils.helpers.features",
  416. "sentry.testutils.helpers.notifications",
  417. "sentry.testutils.helpers.slack",
  418. "sentry.tsdb.dummy",
  419. "sentry.tsdb.inmemory",
  420. "sentry.utils.auth",
  421. "sentry.utils.committers",
  422. "sentry.utils.services",
  423. "sentry.web.forms.accounts",
  424. "sentry.web.frontend.account_identity",
  425. "sentry.web.frontend.auth_close",
  426. "sentry.web.frontend.auth_login",
  427. "sentry.web.frontend.auth_logout",
  428. "sentry.web.frontend.auth_organization_login",
  429. "sentry.web.frontend.auth_provider_login",
  430. "sentry.web.frontend.base",
  431. "sentry.web.frontend.debug.debug_codeowners_auto_sync_failure_email",
  432. "sentry.web.frontend.debug.debug_incident_activity_email",
  433. "sentry.web.frontend.debug.debug_incident_trigger_email",
  434. "sentry.web.frontend.debug.debug_mfa_added_email",
  435. "sentry.web.frontend.debug.debug_mfa_removed_email",
  436. "sentry.web.frontend.debug.debug_new_processing_issues_email",
  437. "sentry.web.frontend.debug.debug_organization_integration_request",
  438. "sentry.web.frontend.debug.debug_organization_invite_request",
  439. "sentry.web.frontend.debug.debug_organization_join_request",
  440. "sentry.web.frontend.disabled_member_view",
  441. "sentry.web.frontend.group_plugin_action",
  442. "sentry.web.frontend.idp_email_verification",
  443. "sentry.web.frontend.integration_extension_configuration",
  444. "sentry.web.frontend.js_sdk_loader",
  445. "sentry.web.frontend.newest_issue",
  446. "sentry.web.frontend.oauth_authorize",
  447. "sentry.web.frontend.oauth_token",
  448. "sentry.web.frontend.organization_integration_setup",
  449. "sentry.web.frontend.pipeline_advancer",
  450. "sentry.web.frontend.project_event",
  451. "sentry.web.frontend.react_page",
  452. "sentry.web.frontend.reactivate_account",
  453. "sentry.web.frontend.setup_wizard",
  454. "sentry.web.frontend.shared_group_details",
  455. "sentry.web.frontend.twofactor",
  456. "sentry_plugins.bitbucket.client",
  457. "sentry_plugins.bitbucket.mixins",
  458. "sentry_plugins.github.plugin",
  459. "sentry_plugins.jira.plugin",
  460. "tests.sentry.api.bases.test_organization",
  461. "tests.sentry.api.bases.test_project",
  462. "tests.sentry.api.bases.test_sentryapps",
  463. "tests.sentry.api.bases.test_team",
  464. "tests.sentry.api.endpoints.notifications.test_notification_actions_details",
  465. "tests.sentry.api.endpoints.notifications.test_notification_actions_index",
  466. "tests.sentry.api.endpoints.test_event_attachment_details",
  467. "tests.sentry.api.helpers.test_group_index",
  468. "tests.sentry.api.test_authentication",
  469. "tests.sentry.api.test_base",
  470. "tests.sentry.api.test_event_search",
  471. "tests.sentry.digests.test_notifications",
  472. "tests.sentry.eventstore.test_base",
  473. "tests.sentry.grouping.test_result",
  474. "tests.sentry.identity.test_oauth2",
  475. "tests.sentry.incidents.test_logic",
  476. "tests.sentry.ingest.test_slicing",
  477. "tests.sentry.issues.test_utils",
  478. ]
  479. disable_error_code = [
  480. "arg-type",
  481. "assignment",
  482. "attr-defined",
  483. "call-arg",
  484. "call-overload",
  485. "dict-item",
  486. "has-type",
  487. "index",
  488. "list-item",
  489. "misc",
  490. "operator",
  491. "override",
  492. "return-value",
  493. "typeddict-item",
  494. "typeddict-unknown-key",
  495. "union-attr",
  496. "unreachable",
  497. "var-annotated",
  498. ]
  499. # end: sentry modules with typing issues
  500. # begin: stronger typing
  501. [[tool.mypy.overrides]]
  502. module = [
  503. "sentry.api.endpoints.issues.*",
  504. "sentry.api.helpers.source_map_helper",
  505. "sentry.buffer.*",
  506. "sentry.build.*",
  507. "sentry.db.models.fields.hybrid_cloud_foreign_key",
  508. "sentry.db.models.fields.types",
  509. "sentry.db.models.manager.*",
  510. "sentry.db.models.paranoia",
  511. "sentry.db.models.utils",
  512. "sentry.eventstore.reprocessing.redis",
  513. "sentry.eventtypes.error",
  514. "sentry.grouping.component",
  515. "sentry.grouping.fingerprinting",
  516. "sentry.grouping.parameterization",
  517. "sentry.hybridcloud.*",
  518. "sentry.issues",
  519. "sentry.issues.analytics",
  520. "sentry.issues.apps",
  521. "sentry.issues.constants",
  522. "sentry.issues.endpoints",
  523. "sentry.issues.endpoints.group_events",
  524. "sentry.issues.endpoints.organization_activity",
  525. "sentry.issues.endpoints.organization_release_previous_commits",
  526. "sentry.issues.endpoints.organization_searches",
  527. "sentry.issues.endpoints.project_stacktrace_link",
  528. "sentry.issues.escalating_group_forecast",
  529. "sentry.issues.escalating_issues_alg",
  530. "sentry.issues.forecasts",
  531. "sentry.issues.ignored",
  532. "sentry.issues.ingest",
  533. "sentry.issues.issue_occurrence",
  534. "sentry.issues.json_schemas",
  535. "sentry.issues.merge",
  536. "sentry.issues.occurrence_consumer",
  537. "sentry.issues.ongoing",
  538. "sentry.issues.priority",
  539. "sentry.issues.producer",
  540. "sentry.issues.query",
  541. "sentry.issues.receivers",
  542. "sentry.issues.related.*",
  543. "sentry.issues.run",
  544. "sentry.issues.status_change",
  545. "sentry.issues.status_change_consumer",
  546. "sentry.issues.status_change_message",
  547. "sentry.issues.update_inbox",
  548. "sentry.lang.java.processing",
  549. "sentry.llm.*",
  550. "sentry.mediators.sentry_app_installations.installation_notifier",
  551. "sentry.migrations.*",
  552. "sentry.models.event",
  553. "sentry.models.eventattachment",
  554. "sentry.models.groupsubscription",
  555. "sentry.models.integrations.integration_feature",
  556. "sentry.monkey",
  557. "sentry.nodestore.base",
  558. "sentry.nodestore.bigtable.backend",
  559. "sentry.nodestore.django.backend",
  560. "sentry.nodestore.django.models",
  561. "sentry.nodestore.filesystem.backend",
  562. "sentry.nodestore.models",
  563. "sentry.profiles.*",
  564. "sentry.relay.config.metric_extraction",
  565. "sentry.reprocessing2",
  566. "sentry.runner.*",
  567. "sentry.services.hybrid_cloud.identity.*",
  568. "sentry.services.hybrid_cloud.issue.*",
  569. "sentry.services.hybrid_cloud.log.*",
  570. "sentry.services.hybrid_cloud.lost_password_hash.*",
  571. "sentry.services.hybrid_cloud.organization_actions.*",
  572. "sentry.services.hybrid_cloud.organization_mapping.*",
  573. "sentry.services.hybrid_cloud.organizationmember_mapping.*",
  574. "sentry.services.hybrid_cloud.project.*",
  575. "sentry.services.hybrid_cloud.project_key.*",
  576. "sentry.services.hybrid_cloud.replica.*",
  577. "sentry.services.hybrid_cloud.tombstone.*",
  578. "sentry.services.hybrid_cloud.user.*",
  579. "sentry.services.hybrid_cloud.user_option.*",
  580. "sentry.snuba.metrics.extraction",
  581. "sentry.stacktraces.platform",
  582. "sentry.tasks.beacon",
  583. "sentry.tasks.commit_context",
  584. "sentry.tasks.on_demand_metrics",
  585. "sentry.tasks.reprocessing2",
  586. "sentry.tasks.store",
  587. "sentry.testutils.helpers.task_runner",
  588. "sentry.types.actor",
  589. "sentry.types.region",
  590. "sentry.utils.arroyo",
  591. "sentry.utils.assets",
  592. "sentry.utils.audit",
  593. "sentry.utils.celery",
  594. "sentry.utils.codeowners",
  595. "sentry.utils.colors",
  596. "sentry.utils.email.*",
  597. "sentry.utils.env",
  598. "sentry.utils.event",
  599. "sentry.utils.files",
  600. "sentry.utils.geo",
  601. "sentry.utils.imports",
  602. "sentry.utils.iterators",
  603. "sentry.utils.javascript",
  604. "sentry.utils.lazy_service_wrapper",
  605. "sentry.utils.locking.*",
  606. "sentry.utils.migrations",
  607. "sentry.utils.numbers",
  608. "sentry.utils.otp",
  609. "sentry.utils.performance_issues.detectors.*",
  610. "sentry.utils.performance_issues.performance_detection",
  611. "sentry.utils.pubsub",
  612. "sentry.utils.redis",
  613. "sentry.utils.redis_metrics",
  614. "sentry.utils.sentry_apps.*",
  615. "sentry.utils.sms",
  616. "sentry.utils.snowflake",
  617. "sentry.utils.urls",
  618. "sentry.utils.uwsgi",
  619. "sentry.utils.zip",
  620. "sentry_plugins.base",
  621. "tests.sentry.api.endpoints.issues.*",
  622. "tests.sentry.event_manager.test_event_manager",
  623. "tests.sentry.grouping.test_fingerprinting",
  624. "tests.sentry.hybridcloud.*",
  625. "tests.sentry.issues",
  626. "tests.sentry.issues.endpoints",
  627. "tests.sentry.issues.endpoints.test_actionable_items",
  628. "tests.sentry.issues.endpoints.test_organization_activity",
  629. "tests.sentry.issues.endpoints.test_organization_searches",
  630. "tests.sentry.issues.endpoints.test_project_stacktrace_link",
  631. "tests.sentry.issues.endpoints.test_source_map_debug",
  632. "tests.sentry.issues.test_attributes",
  633. "tests.sentry.issues.test_escalating",
  634. "tests.sentry.issues.test_escalating_issues_alg",
  635. "tests.sentry.issues.test_group_attributes_dataset",
  636. "tests.sentry.issues.test_grouptype",
  637. "tests.sentry.issues.test_ignored",
  638. "tests.sentry.issues.test_ingest",
  639. "tests.sentry.issues.test_issue_occurrence",
  640. "tests.sentry.issues.test_issue_velocity",
  641. "tests.sentry.issues.test_json_schemas",
  642. "tests.sentry.issues.test_merge",
  643. "tests.sentry.issues.test_occurrence_consumer",
  644. "tests.sentry.issues.test_ongoing",
  645. "tests.sentry.issues.test_priority",
  646. "tests.sentry.issues.test_producer",
  647. "tests.sentry.issues.test_run",
  648. "tests.sentry.issues.test_search_issues_dataset",
  649. "tests.sentry.issues.test_status_change",
  650. "tests.sentry.issues.test_status_change_consumer",
  651. "tests.sentry.issues.test_update_inbox",
  652. "tests.sentry.relay.config.test_metric_extraction",
  653. "tests.sentry.services.hybrid_cloud.*",
  654. "tests.sentry.tasks.test_on_demand_metrics",
  655. "tests.sentry.types.test_actor",
  656. "tests.sentry.types.test_region",
  657. "tools.*",
  658. ]
  659. disallow_any_generics = true
  660. disallow_untyped_defs = true
  661. # end: stronger typing