pyproject.toml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682
  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.discover",
  368. "sentry.search.events.builder.errors",
  369. "sentry.search.events.builder.metrics",
  370. "sentry.search.events.datasets.discover",
  371. "sentry.search.events.datasets.filter_aliases",
  372. "sentry.search.events.datasets.function_aliases",
  373. "sentry.search.events.datasets.metrics",
  374. "sentry.search.events.datasets.metrics_layer",
  375. "sentry.search.events.fields",
  376. "sentry.search.events.filter",
  377. "sentry.search.snuba.backend",
  378. "sentry.search.snuba.executors",
  379. "sentry.search.utils",
  380. "sentry.sentry_apps.apps",
  381. "sentry.sentry_apps.installations",
  382. "sentry.sentry_metrics.consumers.indexer.slicing_router",
  383. "sentry.sentry_metrics.indexer.postgres.postgres_v2",
  384. "sentry.shared_integrations.client.base",
  385. "sentry.shared_integrations.client.proxy",
  386. "sentry.similarity.features",
  387. "sentry.snuba.discover",
  388. "sentry.snuba.errors",
  389. "sentry.snuba.issue_platform",
  390. "sentry.snuba.metrics.datasource",
  391. "sentry.snuba.metrics.fields.base",
  392. "sentry.snuba.metrics.query_builder",
  393. "sentry.snuba.sessions_v2",
  394. "sentry.snuba.spans_indexed",
  395. "sentry.snuba.spans_metrics",
  396. "sentry.tagstore.snuba.backend",
  397. "sentry.tagstore.types",
  398. "sentry.tasks.auth",
  399. "sentry.tasks.base",
  400. "sentry.tasks.integrations",
  401. "sentry.tasks.integrations.migrate_issues",
  402. "sentry.tasks.integrations.migrate_repo",
  403. "sentry.tasks.integrations.slack.find_channel_id_for_rule",
  404. "sentry.tasks.integrations.slack.link_slack_user_identities",
  405. "sentry.tasks.integrations.sync_assignee_outbound_impl",
  406. "sentry.tasks.integrations.sync_status_inbound",
  407. "sentry.tasks.integrations.sync_status_outbound",
  408. "sentry.tasks.process_buffer",
  409. "sentry.tasks.sentry_apps",
  410. "sentry.templatetags.sentry_assets",
  411. "sentry.templatetags.sentry_helpers",
  412. "sentry.templatetags.sentry_plugins",
  413. "sentry.testutils.asserts",
  414. "sentry.testutils.cases",
  415. "sentry.testutils.fixtures",
  416. "sentry.testutils.helpers.features",
  417. "sentry.testutils.helpers.notifications",
  418. "sentry.testutils.helpers.slack",
  419. "sentry.tsdb.dummy",
  420. "sentry.tsdb.inmemory",
  421. "sentry.utils.auth",
  422. "sentry.utils.committers",
  423. "sentry.utils.services",
  424. "sentry.web.forms.accounts",
  425. "sentry.web.frontend.account_identity",
  426. "sentry.web.frontend.auth_close",
  427. "sentry.web.frontend.auth_login",
  428. "sentry.web.frontend.auth_logout",
  429. "sentry.web.frontend.auth_organization_login",
  430. "sentry.web.frontend.auth_provider_login",
  431. "sentry.web.frontend.base",
  432. "sentry.web.frontend.debug.debug_codeowners_auto_sync_failure_email",
  433. "sentry.web.frontend.debug.debug_incident_activity_email",
  434. "sentry.web.frontend.debug.debug_incident_trigger_email",
  435. "sentry.web.frontend.debug.debug_mfa_added_email",
  436. "sentry.web.frontend.debug.debug_mfa_removed_email",
  437. "sentry.web.frontend.debug.debug_new_processing_issues_email",
  438. "sentry.web.frontend.debug.debug_organization_integration_request",
  439. "sentry.web.frontend.debug.debug_organization_invite_request",
  440. "sentry.web.frontend.debug.debug_organization_join_request",
  441. "sentry.web.frontend.disabled_member_view",
  442. "sentry.web.frontend.group_plugin_action",
  443. "sentry.web.frontend.idp_email_verification",
  444. "sentry.web.frontend.integration_extension_configuration",
  445. "sentry.web.frontend.js_sdk_loader",
  446. "sentry.web.frontend.newest_issue",
  447. "sentry.web.frontend.oauth_authorize",
  448. "sentry.web.frontend.oauth_token",
  449. "sentry.web.frontend.organization_integration_setup",
  450. "sentry.web.frontend.pipeline_advancer",
  451. "sentry.web.frontend.project_event",
  452. "sentry.web.frontend.react_page",
  453. "sentry.web.frontend.reactivate_account",
  454. "sentry.web.frontend.setup_wizard",
  455. "sentry.web.frontend.shared_group_details",
  456. "sentry.web.frontend.twofactor",
  457. "sentry_plugins.bitbucket.client",
  458. "sentry_plugins.bitbucket.mixins",
  459. "sentry_plugins.github.plugin",
  460. "sentry_plugins.jira.plugin",
  461. "tests.sentry.api.bases.test_organization",
  462. "tests.sentry.api.bases.test_project",
  463. "tests.sentry.api.bases.test_sentryapps",
  464. "tests.sentry.api.bases.test_team",
  465. "tests.sentry.api.endpoints.notifications.test_notification_actions_details",
  466. "tests.sentry.api.endpoints.notifications.test_notification_actions_index",
  467. "tests.sentry.api.endpoints.test_event_attachment_details",
  468. "tests.sentry.api.helpers.test_group_index",
  469. "tests.sentry.api.test_authentication",
  470. "tests.sentry.api.test_base",
  471. "tests.sentry.api.test_event_search",
  472. "tests.sentry.digests.test_notifications",
  473. "tests.sentry.eventstore.test_base",
  474. "tests.sentry.grouping.test_result",
  475. "tests.sentry.identity.test_oauth2",
  476. "tests.sentry.incidents.test_logic",
  477. "tests.sentry.ingest.test_slicing",
  478. "tests.sentry.issues.test_utils",
  479. ]
  480. disable_error_code = [
  481. "arg-type",
  482. "assignment",
  483. "attr-defined",
  484. "call-arg",
  485. "call-overload",
  486. "dict-item",
  487. "has-type",
  488. "index",
  489. "list-item",
  490. "misc",
  491. "operator",
  492. "override",
  493. "return-value",
  494. "typeddict-item",
  495. "typeddict-unknown-key",
  496. "union-attr",
  497. "unreachable",
  498. "var-annotated",
  499. ]
  500. # end: sentry modules with typing issues
  501. # begin: stronger typing
  502. [[tool.mypy.overrides]]
  503. module = [
  504. "sentry.api.endpoints.issues.*",
  505. "sentry.api.helpers.source_map_helper",
  506. "sentry.buffer.*",
  507. "sentry.build.*",
  508. "sentry.db.models.fields.hybrid_cloud_foreign_key",
  509. "sentry.db.models.fields.types",
  510. "sentry.db.models.manager.*",
  511. "sentry.db.models.paranoia",
  512. "sentry.db.models.utils",
  513. "sentry.eventstore.reprocessing.redis",
  514. "sentry.eventtypes.error",
  515. "sentry.grouping.component",
  516. "sentry.grouping.fingerprinting",
  517. "sentry.grouping.parameterization",
  518. "sentry.hybridcloud.*",
  519. "sentry.issues",
  520. "sentry.issues.analytics",
  521. "sentry.issues.apps",
  522. "sentry.issues.constants",
  523. "sentry.issues.endpoints",
  524. "sentry.issues.endpoints.group_events",
  525. "sentry.issues.endpoints.organization_activity",
  526. "sentry.issues.endpoints.organization_release_previous_commits",
  527. "sentry.issues.endpoints.organization_searches",
  528. "sentry.issues.endpoints.project_stacktrace_link",
  529. "sentry.issues.escalating_group_forecast",
  530. "sentry.issues.escalating_issues_alg",
  531. "sentry.issues.forecasts",
  532. "sentry.issues.ignored",
  533. "sentry.issues.ingest",
  534. "sentry.issues.issue_occurrence",
  535. "sentry.issues.json_schemas",
  536. "sentry.issues.merge",
  537. "sentry.issues.occurrence_consumer",
  538. "sentry.issues.ongoing",
  539. "sentry.issues.priority",
  540. "sentry.issues.producer",
  541. "sentry.issues.query",
  542. "sentry.issues.receivers",
  543. "sentry.issues.related.*",
  544. "sentry.issues.run",
  545. "sentry.issues.status_change",
  546. "sentry.issues.status_change_consumer",
  547. "sentry.issues.status_change_message",
  548. "sentry.issues.update_inbox",
  549. "sentry.lang.java.processing",
  550. "sentry.llm.*",
  551. "sentry.mediators.sentry_app_installations.installation_notifier",
  552. "sentry.migrations.*",
  553. "sentry.models.event",
  554. "sentry.models.eventattachment",
  555. "sentry.models.groupsubscription",
  556. "sentry.models.integrations.integration_feature",
  557. "sentry.monkey",
  558. "sentry.nodestore.base",
  559. "sentry.nodestore.bigtable.backend",
  560. "sentry.nodestore.django.backend",
  561. "sentry.nodestore.django.models",
  562. "sentry.nodestore.filesystem.backend",
  563. "sentry.nodestore.models",
  564. "sentry.profiles.*",
  565. "sentry.relay.config.metric_extraction",
  566. "sentry.reprocessing2",
  567. "sentry.runner.*",
  568. "sentry.services.hybrid_cloud.access.*",
  569. "sentry.services.hybrid_cloud.app.*",
  570. "sentry.services.hybrid_cloud.hook.*",
  571. "sentry.services.hybrid_cloud.identity.*",
  572. "sentry.services.hybrid_cloud.integration.*",
  573. "sentry.services.hybrid_cloud.issue.*",
  574. "sentry.services.hybrid_cloud.log.*",
  575. "sentry.services.hybrid_cloud.lost_password_hash.*",
  576. "sentry.services.hybrid_cloud.notifications.*",
  577. "sentry.services.hybrid_cloud.organization_actions.*",
  578. "sentry.services.hybrid_cloud.organization_mapping.*",
  579. "sentry.services.hybrid_cloud.organizationmember_mapping.*",
  580. "sentry.services.hybrid_cloud.orgauthtoken.*",
  581. "sentry.services.hybrid_cloud.project.*",
  582. "sentry.services.hybrid_cloud.project_key.*",
  583. "sentry.services.hybrid_cloud.replica.*",
  584. "sentry.services.hybrid_cloud.repository.*",
  585. "sentry.services.hybrid_cloud.tombstone.*",
  586. "sentry.services.hybrid_cloud.user.*",
  587. "sentry.services.hybrid_cloud.user_option.*",
  588. "sentry.snuba.metrics.extraction",
  589. "sentry.stacktraces.platform",
  590. "sentry.tasks.beacon",
  591. "sentry.tasks.commit_context",
  592. "sentry.tasks.on_demand_metrics",
  593. "sentry.tasks.reprocessing2",
  594. "sentry.tasks.store",
  595. "sentry.testutils.helpers.task_runner",
  596. "sentry.types.actor",
  597. "sentry.types.region",
  598. "sentry.utils.arroyo",
  599. "sentry.utils.assets",
  600. "sentry.utils.audit",
  601. "sentry.utils.celery",
  602. "sentry.utils.codeowners",
  603. "sentry.utils.colors",
  604. "sentry.utils.email.*",
  605. "sentry.utils.env",
  606. "sentry.utils.event",
  607. "sentry.utils.files",
  608. "sentry.utils.geo",
  609. "sentry.utils.imports",
  610. "sentry.utils.iterators",
  611. "sentry.utils.javascript",
  612. "sentry.utils.lazy_service_wrapper",
  613. "sentry.utils.locking.*",
  614. "sentry.utils.migrations",
  615. "sentry.utils.numbers",
  616. "sentry.utils.otp",
  617. "sentry.utils.performance_issues.detectors.*",
  618. "sentry.utils.performance_issues.performance_detection",
  619. "sentry.utils.pubsub",
  620. "sentry.utils.redis",
  621. "sentry.utils.redis_metrics",
  622. "sentry.utils.sentry_apps.*",
  623. "sentry.utils.sms",
  624. "sentry.utils.snowflake",
  625. "sentry.utils.urls",
  626. "sentry.utils.uwsgi",
  627. "sentry.utils.zip",
  628. "sentry_plugins.base",
  629. "tests.sentry.api.endpoints.issues.*",
  630. "tests.sentry.event_manager.test_event_manager",
  631. "tests.sentry.grouping.test_fingerprinting",
  632. "tests.sentry.hybridcloud.*",
  633. "tests.sentry.issues",
  634. "tests.sentry.issues.endpoints",
  635. "tests.sentry.issues.endpoints.test_actionable_items",
  636. "tests.sentry.issues.endpoints.test_organization_activity",
  637. "tests.sentry.issues.endpoints.test_organization_searches",
  638. "tests.sentry.issues.endpoints.test_project_stacktrace_link",
  639. "tests.sentry.issues.endpoints.test_source_map_debug",
  640. "tests.sentry.issues.test_attributes",
  641. "tests.sentry.issues.test_escalating",
  642. "tests.sentry.issues.test_escalating_issues_alg",
  643. "tests.sentry.issues.test_group_attributes_dataset",
  644. "tests.sentry.issues.test_grouptype",
  645. "tests.sentry.issues.test_ignored",
  646. "tests.sentry.issues.test_ingest",
  647. "tests.sentry.issues.test_issue_occurrence",
  648. "tests.sentry.issues.test_issue_velocity",
  649. "tests.sentry.issues.test_json_schemas",
  650. "tests.sentry.issues.test_merge",
  651. "tests.sentry.issues.test_occurrence_consumer",
  652. "tests.sentry.issues.test_ongoing",
  653. "tests.sentry.issues.test_priority",
  654. "tests.sentry.issues.test_producer",
  655. "tests.sentry.issues.test_run",
  656. "tests.sentry.issues.test_search_issues_dataset",
  657. "tests.sentry.issues.test_status_change",
  658. "tests.sentry.issues.test_status_change_consumer",
  659. "tests.sentry.issues.test_update_inbox",
  660. "tests.sentry.relay.config.test_metric_extraction",
  661. "tests.sentry.services.hybrid_cloud.*",
  662. "tests.sentry.tasks.test_on_demand_metrics",
  663. "tests.sentry.types.test_actor",
  664. "tests.sentry.types.test_region",
  665. "tools.*",
  666. ]
  667. disallow_any_generics = true
  668. disallow_untyped_defs = true
  669. # end: stronger typing