vim-doge icon indicating copy to clipboard operation
vim-doge copied to clipboard

Numpy style: (optionally) exclude type annotations for PEP-484 compliant Python code

Open daturkel opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. According to Sphinx's documentation on Numpy docstrings, types can be excluded from the docstrings for parameters which are hinted in the function signature (not for the return object, however). While this doesn't seem to be explicitly called out in Numpy's own documentation documentation, it's a reasonable tweak and seems to be compatible with Sphinx's parsing of numpy docstrings.

Describe the solution you'd like It would be great if numpy style docstring generation respected this convention (perhaps behind an option flag to enable the behavior).

Describe alternatives you've considered An alternative could just be to include a numpy docstring style which never has types indicated for parameters (and assume the user will always be including type hints in the function signature).

daturkel avatar Nov 30 '20 15:11 daturkel

I can add a python-specific option for this later. I'm super busy lately, so please be patient. I'll try to implement this whenever I have time.

kkoomen avatar Dec 18 '20 04:12 kkoomen

No worries! I'll also take a look at the library in the coming weeks and see if this is something I can possibly contribute.

daturkel avatar Dec 18 '20 14:12 daturkel