PyCQA / docformatter

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

release: v1.7.0 [Community Feedback] #199

Closed weibullguy closed 1 year ago

weibullguy commented 1 year ago

Tracker for issues related to release v1.7.0 (see #197). Please report all issues encountered while using the v1.7.0 release candidates here.

Release v1.7.0 includes:

Pre-releases for v1.7.0 are available or release candidates can be installed using pip:

pip install git+https://github.com/pycqa/docformatter@v1.7.0-rc1

where the rc1 would be replaced by the release candidate you'd like to use.

seisman commented 1 year ago

Please see if this is a bug:

Python code:

def test_docformatter_v1.7.0()
    """
    This is a short desription.

    Here is a link to the github issue
    https://github.com/PyCQA/docformatter/issues/199

    This is a long description.
    """
    pass

Diff output after running docformatter:

$ docformatter --pre-summary-new --make-summary-multi-line test.py       
--- before/test.py
+++ after/test.py
@@ -4,7 +4,7 @@

     Here is a link to the github issue
     https://github.com/PyCQA/docformatter/issues/199
-
+    
     This is a long description.
     """
     pass
weibullguy commented 1 year ago

@seisman it is and it's fixed in v1.7.0-rc2.

seisman commented 1 year ago

One more potential issue using v1.7.0-rc2:

Code:

def func():
    """
    This is a description.

    Example code::

        config(par=value)

    Example code2::

        with config(par=value) as f:
            pass
    """

Diff output:

$ docformatter --pre-summary-new --make-summary-multi-line test.py
--- before/test.py
+++ after/test.py
@@ -4,10 +4,9 @@

     Example code::

-        config(par=value)
+    config(par=value)

     Example code2::

-        with config(par=value) as f:
-            pass
+    with config(par=value) as f:     pass
     """
weibullguy commented 1 year ago

@seisman thanks for the bug hunting. The second one is fixed in v1.7.0-rc3.

seisman commented 1 year ago

Now, v1.7.0-rc3 works well for our PyGMT project.

krzysztof3-wisniewski commented 1 year ago

pre-commit to make sure it doesn't contain any obvious regressions has dedicated test suite which runs it on many open source repositories. Does docformatter have similar test suite? If it doesn't, what do you think about this idea?