diff --git a/CHANGES.rst b/CHANGES.rst index 2668850..b057c60 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,8 @@ CHANGES - Fix Git and Mercurial hooks, issues #88 and #133 - Fix crashes with Python 3.4 by upgrading dependencies - Fix traceback when running tests with Python 2.6 +- Fix the setuptools command ``python setup.py flake8`` to read + the project configuration 2.1.0 - 2013-10-26 @@ -88,7 +90,7 @@ CHANGES - make sure mccabe catches the syntax errors as warnings - pep8 upgrade - added max_line_length default value -- added Flake8Command and entry points is setuptools is around +- added Flake8Command and entry points if setuptools is around - using the setuptools console wrapper when available diff --git a/flake8/main.py b/flake8/main.py index 2a8e484..b33faa2 100644 --- a/flake8/main.py +++ b/flake8/main.py @@ -122,9 +122,13 @@ class Flake8Command(setuptools.Command): yield "%s.py" % filename def run(self): + # Prepare + paths = list(self.distribution_files()) flake8_style = get_style_guide(config_file=DEFAULT_CONFIG, + paths=paths, **self.options_dict) - paths = self.distribution_files() - report = flake8_style.check_files(paths) + + # Run the checkers + report = flake8_style.check_files() exit_code = print_report(report, flake8_style) raise SystemExit(exit_code > 0)