From b8fe71837c9d4f1a4a3f1195f48e9f4371e53892 Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 24 Jul 2022 04:54:28 +0000 Subject: [PATCH] Update CI files [noissue] --- flake8.cfg => .flake8 | 10 ++++++---- .github/template_gitref | 2 +- .github/workflows/ci.yml | 6 +++--- lint_requirements.txt | 5 +++++ pyproject.toml | 3 ++- 5 files changed, 17 insertions(+), 9 deletions(-) rename flake8.cfg => .flake8 (85%) create mode 100644 lint_requirements.txt diff --git a/flake8.cfg b/.flake8 similarity index 85% rename from flake8.cfg rename to .flake8 index d9507a7e5..2693eaa29 100644 --- a/flake8.cfg +++ b/.flake8 @@ -1,11 +1,15 @@ [flake8] exclude = ./docs/*,*/migrations/* -ignore = W503,Q000,Q003,D100,D104,D106,D200,D202,D205,D400,D401,D402,E203 +ignore = E203,W503,Q000,Q003,D100,D104,D106,D200,D205,D400,D401,D402 max-line-length = 100 +# Flake8 builtin codes +# -------------------- +# E203: no whitespace around ':'. disabled until https://github.com/PyCQA/pycodestyle/issues/373 is fixed +# W503: This enforces operators before line breaks which is not pep8 or black compatible. + # Flake8-quotes extension codes # ----------------------------- -# W503: This enforces operators before line breaks which is not pep8 or black compatible. # Q000: double or single quotes only, default is double (don't want to enforce this) # Q003: Change outer quotes to avoid escaping inner quotes @@ -15,9 +19,7 @@ max-line-length = 100 # D104: missing docstring in public package # D106: missing docstring in public nested class (complains about "class Meta:" and documenting those is silly) # D200: one-line docstring should fit on one line with quotes -# D202: no blank line after docstring--disabled until https://github.com/PyCQA/pydocstyle/issues/361 is fixed # D205: 1 blank line required between summary line and description # D400: First line should end with a period # D401: first line should be imperative (nitpicky) # D402: first line should not be the function’s “signature” (false positives) -# E203: no whitespace around ':'. disabled until https://github.com/PyCQA/pycodestyle/issues/373 is fixed diff --git a/.github/template_gitref b/.github/template_gitref index 1b851a079..1c38d930b 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-150-gc95d3f2 +2021.08.26-152-g5ab12e7 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7f28dd1c..452470068 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,9 +42,9 @@ jobs: with: python-version: "3.8" - # dev_requirements contains tools needed for flake8, etc. + # lint_requirements contains tools needed for flake8, etc. - name: Install requirements - run: pip3 install -r dev_requirements.txt + run: pip3 install -r lint_requirements.txt - name: Check commit message if: github.event_name == 'pull_request' @@ -67,7 +67,7 @@ jobs: # Lint code. - name: Run flake8 - run: flake8 --config flake8.cfg + run: flake8 - name: Run extra lint checks run: "[ ! -x .ci/scripts/extra_linting.sh ] || .ci/scripts/extra_linting.sh" diff --git a/lint_requirements.txt b/lint_requirements.txt new file mode 100644 index 000000000..1e7231a57 --- /dev/null +++ b/lint_requirements.txt @@ -0,0 +1,5 @@ +# python packages handy for developers, but not required by pulp +black +check-manifest +flake8 +flake8-black diff --git a/pyproject.toml b/pyproject.toml index e01bc3bd0..832343608 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,11 +38,12 @@ ignore = [ "dev_requirements.txt", "doc_requirements.txt", "docs/**", - "flake8.cfg", "template_config.yml", ".travis/**", ".travis.yml", ".pep8speaks.yml", ".ci/**", ".github/**", + "lint_requirements.txt", + ".flake8", ]