Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is weird. Why does one of these have a final comma but not the other?

Copy link
Member Author

@notatallshaw notatallshaw Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, this is weird, I'll dig into why this is happening.


steps:
# The D: drive is significantly faster than the system C: drive.
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lock-threads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
125 changes: 63 additions & 62 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this changed the order of the blocks? If we need to keep a specific order, that seems a bit more annoying than just fixing formatting.

Copy link
Member Author

@notatallshaw notatallshaw Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only order that changed is that the yaml linting takes place after the yaml formatting.

This is a general best practice when both formatting and linting, if they both find issues then if the lint occurs before the format the format will change what the line numbers the lint was referring to, but if the format occurs before the lint then the lint line numbers remain valid.

Unfortunately the git diff didn't do a good job on matching that things are mostly the same.


- 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
Expand Down
3 changes: 3 additions & 0 deletions .yamlfmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
formatter:
retain_line_breaks_single: true
scan_folded_as_literal: true
Loading