Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta: Run check-peps.py in pre-commit #4071

Merged
merged 9 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
7 changes: 6 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ env:
jobs:
pre-commit:
name: Run pre-commit
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# TEMP: Lint on all to test calling check-peps.py from pre-commit
os: [windows-latest, macos-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v4
Expand Down
17 changes: 9 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minimum_pre_commit_version: '2.8.2'
default_language_version:
python: python3

default_stages: [commit]
default_stages: [pre-commit]


repos:
Expand Down Expand Up @@ -98,13 +98,14 @@ repos:
# Local checks for PEP headers and more
- repo: local
hooks:
# # Hook to run "check-peps.py"
# - id: "check-peps"
# name: "Check PEPs for metadata and content enforcement"
# entry: "python check-peps.py"
# language: "system"
# files: "^pep-\d{4}\.(rst|txt)$"
# require_serial: true
# Hook to run "check-peps.py"
- id: "check-peps"
name: "Check PEPs for metadata and content enforcement"
entry: "python check-peps.py"
language: "python"
AA-Turner marked this conversation as resolved.
Show resolved Hide resolved
AA-Turner marked this conversation as resolved.
Show resolved Hide resolved
files: '^peps/pep-\d{4}\.rst$'
require_serial: true
types: [rst]
hugovk marked this conversation as resolved.
Show resolved Hide resolved

- id: check-required-headers
name: "PEPs must have all required headers"
Expand Down