Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignoring specific line #82

Closed
ethiy opened this issue Feb 22, 2022 · 3 comments
Closed

Ignoring specific line #82

ethiy opened this issue Feb 22, 2022 · 3 comments
Labels
C: style Relates to docstring format style (e.g., Google, NumPy, Sphinx) P: enhancement Feature that is outside the scope of PEP 257 S: duplicate Closed as a duplicate issue or PR
Milestone

Comments

@ethiy
Copy link

ethiy commented Feb 22, 2022

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?

@weibullguy weibullguy added question Questions related to docformatter P: enhancement Feature that is outside the scope of PEP 257 and removed question Questions related to docformatter labels Jul 24, 2022
@weibullguy
Copy link
Member

There is no way to ignore specific lines at the moment. The issue with Sphinx directives will be addressed with #60.

@weibullguy weibullguy added the C: style Relates to docstring format style (e.g., Google, NumPy, Sphinx) label Aug 6, 2022
@weibullguy weibullguy added this to the v2.0.0 milestone Aug 21, 2022
@nstarman
Copy link

nstarman commented Jan 11, 2023

+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.

@weibullguy
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: style Relates to docstring format style (e.g., Google, NumPy, Sphinx) P: enhancement Feature that is outside the scope of PEP 257 S: duplicate Closed as a duplicate issue or PR
Projects
None yet
Development

No branches or pull requests

3 participants