From 3b51b68b6895f8c56614b7bb1b80645f8628fc25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 11 Jan 2021 20:03:53 +0100 Subject: [PATCH] misc: add black files/notes --- .git-blame-ignore-revs | 2 ++ .pre-commit-config.yaml | 8 ++++++++ README | 11 +++++++++++ 3 files changed, 21 insertions(+) create mode 100644 .git-blame-ignore-revs create mode 100644 .pre-commit-config.yaml diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000..bc8e9ea --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# trivial: apply black +faa1f97b000c9e259edbf45bed4b362fcb7fad8f 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 94164b4..347f7d5 100644 --- a/README +++ b/README @@ -63,3 +63,14 @@ You can open an upload form to fargo by creating a popup or an iframe with location http://fargo/upload/. You can pass a parameter ?next=http://yoursite/ if you want the user to come back to your site after the upload, to close the popup or the destroy the iframe. + + +Code Style +========== + +black is used to format the Python 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.)