-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Conversation
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.
|
@@ -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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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>
@JelleZijlstra thank you for taking the efforts / with your help we now "back to black" :) |
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>
Fixes #4043