diff --git a/.travis.yml b/.travis.yml index 50e144b732b557dc63578b9f0532786c958e22fa..6c563a4bff021efd1394de2f9b4623aa9b36a1b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,26 @@ language: python python: - "3.6" - "3.7" + +matrix: + fast_finish: true + - name: "Code Style (Black/Flake8)" + install: + - pip install --upgrade pip + - pip install black + - pip install flake8 + script: + # Black code style + - black --check --diff pytorch_widedeep tests examples setup.py + # Stop the build if there are Python syntax errors or undefined names + - flake8 . --count --select=E901,E999,F821,F822,F823 --ignore=E266 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --ignore=E203,E266,E501,E722,F401,F403,F405,W503,C901 --statistics + # - name: "static type check" + # script: + # - mypy pytorch_widedeep --ignore-missing-imports --no-strict-optional + after_success: skip + install: - pip install --upgrade pip - pip install .