Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"too many class plugin hook passes" error on dataclass with Final property that uses field #13377

Closed
DetachHead opened this issue Aug 11, 2022 · 1 comment

Comments

@DetachHead
Copy link
Contributor

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 _run_code(code, main_globals, None,
  File "/opt/python3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/layers/google.python.pip/pip/lib/python3.9/site-packages/mypy/__main__.py", line 34, in <module>
    console_entry()
  File "/layers/google.python.pip/pip/lib/python3.9/site-packages/mypy/__main__.py", line 12, in console_entry
    main(None, sys.stdout, sys.stderr)
  File "mypy/main.py", line 96, in main
  File "mypy/main.py", line 173, in run_build
  File "mypy/build.py", line 154, in build
  File "mypy/build.py", line 230, in _build
  File "mypy/build.py", line 2729, in dispatch
  File "mypy/build.py", line 3087, in process_graph
  File "mypy/build.py", line 3179, in process_stale_scc
  File "mypy/semanal_main.py", line 86, in semantic_analysis_for_scc
  File "mypy/semanal_main.py", line 404, in apply_class_plugin_hooks
AssertionError: Internal error: too many class plugin hook passes

playground

related: #10090

@AlexWaygood
Copy link
Member

Although the repro is slightly different, this is exactly the same traceback as #10090 (comment), so I'm closing it as a duplicate of #10090 so that we can keep the discussion all in one place.

@AlexWaygood AlexWaygood closed this as not planned Won't fix, can't repro, duplicate, stale Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants