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

v1.7.1 - reST Class Reference Handling for :return: #215

Closed
rmartin16 opened this issue May 20, 2023 · 0 comments · Fixed by #219
Closed

v1.7.1 - reST Class Reference Handling for :return: #215

rmartin16 opened this issue May 20, 2023 · 0 comments · Fixed by #219
Labels
C: style Relates to docstring format style (e.g., Google, NumPy, Sphinx) P: bug PEP 257 violation or existing functionality that doesn't work as documented

Comments

@rmartin16
Copy link

rmartin16 commented May 20, 2023

v1.7.1 is incorrectly modifying several reST references for my :return: documentation.

@@ -2,7 +2,8 @@ def _session(self):
     """
     Create or return existing HTTP session.
 
-    :return: Requests :class:`~requests.Session` object
+    :return: Requests
+    :class: `~requests.Session` object
     """
     pass

Although, this one is not reformatted:

def torrents_upload_limit(self, torrent_hashes=None, **kwargs):
    """
    Retrieve the upload limit for one or more torrents.

    :param torrent_hashes: single torrent hash or list of torrent hashes. Or ``all`` for all torrents.
    :return: :class:`TorrentLimitsDictionary`
    """
    pass

Config:

  - repo: https://github.com/PyCQA/docformatter
    rev: v1.7.1
    hooks:
      - id: docformatter
        args: [--in-place, --pre-summary-newline, --black]

more examples: rmartin16/qbittorrent-api#210

@github-actions github-actions bot added the fresh This is a new issue label May 20, 2023
@weibullguy weibullguy added P: bug PEP 257 violation or existing functionality that doesn't work as documented C: style Relates to docstring format style (e.g., Google, NumPy, Sphinx) and removed fresh This is a new issue labels May 20, 2023
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: bug PEP 257 violation or existing functionality that doesn't work as documented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants