Skip to content

Remove blank lines before class docstring - #3692

Merged
JelleZijlstra merged 1 commit into
psf:mainfrom
jonathanberthias:no-blanks-before-class-docstring
May 18, 2023
Merged

JelleZijlstra merged 1 commit into
psf:mainfrom
jonathanberthias:no-blanks-before-class-docstring

Conversation

@jonathanberthias

@jonathanberthias jonathanberthias commented May 18, 2023 •

Copy link
Copy Markdown
Contributor

Description

Fixes #3659

Since #3035, the blank lines between a function and its docstring are removed. The class docstring is special cased in the code to leave one blank line after, so that change has no effect. This PR fixes that.

BTW, I couldn't find a test for the function case so I added one just to be sure it doesn't regress :)

Checklist - did you ...

  • Add an entry in CHANGES.md if necessary?
  • Add / update tests if necessary?
  • Add new / update outdated documentation?

@github-actions

Copy link
Copy Markdown
Contributor

diff-shades results comparing this PR (710c843) to main (db3668a). The full diff is available in the logs under the "Generate HTML diff report" step.

╭─────────────────────── Summary ────────────────────────╮
│ 3 projects & 43 files changed / 146 changes [+0/-146]  │
│                                                        │
│ ... out of 2 447 818 lines, 11 612 files & 23 projects │
╰────────────────────────────────────────────────────────╯

Differences found.

What is this? | Workflow run | diff-shades documentation

@JelleZijlstra
JelleZijlstra self-requested a review May 18, 2023 15:42
@JelleZijlstra
JelleZijlstra merged commit 2fd9d8b into psf:main May 18, 2023
jsh9 added a commit to jsh9/cercis that referenced this pull request May 21, 2023
commit eedfc38
Author: Jason R. Coombs <jaraco@jaraco.com>
Date:   Fri May 19 13:00:29 2023 -0400

    Avoid EncodingWarning in blib2to3 (psf#3696)

commit 2fd9d8b
Author: Jonathan Berthias <jvberthias@gmail.com>
Date:   Fri May 19 01:57:17 2023 +0200

    Remove blank lines before class docstring (psf#3692)

commit db3668a
Author: Ray Bell <rayjohnbell0@gmail.com>
Date:   Tue May 16 22:47:45 2023 -0400

    Sort DEFAULT_EXCLUDES and add .vscode, .pytest_cache and .ruff_cache (psf#3691)

    Co-authored-by: Ray Bell <ray.bell@dtn.com>
@konstin konstin mentioned this pull request Nov 14, 2023
27 of 28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blank lines before class docstring are not removed

2 participants