From 27d288278a9012fb321d3bc496a2cac63a6d43a3 Mon Sep 17 00:00:00 2001 From: Son NK Date: Sun, 22 Dec 2019 11:57:16 +0000 Subject: [PATCH] add black config --- README.md | 6 ++++++ pyproject.toml | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 pyproject.toml diff --git a/README.md b/README.md index e7b2db4b..df0ea2a0 100644 --- a/README.md +++ b/README.md @@ -440,6 +440,12 @@ Here are a small sum-ups of the directory structure and their roles: - templates/: contain both html and email templates. - tests/: tests. We don't really distinguish unit, functional or integration test. A test is simply here to make sure a feature works correctly. +The code is formatted using https://github.com/psf/black, to format the code, simply run + +``` +black +``` + ### OAuth flow SL currently supports code and implicit flow. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..2c4e6d78 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,18 @@ +[tool.black] +exclude = ''' +( + /( + \.eggs # exclude a few common directories in the + | \.git # root of the project + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | _build + | buck-out + | build + | dist + | migrations # migrations/ is generated by alembic + )/ +) +'''