diff --git a/.travis.yml b/.travis.yml index 8e72161..94d5f70 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,11 +12,11 @@ matrix: language: generic install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo pip2 install pyflakes pep8 coverage coveralls nose; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pip install pyflakes pep8 coverage coveralls nose; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo pip2 install pyflakes pycodestyle coverage coveralls nose; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pip install pyflakes pycodestyle coverage coveralls nose; fi script: - pyflakes . - - pep8 . + - pycodestyle . - nosetests - coveralls diff --git a/appveyor.yml b/appveyor.yml index 29ae3f7..246a67c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,11 +7,11 @@ environment: build_script: - PATH %CD%\here\bin;C:\mingw\bin;C:\python%Python%;C:\python%Python%\scripts;%PATH% - - pip install pyflakes pep8 coverage coveralls nose + - pip install pyflakes pycodestyle coverage coveralls nose test_script: - pyflakes . - - pep8 . + - pycodestyle . - nosetests - coverage report - if not "%COVERALLS_REPO_TOKEN%"=="" coveralls diff --git a/hererocks.py b/hererocks.py index 11d71b6..b646976 100755 --- a/hererocks.py +++ b/hererocks.py @@ -154,7 +154,7 @@ def write_activation_scripts(): "LOCATION_DQ": opts.location.replace("\\", "\\\\").replace('"', '\\"'), "LOCATION_SQ": opts.location.replace("'", "'\\''"), "LOCATION_NESTED_SQ": opts.location.replace("'", "'\\''").replace("'", "'\\''"), - "LOCATION_PAREN": re.sub("[&,=()]", "^\g<0>", opts.location) + "LOCATION_PAREN": re.sub("[&,=()]", r"^\g<0>", opts.location) } for template_name in template_names: @@ -165,9 +165,7 @@ def write_activation_scripts(): script_handle.write(script) def is_executable(path): - return (os.path.exists(path) and - os.access(path, os.F_OK | os.X_OK) and - not os.path.isdir(path)) + return os.path.exists(path) and os.access(path, os.F_OK | os.X_OK) and not os.path.isdir(path) def program_exists(prog): path = os.environ.get("PATH", os.defpath) diff --git a/setup.cfg b/setup.cfg index bd1dcaf..1ffe692 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,2 @@ -[pep8] -ignore = E203,E302,E501 +[pycodestyle] +ignore = E203,E302,E305,E501