From 936cd87ca3b9c04e0de9153cf972fd44a9d3fffc Mon Sep 17 00:00:00 2001 From: Pedro Ferreira Date: Fri, 19 Jun 2020 12:57:33 +0200 Subject: [PATCH] VC/Zoom: Add code linting config --- .flake8 | 37 +++++++++++++++++++++++++++++++++++++ setup.cfg | 2 ++ 2 files changed, 39 insertions(+) create mode 100644 .flake8 create mode 100644 setup.cfg diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..aff3b92 --- /dev/null +++ b/.flake8 @@ -0,0 +1,37 @@ +[flake8] +max-line-length = 120 + +# colored output +format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s + +# decent quote styles +inline-quotes = single +multiline-quotes = single +docstring-quotes = double +avoid-escape = true + +exclude = + build + dist + docs + ext_modules + htmlcov + indico.egg-info + node_modules + .*/ + # TODO: remove the next two entries and use extend-exclude once flake8 3.8.0 is out + .git + __pycache__ + +ignore = + # allow omitting whitespace around arithmetic operators + E226 + # don't require specific wrapping before/after binary operators + W503 + W504 + # allow assigning lambdas (it's useful for single-line functions defined inside other functions) + E731 + # while single quotes are nicer, we have double quotes in way too many places + Q000 + # for non-docstring multiline strings we don't really enforce a quote style + Q001 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..a5814c8 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[pydocstyle] +ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213