From 8aedd80d05169d52d5592076145806a3b3ae8ebc Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 15 May 2014 08:11:00 +0200 Subject: [PATCH] Ignore ez_setup.py properly --- .flake8 | 1 + .pylintrc | 3 +++ scripts/run_checks.py | 22 ++++++++++++---------- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.flake8 b/.flake8 index 8faf7608a..87ea54ede 100644 --- a/.flake8 +++ b/.flake8 @@ -8,3 +8,4 @@ # F841: unused variable ignore=E241,E265,F401,E501,F821,F841 max_complexity = 10 +exclude = ez_setup.py diff --git a/.pylintrc b/.pylintrc index 720f665a3..1cbc84985 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,3 +1,6 @@ +[MASTER] +ignore=ez_setup.py + [MESSAGES CONTROL] disable=no-self-use, super-on-old-class, diff --git a/scripts/run_checks.py b/scripts/run_checks.py index 33bba1b63..e8384426c 100755 --- a/scripts/run_checks.py +++ b/scripts/run_checks.py @@ -57,8 +57,8 @@ options = { # (false-positives) ], }, - 'exclude': ['scripts.ez_setup'], - 'exclude_pep257': ['test_*'], # FIXME exclude ez_setup + 'exclude': [], + 'exclude_pep257': ['test_*', 'ez_setup'], 'other': { 'pylint': ['--output-format=colorized', '--reports=no', '--rcfile=.pylintrc'], @@ -174,10 +174,11 @@ def _get_args(checker): args += ['--disable=' + ','.join(options['disable']['pylint'])] except KeyError: pass - try: - args += ['--ignore=' + ','.join(options['exclude'])] - except KeyError: - pass + if options['exclude']: + try: + args += ['--ignore=' + ','.join(options['exclude'])] + except KeyError: + pass try: args += options['other']['pylint'] except KeyError: @@ -187,10 +188,11 @@ def _get_args(checker): args += ['--ignore=' + ','.join(options['disable']['flake8'])] except KeyError: pass - try: - args += ['--exclude=' + ','.join(options['exclude'])] - except KeyError: - pass + if options['exclude']: + try: + args += ['--exclude=' + ','.join(options['exclude'])] + except KeyError: + pass try: args += options['other']['flake8'] except KeyError: