You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Syntax error in generated stub when using dataclass #15966
When I generate the file without --include-private than the stub is generated correctly.
Your Environment
Mypy version used: 1.5.1
Python version used: 3.11.4
Extra info
Also see KapJI/homeassistant-stubs#349 where this issue was raised.
These stubs are used in custom Home Assistant components, and currently this is broken.
This is also fixed by #15625 which is functional but still waiting on an answer on how to test a dataclass with a _: dataclasses.KW_ONLY field on pythons <3.10
Activity
JelleZijlstra commentedon Aug 26, 2023
cf. #15689 which fixed a similar bug in stubtest
hamdanal commentedon Aug 26, 2023
This is also fixed by #15625 which is functional
but still waiting on an answer on how to test a dataclass with a_: dataclasses.KW_ONLYfield on pythons <3.10stubgen: generate valid dataclass stubs (#15625)