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

An empty file ends with a newline raise W391 blank line at end of file #1273

Closed
EeyoreLee opened this issue Dec 27, 2024 · 3 comments
Closed

Comments

@EeyoreLee
Copy link

The W391 rule specifies that Python files should end with a newline character. Does this not include empty files, such as __init__.py

@asottile
Copy link
Member

an empty file should be 0 bytes

@EeyoreLee
Copy link
Author

@asottile - I couldn't find any instructions regarding empty files in PEP8, and flake8rules said any file should not have zero, two or more than two newline in python file.

@asottile
Copy link
Member

flake8rules is an unaffiliated third party and not to be trusted

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants