-
Notifications
You must be signed in to change notification settings - Fork 187
Add Google docstring convention #275
Comments
@Nurdok , How about 'dem entry points? 😄 |
Are there really much projects using Google style? I couldn't find even 5. It's poorly documented and doesn't have syntax for complex types such as List[Tuple(int, float)]. |
What's bothers me more is that current style checker makes no distinction between Numpy and Google style docstrings. |
@anotherbugmaster could you elaborate? |
Yea I was looking for google style also. It would be nice if it would enforce rules like google section rules ending in ":" (best i can get currently is disabling 406 and 407), and e.g. Args, Raises, and Returns section bodys being indented, and each line being formatted like
|
@shacharoo They look similar, but definitely not the same. Here are the main differences:
So, if one wants a correct rendering of type annotations for Python 2, she should stick with Numpy Style. Otherwise, of course, it doesn't really matter. In my case I really want to have those types and Google Style should be prohibited. |
@anotherbugmaster yes, I know they are not the same convention 😄 |
Nope, at least in some cases it won't. I'll provide you with an example later. |
Is there interest in adding Google's convention to pydocstyle? Getting it |
Is this a open source issue? Might be down to put in some hours to support Google's convention as well @ermik |
@gunny-probably Pydocstyle is indeed open source. PRs welcome! 😄 |
Currently there is no error if the input arguments are not listed at all in the docstring or if the format is different. |
Checking in to see if anyone is working on this? |
@demus not that I'm aware. |
Started working on it here: https://github.com/demus/pydocstyle/tree/google-style-docstrings |
Jumping back in after a long time in a lot of projects. @demus I'd be glad to take part somehow. |
@demus any progress so far? Would be nice to have google style docstring supported. |
Especially if it would enforce that all parameters of a function are mentioned in the docstring. That’s probably the most required feature.
… On 11 Apr 2019, at 04:20, Eterna2 ***@***.***> wrote:
@demus any progress so far? Would be nice to have google style docstring supported.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
If no one else is working on this actively, I would like to take this up. |
Since the actual convention is pretty loosely defined, I started a PR draft here - |
My bad, I haven't made progress on this. I learned that a large percentage of the "section" test code needs to be refactored since it is specific to the |
I am done with a basic implementation in #357 Will continue to add features over time. |
Is it possible to assert that all function parameters are mentioned in the docstring?
… On 21 Apr 2019, at 20:29, Sambhav Kothari ***@***.***> wrote:
I am done with a basic implementation in #357
Will continue to add features over time.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@dickreuter that is on my TODO list, but the current PR is getting big and I don't want to add more features to it. I will create those PRs once the current one is reviewed. |
@dickreuter I was able to squeeze in the function arg check with surprisingly less amount of code. |
@Nurdok I guess this can now be closed? |
There are lots of projects out there using the google docstring convention. Given numpy has been recently added under #129, this is a request to add the google docstring convention.
Comparison between the two can be found here.
The text was updated successfully, but these errors were encountered: