-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Two blank lines after an import should be reduced to one #4489
base: main
Are you sure you want to change the base?
Two blank lines after an import should be reduced to one #4489
Conversation
I got an email about this job failure but looks like all the checks are passing on the PR https://github.com/psf/black/actions/runs/11377698063/job/31652281800 is this something that needs to be addressed? |
Interesting, I suspect some change to how GitHub handles artifacts. Not sure why it doesn't show up here. |
I got this same error again on the rerun of the workflows https://github.com/psf/black/actions/runs/11483099904/job/31957735676 and seems to be because there's no artifact in this workflow https://github.com/psf/black/actions/runs/11412528080 with the file name https://github.com/psf/black/blob/main/.github/workflows/diff_shades.yml#L130:
|
Description
Hey! Trying to contribute for the first time to the project so let me know if I'm missing anything :)
I've implemented changes to address this issue #2020 where there's some inconsistency around how many lines are added after an import. I've added 2 test cases showing that if there is more than 1 blank line between the import and the next line that it is now being reduced to one. One test case was failing because it had in its expected outout 2 lines between the import and following statement, so I think modifying the test case now that it should always be one makes sense.
Checklist - did you ...
CHANGES.md
if necessary?