-
Notifications
You must be signed in to change notification settings - Fork 16
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
Allow more control over--skip-checking-short-docstrings
#112
Comments
I like the 2nd and the 3rd idea, and I will find time to implement them. For the 1st idea, I think it may cause the code logic and the user experience too complex. Specifically, right now, the only way to skip writing the |
Cool, thanks! I can understand the goal of keeping things simple, maybe another option would be to remove In the current state, at for us The convenience of being able to skip redundant information is still very useful. So what about something like:
3,
So there is a small overlap between 1 and 3, but it is still well defined and I think very useful. If no overlap is desired at all, then I think keeping 1 is actually more useful than 3, as 3 is more rare and for the most common cases using All For checking the UPDATE: Changed options to use |
Hi @llucax , Sorry for the delayed reply. I've had some time to rethink these feature requests that you made, and here is what I think now:
On the contrary, it's natural to require all arguments and all exceptions to be properly checked, so people don't really need to remember any special configs (such as |
Fair enough. Do you think the other part of this issue is still useful? I mean checking for missing |
The --skip-checking-short-docstrings is extremely convenient to keep documentation of simple methods very short and avoid redundancy, but it comes with a cost. When enabled, it can lead to a lot of unintended missing documentation.
It would be good to be able to have more control over what's accepted and what's not. For example:
Maximum amount of arguments a function can have omitting the
Args
section, not countingself
(for example, a simple function, like a setter, with just 1 or 2 argument it is very likely properly documented when omittingArgs
, but a function with, say 3 or more is highly unlikely that's OK to skip theArgs
.Option to still require
Raises
if the function raises exceptions and--skip-checking-short-docstrings
is enabled. It is highly unlikely that's OK to not document raised exceptions. Alternatively it could take a list of exceptions that are OK to skip, if the list is empty, then no exceptions can be skipped (for example, it might be OK to omitValueError
, but not other exceptions).Option to allow not documenting, or documenting only with a summary line, dunder methods (
__str__
,__repr__
,__sum__
, etc.). This is because these methods are well defined elsewhere, so probably documenting them is redundant in most cases. An exception list is also probably needed, and should default to__init__
,__new__
and__init_subclass__
(am I missing anything else?), as these methods have variable arguments which are very important to document.The text was updated successfully, but these errors were encountered: