From 8e9770a26bf321a0585141cf05ad959d9d18acb5 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Sat, 13 Jun 2020 17:19:08 +0200 Subject: [PATCH] Styling config --- pyproject.toml | 9 +++++++++ setup.cfg | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 pyproject.toml create mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..93b2644 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,9 @@ +[tool.black] +# Automatically ignore files in .gitignore (opened at this time): +# https://github.com/ambv/black/issues/475 +exclude = ''' +/( + \.pyc + | venv +)/ +''' diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..1a9901c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,43 @@ +[coverage:run] +source = + bda + bds + clubs + cof + events + gestioncof + kfet + petitscours + shared +omit = + *migrations* + *test*.py +branch = true + +[coverage:report] +precision = 2 +show_missing = true + +[flake8] +exclude = migrations +max-line-length = 88 +ignore = + # whitespace before ':' (not PEP8-compliant for slicing) + E203, + # lambda expression + E731, + # line break before binary operator (not PEP8-compliant) + W503 + +[isort] +# For black compat: https://github.com/ambv/black#how-black-wraps-lines +combine_as_imports = true +default_section = THIRDPARTY +force_grid_wrap = 0 +include_trailing_comma = true +known_django = django +known_first_party = bda,bds,clubs,cof,events,gestioncof,kfet,petitscours,shared +line_length = 88 +multi_line_output = 3 +not_skip = __init__.py +sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER