Inconsistent extra blank line after function docstring?

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

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.

Description

C: convention P: bug U: high

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

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

  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.

More from PyCQA/docformatter

All issues in PyCQA/docformatter

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.