docformatter fix does not consider parameters for added newlines
Maintainers usually reply within 1 day
@AtharvRG is already working on this.
Since Oct 31, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Reproduce the formatting with the configuration and command linked in setup.cfg and Makefile using docformatter v1.7.8, using the _publish_shapefile_request docstring as the example. Locate the logic that splits the summary and description and then inserts or indents parameter lines. Done means the description is followed by another newline and the :param entries retain their original indentation.
Written by the indexing model from the issue text.
Description
Given a sentence detected with a ., which gets split into summary/description (as it should), the result doesn't seem to check correctly if the newlines it introduces cause an invalid structure by placing the description right on top of some parameter description.
For some reason, it picks to indent the parameters, which is incorrect.
It should instead add another newline and leave the parameters as they were.
@geoserver_response_handling
def _publish_shapefile_request(self,
*,
workspace_name: str,
datastore_name: str,
filename: str,
) -> requests.Response:
"""
- Request to publish a shapefile in Geoserver. Does so by creating a `Feature type` in Geoserver.
+ Request to publish a shapefile in Geoserver.
- :param workspace_name: Workspace where file will be published
- :param datastore_name: Datastore where file will be published
- :param filename: Name of the shapefile (with no extensions)
- :returns: Response object
+ Does so by creating a `Feature type` in Geoserver.
+ :param workspace_name: Workspace where file will be published
+ :param datastore_name: Datastore where file will be published
+ :param filename: Name of the shapefile (with no extensions)
+ :returns: Response object
"""
...
using https://github.com/PyCQA/docformatter/releases/tag/v1.7.8
- Dominant language
- Python
- Stars
- 600
- Forks
- 107
- Avg merge
- 22h 15m
- Merged PRs (30d)
- 12
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PyCQA/docformatter
-
`--docstring-length` removes blank line after docstrings it doesn't format (ping-pong with ruff format / Black)Possibly taken @RClaudiuM claimed this 1 day ago. Openfresh
Difficulty 3/5 1-2 days Newbie friendliness 68/100
PyCQA/docformatter#420 ·
Maintainers usually reply within 1 day
-
fresh
Difficulty 3/5 1-2 days Newbie friendliness 66/100
PyCQA/docformatter#414 · 1 reaction ·
Maintainers usually reply within 1 day
-
BUG: Inconsistent behavior between `docformatter` and `black`May be free again @AtharvRG claimed this 25 days ago, and no pull request is open. Openfresh
Difficulty 3/5 1-2 days Newbie friendliness 58/100
PyCQA/docformatter#399 · 1 comment ·
Maintainers usually reply within 1 day
-
1.7.8 crashes with a tokenize ValueError on a multi-line f-string inside parenthesesMay be free again @adityaanikam claimed this 106 days ago, and no pull request is open. OpenC: convention P: bug U: high
Difficulty 3/5 1-2 days Newbie friendliness 74/100
PyCQA/docformatter#367 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
1.7.8 rewrites the contents of a non-docstring triple-quoted string, silently changing its valueOpenC: convention P: bug U: high
Difficulty 3/5 1-2 days Newbie friendliness 72/100
PyCQA/docformatter#366 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
All issues in PyCQA/docformatter
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
NatLabRockies/openstudio-mcp#286 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
intersystems/ipm#1338 ·
Maintainers usually reply within 1 day
-
separate_packages splits imports from the same explicitly configured packagePossibly taken @rahul05ranjan claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
The v0-through-v1 path derives ShutdownDuration its own way, silently overriding a user's definitionOpenv1
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day