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

fix: additional newline added to docstring when the previous line length is less than the line length limit minus 1 #4185

Merged
merged 10 commits into from
Feb 5, 2024

Conversation

veryslowcode
Copy link
Contributor

Description

 This resolves the issue mentioned in issue #4180, where a newline will
 be added to a docstring comment (that is approaching the line limit),
 even if the docstring contains a newline before the closing quotes.

Checklist - did you ...

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

src/black/linegen.py Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Jan 28, 2024

diff-shades results comparing this PR (8a42112) to main (632f44b). The full diff is available in the logs under the "Generate HTML diff report" step.

╭─────────────────────── Summary ────────────────────────╮
│ 5 projects & 9 files changed / 9 changes [+0/-9]       │
│                                                        │
│ ... out of 2 530 293 lines, 12 163 files & 22 projects │
╰────────────────────────────────────────────────────────╯

Differences found.

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

@veryslowcode
Copy link
Contributor Author

I see that diff-shades detected changes, but they appear to be the intended changes based on the original issue. If there is anything remaining that needs to be done/changed, please let me know and I am happy to do so.

Copy link
Collaborator

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is close to being ready.

src/black/mode.py Show resolved Hide resolved
src/black/linegen.py Outdated Show resolved Hide resolved
@JelleZijlstra JelleZijlstra merged commit 7edb50f into psf:main Feb 5, 2024
46 checks passed
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.

2 participants