|
| 1 | +[style] |
| 2 | +# For docs, see https://github.com/google/yapf/blob/master/README.rst |
| 3 | + |
| 4 | +based_on_style = pep8 |
| 5 | +# Disallow splitting between dict key and dict value in multiline {"key": "value"} lines |
| 6 | +ALLOW_SPLIT_BEFORE_DICT_VALUE = false |
| 7 | + |
| 8 | +# Avoid adding unnecessary blank lines when nesting |
| 9 | +BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = false |
| 10 | + |
| 11 | +# Always add two blank lines for top-level classes and methods |
| 12 | +BLANK_LINES_AROUND_TOP_LEVEL_DEFINITION = 2 |
| 13 | + |
| 14 | +# These two combine consecutive ({ and }) to same line to reduce clutter |
| 15 | +COALESCE_BRACKETS = true |
| 16 | +DEDENT_CLOSING_BRACKETS = true |
| 17 | + |
| 18 | +# Line length |
| 19 | +COLUMN_LIMIT = 125 |
| 20 | + |
| 21 | +# Try to avoid having overly long lines by having excessively large penalty for that. |
| 22 | +SPLIT_PENALTY_EXCESS_CHARACTER = 1000000000 |
| 23 | + |
| 24 | +# Always split dict entries to one entry per line |
| 25 | +# EACH_DICT_ENTRY_ON_SEPARATE_LINE = true |
| 26 | + |
| 27 | +# Never split this comment to a separate line. Workaround for certain flake8 & email template lines |
| 28 | +I18N_COMMENT = # noqa |
| 29 | + |
| 30 | +# Allow automatically joining lines, for example, multiline if that would fit to a single line |
| 31 | +JOIN_MULTIPLE_LINES = true |
| 32 | + |
| 33 | +# "3 * 5", instead of "3*5" |
| 34 | +SPACES_AROUND_POWER_OPERATOR = true |
| 35 | + |
| 36 | +# Follow normal comment style by adding two spaces between code and comment |
| 37 | +SPACES_BEFORE_COMMENT = 2 |
| 38 | + |
| 39 | +# If list of items is comma terminated, always split to one per line. |
| 40 | +SPLIT_ARGUMENTS_WHEN_COMMA_TERMINATED = true |
| 41 | + |
| 42 | +# Related to previous one, if list of items (args or dict/list/...) needs to be split, split to one per line. |
| 43 | +# SPLIT_ALL_COMMA_SEPARATED_VALUES = true |
| 44 | + |
| 45 | +# Split dict generators for clarity (add line breaks between { and key: val etc. |
| 46 | +SPLIT_BEFORE_DICT_SET_GENERATOR = true |
| 47 | + |
| 48 | +# Split method(k1=v1, k2=v2...) to separate lines |
| 49 | +SPLIT_BEFORE_NAMED_ASSIGNS = true |
| 50 | + |
| 51 | +# For complex (for some definition of complex) comprehensions, put output, for and if to separate lines |
| 52 | +SPLIT_COMPLEX_COMPREHENSION = true |
| 53 | + |
| 54 | +# When splitting something to multiple lines ('method(\n val...'), intend by 4 |
| 55 | +CONTINUATION_INDENT_WIDTH = 4 |
0 commit comments