diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..a4cf77e --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,35 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.0.1 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + +- repo: https://github.com/psf/black + rev: "21.5b1" + hooks: + - id: black + +- repo: https://github.com/PyCQA/isort + rev: "5.8.0" + hooks: + - id: isort + +- repo: https://github.com/PyCQA/flake8 + rev: "3.9.2" + hooks: + - id: flake8 + +- repo: https://github.com/pre-commit/mirrors-mypy + rev: "v0.812" + hooks: + - id: mypy + +- repo: https://github.com/asottile/pyupgrade + rev: "v2.18.2" + hooks: + - id: pyupgrade diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..ff07ac7 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,13 @@ +[isort] +profile = black +known_first_party = procrastinate +skip = .venv,.tox + +[flake8] +# E203: whitespace before colon on list slice: mylist[1 : 2] +# E501: line too long (black knows better) +extend-ignore = E203,E501 +extend-exclude = .venv + +[mypy] +no_implicit_optional = True