Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
MAINT: Changed class constructor __init__ GL08 reporting #592
MAINT: Changed class constructor __init__ GL08 reporting #592
Changes from 9 commits
bd64a7d
998d72f
a43b5b9
cc5fe97
ea2c5e3
3f51f53
66818ea
b22eb3b
be2bd62
296043d
e0edc18
b7eb310
de00113
abe64b2
8fb92b5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We recommended only the class docstring before. How do documentation writers decide what to put in the two docstrings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above my introductory pay grade, but I would stick to recommending class docstring only? The changes only allow flexibility for a constructor docstring if desired.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes:
And all that :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@larsoner I don't know enough about current internals to know if this is how we do things; no utility functions / class methods for this purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like
Validator._load_obj(f"{doc.code_obj.__module__}.{doc.code_obj.__qualname__}")
might do it, or maybe simplerValidator._load_obj(doc.name[:-9])
could work. @mattgebert do you want to try it (probably the second one)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@larsoner I don't think the second one works;
doc.name[:-9]
isnumpydoc.tests.test_validate.__init__
when testingIncompleteConstructorDocumentedInClass.__init__
(is this expected for doc.name, not including the class name?). This means you can't resolve the class without the__qualname__
like you used in the first suggestion. Two equivalent options seem to be:Any preference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either seems okay, hopefully they're equivalent!