Title: `note:` is orphaned from actual error if there are other problems between it · Issue #10480 · python/mypy · GitHub
Open Graph Title: `note:` is orphaned from actual error if there are other problems between it · Issue #10480 · python/mypy
X Title: `note:` is orphaned from actual error if there are other problems between it · Issue #10480 · python/mypy
Description: Bug Report the "note" is orphaned from the actual text it is referring to. this makes it harder to understand the context To Reproduce def f() -> int: error_here() return 1 f(wat=1) run mypy! Expected Behavior Maybe something like this? ...
Open Graph Description: Bug Report the "note" is orphaned from the actual text it is referring to. this makes it harder to understand the context To Reproduce def f() -> int: error_here() return 1 f(wat=1) run mypy! Expec...
X Description: Bug Report the "note" is orphaned from the actual text it is referring to. this makes it harder to understand the context To Reproduce def f() -> int: error_here() return 1 f(wat=1) ru...
Opengraph URL: https://github.com/python/mypy/issues/10480
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`note:` is orphaned from actual error if there are other problems between it","articleBody":"\u003c!--\r\n If you're new to mypy and you're not sure whether what you're experiencing is a mypy bug, please see the \"Question and Help\" form\r\n instead.\r\n-->\r\n\r\n**Bug Report**\r\n\r\nthe \"note\" is orphaned from the actual text it is referring to. this makes it harder to understand the context\r\n\r\n**To Reproduce**\r\n\r\n```python\r\ndef f() -> int:\r\n error_here()\r\n return 1\r\n\r\nf(wat=1)\r\n```\r\n\r\n1. run mypy!\r\n\r\n**Expected Behavior**\r\n\r\nMaybe something like this?\r\n\r\n```console\r\n$ mypy t.py\r\nt.py:2: error: Name 'error_here' is not defined\r\nt.py:5: error: Unexpected keyword argument \"wat\" for \"f\"\r\nt.py:1: note: \"f\" defined here\r\nFound 2 errors in 1 file (checked 1 source file)\r\n```\r\n\r\n**Actual Behavior**\r\n\r\n```console\r\n$ mypy t.py\r\nt.py:1: note: \"f\" defined here\r\nt.py:2: error: Name 'error_here' is not defined\r\nt.py:5: error: Unexpected keyword argument \"wat\" for \"f\"\r\nFound 2 errors in 1 file (checked 1 source file)\r\n```\r\n\r\n**Your Environment**\r\n\r\n- Mypy version used: `0.812`\r\n- Mypy command-line flags: n/a\r\n- Mypy configuration options from `mypy.ini` (and other config files): n/a\r\n- Python version used: 3.8.5\r\n- Operating system and version: ubuntu 20.04\r\n\r\n\u003c!--\r\nYou can freely edit this text, please remove all the lines\r\nyou believe are unnecessary.\r\n-->\r\n","author":{"url":"https://github.com/asottile","@type":"Person","name":"asottile"},"datePublished":"2021-05-15T20:37:58Z","url":"https://github.com/python/mypy/issues/10480"}
| 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:7202192f-83e5-057e-ad44-2fa269a66803 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D154:1B0A31:212C633:2D1A013:6B002415 |
| html-safe-nonce | aef06a04def421070124bd1b26d1b7cfa25537e6ae6454ce6b7799a0ddea6867 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTU0OjFCMEEzMToyMTJDNjMzOjJEMUEwMTM6NkIwMDI0MTUiLCJ2aXNpdG9yX2lkIjoiNDkxNTY3OTI1Mjc2ODEwNTQ5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2c042f04c17dbd562dbb539c27a9716ba38d540c3790ee0bbe40a8fe25698340 |
| hovercard-subject-tag | issue:892534480 |
| 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/10480/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c76b7256968e7d4442923b0721664f8c43c19dbd52bca26555b8e79e048aff89/python/mypy/issues/10480 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c76b7256968e7d4442923b0721664f8c43c19dbd52bca26555b8e79e048aff89/python/mypy/issues/10480 |
| og:image:alt | Bug Report the "note" is orphaned from the actual text it is referring to. this makes it harder to understand the context To Reproduce def f() -> int: error_here() return 1 f(wat=1) run mypy! Expec... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | asottile |
| 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