I am new to Pylint, and when I run it against my script, I get this output:
C: 50, 0: Trailing newlines (trailing-newlines)
Here, Pylint is saying that it is bad to have a final newline.
I like to have a new line at the end of my scripts, so I thought I would disable this warning. I did some google web searching and found this: http://pylint-messages.wikidot.com/messages:c0304
C0304 Message
Final newline missing
Description
Used when a Python source file has no line end character(s) on its last line.
This message belongs to the format checker. Explanation
While Python interpreters typically do not require line end character(s) on the last line, other programs processing Python source files may do, and it is simply good practice to have it. This is confirmed in Python docs: Line Structure which states that a physical line is ended by the respective line end character(s) of the platform.
Here, Pylint is saying that it is bad to miss the final newline.
(A) What is the correct view ? (B) How do I disable the check for the final new line ?
{{ EDIT : It turns out that this is not an issue with Pylint ; It is an issue with vim , which adds eol automatically : How to stop vim from adding a newline at end of file? }}