From d151d17cf397ec66e6fb137e68ef6c2161100f7b Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 08:31:30 +0200 Subject: [PATCH 01/15] LGTM: Start testing on Python 3 instead of Python 2 Fixes: #492 --- .lgtm.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .lgtm.yml diff --git a/.lgtm.yml b/.lgtm.yml new file mode 100644 index 000000000000..b06edf351064 --- /dev/null +++ b/.lgtm.yml @@ -0,0 +1,4 @@ +extraction: + python: + python_setup: + version: 3 From 0017ccff8ca775f1a1cebf2c5c5b5964e8ec6af3 Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 09:34:41 +0200 Subject: [PATCH 02/15] LGTM: Run flake8 tests in before_index --- .lgtm.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.lgtm.yml b/.lgtm.yml index b06edf351064..2d8bf0286a63 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -2,3 +2,6 @@ extraction: python: python_setup: version: 3 +before_index: + - pip install flake8 + - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics From d0c7839207bc4c16c9a2b7d986610ab2dc9dae30 Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 09:44:59 +0200 Subject: [PATCH 03/15] Update .lgtm.yml --- .lgtm.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.lgtm.yml b/.lgtm.yml index 2d8bf0286a63..2e3cd36af5e9 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -2,6 +2,10 @@ extraction: python: python_setup: version: 3 -before_index: - - pip install flake8 - - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics + after_prepare: + - pip install flake8 + before_index: + # stop the build if there are Python syntax errors or undefined names + - flake8 . --count --select=E901,E999,F821,F822,F823 --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 --statistics From 437615a6cabc4205a5b621a1548cdaac7de9f59b Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 09:52:24 +0200 Subject: [PATCH 04/15] Indentation --- .lgtm.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.lgtm.yml b/.lgtm.yml index 2e3cd36af5e9..eeb9a73434c6 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -2,10 +2,10 @@ extraction: python: python_setup: version: 3 - after_prepare: - - pip install flake8 - before_index: - # stop the build if there are Python syntax errors or undefined names - - flake8 . --count --select=E901,E999,F821,F822,F823 --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 --statistics + after_prepare: + - pip install flake8 + before_index: + # stop the build if there are Python syntax errors or undefined names + - flake8 . --count --select=E901,E999,F821,F822,F823 --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 --statistics From 9e56d2b1e85f6946a8ad2cdee2542ca5c8b1ecfe Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 09:57:53 +0200 Subject: [PATCH 05/15] python3 -m --- .lgtm.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.lgtm.yml b/.lgtm.yml index eeb9a73434c6..f19459d0deb2 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -3,9 +3,9 @@ extraction: python_setup: version: 3 after_prepare: - - pip install flake8 + - python3 -m pip install flake8 before_index: # stop the build if there are Python syntax errors or undefined names - - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics + - python3 -m flake8 . --count --select=E901,E999,F821,F822,F823 --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 --statistics + - python3 -m flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics From cf71b40f84cf4075d6bb9545dcd70af937c9cb4b Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 10:03:04 +0200 Subject: [PATCH 06/15] Try on Python 3.7 instead of 3.6 --- .lgtm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.lgtm.yml b/.lgtm.yml index f19459d0deb2..0fe1f4423a3f 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -1,7 +1,7 @@ extraction: python: python_setup: - version: 3 + version: 3.7 after_prepare: - python3 -m pip install flake8 before_index: From 29df128091ae3838cb0df85faca6a1ffe236937a Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 10:06:53 +0200 Subject: [PATCH 07/15] LGTM: Run flake8 tests on Python 3.6 --- .lgtm.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.lgtm.yml b/.lgtm.yml index 0fe1f4423a3f..6aa9a4c525b5 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -1,9 +1,7 @@ extraction: python: python_setup: - version: 3.7 - after_prepare: - - python3 -m pip install flake8 + version: 3 before_index: # stop the build if there are Python syntax errors or undefined names - python3 -m flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics From 0b8dc59c98599c98f7bdb5743c554d7ea64fbd08 Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 10:15:46 +0200 Subject: [PATCH 08/15] Check version of flake8 --- .lgtm.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.lgtm.yml b/.lgtm.yml index 6aa9a4c525b5..1740e3c3629a 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -2,6 +2,12 @@ extraction: python: python_setup: version: 3 + after_prepare: + - flake8 --version + - python3 -m flake8 --version + - python3 -m pip install --upgrade flake8 + - flake8 --version + - python3 -m flake8 --version before_index: # stop the build if there are Python syntax errors or undefined names - python3 -m flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics From f46f7d0772578be0b337a7b9a8c044de053fcdfc Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 10:23:01 +0200 Subject: [PATCH 09/15] python3 -m pip install --upgrade --user flake8 --- .lgtm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.lgtm.yml b/.lgtm.yml index 1740e3c3629a..f9d678d31d34 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -5,7 +5,7 @@ extraction: after_prepare: - flake8 --version - python3 -m flake8 --version - - python3 -m pip install --upgrade flake8 + - python3 -m pip install --upgrade --user flake8 - flake8 --version - python3 -m flake8 --version before_index: From 279ae1ef668fb5010f865df0c652b2e860ece1d0 Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 10:26:25 +0200 Subject: [PATCH 10/15] requirements: flake8 --- .lgtm.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.lgtm.yml b/.lgtm.yml index f9d678d31d34..3cdd50c2a88d 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -1,6 +1,7 @@ extraction: python: python_setup: + requirements: flake8 version: 3 after_prepare: - flake8 --version From 4fdd797459786465f41f22fd3bb7f18ed5762b94 Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 10:34:04 +0200 Subject: [PATCH 11/15] Update .lgtm.yml --- .lgtm.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.lgtm.yml b/.lgtm.yml index 3cdd50c2a88d..9c5694c53835 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -1,15 +1,16 @@ extraction: python: python_setup: - requirements: flake8 + requirements: flake8 # Upgrade flake8 3.5.0 --> >=3.6.0 version: 3 - after_prepare: - - flake8 --version - - python3 -m flake8 --version - - python3 -m pip install --upgrade --user flake8 - - flake8 --version - - python3 -m flake8 --version + #after_prepare: + # - flake8 --version + # - python3 -m flake8 --version + # - python3 -m pip install --upgrade --user flake8 + # - flake8 --version + # - python3 -m flake8 --version before_index: + - python3 -m flake8 --version # stop the build if there are Python syntax errors or undefined names - python3 -m flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide From d832d7a799dfd7ae694999f6818c1ebb67d055eb Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 10:40:23 +0200 Subject: [PATCH 12/15] Ready for review --- .lgtm.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.lgtm.yml b/.lgtm.yml index 9c5694c53835..1d7261f3be03 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -1,14 +1,9 @@ extraction: python: python_setup: - requirements: flake8 # Upgrade flake8 3.5.0 --> >=3.6.0 version: 3 - #after_prepare: - # - flake8 --version - # - python3 -m flake8 --version - # - python3 -m pip install --upgrade --user flake8 - # - flake8 --version - # - python3 -m flake8 --version + after_prepare: + - python3 -m pip install --upgrade --user flake8 before_index: - python3 -m flake8 --version # stop the build if there are Python syntax errors or undefined names From 9affa3bfd94b952f76e29df931de4865fb9157a5 Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 11:07:40 +0200 Subject: [PATCH 13/15] Update .lgtm.yml --- .lgtm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.lgtm.yml b/.lgtm.yml index 1d7261f3be03..ec550ab72705 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -5,7 +5,7 @@ extraction: after_prepare: - python3 -m pip install --upgrade --user flake8 before_index: - - python3 -m flake8 --version + - python3 -m flake8 --version # flake8 3.6.0 on CPython 3.6.5 on Linux # stop the build if there are Python syntax errors or undefined names - python3 -m flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide From 6d05b8d3ab7eb605bedda030975e40b63d39f619 Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 21:08:17 +0200 Subject: [PATCH 14/15] Force a retest --- .lgtm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.lgtm.yml b/.lgtm.yml index ec550ab72705..5cb1945ad73a 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -8,5 +8,5 @@ extraction: - python3 -m flake8 --version # flake8 3.6.0 on CPython 3.6.5 on Linux # stop the build if there are Python syntax errors or undefined names - python3 -m flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - python3 -m flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics From 3f831267a6d254a63aa5509c51b9623da83a30cf Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 24 Oct 2018 21:21:47 +0200 Subject: [PATCH 15/15] Rebuild --- .lgtm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.lgtm.yml b/.lgtm.yml index 5cb1945ad73a..ec550ab72705 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -8,5 +8,5 @@ extraction: - python3 -m flake8 --version # flake8 3.6.0 on CPython 3.6.5 on Linux # stop the build if there are Python syntax errors or undefined names - python3 -m flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - python3 -m flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics