Not sure if this question is suited here as it can be opinion based.
I'm reading through this article about the CPython interpreter https://realpython.com/cpython-source-code-guide/#whats-in-the-source-code and at one point in the article it's specified that it's good practice to leave an empty line at the end of your python source code files.
However, for my development I use the flake8 syntax checker and it does not like me letting an empty line at the end of the file. The article specifies that the cost for that empty line is a bit of performance overhead due to CPython having to insert that line itself.
Is there any specific reason why flake8 considers the empty line to be bad practice?
You are getting W391
and according to flake8 docs.
There should be one, and only one, blank line at the end of each file. This warning will occur when there are zero, two, or more than two blank lines which is correct.
vim based editor automatically adds a newline to every file so you don't have to add them manually because the file ends up having two new lines which results in flake8 warning.
You can also configure your neo vim editor using this answer to show newlines.