From 26f6ec6cc8d68af9e11498f32c8e4e0328918570 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Fri, 16 Aug 2024 13:15:29 +0200 Subject: [PATCH] chore(actions)!: rework actions (#2547) --- .github/workflows/.cleanup-todo | 65 ------- .github/workflows/check.yml | 38 ----- .../{codeql-analysis.yml => codeql.yml} | 0 .github/workflows/docs-checks.yml | 53 ++++++ .../workflows/docs-localization-download.yml | 30 ++-- .../workflows/docs-localization-upload.yml | 12 +- .github/workflows/lib-checks.yml | 159 ++++++++++++++++++ .github/workflows/lint.yml | 53 ------ ...ersion-updates.yml => pr-auto-approve.yml} | 22 ++- .github/workflows/{pr.yml => pr-checks.yml} | 18 +- .github/workflows/test.yml | 78 --------- .github/workflows/todo-checks.yml | 40 +++++ .github/workflows/todo.yml | 16 -- .pre-commit-config.yaml | 14 +- 14 files changed, 304 insertions(+), 294 deletions(-) delete mode 100644 .github/workflows/.cleanup-todo delete mode 100644 .github/workflows/check.yml rename .github/workflows/{codeql-analysis.yml => codeql.yml} (100%) create mode 100644 .github/workflows/docs-checks.yml create mode 100644 .github/workflows/lib-checks.yml delete mode 100644 .github/workflows/lint.yml rename .github/workflows/{version-updates.yml => pr-auto-approve.yml} (56%) rename .github/workflows/{pr.yml => pr-checks.yml} (56%) delete mode 100644 .github/workflows/test.yml create mode 100644 .github/workflows/todo-checks.yml delete mode 100644 .github/workflows/todo.yml diff --git a/.github/workflows/.cleanup-todo b/.github/workflows/.cleanup-todo deleted file mode 100644 index 01c573a26d..0000000000 --- a/.github/workflows/.cleanup-todo +++ /dev/null @@ -1,65 +0,0 @@ -Status checks that are required. -CodeQL -@github-advanced-security -Check Dependencies -@github-actions -codespell -@github-actions -bandit -@github-actions -docs/readthedocs.org:pycord -mypy -@github-actions -pre-commit.ci - pr -@pre-commit-ci -todo -@github-actions -pytest (ubuntu-latest, 3.10) -@github-actions -pytest (ubuntu-latest, 3.11) -@github-actions -pytest (ubuntu-latest, 3.9) -@github-actions -pytest (windows-latest, 3.9) -@github-actions -pytest (windows-latest, 3.10) -@github-actions -pytest (windows-latest, 3.11) -@github-actions -pytest (macos-latest, 3.10) -@github-actions -pytest (macos-latest, 3.11) -@github-actions -Check Title -@github-actions -pullapprove4 -@pullapprove4 -Analyze (python) -@github-actions -pylint -@github-actions -docs -@github-actions -pytest (ubuntu-latest, 3.12) -@github-actions -pytest (macos-latest, 3.12) -@github-actions -pytest (windows-latest, 3.12) -@github-actions - --------------------------------------------- - -paths - -docs/ Documentation -docs/build/locales/ | docs/locales/ Translations -discord/ | setup.py | pyproject.toml, MAINFEST.in Main python lib -.github/ github meta -.github/workflows/ github actions -.github/depandabot.yml github actions configurations -.github/ISSUE_TEMPLATE/ github templates -examples/ example python code, should not be checked -requirements/ python requirements -tests/ currently more or less unused, maybe check? -.files configurations -/ repo content diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index ce9f1deba1..0000000000 --- a/.github/workflows/check.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Checks -on: [pull_request, push, workflow_dispatch] - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - codespell: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - cache: "pip" - cache-dependency-path: "requirements/dev.txt" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements/dev.txt - - run: - codespell --ignore-words-list="groupt,nd,ot,ro,falsy,BU" \ - --exclude-file=".github/workflows/codespell.yml" - bandit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - cache: "pip" - cache-dependency-path: "requirements/dev.txt" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements/dev.txt - - run: bandit --recursive --skip B101,B104,B105,B110,B307,B311,B404,B603,B607 . diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql.yml similarity index 100% rename from .github/workflows/codeql-analysis.yml rename to .github/workflows/codeql.yml diff --git a/.github/workflows/docs-checks.yml b/.github/workflows/docs-checks.yml new file mode 100644 index 0000000000..21e99dfb8e --- /dev/null +++ b/.github/workflows/docs-checks.yml @@ -0,0 +1,53 @@ +name: "Documentation Checks" + +on: + push: + paths: + - discord/ + - docs/ + - requirements/ + - pyproject.toml + - setup.py + pull_request: + paths: + - discord/ + - docs/ + - requirements/ + - pyproject.toml + - setup.py + workflow_dispatch: + schedule: + - cron: "0 0 * * *" + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: write-all + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - name: "Checkout Repository" + uses: actions/checkout@v4 + - name: "Setup Python" + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: "pip" + cache-dependency-path: "requirements/docs.txt" + check-latest: true + - name: Install dependencies + run: | + python -m pip install -U pip + pip install ".[docs]" + - name: "Check Links" + if: ${{ github.event_name == 'schedule' }} + run: | + cd docs + make linkcheck + - name: "Compile to html" + run: | + cd docs + make -e SPHINXOPTS="-D language='en'" html diff --git a/.github/workflows/docs-localization-download.yml b/.github/workflows/docs-localization-download.yml index e927c3835b..cc62511ed0 100644 --- a/.github/workflows/docs-localization-download.yml +++ b/.github/workflows/docs-localization-download.yml @@ -1,18 +1,19 @@ -name: Multilingual Docs Download +name: "Multilingual Docs Download" on: workflow_dispatch: +permissions: write-all + jobs: download: - permissions: write-all name: "Download localizations from Crowdin" runs-on: ubuntu-latest outputs: pr_ref: ${{ steps.convert_outputs.outputs.pr_ref }} pr_id: ${{ steps.convert_outputs.outputs.pr_id }} steps: - - name: Checkout Repository + - name: "Checkout Repository" uses: actions/checkout@v4 with: fetch-tags: true @@ -34,8 +35,7 @@ jobs: working-directory: ./docs - name: "Build locales" run: - sphinx-intl update -p ./build/locales -l ja -l de -l ja -l fr -l it -l en -l - hi -l ko -l pt_BR -l es -l zh_CN -l ru + sphinx-intl update -p ./build/locales -l ja -l de -l ja -l fr -l it -l en -l hi -l ko -l pt_BR -l es -l zh_CN -l ru working-directory: ./docs - name: "Crowdin" id: crowdin @@ -48,9 +48,7 @@ jobs: localization_branch_name: l10n_master create_pull_request: true pull_request_title: "docs: Update localizations from Crowdin" - pull_request_body: - "Crowdin download was triggered due to completely translated file or - project. Starting sync. CC @Lulalaby" + pull_request_body: "Crowdin download was triggered due to completely translated file or project. Starting sync. CC @Lulalaby" pull_request_base_branch_name: "master" pull_request_reviewers: "Lulalaby" config: "crowdin.yml" @@ -69,14 +67,13 @@ jobs: echo "pr_id=$(echo -n "$PR_ID" | base64)" >> $GITHUB_OUTPUT pr: - permissions: write-all name: "PR operations" needs: [download] runs-on: ubuntu-latest steps: - - name: Checkout Repository + - name: "Checkout Repository" uses: actions/checkout@v4 - - name: Refresh Pull + - name: "Refresh Pull" run: | git fetch --all git reset --hard origin/master @@ -123,11 +120,14 @@ jobs: #with: #workflow: version-updates.yml #ref: ${{ steps.convert_outputs.outputs.pr_ref }} - - run: gh pr merge --auto --squash $PR_ID + - name: "Auto Approve" + run: gh pr review --approve -b "auto-approval for localization sync :3" "$PR_ID" env: PR_ID: ${{ steps.convert_outputs.outputs.pr_id }} - GITHUB_TOKEN: ${{ secrets.CI_TOKEN }} - - run: gh pr review --approve -b "auto-approval for localization sync :3" "$PR_ID" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: "Enable Auto Merge" + if: ${{ always() }} + run: gh pr merge --auto --squash $PR_ID env: PR_ID: ${{ steps.convert_outputs.outputs.pr_id }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.CI_TOKEN }} diff --git a/.github/workflows/docs-localization-upload.yml b/.github/workflows/docs-localization-upload.yml index 59b7153384..ca39b52f72 100644 --- a/.github/workflows/docs-localization-upload.yml +++ b/.github/workflows/docs-localization-upload.yml @@ -1,19 +1,18 @@ -name: Multilingual Docs Upload +name: "Multilingual Docs Upload" on: push: branches: - master workflow_dispatch: + +permissions: write-all jobs: upload: - permissions: write-all name: "Upload localization base to Crowdin" runs-on: ubuntu-latest - if: - contains(github.event.head_commit.message, '!crowdin upload') || github.event_name - == 'workflow_dispatch' + if: ${{ contains(github.event.head_commit.message, '!crowdin upload') || github.event_name == 'workflow_dispatch' }} steps: - uses: actions/checkout@v4 - name: "Install Python" @@ -34,8 +33,7 @@ jobs: working-directory: ./docs - name: "Build locales" run: - sphinx-intl update -p ./build/locales -l ja -l de -l ja -l fr -l it -l en -l - hi -l ko -l pt_BR -l es -l zh_CN -l ru + sphinx-intl update -p ./build/locales -l ja -l de -l ja -l fr -l it -l en -l hi -l ko -l pt_BR -l es -l zh_CN -l ru working-directory: ./docs - name: "Crowdin" uses: crowdin/github-action@v2 diff --git a/.github/workflows/lib-checks.yml b/.github/workflows/lib-checks.yml new file mode 100644 index 0000000000..cf95a9285c --- /dev/null +++ b/.github/workflows/lib-checks.yml @@ -0,0 +1,159 @@ +name: "Library Checks" + +on: + push: + paths: + - discord/ + - requirements/ + - pyproject.toml + - setup.py + - .flake8 + - .prettierrc + pull_request: + paths: + - discord/ + - requirements/ + - pyproject.toml + - setup.py + - .flake8 + - .prettierrc + workflow_dispatch: + schedule: + - cron: "0 0 * * *" + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: write-all + +jobs: + codespell: + if: ${{ github.event_name != 'schedule' }} + runs-on: ubuntu-latest + steps: + - name: "Checkout Repository" + uses: actions/checkout@v4 + - name: "Setup Python" + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: "pip" + cache-dependency-path: "requirements/dev.txt" + - name: "Install dependencies" + run: | + python -m pip install --upgrade pip + pip install -r requirements/dev.txt + - name: "Run codespell" + run: + codespell --ignore-words-list="groupt,nd,ot,ro,falsy,BU" \ + --exclude-file=".github/workflows/codespell.yml" + bandit: + if: ${{ github.event_name != 'schedule' }} + runs-on: ubuntu-latest + steps: + - name: "Checkout Repository" + uses: actions/checkout@v4 + - name: "Setup Python" + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: "pip" + cache-dependency-path: "requirements/dev.txt" + - name: "Install dependencies" + run: | + python -m pip install --upgrade pip + pip install -r requirements/dev.txt + - name: "Run bandit" + run: bandit --recursive --skip B101,B104,B105,B110,B307,B311,B404,B603,B607 . + pylint: + if: ${{ github.event_name != 'schedule' }} + runs-on: ubuntu-latest + steps: + - name: "Checkout Repository" + uses: actions/checkout@v4 + - name: "Setup Python" + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: "pip" + cache-dependency-path: "requirements/dev.txt" + - name: "Install dependencies" + run: | + python -m pip install --upgrade pip + pip install -r requirements/dev.txt + - name: "Setup cache" + id: cache-pylint + uses: actions/cache@v4 + with: + path: .pylint.d + key: pylint + - name: "Run pylint" + run: pylint discord/ --exit-zero + mypy: + if: ${{ github.event_name != 'schedule' }} + runs-on: ubuntu-latest + steps: + - name: "Checkout Repository" + uses: actions/checkout@v4 + - name: "Setup Python" + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: "pip" + cache-dependency-path: "requirements/dev.txt" + - name: "Install dependencies" + run: | + python -m pip install --upgrade pip + pip install -r requirements/dev.txt + - name: "Setup cache" + id: cache-mypy + uses: actions/cache@v4 + with: + path: .mypy_cache + key: mypy + - name: "Make mypy cache directory" + id: cache-dir-mypy + run: mkdir -p -v .mypy_cache + - name: "Run mypy" + run: mypy --non-interactive discord/ + pytest: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.9", "3.10", "3.11", "3.12"] + exclude: + - { python-version: "3.9", os: "macos-latest" } + include: + - { python-version: "3.9", os: "macos-13" } + runs-on: ${{ matrix.os }} + env: + OS: ${{ matrix.os }} + PYTHON: ${{ matrix.python-version }} + steps: + - name: "Checkout Repository" + uses: actions/checkout@v4 + - name: "Setup Python" + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: "pip" + cache-dependency-path: "requirements/dev.txt" + check-latest: true + - name: "Install dependencies" + run: | + python -m pip install --upgrade pip + pip install flake8 + pip install -r requirements/dev.txt + - name: "Setup cache" + id: cache-pytest + uses: actions/cache@v4 + with: + path: .pytest_cache + key: ${{ matrix.os }}-${{ matrix.python-version }}-pytest + - name: "Lint with flake8" + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 4cf3fe53ab..0000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Type Check and Lint -on: [push, pull_request, workflow_dispatch] - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - pylint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - cache: "pip" - cache-dependency-path: "requirements/dev.txt" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements/dev.txt - - name: Setup cache - id: cache-pylint - uses: actions/cache@v4 - with: - path: .pylint.d - key: pylint - - name: Analyse code with pylint - run: | - pylint discord/ --exit-zero - mypy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - cache: "pip" - cache-dependency-path: "requirements/dev.txt" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements/dev.txt - - name: Setup cache - id: cache-mypy - uses: actions/cache@v4 - with: - path: .mypy_cache - key: mypy - - name: Make mypy cache directory - run: mkdir -p -v .mypy_cache - - name: Run type checks with Mypy - run: mypy --non-interactive discord/ diff --git a/.github/workflows/version-updates.yml b/.github/workflows/pr-auto-approve.yml similarity index 56% rename from .github/workflows/version-updates.yml rename to .github/workflows/pr-auto-approve.yml index ff59575d15..2337c1dadb 100644 --- a/.github/workflows/version-updates.yml +++ b/.github/workflows/pr-auto-approve.yml @@ -1,12 +1,15 @@ -name: Version Update Auto Merge -on: [pull_request, workflow_dispatch] +name: "Auto Approve" -permissions: - contents: write - pull-requests: write +on: [pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: write-all jobs: - auto-merge: + auto-approve: runs-on: ubuntu-latest if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'crowdin-bot' || @@ -14,11 +17,14 @@ jobs: == 58779643 }} continue-on-error: true steps: - - run: gh pr review --approve "$PR_URL" + - name: "Auto Approve" + run: gh pr review --approve "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - run: gh pr merge --auto --squash "$PR_URL" + - name: "Enable Auto Merge" + if: ${{ always() }} + run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr-checks.yml similarity index 56% rename from .github/workflows/pr.yml rename to .github/workflows/pr-checks.yml index 9131fca566..8448acc094 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr-checks.yml @@ -1,4 +1,4 @@ -name: "Lint PR" +name: "Pull Request Checks" on: workflow_dispatch: @@ -9,18 +9,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true +permissions: write-all + jobs: - check_dependencies: + pr-dependencies: runs-on: ubuntu-latest - name: Check Dependencies + name: "Check PR Dependencies" steps: - - uses: gregsdennis/dependencies-action@main + - name: PR Dependency Check + uses: gregsdennis/dependencies-action@v1.4.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - check_title: - name: Check Title + semantic-title: + name: "Check Semantic Title" runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@v5 + - name: "Check Semantic Pull Request" + uses: amannn/action-semantic-pull-request@v5.5.3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 8eb133ade1..0000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: Unit Tests - -on: - push: - pull_request: - workflow_dispatch: - schedule: - - cron: "0 0 * * *" - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - pytest: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.9", "3.10", "3.11", "3.12"] - # Python 3.9 are on macos-13 but not macos-latest (macos-14-arm64) - # https://github.com/actions/setup-python/issues/696#issuecomment-1637587760 - exclude: - - { python-version: "3.9", os: "macos-latest" } - include: - - { python-version: "3.9", os: "macos-13" } - env: - OS: ${{ matrix.os }} - PYTHON: ${{ matrix.python-version }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: "pip" - cache-dependency-path: "requirements/dev.txt" - check-latest: true - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 - pip install -r requirements/dev.txt - - name: Setup cache - id: cache-pytest - uses: actions/cache@v4 - with: - path: .pytest_cache - key: ${{ matrix.os }}-${{ matrix.python-version }}-pytest - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics - docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - cache: "pip" - cache-dependency-path: "requirements/docs.txt" - check-latest: true - - name: Install dependencies - run: | - python -m pip install -U pip - pip install ".[docs]" - - name: Check Links - if: github.event_name == 'schedule' - run: | - cd docs - make linkcheck - - name: Compile to html - run: | - cd docs - make html diff --git a/.github/workflows/todo-checks.yml b/.github/workflows/todo-checks.yml new file mode 100644 index 0000000000..57f91eb399 --- /dev/null +++ b/.github/workflows/todo-checks.yml @@ -0,0 +1,40 @@ +name: "TODO Checks" + +on: + push: + paths: + - discord/ + - docs/ + - examples/ + - tests/ + branches: [master] + pull_request: + paths: + - discord/ + - docs/ + - examples/ + - tests/ + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: write-all + +jobs: + todo-check: + runs-on: ubuntu-latest + steps: + - name: "Checkout Repository" + uses: actions/checkout@v4 + - name: "Track TODO Action" + uses: ribtoks/tdg-github-action@v0.4.11-beta + with: + TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + SHA: ${{ github.sha }} + REF: ${{ github.ref }} + COMMENT_ON_ISSUES: true + EXCLUDE_PATTERN: "\\.(doctree|doctrees|pickle)$" + ASSIGN_FROM_BLAME: true diff --git a/.github/workflows/todo.yml b/.github/workflows/todo.yml deleted file mode 100644 index 17caeeac0b..0000000000 --- a/.github/workflows/todo.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Check TODO -on: [push, pull_request, workflow_dispatch] -jobs: - todo: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Run tdg-github-action - uses: ribtoks/tdg-github-action@v0.4.11-beta - with: - TOKEN: ${{ secrets.GITHUB_TOKEN }} - REPO: ${{ github.repository }} - SHA: ${{ github.sha }} - REF: ${{ github.ref }} - COMMENT_ON_ISSUES: true - EXCLUDE_PATTERN: "\\.(doctree|doctrees|pickle)$" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fdad35f6b2..3aa0288d23 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,9 +7,9 @@ repos: rev: v4.6.0 hooks: - id: trailing-whitespace - exclude: \.(po|pot)$ + exclude: \.(po|pot|yml|yaml)$ - id: end-of-file-fixer - exclude: \.(po|pot)$ + exclude: \.(po|pot|yml|yaml)$ - repo: https://github.com/PyCQA/autoflake rev: v2.3.1 hooks: @@ -24,18 +24,18 @@ repos: rev: v3.17.0 hooks: - id: pyupgrade - exclude: \.(po|pot)$ + exclude: \.(po|pot|yml|yaml)$ - repo: https://github.com/PyCQA/isort rev: 5.13.2 hooks: - id: isort - exclude: \.(po|pot)$ + exclude: \.(po|pot|yml|yaml)$ - repo: https://github.com/psf/black rev: 24.8.0 hooks: - id: black args: [--safe, --quiet] - exclude: \.(po|pot)$ + exclude: \.(po|pot|yml|yaml)$ - repo: https://github.com/Pierre-Sassoulas/black-disable-checker rev: v1.1.3 hooks: @@ -85,12 +85,12 @@ repos: hooks: - id: prettier args: [--prose-wrap=always, --print-width=88] - exclude: \.(po|pot)$ + exclude: \.(po|pot|yml|yaml)$ - repo: https://github.com/DanielNoord/pydocstringformatter rev: v0.7.3 hooks: - id: pydocstringformatter - exclude: \.(po|pot)$ + exclude: \.(po|pot|yml|yaml)$ args: [ --style=numpydoc,