Skip to content
Permalink
Browse files

Propose new yapf format settings

Given our profuse use of dictionaries, this option procures compact
dictionaries, when most of its values are short.

CMK-1180

Change-Id: I5814b791e19917f662e53440c4f72335d2a886e8
  • Loading branch information...
Titan-C committed Nov 9, 2018
1 parent df0fe1f commit 9b668c2c01571ed507a38389a03381f494ea67d5
Showing with 103 additions and 188 deletions.
  1. +8 −0 .style.yapf
  2. +95 −188 cmk/gui/plugins/dashboard/builtin.py
@@ -4,6 +4,14 @@ blank_line_before_nested_class_or_def=False
column_limit=100
indent_dictionary_value=True

# Dictionary values sometimes exced the line length limit and are thus
# placed in a new line. But at the same time all dictionary elements follow
# this format to guard uniformity. This is inconvenient since we trade
# convenience at readtime(because short length values still appear in new
# lines) for format uniformity. Therefore we enforce dictionary values to
# remain on same line.
allow_split_before_dict_value=False

# We do not use i18n comments. Therefore we allow yapf to also format these things.
# Most declarations e.g. in cmk/gui/plugins/wato/active_checks.py are only reformatted
# with this change.
Oops, something went wrong.

0 comments on commit 9b668c2

Please sign in to comment.
You can’t perform that action at this time.