Skip to content

Commit 9d72915

Browse files
committed
ci: move black & isort to pre-commit
1 parent b1a6408 commit 9d72915

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

.github/workflows/python-package.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,6 @@ jobs:
4545
run: |
4646
tox -e dist-check
4747
48-
- name: Codestyle
49-
if: ${{ matrix.python-version == '3.9' }}
50-
run: |
51-
tox -e codestyle
52-
53-
- name: Lint - sort
54-
if: ${{ matrix.python-version == '3.9' }}
55-
run: |
56-
tox -e sort
57-
5848
- name: Security
5949
if: ${{ matrix.python-version == '3.9' }}
6050
run: |
@@ -64,3 +54,12 @@ jobs:
6454
if: ${{ matrix.python-version == '3.9' }}
6555
run: |
6656
tox -e docs
57+
58+
lint:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v2
62+
- uses: actions/setup-python@v4
63+
with:
64+
python-version: "3.9"
65+
- uses: pre-commit/[email protected]

.pre-commit-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
exclude: "^docs/.*$"
4+
default_stages: [commit]
5+
6+
ci:
7+
autofix_commit_msg: "chore(pre-commit.ci): auto fixes"
8+
autoupdate_commit_msg: "chore(pre-commit.ci): pre-commit autoupdate"
9+
10+
repos:
11+
- repo: https://github.com/PyCQA/isort
12+
rev: 5.10.1
13+
hooks:
14+
- id: isort
15+
- repo: https://github.com/psf/black
16+
rev: 22.6.0
17+
hooks:
18+
- id: black

0 commit comments

Comments
 (0)