pycodestyle is a tool to check your Python code against some of the style conventions in PEP 8. $ pycodestyle --first optparse.py optparse.py:69:11: E401 multiple imports on one line optparse.py:77:1: ...