Skip to content

Commit

Permalink
ci: move black & isort to pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
browniebroke committed Sep 2, 2022
1 parent b1a6408 commit 9d72915
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ jobs:
run: |
tox -e dist-check
- name: Codestyle
if: ${{ matrix.python-version == '3.9' }}
run: |
tox -e codestyle
- name: Lint - sort
if: ${{ matrix.python-version == '3.9' }}
run: |
tox -e sort
- name: Security
if: ${{ matrix.python-version == '3.9' }}
run: |
Expand All @@ -64,3 +54,12 @@ jobs:
if: ${{ matrix.python-version == '3.9' }}
run: |
tox -e docs
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- uses: pre-commit/[email protected]
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: "^docs/.*$"
default_stages: [commit]

ci:
autofix_commit_msg: "chore(pre-commit.ci): auto fixes"
autoupdate_commit_msg: "chore(pre-commit.ci): pre-commit autoupdate"

repos:
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black

0 comments on commit 9d72915

Please sign in to comment.