sudo: false
language: python
cache: pip
python:
  - "2.7"
  - "3.4"
  - "3.5"
  - "3.6"
matrix:
  include:
    - python: 3.7 # https://github.com/travis-ci/travis-ci/issues/9069#issuecomment-425720905
      dist: xenial
      sudo: true
install:
  - pip install -U pip setuptools
  - pip install tox-travis pre-commit
  - pip install codecov
script:
  - tox
  - pre-commit run --all-files
after_success:
  - codecov

sudo: false
language: python
cache: pip
python:
  - "2.7"
  - "3.4"
  - "3.5"
  - "3.6"
matrix:
  include:
    - python: 3.7 # https://github.com/travis-ci/travis-ci/issues/9069#issuecomment-425720905
      dist: xenial
      sudo: true
install:
  - pip install -U pip setuptools
  - pip install tox-travis
  - pip install codecov
  - if [[ $TRAVIS_PYTHON_VERSION != 3.4 ]]; then pip install pre-commit; fi
script:
  - tox
  - if [[ $TRAVIS_PYTHON_VERSION != 3.4 ]]; then pre-commit run --all-files; fi
after_success:
  - codecov

Fix Travis for Python 3.4
Fix Travis for Python 3.4
