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 - Quoted URL String Broken by Line Length Leaving Quote on Previous Line #218

Closed rmartin16 closed 1 year ago

rmartin16 commented 1 year ago

With v1.7.1, encountered a case of a quoted string at the line length being broken leaving the quote on the previous line.

Maybe the fact it's a URL is playing a role here...

     def make_project_url(self, bundle, app_name):
         """Construct a candidate project URL from the bundle and app name.

-        It's not a perfect guess, but it's better than having
-        "https://example.com".
+        It's not a perfect guess, but it's better than having "
+        https://example.com".

         :param bundle: The bundle identifier.
         :param app_name: The app name.

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 this one, I get:

-    It's not a perfect guess, but it's better than having
-    "https://example.com".
+    It's not a perfect guess, but it's better than having "https://example.com".

Could you post a link to the PR or the file this docstring is in so I can make sure I'm using the 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 the 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#diff-d538de51047cebe61e3d51b1b421d2a126c262b04bef94302b97a68bfe3fe854L198