Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
- repo: local
hooks:
- id: flake8
name: flake8
entry: flake8
language: system
types: [python]
- id: isort
name: isort
entry: isort
language: system
types: [python]
- id: black
name: black
entry: black
language: system
types: [python]
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.PRECIOUS:
.SUFFIXES:

SHELL:=/bin/bash -e -o pipefail -O globstar
SHELL:=/bin/bash -e -o pipefail #-O globstar
SELF:=$(firstword $(MAKEFILE_LIST))

VE_DIR=venv
Expand Down Expand Up @@ -45,6 +45,7 @@ ${VE_DIR}:
.PHONY: develop
develop:
pip install -e .[dev]
pre-commit install

#=> install: install package
.PHONY: install
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ Code reformatting:

make reformat

Install pre-commit hook:

# included in `make devready`, not necessary for new installations
pre-commit install

Test:

make test # for current environment
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ exclude_lines = [
[tool.black]
line-length = 100

[tool.isort]
profile = "black"
src_paths = ["src"]


# [tool.flake8]
# flake8 does not support configuration in pyproject.toml
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dev =
ipython~=8.4
isort~=5.10
mypy
pre-commit~=3.4
pylint~=2.14
pytest-cov~=4.1
pytest-optional-tests
Expand Down