mypy.ini 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. [mypy]
  2. python_version = 3.8
  3. mypy_path = fixtures/stubs-for-mypy
  4. files = fixtures/stubs-for-mypy,
  5. src/sentry/analytics/,
  6. src/sentry/api/bases/external_actor.py,
  7. src/sentry/api/bases/organization.py,
  8. src/sentry/api/bases/organization_events.py,
  9. src/sentry/api/bases/rule.py,
  10. src/sentry/api/endpoints/codeowners/,
  11. src/sentry/api/endpoints/group_events.py,
  12. src/sentry/api/endpoints/group_event_details.py,
  13. src/sentry/api/endpoints/group_tags.py,
  14. src/sentry/api/endpoints/organization_events_stats.py,
  15. src/sentry/api/endpoints/organization_events_trace.py,
  16. src/sentry/api/endpoints/organization_measurements_meta.py,
  17. src/sentry/api/endpoints/project_stacktrace_link.py,
  18. src/sentry/api/endpoints/project_app_store_connect_credentials.py,
  19. src/sentry/api/endpoints/rpc.py,
  20. src/sentry/api/endpoints/team_issue_breakdown.py,
  21. src/sentry/api/endpoints/team_unresolved_issue_age.py,
  22. src/sentry/api/helpers/environments.py,
  23. src/sentry/api/helpers/events.py,
  24. src/sentry/api/helpers/group_index/,
  25. src/sentry/api/invite_helper.py,
  26. src/sentry/api/issue_search.py,
  27. src/sentry/api/permissions.py,
  28. src/sentry/api/serializers/base.py,
  29. src/sentry/api/serializers/models/external_actor.py,
  30. src/sentry/api/serializers/models/integration.py,
  31. src/sentry/api/serializers/models/notification_setting.py,
  32. src/sentry/api/serializers/models/organization.py,
  33. src/sentry/api/serializers/models/organization_member/,
  34. src/sentry/api/serializers/models/team.py,
  35. src/sentry/api/serializers/models/user.py,
  36. src/sentry/api/serializers/types.py,
  37. src/sentry/api/utils.py,
  38. src/sentry/api/validators/external_actor.py,
  39. src/sentry/api/validators/notifications.py,
  40. src/sentry/apidocs/,
  41. src/sentry/auth/access.py,
  42. src/sentry/auth/email.py,
  43. src/sentry/auth/helper.py,
  44. src/sentry/auth/idpmigration.py,
  45. src/sentry/auth/provider.py,
  46. src/sentry/auth/system.py,
  47. src/sentry/auth/view.py,
  48. src/sentry/constants.py,
  49. src/sentry/db/models/base.py,
  50. src/sentry/db/models/fields/bounded.py,
  51. src/sentry/db/models/fields/foreignkey.py,
  52. src/sentry/db/models/fields/onetoone.py,
  53. src/sentry/db/models/fields/text.py,
  54. src/sentry/db/models/manager/,
  55. src/sentry/db/models/paranoia.py,
  56. src/sentry/db/models/query.py,
  57. src/sentry/db/models/utils.py,
  58. src/sentry/digests/,
  59. src/sentry/dynamic_sampling/,
  60. src/sentry/event_manager.py,
  61. src/sentry/eventstream/base.py,
  62. src/sentry/eventstream/snuba.py,
  63. src/sentry/eventstream/kafka/,
  64. src/sentry/features/,
  65. src/sentry/grouping/result.py,
  66. src/sentry/grouping/strategies/base.py,
  67. src/sentry/grouping/strategies/legacy.py,
  68. src/sentry/grouping/strategies/message.py,
  69. src/sentry/grouping/strategies/newstyle.py,
  70. src/sentry/grouping/strategies/security.py,
  71. src/sentry/grouping/strategies/template.py,
  72. src/sentry/grouping/strategies/utils.py,
  73. src/sentry/incidents/charts.py,
  74. src/sentry/incidents/tasks.py,
  75. src/sentry/incidents/subscription_processor.py,
  76. src/sentry/incidents/utils/types.py,
  77. src/sentry/ingest/billing_metrics_consumer.py,
  78. src/sentry/ingest/consumer_v2/,
  79. src/sentry/ingest/transaction_clusterer/,
  80. src/sentry/integrations/base.py,
  81. src/sentry/integrations/github/,
  82. src/sentry/integrations/mixins/commit_context.py,
  83. src/sentry/integrations/slack/,
  84. src/sentry/integrations/manager.py,
  85. src/sentry/integrations/message_builder.py,
  86. src/sentry/integrations/utils/atlassian_connect.py,
  87. src/sentry/integrations/utils/scope.py,
  88. src/sentry/integrations/utils/code_mapping.py,
  89. src/sentry/integrations/utils/codecov.py,
  90. src/sentry/integrations/vsts/,
  91. src/sentry/issues/,
  92. src/sentry/killswitches.py,
  93. src/sentry/lang/native/appconnect.py,
  94. src/sentry/mail/notifications.py,
  95. src/sentry/metrics/,
  96. src/sentry/models/debugfile.py,
  97. src/sentry/models/groupsubscription.py,
  98. src/sentry/models/options/,
  99. src/sentry/models/rulefirehistory.py,
  100. src/sentry/notifications/,
  101. src/sentry/ownership/grammar.py,
  102. src/sentry/pipeline/,
  103. src/sentry/plugins/base/view.py,
  104. src/sentry/post_process_forwarder/,
  105. src/sentry/processing/backpressure/,
  106. src/sentry/processing/realtime_metrics/,
  107. src/sentry/profiles/,
  108. src/sentry/ratelimits/,
  109. src/sentry/relay/config/__init__.py,
  110. src/sentry/relay/config/measurements.py,
  111. src/sentry/relay/config/metric_extraction.py,
  112. src/sentry/release_health/,
  113. src/sentry/replays/consumers/,
  114. src/sentry/replays/usecases/,
  115. src/sentry/replays/endpoints/organization_replay_count.py,
  116. src/sentry/replays/endpoints/organization_replay_details.py,
  117. src/sentry/replays/post_process.py,
  118. src/sentry/roles/manager.py,
  119. src/sentry/rules/,
  120. src/sentry/runner/commands/devserver.py,
  121. src/sentry/runner/commands/devservices.py,
  122. src/sentry/runner/initializer.py,
  123. src/sentry/search/base.py,
  124. src/sentry/search/events/builder/,
  125. src/sentry/search/events/constants.py,
  126. src/sentry/search/events/types.py,
  127. src/sentry/search/events/datasets/base.py,
  128. src/sentry/search/events/datasets/discover.py,
  129. src/sentry/search/events/datasets/filter_aliases.py,
  130. src/sentry/search/events/datasets/field_aliases.py,
  131. src/sentry/search/snuba/,
  132. src/sentry/search/utils.py,
  133. src/sentry/sentry_apps/,
  134. src/sentry/sentry_metrics/,
  135. src/sentry/services/http.py,
  136. src/sentry/services/base.py,
  137. src/sentry/services/hybrid_cloud/,
  138. src/sentry/shared_integrations/,
  139. src/sentry/silo/,
  140. src/sentry/snuba/entity_subscription.py,
  141. src/sentry/snuba/events.py,
  142. src/sentry/snuba/outcomes.py,
  143. src/sentry/snuba/query_subscriptions/,
  144. src/sentry/snuba/metrics/fields/histogram.py,
  145. src/sentry/snuba/metrics/fields/base.py,
  146. src/sentry/snuba/metrics/naming_layer/,
  147. src/sentry/snuba/metrics/query.py,
  148. src/sentry/snuba/profiles.py,
  149. src/sentry/spans/,
  150. src/sentry/tasks/app_store_connect.py,
  151. src/sentry/tasks/low_priority_symbolication.py,
  152. src/sentry/tasks/store.py,
  153. src/sentry/tasks/symbolication.py,
  154. src/sentry/tasks/update_user_reports.py,
  155. src/sentry/tasks/derive_code_mappings.py,
  156. src/sentry/tasks/weekly_escalating_forecast.py,
  157. src/sentry/tasks/auto_enable_codecov.py,
  158. src/sentry/tasks/auto_ongoing_issues.py,
  159. src/sentry/testutils/modelmanifest.py,
  160. src/sentry/testutils/silo.py,
  161. src/sentry/types/organization.py,
  162. src/sentry/types/region.py,
  163. src/sentry/unmerge.py,
  164. src/sentry/utils/appleconnect/,
  165. src/sentry/utils/arroyo.py,
  166. src/sentry/utils/arroyo_producer.py,
  167. src/sentry/utils/assets.py,
  168. src/sentry/utils/audit.py,
  169. src/sentry/utils/auth.py,
  170. src/sentry/utils/avatar.py,
  171. src/sentry/utils/cache.py,
  172. src/sentry/utils/codecs.py,
  173. src/sentry/utils/committers.py,
  174. src/sentry/utils/cursors.py,
  175. src/sentry/utils/dates.py,
  176. src/sentry/utils/email/,
  177. src/sentry/utils/event_frames.py,
  178. src/sentry/utils/hashlib.py,
  179. src/sentry/utils/http.py,
  180. src/sentry/utils/integrationdocs.py,
  181. src/sentry/utils/json.py,
  182. src/sentry/utils/jwt.py,
  183. src/sentry/utils/kvstore,
  184. src/sentry/utils/metrics.py,
  185. src/sentry/utils/options.py,
  186. src/sentry/utils/outcomes.py,
  187. src/sentry/utils/pagination_factory.py,
  188. src/sentry/utils/patch_set.py,
  189. src/sentry/utils/redis_metrics.py,
  190. src/sentry/utils/request_cache.py,
  191. src/sentry/utils/services.py,
  192. src/sentry/utils/suspect_resolutions/commit_correlation.py,
  193. src/sentry/utils/suspect_resolutions/metric_correlation.py,
  194. src/sentry/utils/suspect_resolutions/resolved_in_active_release.py,
  195. src/sentry/utils/time_window.py,
  196. src/sentry/utils/yaml.py,
  197. src/sentry/web/decorators.py,
  198. src/sentry/web/frontend/base.py,
  199. src/sentry/web/helpers.py,
  200. tests/sentry/api/helpers/test_group_index.py,
  201. tests/sentry/lang/native/test_appconnect.py,
  202. tests/sentry/post_process_forwarder,
  203. tests/sentry/processing/backpressure/,
  204. tests/sentry/processing/realtime_metrics/,
  205. tests/sentry/issues/,
  206. tests/sentry/tasks/test_low_priority_symbolication.py,
  207. tests/sentry/utils/appleconnect/,
  208. tools/
  209. show_error_codes = true
  210. ; Enable all options used with --strict
  211. warn_unused_configs=True
  212. disallow_any_generics=True
  213. disallow_subclassing_any=True
  214. disallow_untyped_calls=True
  215. disallow_untyped_defs=True
  216. disallow_incomplete_defs=True
  217. check_untyped_defs=True
  218. disallow_untyped_decorators=True
  219. no_implicit_optional=True
  220. warn_unused_ignores=True
  221. warn_redundant_casts=True
  222. warn_return_any=True
  223. no_implicit_reexport=True
  224. plugins = pydantic.mypy
  225. ; Set this to skip until more of the codebase is typed
  226. [mypy-sentry.*]
  227. follow_imports = skip
  228. [mypy-bitfield.*]
  229. follow_imports = silent
  230. [mypy-sudo.*]
  231. follow_imports = silent
  232. [mypy-celery.*]
  233. ignore_missing_imports = True
  234. [mypy-confluent_kafka.*]
  235. ignore_missing_imports = True
  236. [mypy-django.*]
  237. ignore_missing_imports = True
  238. [mypy-docker.*]
  239. ignore_missing_imports = True
  240. [mypy-google.*]
  241. ignore_missing_imports = True
  242. [mypy-honcho.*]
  243. ignore_missing_imports = True
  244. [mypy-kombu]
  245. ignore_missing_imports = True
  246. [mypy-mistune.*]
  247. ignore_missing_imports = True
  248. [mypy-parsimonious.*]
  249. ignore_missing_imports = True
  250. [mypy-rb.*]
  251. ignore_missing_imports = True
  252. [mypy-rest_framework.*]
  253. ignore_missing_imports = True
  254. [mypy-sentry_relay.*]
  255. ignore_missing_imports = True
  256. [mypy-toronado]
  257. ignore_missing_imports = True
  258. [mypy-unidiff]
  259. ignore_missing_imports = True
  260. [mypy-msgpack]
  261. ignore_missing_imports = True
  262. [mypy-rapidjson]
  263. ignore_missing_imports = True
  264. [mypy-statsd]
  265. ignore_missing_imports = True
  266. [mypy-datadog.*]
  267. ignore_missing_imports = True
  268. # TODO: these cause type errors when followed
  269. [mypy-snuba_sdk.*]
  270. follow_imports = skip
  271. # this package marks itself as typed but has no annotations
  272. [mypy-google.cloud.bigtable.*]
  273. follow_imports = skip
  274. # https://github.com/googleapis/python-api-core/pull/453
  275. [mypy-google.api_core.retry]
  276. follow_imports = skip