Fix pycodestyle (pep8) errors

This commit is contained in:
Marcin Kulik
2018-12-08 19:02:13 +01:00
parent ac1f970a0d
commit 7b9c8298b4
3 changed files with 4 additions and 4 deletions

View File

@@ -8,8 +8,8 @@ python:
- "3.7-dev"
before_install:
- pip install pep8
- pip install pycodestyle
script:
- find . -name \*.py -exec pep8 --ignore=E501 {} +
- find . -name \*.py -exec pycodestyle --ignore=E501,E402 {} +
- make test

View File

@@ -13,7 +13,7 @@ class Player:
stdin = open('/dev/tty')
with raw(stdin.fileno()):
self._play(asciicast, idle_time_limit, speed, stdin)
except:
except Exception:
self._play(asciicast, idle_time_limit, speed, None)
def _play(self, asciicast, idle_time_limit, speed, stdin):

View File

@@ -29,7 +29,7 @@ def test_upgrade_no_config_file():
config.upgrade()
install_id = read_install_id(config.install_id_path)
assert re.match('^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}', install_id)
assert re.match('^\\w{8}-\\w{4}-\\w{4}-\\w{4}-\\w{12}', install_id)
assert_equal(install_id, config.install_id)
assert not path.exists(config.config_file_path)