Title: sentry_sdk.init(disable_integration=...) annotation incorrect · Issue #7460 · getsentry/sentry-python · GitHub
Open Graph Title: sentry_sdk.init(disable_integration=...) annotation incorrect · Issue #7460 · getsentry/sentry-python
X Title: sentry_sdk.init(disable_integration=...) annotation incorrect · Issue #7460 · getsentry/sentry-python
Description: How do you use Sentry? Self-hosted/on-premise Version the latest Steps to Reproduce We're running code which disables an integration by calling sentry.init( ..., disabled_integrations=[sentry_sdk.integrations.falcon.FalconIntegration] ) ...
Open Graph Description: How do you use Sentry? Self-hosted/on-premise Version the latest Steps to Reproduce We're running code which disables an integration by calling sentry.init( ..., disabled_integrations=[sentry_sdk.i...
X Description: How do you use Sentry? Self-hosted/on-premise Version the latest Steps to Reproduce We're running code which disables an integration by calling sentry.init( ..., disabled_integrations=[sentry_s...
Opengraph URL: https://github.com/getsentry/sentry-python/issues/7460
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"sentry_sdk.init(disable_integration=...) annotation incorrect","articleBody":"### How do you use Sentry?\n\nSelf-hosted/on-premise\n\n### Version\n\nthe latest\n\n### Steps to Reproduce\n\nWe're running code which disables an integration by calling\n\n```\nsentry.init(\n ...,\n disabled_integrations=[sentry_sdk.integrations.falcon.FalconIntegration]\n)\n```\n\nand mypy (rightfully) complains about this:\n```\nerror: List item 0 has incompatible type \"type[FalconIntegration]\"; expected \"Integration\" [list-item]\n```\n\nThe annotation in https://github.com/getsentry/sentry-python/blob/a618e3a3df9a7b1bbb09d38f1b38fbd5876df622/sentry_sdk/consts.py#L1340 should be fixed to allow `Optional[Sequence[Integration | type[Integration]]` instead. Not sure if anyone passes Integration in directly here - I don't expect those integrations to be singletons - so maybe just type[Integration] suffices as well.\n\nhttps://github.com/getsentry/sentry-python/blob/a618e3a3df9a7b1bbb09d38f1b38fbd5876df622/sentry_sdk/integrations/__init__.py#L185 already has the correct annotation.\n\n### Expected Result\n\nmypy not complaining\n\n### Actual Result\n\nmypy complains","author":{"url":"https://github.com/jap","@type":"Person","name":"jap"},"datePublished":"2026-09-10T13:52:07Z","url":"https://github.com/getsentry/sentry-python/issues/7460"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6e94094b-dfb4-1cb9-6c1e-a4d01c514932 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E3D2:D9951:532EB6:739558:6B009531 |
| html-safe-nonce | 3f797c09e0e112a6f89fc16f52d7b13dfb05a78d10c018b6581c6cc098af6c64 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0QyOkQ5OTUxOjUzMkVCNjo3Mzk1NTg6NkIwMDk1MzEiLCJ2aXNpdG9yX2lkIjoiOTIxMzgxODk5MjAwMTU4NjQ4MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b10833b37076ba32e8827d95bba7870f3c62e6bf95cb2ae1a921c0c6978eca75 |
| hovercard-subject-tag | issue:5413050058 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-python/7460/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ccd1dad448ab0dfb1b00a45832ee2e6d8237717d21535936a38f0f852fd46ac2/getsentry/sentry-python/issues/7460 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ccd1dad448ab0dfb1b00a45832ee2e6d8237717d21535936a38f0f852fd46ac2/getsentry/sentry-python/issues/7460 |
| og:image:alt | How do you use Sentry? Self-hosted/on-premise Version the latest Steps to Reproduce We're running code which disables an integration by calling sentry.init( ..., disabled_integrations=[sentry_sdk.i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jap |
| hostname | github.com |
| expected-hostname | github.com |
| None | 552480023d6963d7f188d82f8cd5f3fe5046244607d769b794462821d9ea1b29 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 137814779 |
| octolytics-dimension-repository_nwo | getsentry/sentry-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 137814779 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | caf54e38b10face642f6cc1c79e4562e7ee52e3c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width