Add pre commit (#103)

* add pre-commit

* run pre-commit

* skip lint on README.md as it breaks template filling
This commit is contained in:
Paul Robinson
2023-10-04 13:32:07 -06:00
committed by GitHub
parent efcb97c348
commit 7099bbaaa4
15 changed files with 82 additions and 67 deletions

View File

@ -5,8 +5,7 @@ CURRENT_SIGN_SETTING := $(shell git config commit.gpgSign)
help:
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "lint - check style with mypy, flake8, isort, pydocstyle, and black"
@echo "lint-roll - automatically fix problems with flake8 and black"
@echo "lint - fix linting issues with pre-commit
@echo "test - run tests quickly with the default Python"
@echo "docs - generate docs and open in browser (linux-docs for version on linux)"
@echo "notes - consume towncrier newsfragments/ and update release notes in docs/"
@ -27,12 +26,7 @@ clean-pyc:
find . -name '__pycache__' -exec rm -rf {} +
lint:
tox run -e lint
lint-roll:
isort <MODULE_NAME> tests
black <MODULE_NAME> tests setup.py
$(MAKE) lint
pre-commit run --all-files --show-diff-on-failure
test:
pytest tests