pyproject.toml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702
  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.artifact_lookup",
  116. "sentry.api.endpoints.auth_config",
  117. "sentry.api.endpoints.auth_login",
  118. "sentry.api.endpoints.catchall",
  119. "sentry.api.endpoints.chunk",
  120. "sentry.api.endpoints.codeowners",
  121. "sentry.api.endpoints.codeowners.index",
  122. "sentry.api.endpoints.event_attachments",
  123. "sentry.api.endpoints.group_external_issues",
  124. "sentry.api.endpoints.group_integration_details",
  125. "sentry.api.endpoints.group_integrations",
  126. "sentry.api.endpoints.index",
  127. "sentry.api.endpoints.integrations.install_request",
  128. "sentry.api.endpoints.integrations.sentry_apps.details",
  129. "sentry.api.endpoints.integrations.sentry_apps.index",
  130. "sentry.api.endpoints.integrations.sentry_apps.installation.index",
  131. "sentry.api.endpoints.integrations.sentry_apps.internal_app_token.index",
  132. "sentry.api.endpoints.integrations.sentry_apps.publish_request",
  133. "sentry.api.endpoints.integrations.sentry_apps.requests",
  134. "sentry.api.endpoints.integrations.sentry_apps.stats.details",
  135. "sentry.api.endpoints.internal.mail",
  136. "sentry.api.endpoints.organization_code_mapping_codeowners",
  137. "sentry.api.endpoints.organization_code_mappings",
  138. "sentry.api.endpoints.organization_details",
  139. "sentry.api.endpoints.organization_events",
  140. "sentry.api.endpoints.organization_events_facets",
  141. "sentry.api.endpoints.organization_events_facets_performance",
  142. "sentry.api.endpoints.organization_events_meta",
  143. "sentry.api.endpoints.organization_events_spans_performance",
  144. "sentry.api.endpoints.organization_events_stats",
  145. "sentry.api.endpoints.organization_events_trace",
  146. "sentry.api.endpoints.organization_events_trends",
  147. "sentry.api.endpoints.organization_index",
  148. "sentry.api.endpoints.organization_issues_count",
  149. "sentry.api.endpoints.organization_member.details",
  150. "sentry.api.endpoints.organization_member.index",
  151. "sentry.api.endpoints.organization_member.requests.invite.details",
  152. "sentry.api.endpoints.organization_member_unreleased_commits",
  153. "sentry.api.endpoints.organization_metrics",
  154. "sentry.api.endpoints.organization_metrics_meta",
  155. "sentry.api.endpoints.organization_metrics_samples",
  156. "sentry.api.endpoints.organization_onboarding_continuation_email",
  157. "sentry.api.endpoints.organization_projects",
  158. "sentry.api.endpoints.organization_projects_experiment",
  159. "sentry.api.endpoints.organization_releases",
  160. "sentry.api.endpoints.organization_repositories",
  161. "sentry.api.endpoints.organization_request_project_creation",
  162. "sentry.api.endpoints.organization_search_details",
  163. "sentry.api.endpoints.organization_sessions",
  164. "sentry.api.endpoints.organization_stats",
  165. "sentry.api.endpoints.organization_teams",
  166. "sentry.api.endpoints.project_artifact_bundle_file_details",
  167. "sentry.api.endpoints.project_event_details",
  168. "sentry.api.endpoints.project_group_index",
  169. "sentry.api.endpoints.project_index",
  170. "sentry.api.endpoints.project_ownership",
  171. "sentry.api.endpoints.project_release_files",
  172. "sentry.api.endpoints.project_repo_path_parsing",
  173. "sentry.api.endpoints.project_rule_preview",
  174. "sentry.api.endpoints.project_rules_configuration",
  175. "sentry.api.endpoints.project_servicehook_stats",
  176. "sentry.api.endpoints.project_transaction_names",
  177. "sentry.api.endpoints.rule_snooze",
  178. "sentry.api.endpoints.team_details",
  179. "sentry.api.endpoints.team_release_count",
  180. "sentry.api.endpoints.team_time_to_resolution",
  181. "sentry.api.endpoints.user_details",
  182. "sentry.api.endpoints.user_subscriptions",
  183. "sentry.api.event_search",
  184. "sentry.api.helpers.deprecation",
  185. "sentry.api.helpers.group_index.index",
  186. "sentry.api.helpers.group_index.update",
  187. "sentry.api.invite_helper",
  188. "sentry.api.issue_search",
  189. "sentry.api.paginator",
  190. "sentry.api.permissions",
  191. "sentry.api.serializers.models.auth_provider",
  192. "sentry.api.serializers.models.dashboard",
  193. "sentry.api.serializers.models.doc_integration",
  194. "sentry.api.serializers.models.environment",
  195. "sentry.api.serializers.models.event",
  196. "sentry.api.serializers.models.external_actor",
  197. "sentry.api.serializers.models.group",
  198. "sentry.api.serializers.models.group_stream",
  199. "sentry.api.serializers.models.integration",
  200. "sentry.api.serializers.models.integration_feature",
  201. "sentry.api.serializers.models.notification_action",
  202. "sentry.api.serializers.models.organization",
  203. "sentry.api.serializers.models.organization_member.base",
  204. "sentry.api.serializers.models.plugin",
  205. "sentry.api.serializers.models.project",
  206. "sentry.api.serializers.models.role",
  207. "sentry.api.serializers.models.rule",
  208. "sentry.api.serializers.models.sentry_app",
  209. "sentry.api.serializers.models.team",
  210. "sentry.api.serializers.models.user",
  211. "sentry.api.serializers.models.user_identity_config",
  212. "sentry.api.serializers.rest_framework.doc_integration",
  213. "sentry.api.serializers.rest_framework.mentions",
  214. "sentry.api.serializers.rest_framework.notification_action",
  215. "sentry.api.serializers.rest_framework.rule",
  216. "sentry.api.serializers.rest_framework.sentry_app_request",
  217. "sentry.api.serializers.snuba",
  218. "sentry.api.validators.email",
  219. "sentry.auth.helper",
  220. "sentry.auth.provider",
  221. "sentry.auth.providers.dummy",
  222. "sentry.auth.providers.github.views",
  223. "sentry.auth.providers.google.views",
  224. "sentry.auth.providers.oauth2",
  225. "sentry.auth.providers.saml2.generic.views",
  226. "sentry.auth.providers.saml2.provider",
  227. "sentry.auth.providers.saml2.rippling.provider",
  228. "sentry.auth.providers.saml2.views",
  229. "sentry.auth.system",
  230. "sentry.auth.view",
  231. "sentry.db.mixin",
  232. "sentry.db.models.manager.base",
  233. "sentry.db.models.paranoia",
  234. "sentry.db.models.query",
  235. "sentry.db.models.utils",
  236. "sentry.db.postgres.base",
  237. "sentry.db.router",
  238. "sentry.digests.notifications",
  239. "sentry.discover.endpoints.discover_key_transactions",
  240. "sentry.eventstore.models",
  241. "sentry.features.handler",
  242. "sentry.features.manager",
  243. "sentry.grouping.fingerprinting",
  244. "sentry.grouping.strategies.hierarchical",
  245. "sentry.grouping.strategies.legacy",
  246. "sentry.grouping.strategies.newstyle",
  247. "sentry.identity.bitbucket.provider",
  248. "sentry.identity.github_enterprise.provider",
  249. "sentry.identity.gitlab.provider",
  250. "sentry.identity.oauth2",
  251. "sentry.identity.pipeline",
  252. "sentry.identity.providers.dummy",
  253. "sentry.identity.slack.provider",
  254. "sentry.incidents.endpoints.bases",
  255. "sentry.incidents.endpoints.organization_alert_rule_details",
  256. "sentry.incidents.endpoints.organization_alert_rule_index",
  257. "sentry.incidents.endpoints.organization_incident_comment_details",
  258. "sentry.incidents.endpoints.organization_incident_index",
  259. "sentry.incidents.logic",
  260. "sentry.incidents.subscription_processor",
  261. "sentry.incidents.tasks",
  262. "sentry.integrations.aws_lambda.integration",
  263. "sentry.integrations.base",
  264. "sentry.integrations.bitbucket.client",
  265. "sentry.integrations.bitbucket.installed",
  266. "sentry.integrations.bitbucket.integration",
  267. "sentry.integrations.bitbucket.issues",
  268. "sentry.integrations.bitbucket.uninstalled",
  269. "sentry.integrations.bitbucket.webhook",
  270. "sentry.integrations.bitbucket_server.client",
  271. "sentry.integrations.bitbucket_server.integration",
  272. "sentry.integrations.bitbucket_server.webhook",
  273. "sentry.integrations.example.integration",
  274. "sentry.integrations.example.repository",
  275. "sentry.integrations.github.client",
  276. "sentry.integrations.github.integration",
  277. "sentry.integrations.github.issues",
  278. "sentry.integrations.github.repository",
  279. "sentry.integrations.github.webhook",
  280. "sentry.integrations.github_enterprise.integration",
  281. "sentry.integrations.github_enterprise.webhook",
  282. "sentry.integrations.gitlab.client",
  283. "sentry.integrations.gitlab.integration",
  284. "sentry.integrations.gitlab.issues",
  285. "sentry.integrations.gitlab.webhooks",
  286. "sentry.integrations.jira.actions.form",
  287. "sentry.integrations.jira.client",
  288. "sentry.integrations.jira.integration",
  289. "sentry.integrations.jira.views.base",
  290. "sentry.integrations.jira.views.sentry_issue_details",
  291. "sentry.integrations.jira.webhooks.base",
  292. "sentry.integrations.jira.webhooks.issue_updated",
  293. "sentry.integrations.jira_server.client",
  294. "sentry.integrations.jira_server.integration",
  295. "sentry.integrations.jira_server.webhooks",
  296. "sentry.integrations.manager",
  297. "sentry.integrations.message_builder",
  298. "sentry.integrations.metric_alerts",
  299. "sentry.integrations.mixins.issues",
  300. "sentry.integrations.mixins.notifications",
  301. "sentry.integrations.mixins.repositories",
  302. "sentry.integrations.msteams.actions.form",
  303. "sentry.integrations.msteams.client",
  304. "sentry.integrations.msteams.integration",
  305. "sentry.integrations.msteams.link_identity",
  306. "sentry.integrations.msteams.notifications",
  307. "sentry.integrations.msteams.webhook",
  308. "sentry.integrations.notifications",
  309. "sentry.integrations.pagerduty.actions.form",
  310. "sentry.integrations.pagerduty.client",
  311. "sentry.integrations.pagerduty.integration",
  312. "sentry.integrations.pipeline",
  313. "sentry.integrations.slack.actions.form",
  314. "sentry.integrations.slack.client",
  315. "sentry.integrations.slack.integration",
  316. "sentry.integrations.slack.message_builder.issues",
  317. "sentry.integrations.slack.message_builder.notifications.digest",
  318. "sentry.integrations.slack.message_builder.notifications.issues",
  319. "sentry.integrations.slack.notifications",
  320. "sentry.integrations.slack.unfurl.discover",
  321. "sentry.integrations.slack.utils.channel",
  322. "sentry.integrations.slack.utils.users",
  323. "sentry.integrations.slack.views.link_identity",
  324. "sentry.integrations.slack.views.link_team",
  325. "sentry.integrations.slack.views.unlink_team",
  326. "sentry.integrations.slack.webhooks.action",
  327. "sentry.integrations.slack.webhooks.base",
  328. "sentry.integrations.slack.webhooks.command",
  329. "sentry.integrations.slack.webhooks.event",
  330. "sentry.integrations.utils.commit_context",
  331. "sentry.integrations.utils.sync",
  332. "sentry.integrations.vercel.client",
  333. "sentry.integrations.vercel.integration",
  334. "sentry.integrations.vercel.webhook",
  335. "sentry.integrations.vsts.client",
  336. "sentry.integrations.vsts.integration",
  337. "sentry.integrations.vsts.issues",
  338. "sentry.integrations.vsts.repository",
  339. "sentry.integrations.vsts_extension.integration",
  340. "sentry.middleware.access_log",
  341. "sentry.middleware.auth",
  342. "sentry.middleware.ratelimit",
  343. "sentry.middleware.superuser",
  344. "sentry.models.auditlogentry",
  345. "sentry.models.integrations.external_issue",
  346. "sentry.models.integrations.sentry_app_installation",
  347. "sentry.models.organizationaccessrequest",
  348. "sentry.monitors.consumers.monitor_consumer",
  349. "sentry.monitors.endpoints.base",
  350. "sentry.monitors.endpoints.monitor_ingest_checkin_attachment",
  351. "sentry.monitors.endpoints.organization_monitor_index",
  352. "sentry.net.http",
  353. "sentry.net.socket",
  354. "sentry.notifications.additional_attachment_manager",
  355. "sentry.notifications.notifications.activity.base",
  356. "sentry.notifications.notifications.activity.release",
  357. "sentry.notifications.notifications.integration_nudge",
  358. "sentry.notifications.notifications.rules",
  359. "sentry.ownership.grammar",
  360. "sentry.pipeline.base",
  361. "sentry.pipeline.views.base",
  362. "sentry.pipeline.views.nested",
  363. "sentry.plugins.base.notifier",
  364. "sentry.plugins.base.urls",
  365. "sentry.plugins.bases.data_forwarding",
  366. "sentry.plugins.bases.issue",
  367. "sentry.plugins.bases.issue2",
  368. "sentry.plugins.bases.notify",
  369. "sentry.plugins.config",
  370. "sentry.plugins.endpoints",
  371. "sentry.plugins.providers.base",
  372. "sentry.plugins.providers.repository",
  373. "sentry.receivers.releases",
  374. "sentry.release_health.metrics_sessions_v2",
  375. "sentry.release_health.tasks",
  376. "sentry.replays.endpoints.project_replay_clicks_index",
  377. "sentry.replays.lib.query",
  378. "sentry.rules.actions.integrations.base",
  379. "sentry.rules.actions.integrations.create_ticket.form",
  380. "sentry.rules.actions.integrations.create_ticket.utils",
  381. "sentry.rules.actions.notify_event_service",
  382. "sentry.rules.filters.assigned_to",
  383. "sentry.rules.history.preview",
  384. "sentry.scim.endpoints.members",
  385. "sentry.scim.endpoints.teams",
  386. "sentry.scim.endpoints.utils",
  387. "sentry.search.events.builder.discover",
  388. "sentry.search.events.builder.errors",
  389. "sentry.search.events.builder.metrics",
  390. "sentry.search.events.datasets.discover",
  391. "sentry.search.events.datasets.filter_aliases",
  392. "sentry.search.events.datasets.function_aliases",
  393. "sentry.search.events.datasets.metrics",
  394. "sentry.search.events.datasets.metrics_layer",
  395. "sentry.search.events.datasets.profile_functions",
  396. "sentry.search.events.datasets.profiles",
  397. "sentry.search.events.datasets.spans_metrics",
  398. "sentry.search.events.fields",
  399. "sentry.search.events.filter",
  400. "sentry.search.snuba.backend",
  401. "sentry.search.snuba.executors",
  402. "sentry.search.utils",
  403. "sentry.sentry_apps.apps",
  404. "sentry.sentry_apps.installations",
  405. "sentry.sentry_metrics.consumers.indexer.slicing_router",
  406. "sentry.sentry_metrics.indexer.postgres.postgres_v2",
  407. "sentry.shared_integrations.client.base",
  408. "sentry.shared_integrations.client.proxy",
  409. "sentry.similarity.features",
  410. "sentry.snuba.discover",
  411. "sentry.snuba.errors",
  412. "sentry.snuba.issue_platform",
  413. "sentry.snuba.metrics.datasource",
  414. "sentry.snuba.metrics.fields.base",
  415. "sentry.snuba.metrics.query_builder",
  416. "sentry.snuba.sessions_v2",
  417. "sentry.snuba.spans_indexed",
  418. "sentry.snuba.spans_metrics",
  419. "sentry.tagstore.snuba.backend",
  420. "sentry.tagstore.types",
  421. "sentry.tasks.auth",
  422. "sentry.tasks.base",
  423. "sentry.tasks.codeowners.update_code_owners_schema",
  424. "sentry.tasks.integrations",
  425. "sentry.tasks.integrations.migrate_issues",
  426. "sentry.tasks.integrations.migrate_repo",
  427. "sentry.tasks.integrations.slack.find_channel_id_for_rule",
  428. "sentry.tasks.integrations.slack.link_slack_user_identities",
  429. "sentry.tasks.integrations.sync_assignee_outbound_impl",
  430. "sentry.tasks.integrations.sync_status_inbound",
  431. "sentry.tasks.integrations.sync_status_outbound",
  432. "sentry.tasks.process_buffer",
  433. "sentry.tasks.sentry_apps",
  434. "sentry.templatetags.sentry_assets",
  435. "sentry.templatetags.sentry_helpers",
  436. "sentry.templatetags.sentry_plugins",
  437. "sentry.testutils.asserts",
  438. "sentry.testutils.cases",
  439. "sentry.testutils.fixtures",
  440. "sentry.testutils.helpers.features",
  441. "sentry.testutils.helpers.notifications",
  442. "sentry.testutils.helpers.slack",
  443. "sentry.tsdb.dummy",
  444. "sentry.tsdb.inmemory",
  445. "sentry.types.integrations",
  446. "sentry.utils.auth",
  447. "sentry.utils.committers",
  448. "sentry.utils.services",
  449. "sentry.utils.snowflake",
  450. "sentry.web.forms.accounts",
  451. "sentry.web.frontend.account_identity",
  452. "sentry.web.frontend.auth_close",
  453. "sentry.web.frontend.auth_login",
  454. "sentry.web.frontend.auth_logout",
  455. "sentry.web.frontend.auth_organization_login",
  456. "sentry.web.frontend.auth_provider_login",
  457. "sentry.web.frontend.base",
  458. "sentry.web.frontend.debug.debug_codeowners_auto_sync_failure_email",
  459. "sentry.web.frontend.debug.debug_incident_activity_email",
  460. "sentry.web.frontend.debug.debug_incident_trigger_email",
  461. "sentry.web.frontend.debug.debug_mfa_added_email",
  462. "sentry.web.frontend.debug.debug_mfa_removed_email",
  463. "sentry.web.frontend.debug.debug_new_processing_issues_email",
  464. "sentry.web.frontend.debug.debug_organization_integration_request",
  465. "sentry.web.frontend.debug.debug_organization_invite_request",
  466. "sentry.web.frontend.debug.debug_organization_join_request",
  467. "sentry.web.frontend.disabled_member_view",
  468. "sentry.web.frontend.group_plugin_action",
  469. "sentry.web.frontend.idp_email_verification",
  470. "sentry.web.frontend.integration_extension_configuration",
  471. "sentry.web.frontend.js_sdk_loader",
  472. "sentry.web.frontend.newest_issue",
  473. "sentry.web.frontend.oauth_authorize",
  474. "sentry.web.frontend.oauth_token",
  475. "sentry.web.frontend.organization_integration_setup",
  476. "sentry.web.frontend.pipeline_advancer",
  477. "sentry.web.frontend.project_event",
  478. "sentry.web.frontend.react_page",
  479. "sentry.web.frontend.reactivate_account",
  480. "sentry.web.frontend.setup_wizard",
  481. "sentry.web.frontend.shared_group_details",
  482. "sentry.web.frontend.twofactor",
  483. "sentry_plugins.bitbucket.client",
  484. "sentry_plugins.bitbucket.mixins",
  485. "sentry_plugins.github.plugin",
  486. "sentry_plugins.jira.plugin",
  487. "tests.sentry.api.bases.test_organization",
  488. "tests.sentry.api.bases.test_project",
  489. "tests.sentry.api.bases.test_sentryapps",
  490. "tests.sentry.api.bases.test_team",
  491. "tests.sentry.api.endpoints.notifications.test_notification_actions_details",
  492. "tests.sentry.api.endpoints.notifications.test_notification_actions_index",
  493. "tests.sentry.api.endpoints.test_event_attachment_details",
  494. "tests.sentry.api.helpers.test_group_index",
  495. "tests.sentry.api.test_authentication",
  496. "tests.sentry.api.test_base",
  497. "tests.sentry.api.test_event_search",
  498. "tests.sentry.digests.test_notifications",
  499. "tests.sentry.eventstore.test_base",
  500. "tests.sentry.grouping.test_result",
  501. "tests.sentry.identity.test_oauth2",
  502. "tests.sentry.incidents.test_logic",
  503. "tests.sentry.ingest.test_slicing",
  504. "tests.sentry.integrations.github.test_client",
  505. "tests.sentry.issues.test_utils",
  506. "tests.sentry.tasks.test_post_process",
  507. ]
  508. disable_error_code = [
  509. "arg-type",
  510. "assignment",
  511. "attr-defined",
  512. "call-arg",
  513. "call-overload",
  514. "dict-item",
  515. "has-type",
  516. "index",
  517. "list-item",
  518. "misc",
  519. "operator",
  520. "override",
  521. "return-value",
  522. "typeddict-item",
  523. "typeddict-unknown-key",
  524. "union-attr",
  525. "unreachable",
  526. "var-annotated",
  527. ]
  528. # end: sentry modules with typing issues
  529. # begin: stronger typing
  530. [[tool.mypy.overrides]]
  531. module = [
  532. "sentry.api.endpoints.issues.*",
  533. "sentry.api.helpers.source_map_helper",
  534. "sentry.buffer.*",
  535. "sentry.build.*",
  536. "sentry.eventstore.reprocessing.redis",
  537. "sentry.grouping.parameterization",
  538. "sentry.hybridcloud",
  539. "sentry.hybridcloud.migrations.*",
  540. "sentry.hybridcloud.options",
  541. "sentry.hybridcloud.rpc_services.*",
  542. "sentry.issues",
  543. "sentry.issues.analytics",
  544. "sentry.issues.apps",
  545. "sentry.issues.constants",
  546. "sentry.issues.endpoints",
  547. "sentry.issues.endpoints.group_events",
  548. "sentry.issues.endpoints.organization_activity",
  549. "sentry.issues.endpoints.organization_release_previous_commits",
  550. "sentry.issues.endpoints.organization_searches",
  551. "sentry.issues.endpoints.project_stacktrace_link",
  552. "sentry.issues.escalating_group_forecast",
  553. "sentry.issues.escalating_issues_alg",
  554. "sentry.issues.forecasts",
  555. "sentry.issues.ignored",
  556. "sentry.issues.ingest",
  557. "sentry.issues.issue_occurrence",
  558. "sentry.issues.json_schemas",
  559. "sentry.issues.merge",
  560. "sentry.issues.occurrence_consumer",
  561. "sentry.issues.ongoing",
  562. "sentry.issues.priority",
  563. "sentry.issues.producer",
  564. "sentry.issues.query",
  565. "sentry.issues.receivers",
  566. "sentry.issues.related.*",
  567. "sentry.issues.run",
  568. "sentry.issues.status_change",
  569. "sentry.issues.status_change_consumer",
  570. "sentry.issues.status_change_message",
  571. "sentry.issues.update_inbox",
  572. "sentry.lang.java.processing",
  573. "sentry.llm.*",
  574. "sentry.mediators.sentry_app_installations.installation_notifier",
  575. "sentry.migrations.*",
  576. "sentry.models.eventattachment",
  577. "sentry.nodestore.base",
  578. "sentry.nodestore.bigtable.backend",
  579. "sentry.nodestore.django.backend",
  580. "sentry.nodestore.django.models",
  581. "sentry.nodestore.filesystem.backend",
  582. "sentry.nodestore.models",
  583. "sentry.profiles.*",
  584. "sentry.relay.config.metric_extraction",
  585. "sentry.reprocessing2",
  586. "sentry.runner.*",
  587. "sentry.services.hybrid_cloud.access.*",
  588. "sentry.services.hybrid_cloud.app.*",
  589. "sentry.services.hybrid_cloud.hook.*",
  590. "sentry.services.hybrid_cloud.identity.*",
  591. "sentry.services.hybrid_cloud.integration.*",
  592. "sentry.services.hybrid_cloud.issue.*",
  593. "sentry.services.hybrid_cloud.log.*",
  594. "sentry.services.hybrid_cloud.lost_password_hash.*",
  595. "sentry.services.hybrid_cloud.notifications.*",
  596. "sentry.services.hybrid_cloud.organization_actions.*",
  597. "sentry.services.hybrid_cloud.organization_mapping.*",
  598. "sentry.services.hybrid_cloud.organizationmember_mapping.*",
  599. "sentry.services.hybrid_cloud.orgauthtoken.*",
  600. "sentry.services.hybrid_cloud.pagination",
  601. "sentry.services.hybrid_cloud.project.*",
  602. "sentry.services.hybrid_cloud.project_key.*",
  603. "sentry.services.hybrid_cloud.region",
  604. "sentry.services.hybrid_cloud.replica.*",
  605. "sentry.services.hybrid_cloud.repository.*",
  606. "sentry.services.hybrid_cloud.rpcmetrics",
  607. "sentry.services.hybrid_cloud.sig",
  608. "sentry.services.hybrid_cloud.tombstone.*",
  609. "sentry.services.hybrid_cloud.user.*",
  610. "sentry.services.hybrid_cloud.user_option.*",
  611. "sentry.services.hybrid_cloud.util",
  612. "sentry.snuba.metrics.extraction",
  613. "sentry.tasks.commit_context",
  614. "sentry.tasks.on_demand_metrics",
  615. "sentry.tasks.reprocessing2",
  616. "sentry.tasks.store",
  617. "sentry.testutils.helpers.task_runner",
  618. "sentry.types.actor",
  619. "sentry.types.region",
  620. "sentry.utils.arroyo",
  621. "sentry.utils.assets",
  622. "sentry.utils.audit",
  623. "sentry.utils.canonical",
  624. "sentry.utils.celery",
  625. "sentry.utils.codeowners",
  626. "sentry.utils.colors",
  627. "sentry.utils.email.*",
  628. "sentry.utils.env",
  629. "sentry.utils.event",
  630. "sentry.utils.files",
  631. "sentry.utils.geo",
  632. "sentry.utils.imports",
  633. "sentry.utils.iterators",
  634. "sentry.utils.javascript",
  635. "sentry.utils.locking.*",
  636. "sentry.utils.migrations",
  637. "sentry.utils.numbers",
  638. "sentry.utils.otp",
  639. "sentry.utils.performance_issues.detectors.*",
  640. "sentry.utils.performance_issues.performance_detection",
  641. "sentry.utils.pubsub",
  642. "sentry.utils.redis",
  643. "sentry.utils.redis_metrics",
  644. "sentry.utils.sentry_apps.*",
  645. "sentry.utils.sms",
  646. "sentry.utils.urls",
  647. "sentry.utils.uwsgi",
  648. "sentry.utils.zip",
  649. "sentry_plugins.base",
  650. "tests.sentry.api.endpoints.issues.*",
  651. "tests.sentry.grouping.test_fingerprinting",
  652. "tests.sentry.hybridcloud.*",
  653. "tests.sentry.issues",
  654. "tests.sentry.issues.endpoints",
  655. "tests.sentry.issues.endpoints.test_actionable_items",
  656. "tests.sentry.issues.endpoints.test_organization_activity",
  657. "tests.sentry.issues.endpoints.test_organization_searches",
  658. "tests.sentry.issues.endpoints.test_project_stacktrace_link",
  659. "tests.sentry.issues.endpoints.test_source_map_debug",
  660. "tests.sentry.issues.test_attributes",
  661. "tests.sentry.issues.test_escalating",
  662. "tests.sentry.issues.test_escalating_issues_alg",
  663. "tests.sentry.issues.test_group_attributes_dataset",
  664. "tests.sentry.issues.test_grouptype",
  665. "tests.sentry.issues.test_ignored",
  666. "tests.sentry.issues.test_ingest",
  667. "tests.sentry.issues.test_issue_occurrence",
  668. "tests.sentry.issues.test_issue_velocity",
  669. "tests.sentry.issues.test_json_schemas",
  670. "tests.sentry.issues.test_merge",
  671. "tests.sentry.issues.test_occurrence_consumer",
  672. "tests.sentry.issues.test_ongoing",
  673. "tests.sentry.issues.test_priority",
  674. "tests.sentry.issues.test_producer",
  675. "tests.sentry.issues.test_run",
  676. "tests.sentry.issues.test_search_issues_dataset",
  677. "tests.sentry.issues.test_status_change",
  678. "tests.sentry.issues.test_status_change_consumer",
  679. "tests.sentry.issues.test_update_inbox",
  680. "tests.sentry.relay.config.test_metric_extraction",
  681. "tests.sentry.services.hybrid_cloud.*",
  682. "tests.sentry.tasks.test_on_demand_metrics",
  683. "tests.sentry.types.test_actor",
  684. "tests.sentry.types.test_region",
  685. "tools.*",
  686. ]
  687. disallow_any_generics = true
  688. disallow_untyped_defs = true
  689. # end: stronger typing