PyCQA / docformatter

Formats docstrings to follow PEP 257
https://pypi.python.org/pypi/docformatter
MIT License
524 stars 61 forks source link

v1.7.1 - Improper Whitespace Management for `:param :`/`:return:` Wrapping #217

Closed rmartin16 closed 1 year ago

rmartin16 commented 1 year ago

With v1.7.1, some of the :param : and :return: wrapping kept a lot of unnecessary whitespace.

Some examples:

@@ -163,9 +163,10 @@ class CreateCommand(BaseCommand):

         :param app: The config object for the app
         :return: A dictionary of document types, with the values being dictionaries
-            describing the icon sizes that the template supports. The inner dictionary
-            describes the path fragments (relative to the bundle path) for the images
-            that are required; the keys are the size of the splash images.
+                describing the icon sizes that the template supports. The inner
+                dictionary             describes the path fragments (relative to the
+                bundle path) for the images             that are required; the keys are
+                the size of the splash images.
         """
@@ -127,8 +127,9 @@ class BaseCommand(ABC):
         :param apps: Dictionary of project's Apps keyed by app name.
         :param base_path: Base directory for Briefcase project.
         :param data_path: Base directory for Briefcase tools, support packages, etc.
-        :param is_clone: Flag that Command was triggered by the user's requested Command;
-            for instance, RunCommand can invoke UpdateCommand and/or BuildCommand.
+        :param is_clone: Flag that Command was triggered by the user's requested
+                Command;             for instance, RunCommand can invoke UpdateCommand
+                and/or BuildCommand.
         """
         if base_path is None:
@@ -512,8 +512,8 @@ connection.
     def verify_system_image(self, system_image):
         """Verify that the required system image is installed.

-        :param system_image: The SDKManager identifier for the system
-            image (e.g., ``"system-images;android-31;default;x86_64"``)
+        :param system_image: The SDKManager identifier for the system             image
+                (e.g., ``"system-images;android-31;default;x86_64"``)
         """
         # Look for the directory named as a system image.
         # If it exists, we already have the system image.
@@ -1040,8 +1040,8 @@ In future, you can specify this device by running:
         """Update the AVD configuration with specific values.

         :params avd: The AVD whose config will be updated
-        :params updates: A dictionary containing the new key-value to
-            add to the device configuration.
+        :params updates: A dictionary containing the new key-value to             add to
+                the device configuration.
         """
         avd_config = self.avd_config(avd)

Config:

  - repo: https://github.com/PyCQA/docformatter
    rev: v1.7.1
    hooks:
      - id: docformatter
        args: [--in-place, --black]
weibullguy commented 1 year ago

I can't reproduce these. Could you post a link to the PR or the file this docstring is in so I can make sure I'm using your whole docstring?

rmartin16 commented 1 year ago

Could you post a link to the PR or the file this docstring is in so I can make sure I'm using your whole docstring?

Sure thing; the scheduled CI finally ran for this today: https://github.com/beeware/briefcase/pull/1281

https://github.com/beeware/briefcase/pull/1281/files