-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Check GL08 on class __init__ constructors #591
Comments
In case it wasn't clear, |
That makes sense to me. |
Hey all (@larsoner, @stefanv), I have re-opened the issue as the current implementation is not working with the When we improved the class constructor init GL08 reporting, we only wrote tests for the However, under the implementation of the abstract syntax tree (ast) validator ( Here's the way we get currently (roughly) get the class reference from the constructor:
Any ideas what we should do for the The
This seems quite convoluted just to get the parent class for the constructor. What are your thoughts? |
Further discussion on this, should all tests in test_validate also be written/run with AstValidator in mind? |
I was looking for a way to skip GL08 checks on class constructors (
__init__
) throughout my code. This is particularly as the numpydoc recommendation for class strings documents the constructor:It seems that there ought to be a default check ignore for
__init__
constructors if no docstring has been provided (and if a class docstring has been provided). Obviously if an (optional) docstring for__init__
has been created, then it ought to be checked.This conditional checking doesn't seem possible with the default
override_<code>
,exclude
toml tags.Keen to hear others thoughts!
The text was updated successfully, but these errors were encountered: