From 983789fef31cd8412f5be0012d01a3c63b997607 Mon Sep 17 00:00:00 2001 From: Marko Petric <marko.petric@cern.ch> Date: Mon, 9 Sep 2019 13:28:00 +0200 Subject: [PATCH] Add config file for python formatting --- setup.cfg | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000..638660566 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,40 @@ +[pycodestyle] +max-line-length = 120 +ignore = E111, E114 + #continuation line with same indent as next logical line + E125 + + +[pep8] +indent_size=2 + +[flake8] +exclude = .git,__pycache__,old,build,dist +ignore = + # indentation is not a multiple of 4 + E111 + # indentation is not a multiple of 4 (comment) + E114 + # closing bracket does not match visual indentation + E124 + # continuation line with same indent as next logical line + E125 + # continuation line over-indented for visual indent + E127 +max-line-length=120 +hang_closing=true + +[yapf] +based_on_style = pep8 +DEDENT_CLOSING_BRACKETS=false +COALESCE_BRACKETS=false +COLUMN_LIMIT=120 +EACH_DICT_ENTRY_ON_SEPARATE_LINE=true +INDENT_WIDTH=2 +SPACES_BEFORE_COMMENT=1 +SPACES_AROUND_DEFAULT_OR_NAMED_ASSIGN=true +SPLIT_ARGUMENTS_WHEN_COMMA_TERMINATED=true +SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PAREN=false +SPLIT_BEFORE_FIRST_ARGUMENT=false +SPLIT_PENALTY_AFTER_OPENING_BRACKET=1000000 +BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF=false -- GitLab