Skip to main content
edited tags
Link
Drew
  • 79.1k
  • 10
  • 123
  • 257

Emacs lisp Library for automatically inserting python docstring in Google style

Source Link
sy2
  • 123
  • 1
  • 1
  • 4

Emacs lisp for automatically inserting python docstring in Google style

I'm looking for an elisp package that automatically inserts Python docstring for a method. I found a package, which is very close to my purpose. But it's in reStructured text, not in Google style.

sphinx-doc.el https://github.com/naiquevin/sphinx-doc.el

Describing arguments in docstrings (Google python style guide) https://www.chromium.org/chromium-os/python-style-guidelines#TOC-Describing-arguments-in-docstrings

My expectation is when I call M-x sphinx-doc-google within the following function,

def some_function(a, b, c):

I need a result like this.

def some_function(a, b, c):
    """
    Args:
        a:
        b:
        c:
    Returns:
    """

I know it's not difficult to implement by myself. I just want to ask this question to avoid the reinvention.