Add checks to maintain a consistent Python code style and prevent bugs (#515)
A flake8 configuration is included in setup.cfg and the checks are
executed automatically on Travis:
* Ensures a consistent PEP8 code style
* Does basic linting to prevent possible bugs
diff --git a/.travis.yml b/.travis.yml
index a56120b..ff4662f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,11 +38,12 @@
# Documentation build:
- os: linux
language: docs
- env: DOCS STYLE
- install: pip install sphinx sphinx_rtd_theme
+ env: DOCS STYLE LINT
+ install: pip install sphinx sphinx_rtd_theme flake8 pep8-naming
script:
- make -C docs html SPHINX_OPTIONS=-W
- tools/check-style.sh
+ - flake8
cache:
directories:
- $HOME/.cache/pip