mypy
9511daa6 - Support better `__post_init__` method signature for `dataclasses` (#15503)

Commit
3 years ago
Support better `__post_init__` method signature for `dataclasses` (#15503) Now we use a similar approach to https://github.com/python/mypy/pull/14849 First, we generate a private name to store in a metadata (with `-`, so - no conflicts, ever). Next, we check override to be compatible: we take the currect signature and compare it to the ideal one we have. Simple and it works :) Closes #15498 Closes #9254 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
Author
Parents
Loading