Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove blank lines before class docstring #3692

Merged

Conversation

jonathanberthias
Copy link
Contributor

@jonathanberthias jonathanberthias commented May 18, 2023

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

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>
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