From f74645b2a161f9d0278bd8957d9b9f4f12881ee7 Mon Sep 17 00:00:00 2001 From: Steven Myint Date: Thu, 4 Jan 2018 09:47:43 -0800 Subject: [PATCH] Add more automated checks --- .travis.yml | 7 ++++++- Makefile | 3 ++- test_autoflake.py | 7 ++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3217848..1b58cf9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,12 @@ install: script: - ./setup.py test - - ./test_fuzz.py *.py + - ./test_fuzz.py ./*.py + + - pyflakes ./*.py + - pip install pycodestyle pydocstyle + - pycodestyle ./*.py + - pydocstyle autoflake.py setup.py after_success: - pip install --quiet coverage diff --git a/Makefile b/Makefile index cd27658..2a71cf8 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ check: - pycodestyle autoflake.py setup.py + pyflakes ./*.py pylint \ --reports=no \ --rcfile=/dev/null \ --errors-only \ autoflake.py setup.py + pycodestyle ./*.py pydocstyle autoflake.py setup.py check-manifest python setup.py --long-description | rstcheck - diff --git a/test_autoflake.py b/test_autoflake.py index 1043901..e3ca4f6 100755 --- a/test_autoflake.py +++ b/test_autoflake.py @@ -1101,9 +1101,10 @@ def test_exclude(self): 'w') as output: output.write('import os\n') - p = subprocess.Popen(list(AUTOFLAKE_COMMAND) + - [temp_directory, '--recursive', '--exclude=a*'], - stdout=subprocess.PIPE) + p = subprocess.Popen( + list(AUTOFLAKE_COMMAND) + + [temp_directory, '--recursive', '--exclude=a*'], + stdout=subprocess.PIPE) result = p.communicate()[0].decode('utf-8') self.assertNotIn('import re', result)