-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Pydantic models should not trigger too-few-public-methods #3370
Comments
Thanks, at this point we can probably add an option to skip |
That sounds great. Note that pydantic comes also with a dataclass implementation that supports validation. It might make sense to look into supporting this as well. |
Any updates on this issue? 🙂 |
Please set "help wanted" tag to search for someone who can fix this issue |
I'm game to take a crack at this, but I'm uncertain if it's acceptable to add the |
We're trying not to add packages to the tests requirements right now. I think at this point it could be a configurable option to add classes that should be ignored by this check. This way we could test with any classes even one we created specifically for the test and easily add other similar classes. |
I like this - something like this?
? |
Looks great ! How would we handle multiple values ? filter separated by comma, a regex ? |
I guess following the existing patterns, it'd be a comma-separated list of module names/prefixes. |
Allow excluding classes based on their ancestors from the ``too-few-public-methods`` checker. Closes #3370 Signed-off-by: Mike Fiedler <miketheman@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
Is your feature request related to a problem? Please describe
Pylint triggers too-few-public-methods for pydantic models.
They are very similar to dataclasses which got special treatment in #3025
Describe the solution you'd like
Pylint should not emit too-few-public-methods for pydantic models or provide a mechanism so pydantic can declare this exception.
Additional context
The text was updated successfully, but these errors were encountered: