Skip to content

Exit Flake8Command.run() cleanly if style checks pass

username-removed-59902 requested to merge jcwilson/flake8:master into master

When using distutils/setuptools, it is common to perform several commands in sequence. For example: python setup.py flake8 bdist_egg. When run() exits by raising a SystemExit exception, it causes the entire chain to break - meaning flake8 cannot be used in combination with any other command.

This change simply alters the behavior to exit normally if there were no style violations found. Otherwise, it will exit immediately, as before, with a non-zero exit code.

Merge request reports