diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93d09fef27e..b5df67d0cda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,8 +10,7 @@ on: pull_request: schedule: - cron: 0 0 * * MON # Run every Monday at 00:00 UTC - workflow_dispatch: - # allow manual runs on branches without a PR + workflow_dispatch: # allow manual runs on branches without a PR env: # The "FORCE_COLOR" variable, when set to 1, @@ -184,8 +183,8 @@ jobs: - "3.13" - "3.14" group: - - { number: 1, pytest-filter: "not test_install" } - - { number: 2, pytest-filter: "test_install" } + - {number: 1, pytest-filter: "not test_install"} + - {number: 2, pytest-filter: "test_install",} steps: # The D: drive is significantly faster than the system C: drive. @@ -255,7 +254,7 @@ jobs: --durations=5 --use-zipapp - check: # This job does nothing and is only used for the branch protection + check: # This job does nothing and is only used for the branch protection if: always() needs: diff --git a/.github/workflows/lock-threads.yml b/.github/workflows/lock-threads.yml index 367c3cca227..9e951458b49 100644 --- a/.github/workflows/lock-threads.yml +++ b/.github/workflows/lock-threads.yml @@ -2,7 +2,7 @@ name: 'Lock Closed Threads' on: schedule: - - cron: '0 7 * * *' # 7am UTC, daily + - cron: '0 7 * * *' # 7am UTC, daily workflow_dispatch: permissions: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9116caf4e30..a4e54f64853 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: name: pypi url: https://pypi.org/project/pip/${{ github.ref_name }} permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing + id-token: write # IMPORTANT: mandatory for trusted publishing steps: - name: Download all the dists diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5892e559b88..c8cf9dfd9f5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,74 +1,75 @@ exclude: 'src/pip/_vendor/' repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v6.0.0 - hooks: - - id: check-builtin-literals - - id: check-added-large-files - - id: check-case-conflict - - id: check-toml - - id: check-yaml - - id: debug-statements - - id: end-of-file-fixer - exclude: WHEEL - - id: forbid-new-submodules - - id: trailing-whitespace - exclude: .patch + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: check-builtin-literals + - id: check-added-large-files + - id: check-case-conflict + - id: check-toml + - id: debug-statements + - id: end-of-file-fixer + exclude: WHEEL + - id: forbid-new-submodules + - id: trailing-whitespace + exclude: .patch -- repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.9.0 - hooks: - - id: black + - repo: https://github.com/google/yamlfmt + rev: v0.20.0 + hooks: + - id: yamlfmt + types: [yaml] -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.3 - hooks: - - id: ruff-check - args: [--fix] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: check-yaml -- repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.18.2 - hooks: - - id: mypy - exclude: tests/data - args: ["--pretty", "--show-error-codes"] - additional_dependencies: [ - 'keyring==24.2.0', - 'nox==2024.03.02', - 'pytest', - 'types-docutils==0.20.0.3', - 'types-setuptools==68.2.0.0', - 'types-freezegun==1.1.10', - 'types-pyyaml==6.0.12.12', - 'typing-extensions', - ] + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 25.9.0 + hooks: + - id: black -- repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.10.0 - hooks: - - id: python-no-log-warn - - id: python-no-eval - - id: rst-backticks - files: .*\.rst$ - types: [file] - exclude: NEWS.rst # The errors flagged in NEWS.rst are old. + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.14.3 + hooks: + - id: ruff-check + args: [--fix] -- repo: https://github.com/codespell-project/codespell - rev: v2.4.1 - hooks: - - id: codespell - exclude: AUTHORS.txt|tests/data - args: ["--ignore-words", tools/codespell-ignore.txt] + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.18.2 + hooks: + - id: mypy + exclude: tests/data + args: ["--pretty", "--show-error-codes"] + additional_dependencies: ['keyring==24.2.0', 'nox==2024.03.02', 'pytest', 'types-docutils==0.20.0.3', 'types-setuptools==68.2.0.0', 'types-freezegun==1.1.10', 'types-pyyaml==6.0.12.12', 'typing-extensions'] -- repo: local - hooks: - - id: news-fragment-filenames - name: NEWS fragment - language: fail - entry: NEWS fragment files must be named *.(process|removal|feature|bugfix|vendor|doc|trivial).rst - exclude: ^news/(.gitignore|.*\.(process|removal|feature|bugfix|vendor|doc|trivial).rst) - files: ^news/ + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.10.0 + hooks: + - id: python-no-log-warn + - id: python-no-eval + - id: rst-backticks + files: .*\.rst$ + types: [file] + exclude: NEWS.rst # The errors flagged in NEWS.rst are old. + + - repo: https://github.com/codespell-project/codespell + rev: v2.4.1 + hooks: + - id: codespell + exclude: AUTHORS.txt|tests/data + args: ["--ignore-words", tools/codespell-ignore.txt] + + - repo: local + hooks: + - id: news-fragment-filenames + name: NEWS fragment + language: fail + entry: NEWS fragment files must be named *.(process|removal|feature|bugfix|vendor|doc|trivial).rst + exclude: ^news/(.gitignore|.*\.(process|removal|feature|bugfix|vendor|doc|trivial).rst) + files: ^news/ ci: autofix_prs: false diff --git a/.yamlfmt b/.yamlfmt new file mode 100644 index 00000000000..f8bd0244a1e --- /dev/null +++ b/.yamlfmt @@ -0,0 +1,3 @@ +formatter: + retain_line_breaks_single: true + scan_folded_as_literal: true