Title: # type: ignore doesn't work on wrapped lines · Issue #8905 · python/mypy · GitHub
Open Graph Title: # type: ignore doesn't work on wrapped lines · Issue #8905 · python/mypy
X Title: # type: ignore doesn't work on wrapped lines · Issue #8905 · python/mypy
Description: def _exception_handler(self, loop: asyncio.AbstractEventLoop, context: Mapping[str, Any]) -> None: # type: ignore[misc] In this example, the error produced is error: Explicit "Any" is not allowed [misc]. It says the error is on line 1, b...
Open Graph Description: def _exception_handler(self, loop: asyncio.AbstractEventLoop, context: Mapping[str, Any]) -> None: # type: ignore[misc] In this example, the error produced is error: Explicit "Any" is not allowed [...
X Description: def _exception_handler(self, loop: asyncio.AbstractEventLoop, context: Mapping[str, Any]) -> None: # type: ignore[misc] In this example, the error produced is error: Explicit "Any" is ...
Opengraph URL: https://github.com/python/mypy/issues/8905
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"# type: ignore doesn't work on wrapped lines","articleBody":"```\r\ndef _exception_handler(self, loop: asyncio.AbstractEventLoop,\r\n context: Mapping[str, Any]) -\u003e None: # type: ignore[misc]\r\n```\r\nIn this example, the error produced is `error: Explicit \"Any\" is not allowed [misc]`.\r\nIt says the error is on line 1, but clearly is on line 2.\r\nThat's not a problem in itself, I assume it's just treating the wrapped line as a single line.\r\n\r\nHowever, the ignore comment, which is on the correct line, is not recognised by Mypy unless it is moved to the first line. If Mypy is going to treat wrapped lines as a single line, then the comments should also get wrapped to that same line.","author":{"url":"https://github.com/Dreamsorcerer","@type":"Person","name":"Dreamsorcerer"},"datePublished":"2020-05-27T18:58:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/8905/mypy/issues/8905"}
| 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:fff006e4-36f3-c510-1ecb-45544b3265e3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E880:245004:61C07BA:8A059E8:6A574BF1 |
| html-safe-nonce | 9e3f2ebb89ce3299177930589d4753fbbf31f5ebbade96ecaa7a3353347fe033 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODgwOjI0NTAwNDo2MUMwN0JBOjhBMDU5RTg6NkE1NzRCRjEiLCJ2aXNpdG9yX2lkIjoiNTYxNDAwNjM5OTI1NDYxMjk3NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ed52c82e9b155f924830a2a4efeb9b805232d33b960f1878c395ec4e3c6f4ab5 |
| hovercard-subject-tag | issue:625949299 |
| 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/8905/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bd2b6f0b8b1efbc5e9dd9b4c5ab8183319fd66b87ed88e35ea05130dac838d1f/python/mypy/issues/8905 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bd2b6f0b8b1efbc5e9dd9b4c5ab8183319fd66b87ed88e35ea05130dac838d1f/python/mypy/issues/8905 |
| og:image:alt | def _exception_handler(self, loop: asyncio.AbstractEventLoop, context: Mapping[str, Any]) -> None: # type: ignore[misc] In this example, the error produced is error: Explicit "Any" is not allowed [... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Dreamsorcerer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98 |
| 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 | 602250ea3b6dd8302a7220ef98adb828dbc807e4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width