Bug report
Bug description:
from dataclasses import dataclass
@dataclass
class PostInit:
def __post_init__():
pass
PostInit()
will yield this error message:
TypeError: PostInit.__post_init__() takes 0 positional arguments but 1 was given
where it should read:
TypeError: PostInit.__post_init__() takes 1 positional argument but 0 were given
CPython versions tested on:
3.14, 3.12, 3.13
Operating systems tested on:
macOS