Skip to content

Commit 527e0d2

Browse files
committed
Add pre-commit config
1 parent 79d6a79 commit 527e0d2

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: psf/black@stable
18-
19-
check-file-headers:
20-
runs-on: ubuntu-latest
21-
steps:
22-
- uses: actions/checkout@v4
23-
- uses: actions/setup-python@v4
24-
with:
25-
python-version: 3.12
26-
- name: Check header
27-
run: python ./check_header.py
28-
shell: bash
17+
- uses: pre-commit/[email protected]
2918

3019
test:
3120
runs-on: ${{ matrix.os }}

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
repos:
3+
- repo: https://github.com/psf/black-pre-commit-mirror
4+
rev: 24.10.0
5+
hooks:
6+
- id: black
7+
- repo: local
8+
hooks:
9+
- id: check-headers
10+
name: check headers
11+
language: script
12+
entry: check_header.py
13+
pass_filenames: false
14+
require_serial: true
15+
types: [python]

0 commit comments

Comments
 (0)