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 some tools have problems if the file ends and the last line has text on it but does not have a newline at the end of the file. Badly written tools can miss processing that last partial line, or even worse can read random memory beyond the last line (though that is unlikely to happen with tools written in Python it can happen with tools written in C).

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