From 70398ec1906d153590f3cc1e7ce5bc3ac45dc6af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 11 Jan 2021 19:08:28 +0100 Subject: [PATCH] misc: add black files/notes --- .git-blame-ignore-revs | 2 ++ .pre-commit-config.yaml | 8 ++++++++ README.rst | 10 ++++++++++ 3 files changed, 20 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..beb7b28 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# trivial: apply black +d37357188d49b5f7db11bc8e487caf620a666a85 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.rst b/README.rst index 02c9ff7..0ce019f 100644 --- a/README.rst +++ b/README.rst @@ -42,6 +42,16 @@ Note that the SSH host key verification will fail unless the proper known_hosts file has been installed, or created by manually connecting to the git server. +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.) + Packaging ---------