Title: Crash with "Should never get here in normal mode" with incremental=True · Issue #3852 · python/mypy · GitHub
Open Graph Title: Crash with "Should never get here in normal mode" with incremental=True · Issue #3852 · python/mypy
X Title: Crash with "Should never get here in normal mode" with incremental=True · Issue #3852 · python/mypy
Description: I was working in a file, adding types and replacing attrs with typing.NamedTuple in order to benefit from types, when I got this crash: $ bin/mypy python/ Traceback (most recent call last): File "bin/mypy", line 33, in
Open Graph Description: I was working in a file, adding types and replacing attrs with typing.NamedTuple in order to benefit from types, when I got this crash: $ bin/mypy python/ Traceback (most recent call last): File "b...
X Description: I was working in a file, adding types and replacing attrs with typing.NamedTuple in order to benefit from types, when I got this crash: $ bin/mypy python/ Traceback (most recent call last): File &q...
Opengraph URL: https://github.com/python/mypy/issues/3852
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash with \"Should never get here in normal mode\" with incremental=True","articleBody":"I was working in a file, adding types and replacing [attrs](http://www.attrs.org/en/stable/) with `typing.NamedTuple` in order to benefit from types, when I got this crash:\r\n\r\n```\r\n$ bin/mypy python/\r\nTraceback (most recent call last):\r\n File \"bin/mypy\", line 33, in \u003cmodule>\r\n sys.exit(console_entry())\r\n File \"dist/lib/python3.6/mypy/__main__.py\", line 7, in console_entry\r\n main(None)\r\n File \"dist/lib/python3.6/mypy/main.py\", line 50, in main\r\n res = type_check_only(sources, bin_dir, options)\r\n File \"dist/lib/python3.6/mypy/main.py\", line 97, in type_check_only\r\n options=options)\r\n File \"dist/lib/python3.6/mypy/build.py\", line 196, in build\r\n graph = dispatch(sources, manager)\r\n File \"dist/lib/python3.6/mypy/build.py\", line 1801, in dispatch\r\n process_graph(graph, manager)\r\n File \"dist/lib/python3.6/mypy/build.py\", line 2037, in process_graph\r\n process_fresh_scc(graph, prev_scc)\r\n File \"dist/lib/python3.6/mypy/build.py\", line 2106, in process_fresh_scc\r\n graph[id].fix_cross_refs()\r\n File \"dist/lib/python3.6/mypy/build.py\", line 1547, in fix_cross_refs\r\n self.manager.options.quick_and_dirty)\r\n File \"dist/lib/python3.6/mypy/fixup.py\", line 22, in fixup_module_pass_one\r\n node_fixer.visit_symbol_table(tree.names)\r\n File \"dist/lib/python3.6/mypy/fixup.py\", line 105, in visit_symbol_table\r\n self.visit_type_info(value.node)\r\n File \"dist/lib/python3.6/mypy/fixup.py\", line 62, in visit_type_info\r\n base.accept(self.type_fixer)\r\n File \"dist/lib/python3.6/mypy/types.py\", line 435, in accept\r\n return visitor.visit_instance(self)\r\n File \"dist/lib/python3.6/mypy/fixup.py\", line 176, in visit_instance\r\n assert self.quick_and_dirty, \"Should never get here in normal mode\"\r\nAssertionError: Should never get here in normal mode\r\n```\r\n\r\nMy mypi.ini contained\r\n\r\n```\r\n[mypy]\r\nfollow_imports = silent\r\nincremental = True\r\n```\r\n\r\nHowever the error went away when I removed `incremental = True`.","author":{"url":"https://github.com/lordmauve","@type":"Person","name":"lordmauve"},"datePublished":"2017-08-21T15:05:08Z","url":"https://github.com/python/mypy/issues/3852"}
| 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:f290927f-0008-38be-d69f-0459cfdce2cc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 805A:1756E4:1053C2B:1554553:6B00054A |
| html-safe-nonce | 5d82f6cd61c5e8afcc54aaa39a71cd1b62a91acebdc240a329e4297848998674 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDVBOjE3NTZFNDoxMDUzQzJCOjE1NTQ1NTM6NkIwMDA1NEEiLCJ2aXNpdG9yX2lkIjoiNTcwNzU2MjU3NjY1Nzc3Nzk5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a154eb94fe0224c5cd852fcb619453e151f235d4f8886ea9b35fb36922b062ed |
| hovercard-subject-tag | issue:251686646 |
| 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/3852/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fb56179b12239a7a6262b5e3d9950cf79356db28d80b0c49df4975cce58e1e51/python/mypy/issues/3852 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fb56179b12239a7a6262b5e3d9950cf79356db28d80b0c49df4975cce58e1e51/python/mypy/issues/3852 |
| og:image:alt | I was working in a file, adding types and replacing attrs with typing.NamedTuple in order to benefit from types, when I got this crash: $ bin/mypy python/ Traceback (most recent call last): File "b... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lordmauve |
| 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