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

Black 24.1 no longer removes blanks within blocks #4193

Closed
xtfocus opened this issue Jan 29, 2024 · 1 comment
Closed

Black 24.1 no longer removes blanks within blocks #4193

xtfocus opened this issue Jan 29, 2024 · 1 comment
Labels
T: enhancement New feature or request

Comments

@xtfocus
Copy link

xtfocus commented Jan 29, 2024

I tried two black versions: black 24.1.1 and 23.3.0. Only the 23.3.0 version removes the REDUNDANT SPACE in the code below

   if not best_rate:
        # REDUNDANT SPACE
        print(f"No match found for {phone_number}")
    else:
        print(best_rate)

I cannot find where this change is documented in the change log here
I would love to know if this change is intended and why. Thanks

@xtfocus xtfocus added the T: enhancement New feature or request label Jan 29, 2024
@JelleZijlstra
Copy link
Collaborator

The relevant change is "Allow empty first lines at the beginning of most blocks (#3967, #4061)". We started removing these blank lines in Black 23 and lots of people complained, so we decided to stop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants