docformatter
docformatter copied to clipboard
Ignoring specific line
In my project doctstrings, I have some sphinx style notes. In consequence, I have a line break just after .. note::
as shown hereafter:
def foo():
"""
Fancy doc
More details.
.. note::
Some notes.
"""
pass
However, when I run docformatter
with these options r -i --pre-summary-newline --make-summary-multi-line --wrap-summaries 90 --wrap-descriptions 90
it outputs:
def foo():
"""
Fancy doc
More details.
.. note:: Some notes.
"""
pass
even when I exclude the affected files.
Is there a way to ignore specific lines?
There is no way to ignore specific lines at the moment. The issue with Sphinx directives will be addressed with #60.
+1 on specific line ignores! I want to add this to the Astropy CI, but the option to ignore specific lines — e..g. by docfmt: +SKIP
or noqa: DOC101
or something — is a must to support some of our runtime docstring processing.
The specific problem that was reported actually has to do with handing reST directives. There are any number of other issues related to reST directives. The requested solution (and the +1) is essentially the same as #144, so I'm going to close this issue to #144.