Title: "too many class plugin hook passes" error on `dataclass` with `Final` property that uses `field` · Issue #13377 · python/mypy · GitHub
Open Graph Title: "too many class plugin hook passes" error on `dataclass` with `Final` property that uses `field` · Issue #13377 · python/mypy
X Title: "too many class plugin hook passes" error on `dataclass` with `Final` property that uses `field` · Issue #13377 · python/mypy
Description: from dataclasses import dataclass, field from typing import Final @dataclass class Foo: a: Final = field(default=1) Traceback (most recent call last): File "/opt/python3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main return ...
Open Graph Description: from dataclasses import dataclass, field from typing import Final @dataclass class Foo: a: Final = field(default=1) Traceback (most recent call last): File "/opt/python3.9/lib/python3.9/runpy.py", ...
X Description: from dataclasses import dataclass, field from typing import Final @dataclass class Foo: a: Final = field(default=1) Traceback (most recent call last): File "/opt/python3.9/lib/python3.9/runpy....
Opengraph URL: https://github.com/python/mypy/issues/13377
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"too many class plugin hook passes\" error on `dataclass` with `Final` property that uses `field`","articleBody":"```py\r\nfrom dataclasses import dataclass, field\r\nfrom typing import Final\r\n\r\n@dataclass\r\nclass Foo:\r\n a: Final = field(default=1)\r\n```\r\n```\r\nTraceback (most recent call last):\r\n File \"/opt/python3.9/lib/python3.9/runpy.py\", line 197, in _run_module_as_main\r\n return _run_code(code, main_globals, None,\r\n File \"/opt/python3.9/lib/python3.9/runpy.py\", line 87, in _run_code\r\n exec(code, run_globals)\r\n File \"/layers/google.python.pip/pip/lib/python3.9/site-packages/mypy/__main__.py\", line 34, in \u003cmodule>\r\n console_entry()\r\n File \"/layers/google.python.pip/pip/lib/python3.9/site-packages/mypy/__main__.py\", line 12, in console_entry\r\n main(None, sys.stdout, sys.stderr)\r\n File \"mypy/main.py\", line 96, in main\r\n File \"mypy/main.py\", line 173, in run_build\r\n File \"mypy/build.py\", line 154, in build\r\n File \"mypy/build.py\", line 230, in _build\r\n File \"mypy/build.py\", line 2729, in dispatch\r\n File \"mypy/build.py\", line 3087, in process_graph\r\n File \"mypy/build.py\", line 3179, in process_stale_scc\r\n File \"mypy/semanal_main.py\", line 86, in semantic_analysis_for_scc\r\n File \"mypy/semanal_main.py\", line 404, in apply_class_plugin_hooks\r\nAssertionError: Internal error: too many class plugin hook passes\r\n```\r\n[playground](https://mypy-play.net/?mypy=latest&python=3.10&gist=af129da8420a93c4c256d295f674e5c4)\r\n\r\nrelated: #10090","author":{"url":"https://github.com/DetachHead","@type":"Person","name":"DetachHead"},"datePublished":"2022-08-11T05:54:18Z","url":"https://github.com/python/mypy/issues/13377"}
| 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:cec8fca2-f941-28cb-c1fb-c5177cefda5d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C0E6:2AD163:235D98F:301574A:6B002CB3 |
| html-safe-nonce | 1feaa38661ee7fd30cf7d572df235911d8ca248398d1ae3a7dfda89d0ea1decd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMEU2OjJBRDE2MzoyMzVEOThGOjMwMTU3NEE6NkIwMDJDQjMiLCJ2aXNpdG9yX2lkIjoiMzY5NDcyODk0NTExNjEzMDQ4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0379530dca0c887d7b7c20a190434b104238a14ec4692222782aecf5af3a330c |
| hovercard-subject-tag | issue:1335502339 |
| 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/13377/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fa2abf79363ce4232af2427e217c9eb6f88ee8a064d99b42c98459e8aad81d93/python/mypy/issues/13377 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fa2abf79363ce4232af2427e217c9eb6f88ee8a064d99b42c98459e8aad81d93/python/mypy/issues/13377 |
| og:image:alt | from dataclasses import dataclass, field from typing import Final @dataclass class Foo: a: Final = field(default=1) Traceback (most recent call last): File "/opt/python3.9/lib/python3.9/runpy.py", ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DetachHead |
| 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