Skip to content

Commit

Permalink
Add pre-commit configuration (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Apr 2, 2021
1 parent d0f848e commit 85cb021
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,5 @@ jobs:
with:
python-version: 3.8

- name: Install flake8, isort and black
run: pip install flake8 isort black

- name: Run flake8
run: flake8 pygeos

- name: Run black
run: black pygeos --check

- name: Run isort
run: isort pygeos --check-only --extend-skip __init__.py

- name: Run black, flake8 and isort
uses: pre-commit/action@v2.0.0
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
files: 'pygeos'
repos:
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.8.0
hooks:
- id: isort
exclude: pygeos/__init__.py

0 comments on commit 85cb021

Please sign in to comment.