-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 introduces E302 with a Comment at Line 0 and no Imports #40
Comments
Thanks for your report, I will be dealing with empty lines for the next release! |
Thanks for the quick turn-around! Do you have a donation link? |
Thanks for asking! I appreciate that. I don't intend to make money by working on Black. I invite you to donate to the Python Software Foundation instead. This organization protects our trademarks, sponsors development sprints and conferences, and so on. |
Oh I'm already a donor to PSF. I'll have to increase my donation! :) |
This is now fixed in 18.3a3! Thanks! ✨ 🍰 ✨ |
I'm not sure if this is a regression, or if classes are handled differently, but I have the following code: newline here
newline here
# -----
# something
# -----
class FooState:
YES = "yes"
NO = "no" which no newlines at all
# -----
# something
# -----
class FooState:
YES = "yes"
NO = "no" which results in:
Should I open a new issue? Is this expected behavior and |
flake8 is wrong, you don't have to have those pointless empty new lines at the start of the file. |
I figured as much. I disabled E302 given I want to let |
Operating system: Debian 9
Python version: 3.6.4
Black version: black.py, version 18.3a2
Black converts this:
into this:
which causes this:
The text was updated successfully, but these errors were encountered: