From be9a5732f7c89f906bf7807260cf7361a8b527c1 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 1 Apr 2024 18:33:26 -0700 Subject: [PATCH] Refactor out linting into pre-commit --- .github/workflows/tests.yml | 7 ------- .pre-commit-config.yaml | 16 ++++++++++++++++ conda-requirements.txt | 2 -- 3 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d279113bd..364448b57 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,13 +43,6 @@ jobs: env: GH_TOKEN: ${{ steps.generate_token.outputs.token }} - - name: lint - shell: bash -l {0} - run: | - # maybe later... - # black --check conda_forge_webservices - flake8 conda_forge_webservices - - name: run test suite shell: bash -l {0} run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..e5db0531a --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,16 @@ +repos: +- repo: https://github.com/pycqa/flake8 + rev: 7.0.0 + hooks: + - id: flake8 + +ci: + autofix_commit_msg: | + [pre-commit.ci] auto fixes from pre-commit.com hooks + + for more information, see https://pre-commit.ci + autofix_prs: false + autoupdate_commit_msg: '[ci skip] [pre-commit.ci] pre-commit autoupdate' + autoupdate_schedule: monthly + skip: [] + submodules: false diff --git a/conda-requirements.txt b/conda-requirements.txt index d015af8fe..b1bb13021 100644 --- a/conda-requirements.txt +++ b/conda-requirements.txt @@ -1,5 +1,4 @@ anaconda-client>=1.8.0 -black cachetools conda conda-build @@ -8,7 +7,6 @@ conda-forge-pinning conda-smithy>=3.7.6 # this pin is for bot automerge and maint. team bug fixes cryptography>=39 python-dateutil -flake8 git lxml mock