Title: (🐞) Same error reported multiple times on inner functions when `show-error-context` is enabled · Issue #13517 · python/mypy · GitHub
Open Graph Title: (🐞) Same error reported multiple times on inner functions when `show-error-context` is enabled · Issue #13517 · python/mypy
X Title: (🐞) Same error reported multiple times on inner functions when `show-error-context` is enabled · Issue #13517 · python/mypy
Description: Doubble trouble def a() -> None: def b() -> None: 1 + "" d d = 1 main.py: note: In function "a": main.py:3: error: Unsupported operand types for + ("int" and "str") main.py: note: In function "b": main.py:3: error: Unsupported operand ty...
Open Graph Description: Doubble trouble def a() -> None: def b() -> None: 1 + "" d d = 1 main.py: note: In function "a": main.py:3: error: Unsupported operand types for + ("int" and "str") main.py: note: In function "b": ...
X Description: Doubble trouble def a() -> None: def b() -> None: 1 + "" d d = 1 main.py: note: In function "a": main.py:3: error: Unsupported operand types for + ("int" and &qu...
Opengraph URL: https://github.com/python/mypy/issues/13517
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"(🐞) Same error reported multiple times on inner functions when `show-error-context` is enabled","articleBody":"### Doubble trouble\r\n```py\r\ndef a() -> None:\r\n def b() -> None:\r\n 1 + \"\"\r\n d\r\n\r\n d = 1\r\n```\r\n```\r\nmain.py: note: In function \"a\":\r\nmain.py:3: error: Unsupported operand types for + (\"int\" and \"str\")\r\nmain.py: note: In function \"b\":\r\nmain.py:3: error: Unsupported operand types for + (\"int\" and \"str\")\r\n```\r\n[playground](https://mypy-play.net/?mypy=latest&python=3.10&flags=show-error-context&gist=fe416211621b82ce2cfbbdf64c46681c)\r\n\r\n### Trippple threat\r\n```py\r\nfrom typing import TypeVar, overload, _T as T\r\n\r\n@overload\r\ndef deco(fn: T) -> T: ...\r\n@overload\r\ndef deco() -> None: ...\r\n\r\ndef deco(fn=None): ...\r\n\r\n\r\ndef a() -> None:\r\n def b() -> None:\r\n 1 + \"\"\r\n d\r\n d = 1\r\n c()\r\n\r\n\r\n@deco\r\ndef c(): ...\r\n```\r\n```\r\nmain.py: note: In function \"a\":\r\nmain.py:13: error: Unsupported operand types for + (\"int\" and \"str\")\r\nmain.py: note: In function \"b\":\r\nmain.py:13: error: Unsupported operand types for + (\"int\" and \"str\")\r\nmain.py: note: In function \"a\":\r\nmain.py:13: error: Unsupported operand types for + (\"int\" and \"str\")\r\n```\r\n[playground](https://mypy-play.net/?mypy=latest&python=3.10&flags=show-error-context&gist=182a57468837790914e421104016fd22)","author":{"url":"https://github.com/KotlinIsland","@type":"Person","name":"KotlinIsland"},"datePublished":"2022-08-26T01:41:51Z","url":"https://github.com/python/mypy/issues/13517"}
| 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:e7d5b89b-06a7-194d-bc3a-66f0ac4c0a70 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AFEA:1F5A:1F9A0B:30BBF2:6B0032DC |
| html-safe-nonce | b7031668ac48426555e410161cdda151272a073e1b59ad21c467c37b2690c0f7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkVBOjFGNUE6MUY5QTBCOjMwQkJGMjo2QjAwMzJEQyIsInZpc2l0b3JfaWQiOiI0NjY0NDM1NTYxOTg4MjI2MjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4e0599004fd042e740c2ac048777c60788d2ad190ba85a437db468779e3ed959 |
| hovercard-subject-tag | issue:1351623862 |
| 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/13517/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a1dbe4e85177ca3c4fb4a58e744dc421725d6379498910437594ae65eeff8394/python/mypy/issues/13517 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a1dbe4e85177ca3c4fb4a58e744dc421725d6379498910437594ae65eeff8394/python/mypy/issues/13517 |
| og:image:alt | Doubble trouble def a() -> None: def b() -> None: 1 + "" d d = 1 main.py: note: In function "a": main.py:3: error: Unsupported operand types for + ("int" and "str") main.py: note: In function "b": ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KotlinIsland |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width