summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2021-01-11 19:11:07 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2021-01-11 19:11:07 (GMT)
commit8bb319ec8adf026ed8e1e0e06c3d3782a0628dcb (patch)
tree79dae0ba89198520c9a4292d46c85c06e9f4dd85
parentce7f2dd5000cf1eb462ae18aeeb5ab66913b452f (diff)
downloadwelco-8bb319ec8adf026ed8e1e0e06c3d3782a0628dcb.zip
welco-8bb319ec8adf026ed8e1e0e06c3d3782a0628dcb.tar.gz
welco-8bb319ec8adf026ed8e1e0e06c3d3782a0628dcb.tar.bz2
misc: add black files/notes
-rw-r--r--.git-blame-ignore-revs2
-rw-r--r--.pre-commit-config.yaml8
-rw-r--r--README12
3 files changed, 22 insertions, 0 deletions
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 0000000..505921d
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1,2 @@
+# trivial: apply black
+ce7f2dd5000cf1eb462ae18aeeb5ab66913b452f
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..a14705c
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,8 @@
+# See https://pre-commit.com for more information
+# See https://pre-commit.com/hooks.html for more hooks
+repos:
+- repo: https://github.com/psf/black
+ rev: 20.8b1
+ hooks:
+ - id: black
+ args: ['--target-version', 'py37', '--skip-string-normalization', '--line-length', '110']
diff --git a/README b/README
index a6c5eda..405e4b2 100644
--- a/README
+++ b/README
@@ -36,6 +36,18 @@ Tests
pip install pytest pytest-django pytest-mock
DJANGO_SETTINGS_MODULE=welco.settings py.test tests/
+
+Code Style
+----------
+
+black is used to format the code, using thoses parameters:
+
+ black --target-version py37 --skip-string-normalization --line-length 110
+
+There is .pre-commit-config.yaml to use pre-commit to automatically run black
+before commits. (execute `pre-commit install` to install the git hook.)
+
+
License
-------