From ad31f9992db5530ccdcf234efb4e4a11aea25404 Mon Sep 17 00:00:00 2001 From: Al Crowley Date: Mon, 14 Feb 2022 11:30:55 -0500 Subject: [PATCH 1/3] Adding flake8 lint check to test job in CI pipeline --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6c085b4..d6d14ee 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -85,6 +85,9 @@ jobs: key: v1-sonarcloud-scanner-4.6.2.2472 paths: /tmp/cache/scanner + - run: + name: flake8 lint tests + command: flake8 . dependency-check: docker: - image: cimg/python:3.8 From b2e945ff5c8fb6708fe4a8546491b4192ee08c2a Mon Sep 17 00:00:00 2001 From: Al Crowley Date: Mon, 14 Feb 2022 11:44:29 -0500 Subject: [PATCH 2/3] Update flake8 to version 4.0.1 to avoid error with old version Move flake8 to requirements-test.txt --- requirements-test.txt | 3 ++- requirements.txt | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-test.txt b/requirements-test.txt index 2df6a92..945f94c 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,3 +1,4 @@ pytest==6.2.5 pytest-cov==3.0.0 -safety==1.10.3 \ No newline at end of file +safety==1.10.3 +flake8==4.0.1 diff --git a/requirements.txt b/requirements.txt index 9aa9272..32e2ee7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,4 +27,3 @@ pdfkit==0.6.1 beautifulsoup4==4.7.1 gunicorn==19.10.0 -flake8==3.6.0 From 14d58cf63409963852d8ba89447df3386f080a15 Mon Sep 17 00:00:00 2001 From: Al Crowley Date: Mon, 14 Feb 2022 12:06:47 -0500 Subject: [PATCH 3/3] Adding .flake8 as configuration file. --- .circleci/config.yml | 2 +- .flake8 | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .flake8 diff --git a/.circleci/config.yml b/.circleci/config.yml index d6d14ee..ebabb8e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,7 +87,7 @@ jobs: - run: name: flake8 lint tests - command: flake8 . + command: flake8 --config .flake8 dependency-check: docker: - image: cimg/python:3.8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..4498dfb --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +max-line-lenght = 160 +ignore = + Z111 # not a real code, just placeholder for an example