Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow empty lines at beginning of blocks (again) #4060

Merged
merged 6 commits into from
Dec 10, 2023

Conversation

JelleZijlstra
Copy link
Collaborator

Fixes #4043

Copy link

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

╭─────────────────────── Summary ────────────────────────╮
│ 2 projects & 8 files changed / 9 changes [+9/-0]       │
│                                                        │
│ ... out of 2 522 730 lines, 11 793 files & 23 projects │
╰────────────────────────────────────────────────────────╯

Differences found.

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

@@ -684,18 +684,14 @@ def _maybe_empty_lines(self, current_line: Line) -> Tuple[int, int]:
return 0, 1
return before, 1

# In preview mode, always allow blank lines, except right before a function
Copy link
Collaborator

Choose a reason for hiding this comment

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

Btw a few lines up we have and current_line.is_triple_quoted_string. Should that also use is_docstring? Seems preferable to have consistent behaviour for single quote docstrings as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I don't really understand why we sometimes use one and sometimes the other. I'll merge this first and then maybe make another preview style change harmonizing between these two.

@JelleZijlstra JelleZijlstra merged commit 61b529b into psf:main Dec 10, 2023
45 of 46 checks passed
@JelleZijlstra JelleZijlstra deleted the 241a1 branch December 10, 2023 02:29
return42 added a commit to return42/searxng that referenced this pull request Mar 8, 2024
The issue discussed in [1] has been solved since [2] has been merged into black
/ now we can upgrade without touching 69 files as it was needed with black
23.1.0 [3].

[1] searxng#2159 (comment)
[2] psf/black#4060
[3] https://github.com/searxng/searxng/pull/2159/files

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@return42
Copy link

return42 commented Mar 8, 2024

@JelleZijlstra thank you for taking the efforts / with your help we now "back to black" :)

return42 added a commit to searxng/searxng that referenced this pull request Mar 9, 2024
The issue discussed in [1] has been solved since [2] has been merged into black
/ now we can upgrade without touching 69 files as it was needed with black
23.1.0 [3].

[1] #2159 (comment)
[2] psf/black#4060
[3] https://github.com/searxng/searxng/pull/2159/files

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@JelleZijlstra JelleZijlstra restored the 241a1 branch September 10, 2024 23:36
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Newlines after code block open, once and for all?
3 participants