Title: Support for output message ranges, instead of just the position · Issue #12288 · python/mypy · GitHub
Open Graph Title: Support for output message ranges, instead of just the position · Issue #12288 · python/mypy
X Title: Support for output message ranges, instead of just the position · Issue #12288 · python/mypy
Description: Feature Following the discussion in microsoft/vscode#142810, I propose MyPy to output a range over which a typing error occurs, instead of just the position of it. The current message with --show-column-numbers and --no-pretty looks like...
Open Graph Description: Feature Following the discussion in microsoft/vscode#142810, I propose MyPy to output a range over which a typing error occurs, instead of just the position of it. The current message with --show-c...
X Description: Feature Following the discussion in microsoft/vscode#142810, I propose MyPy to output a range over which a typing error occurs, instead of just the position of it. The current message with --show-c...
Opengraph URL: https://github.com/python/mypy/issues/12288
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support for output message ranges, instead of just the position","articleBody":"**Feature**\r\n\r\nFollowing the discussion in https://github.com/microsoft/vscode/issues/142810, I propose MyPy to output a range over which a typing error occurs, instead of just the position of it. The current message with `--show-column-numbers` and `--no-pretty` looks like this:\r\n\r\n```\r\ntest.py:4:5: error: Argument 1 to \"foo\" has incompatible type \"str\"; expected \"int\"\r\n```\r\n\r\nIt'd be great if a range would be included for the column numbers, if possible:\r\n\r\n```\r\ntest.py:4:5-15: error: Argument 1 to \"foo\" has incompatible type \"str\"; expected \"int\"\r\n```\r\n\r\nOutput with `--pretty` could then use multiple `^` characters to visualize the range. Omitting `--show-column-numbers` wouldn't display column numbers at all, thus the output would remain unchanged.\r\n\r\n**Pitch**\r\n\r\nThis change would allow the VSCode Python extension to output diagnostic objects with proper ranges, since the current implementation only underlines one character and makes it hard to work with, and [other proposed solutions](https://github.com/microsoft/vscode/issues/142810#issuecomment-1054682229) appear to be non-trivial at the very least.\r\n","author":{"url":"https://github.com/DevilXD","@type":"Person","name":"DevilXD"},"datePublished":"2022-03-04T10:36:43Z","url":"https://github.com/python/mypy/issues/12288"}
| 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:563f278b-1921-97e0-641a-62e2796c78b9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E1AA:1F3799:2CF8F2D:3B4BEBC:6B001C9D |
| html-safe-nonce | 38b97728c49a1966b13c1981f9b412d0c5960e4f608b8374fdc68d9ab2ed854b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUFBOjFGMzc5OToyQ0Y4RjJEOjNCNEJFQkM6NkIwMDFDOUQiLCJ2aXNpdG9yX2lkIjoiMjQ2NzYyNDMxODY5NjE2ODYwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | aa4ad260725bd4153bfb1348a812fbc8731708746aa6597ad6c33e9fbf83886a |
| hovercard-subject-tag | issue:1159497340 |
| 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/12288/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5ae68d762a6bcdaa4f6e470625267201ace34e6fa40c147d17cdc8a48c0a3a67/python/mypy/issues/12288 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5ae68d762a6bcdaa4f6e470625267201ace34e6fa40c147d17cdc8a48c0a3a67/python/mypy/issues/12288 |
| og:image:alt | Feature Following the discussion in microsoft/vscode#142810, I propose MyPy to output a range over which a typing error occurs, instead of just the position of it. The current message with --show-c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DevilXD |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width