Browse Source

Auto merge of #2476 - micbou:flake8, r=Valloric

[READY] Do not disable Flake8 on Python 2.6 Travis but restrict its version

See PR https://github.com/Valloric/ycmd/pull/665.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2476)
<!-- Reviewable:end -->
Homu 8 years ago
parent
commit
194ff33466
3 changed files with 13 additions and 20 deletions
  1. 5 7
      .travis.yml
  2. 0 7
      ci/travis/travis_script.sh
  3. 8 6
      python/test_requirements.txt

+ 5 - 7
.travis.yml

@@ -8,8 +8,7 @@ before_install:
 install:
   # source because it sets up env vars on some platforms
   - source ci/travis/travis_install.sh
-script:
-  - ci/travis/travis_script.sh
+script: ./run_tests.py
 after_success:
   - codecov
 env:
@@ -18,14 +17,13 @@ env:
     - YCM_CORES=3
     - COVERAGE=true
   matrix:
-    - YCM_PYTHON_VERSION=2.7 YCM_FLAKE8=true
-    # Since 3.0.4, Flake8 is not working anymore on Python 2.6.
-    - YCM_PYTHON_VERSION=2.6 YCM_FLAKE8=false
-    - YCM_PYTHON_VERSION=3.3 YCM_FLAKE8=true
+    - YCM_PYTHON_VERSION=2.6
+    - YCM_PYTHON_VERSION=2.7
+    - YCM_PYTHON_VERSION=3.3
 matrix:
   exclude:
     - os: osx
-      env: YCM_PYTHON_VERSION=2.6 YCM_FLAKE8=false
+      env: YCM_PYTHON_VERSION=2.6
 addons:
   apt:
     sources:

+ 0 - 7
ci/travis/travis_script.sh

@@ -1,7 +0,0 @@
-#!/bin/bash
-
-if [ "${YCM_FLAKE8}" = true ]; then
-  ./run_tests.py
-else
-  ./run_tests.py --no-flake8
-fi

+ 8 - 6
python/test_requirements.txt

@@ -1,8 +1,10 @@
-flake8>=2.0
-mock>=1.0.1
-nose>=1.3.7
-PyHamcrest>=1.8.0
+# Flake8 3.x dropped support of Python 2.6 and 3.3
+flake8     <  3.0.0; python_version == '2.6' or python_version == '3.3'
+flake8     >= 3.0.0; python_version == '2.7' or python_version >  '3.3'
+mock       >= 1.0.1
+nose       >= 1.3.7
+PyHamcrest >= 1.8.0
 # This needs to be kept in sync with submodule checkout in
 # third_party/ycmd/third_party
-future==0.15.2
-codecov>=2.0.5
+future     == 0.15.2
+codecov    >= 2.0.5