-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.style.yapf
71 lines (60 loc) · 1.76 KB
/
.style.yapf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Code style formatting settings
# https://github.com/google/yapf
[style]
# Which predefined style this style is based on.
BASED_ON_STYLE = google
# The number of columns to use for indentation.
INDENT_WIDTH = 4
# Max line length
COLUMN_LIMIT = 120
# Put closing brackets on a separate line, dedented, if the bracketed
# expression can't fit in a single line. Applies to all kinds of brackets,
# including function definitions and calls. For example:
#
# config = {
# 'key1': 'value1',
# 'key2': 'value2',
# } # <--- this bracket is dedented and on a separate line
DEDENT_CLOSING_BRACKETS = True
# Do not split consecutive brackets. Only relevant when
# dedent_closing_brackets is set. For example:
#
# call_func_that_takes_a_dict(
# {
# 'key1': 'value1',
# 'key2': 'value2',
# }
# )
#
# would reformat to:
#
# call_func_that_takes_a_dict({
# 'key1': 'value1',
# 'key2': 'value2',
# })
COALESCE_BRACKETS = True
# Let spacing indicate operator precedence.
# For example:
#
# a = 1 * 2 + 3 / 4
# b = 1 / 2 - 3 * 4
# c = (1 + 2) * (3 - 4)
# d = (1 - 2) / (3 + 4)
# e = 1 * 2 - 3
# f = 1 + 2 + 3 + 4
# will be formatted as follows to indicate precedence:
#
# a = 1*2 + 3/4
# b = 1/2 - 3*4
# c = (1+2) * (3-4)
# d = (1-2) / (3+4)
# e = 1*2 - 3
# f = 1 + 2 + 3 + 4
ARITHMETIC_PRECEDENCE_INDICATION = True
# If a comma separated list (dict, list, tuple, or function def)
# is on a line that is too long, split such that all elements are on a single line.
#SPLIT_ALL_COMMA_SEPARATED_VALUES = TRUE
# More settings
# https://github.com/google/yapf#knobs
# https://gist.github.com/krnd/3b8c5834c5c5c5097638ec10729787f7
# https://github.com/google/yapf/blob/51ffe2d07930a509ecb2ef454a7b251eeeac0a59/yapf/yapflib/style.py