Skip to content

Commit

Permalink
migrate to pre-commit for linting+formatting (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades authored Nov 26, 2021
1 parent 3eb6b44 commit 4416782
Show file tree
Hide file tree
Showing 8 changed files with 424 additions and 788 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,8 @@ jobs:
- name: Set Up Python
uses: actions/setup-python@v2
with:
python-version: "3.9.7" # 3.9.8 crashes
- name: Install Nox Dependencies
run: |
python -m pip install poetry nox nox-poetry pyparsing==3.0.4
- name: Run Lint
run: nox --non-interactive --session lint -- --full-trace
python-version: "3.9"
- uses: pre-commit/[email protected]

linkcheck:
name: Docs-Linkcheck
Expand Down
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/psf/black
rev: 21.9b0
hooks:
- id: black

- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies:
- pep8-naming

- repo: https://github.com/pycqa/isort
rev: 5.9.3
hooks:
- id: isort
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ list:

.PHONY: lint
lint:
poetry run flake8 ${SRC_FILES}
pre-commit run --all-files

.PHONY: test
test:
Expand Down
Loading

0 comments on commit 4416782

Please sign in to comment.