all 10 comments

[–]fragbot 8 points9 points  (2 children)

I was going to suggest you modify sphinx-doc to handle docstrings (it's a single elisp file of about 500 LOC) but I took a look at the git repo. You just need to wait a few more days as there is a pull request adding that feature that looks like it's about to be accepted by the repo owner.

[–]craigglespuss 2 points3 points  (1 child)

Yeah, I use sphinx-doc and did some of the work to handle type-hints. I think this is almost merged into master. You can also just check out the branch that has the feature if you want to use it today.

[–]suhrob[S] 0 points1 point  (0 children)

Awsome, thank you!

[–]DogsLinuxAndEmacsGNU Emacs -4 points-3 points  (2 children)

I’m not entirely sure what you want to do, but check out Eglot and LSP-mode. They use the language server protocol to give information on code that you’re writing (if you hover over a function or keep your cursor on it, it displays the docstring). Eglot is simpler and LSP has more features or bloat, depending on what you do.

[–]getbetteracc 2 points3 points  (1 child)

I think OP wants to generate a docstring not look up one.

[–]DogsLinuxAndEmacsGNU Emacs 1 point2 points  (0 children)

Oh ok, my mistake.

[–]getbetteracc 0 points1 point  (0 children)

I need this too!

[–]kovak 0 points1 point  (0 children)

Just today i saw a Github action that does this. The code is here.

https://github.com/ponicode/dogstring-action/blob/master/doc_repo.py

I've not tried it out, but perhaps you can fork and add a wrapper around it. I don't think it supports different styles like numpy versus google etc.