How to check spelling of python docstring with emacs?

I would like to run a spell check on the docstrings of my Python code, if possible, from emacs.

I found the ispell-check-comments parameter, which can be used to spell only comments in code, but I couldn’t target only docstrings, which are pretty python specific.

+6
python emacs docstring spell-checking
source share
1 answer

I recommend you try flyspell mode. You can use something like:

(add-hook 'python-mode-hook' flyspell-prog-mode)

in your Emacs configuration.

+13
source share

All Articles