pyproject.toml 27 KB

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