From 5bc0f6f115a1467a5459d0f7f6558f28d2c6ad5b Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 16 Nov 2019 13:08:25 +0100 Subject: [PATCH 1/4] Travis CI: Lint for syntax errors --- .travis.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index da04e7fa7..fa905f6a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,6 @@ language: python python: 2.7 -sudo: required - services: - docker @@ -28,6 +26,7 @@ cache: - $HOME/docker stages: + - lint - build - test - clean @@ -35,7 +34,18 @@ stages: # We should label the steps if Travis ever supports it: # https://github.com/travis-ci/travis-ci/issues/5898 jobs: + allow_failures: + - python: 3.8 include: + - stage: lint + script: + - pip install flake8 + - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + - stage: lint + python: 3.8 + script: + - pip install flake8 + - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - stage: build name: Build script: scripts/ci build From d980cbe4845ace1060dda0c69885e5d29d0403a6 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 16 Nov 2019 19:41:05 +0100 Subject: [PATCH 2/4] import logging ; from util.log import logfile_path --- config_app/config_application.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config_app/config_application.py b/config_app/config_application.py index 43676e354..ac88b0c73 100644 --- a/config_app/config_application.py +++ b/config_app/config_application.py @@ -1,4 +1,6 @@ +import logging from config_app.c_app import app as application +from util.log import logfile_path # Bind all of the blueprints import config_web From 8196bcec8aee267929d4e10898e293406ebaa5dd Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 16 Nov 2019 19:43:23 +0100 Subject: [PATCH 3/4] ServiceKeyAlreadyApproved --- config_app/config_endpoints/api/superuser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_app/config_endpoints/api/superuser.py b/config_app/config_endpoints/api/superuser.py index 7e5adccb5..fece42c7c 100644 --- a/config_app/config_endpoints/api/superuser.py +++ b/config_app/config_endpoints/api/superuser.py @@ -13,7 +13,7 @@ from util.config.validator import EXTRA_CA_DIRECTORY from config_app.config_endpoints.exception import InvalidRequest from config_app.config_endpoints.api import resource, ApiResource, nickname, log_action, validate_json_request -from config_app.config_endpoints.api.superuser_models_pre_oci import pre_oci_model +from config_app.config_endpoints.api.superuser_models_pre_oci import pre_oci_model, ServiceKeyAlreadyApproved from config_app.config_util.ssl import load_certificate, CertInvalidException from config_app.c_app import app, config_provider, INIT_SCRIPTS_LOCATION From e7f0cb7d1b133f7ce154eed7f812e4a78a9a44a7 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Fri, 22 Nov 2019 15:12:14 +0100 Subject: [PATCH 4/4] Add "black --check . || true" on Python 3 --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fa905f6a1..eb79050e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,7 +44,8 @@ jobs: - stage: lint python: 3.8 script: - - pip install flake8 + - pip install black flake8 + - black --check . || true # TODO: (cclauss) Remove "|| true" when ready - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - stage: build name: Build