Pylint giving me "Final new line missing" Pylint giving me "Final new line missing" python-3.x python-3.x

Pylint giving me "Final new line missing"


You need an empty new line at the end of your file. Just add another ENTER at the end of the last line and you'll be fine.


I just ran into this issue and found this answer to a similar question:

The reason you need at least one newline is that historically sometools have problems if the file ends and the last line has text on itbut does not have a newline at the end of the file. Badly writtentools can miss processing that last partial line, or even worse canread random memory beyond the last line (though that is unlikely tohappen with tools written in Python it can happen with tools writtenin C).

So you must ensure there is a newline terminating the last non-blankline.