PyCQA / PyCQA/docformatter

Inconsistent extra blank line after function docstring?

Open
#345 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C: convention P: bug U: high
Dominant language
Python
Stars
598
Forks
93
PR merge metrics
No merged PRs in 30d

Description

Using docformatter==1.7.8, I now get the following diff using the below config.

I'm not sure what is happening. I would expect them to both have the extra line or not based on blank value, but not have a mix of them.

[docformatter]
recursive = true
wrap-descriptions = 0
wrap-summaries = 120
make-summary-multi-line = True
pre-summary-newline = True
blank = False

https://github.com/crim-ca/weaver/blob/13714bfc6e4093ca91e04fa6153c91677ede6e6c/weaver/execute.py#L265-L266

Image

https://github.com/crim-ca/weaver/blob/13714bfc6e4093ca91e04fa6153c91677ede6e6c/weaver/execute.py#L176-L178

Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported formatting with docformatter==1.7.8, the configuration in the issue, and the two linked sections of weaver/execute.py. Compare how the formatter handles the extra blank line after each function docstring when blank = False; done means the behavior is consistent with the documented setting and covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.