Skip to content

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

@rmartin16

Description

@rmartin16

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: styleRelates to docstring format style (e.g., Google, NumPy, Sphinx)P: bugPEP 257 violation or existing functionality that doesn't work as documented

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions