Title: runtime flag to disable all `# type: ignore` comments · Issue #19476 · python/mypy · GitHub
Open Graph Title: runtime flag to disable all `# type: ignore` comments · Issue #19476 · python/mypy
X Title: runtime flag to disable all `# type: ignore` comments · Issue #19476 · python/mypy
Description: Feature I thought this might be supported, but could not find it in the docs or --help. I also couldn't find this request as a closed or open issue; apologies if this has been discussed. I believe it would be beneficial for mypy to have ...
Open Graph Description: Feature I thought this might be supported, but could not find it in the docs or --help. I also couldn't find this request as a closed or open issue; apologies if this has been discussed. I believe ...
X Description: Feature I thought this might be supported, but could not find it in the docs or --help. I also couldn't find this request as a closed or open issue; apologies if this has been discussed. I beli...
Opengraph URL: https://github.com/python/mypy/issues/19476
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"runtime flag to disable all `# type: ignore` comments","articleBody":"**Feature**\n\n_I thought this might be supported, but could not find it in the docs or `--help`. I also couldn't find this request as a closed or open issue; apologies if this has been discussed._ \n\nI believe it would be beneficial for mypy to have a `--disable-ignores` flag or similar.\n\nThe flag would simply ignore all code decorated with `# type: ignore*` or similar.\n\n**Pitch**\n\nThis would simplify auditing and managing legacy code.\n\nOften times, errors are suppressed because mypy does not yet have a relevant feature or the developer's codebase requires too much refactoring. This is somewhat similar to the current support for unused ignores, but would help developers catch situations where slight edits to code might make it conformant to mypy.\n\nPeriodically disable all ignores for an audit is an important part of maintaining code health. Bringing this functionality into mypy would be much easier than running mypy on a version of the code with the ignores stripped.\n\n\n","author":{"url":"https://github.com/jvanasco","@type":"Person","name":"jvanasco"},"datePublished":"2025-07-17T16:16:45Z","url":"https://github.com/python/mypy/issues/19476"}
| 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:daf627d0-c8b4-b3e3-165b-a19a2fb4ba62 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B64:156D4E:746C15:96FCD6:6AFFCCF7 |
| html-safe-nonce | ba6e9e0612ca45208e44057484e8674862076e9552556d2dc02b68d83cc88e57 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjY0OjE1NkQ0RTo3NDZDMTU6OTZGQ0Q2OjZBRkZDQ0Y3IiwidmlzaXRvcl9pZCI6Ijg0NTM2NDI3NjE2NjM0MDEyMDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | cf47ce4931bea5d69a9e220715ae5baee28d6ac916cf4ec3296c8a2752c71773 |
| hovercard-subject-tag | issue:3240155165 |
| 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/python/mypy/19476/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e718adfda1a33718290e0fc540d50e4ffc11d35dc151cb7a08bcd29914af4b7d/python/mypy/issues/19476 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e718adfda1a33718290e0fc540d50e4ffc11d35dc151cb7a08bcd29914af4b7d/python/mypy/issues/19476 |
| og:image:alt | Feature I thought this might be supported, but could not find it in the docs or --help. I also couldn't find this request as a closed or open issue; apologies if this has been discussed. I believe ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jvanasco |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| 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 | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width