Files should end with a newline.

Anti-pattern

Imagine the example below is an entire file.

import os

BASE_DIR = os.path.dirname(os.path.abspath(__file__))

Best practice

Imagine the example below is an entire file.

import os

BASE_DIR = os.path.dirname(os.path.abspath(__file__))