From 983b22e3d35312267ce3c1f7be136a85ef7f955c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sa=C5=82aban?= Date: Tue, 30 Nov 2021 13:32:01 +0100 Subject: [PATCH] Add pre-commit formatting and sanitizing --- .gitignore | 1 + .pre-commit-config.yaml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.gitignore b/.gitignore index 4536ea5..e1f492d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ !.editorconfig !.gitignore !.travis.yml +!.pre-commit-config.yaml *.py[co] *~ *.bak diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..d5720c0 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +exclude: + ^(build/|dist/|docs/|htmlcov/|venv/) +repos: +- repo: https://github.com/psf/black + rev: 21.11b1 + hooks: + - id: black + language_version: python3 +#- repo: https://github.com/pycqa/isort +# rev: 5.10.1 +# hooks: +# - id: isort +# name: isort (python) +#- repo: https://gitlab.com/PyCQA/flake8 +# rev: 4.0.1 +# hooks: +# - id: flake8 +# args: [--max-line-length=127]