Closed weibullguy closed 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
@seisman it is and it's fixed in v1.7.0-rc2.
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
"""
@seisman thanks for the bug hunting. The second one is fixed in v1.7.0-rc3.
Now, v1.7.0-rc3 works well for our PyGMT project.
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?
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:
--black
that causesdocformatter
to format compatible withblack
(see #94).--no-cap
for user to provide list of words not to capitalize when they appear as the first word in the summary (see #193).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.