flake8-max-lines flake8 plugin to check max lines of files install pip install flake8 flake8_max_lines usage flake8 {python file} you can specify how many lines allowed (default: 300) flake8 --max-lines 500 {python file}