-
Notifications
You must be signed in to change notification settings - Fork 46
/
setup.cfg
80 lines (62 loc) · 2.72 KB
/
setup.cfg
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
72
73
74
75
76
77
78
79
80
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[yapf]
based_on_style=google
# Align closing bracket with visual indentation.
align_closing_bracket_with_visual_indent = False
# Allow dictionary keys to exist on multiple lines.
allow_multiline_dictionary_keys = True
# Allow lambdas to be formatted on more than one line.
allow_multiline_lambdas = True
blank_line_before_nested_class_or_def = True
# Do not split consecutive brackets. Only relevant when DEDENT_CLOSING_BRACKETS is set
coalesce_brackets = False
# The column limit.
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
#
# time_series = self.remote_client.query_entity_counters(
# entity='dev3246.region1',
# key='dns.query_latency_tcp',
# transform=Transformation.AVERAGE(window=timedelta(seconds=60)),
# start_ts=now()-timedelta(days=3),
# end_ts=now(),
# ) # <--- this bracket is dedented and on a separate line
dedent_closing_brackets=True
# Place each dictionary entry onto its own line.
each_dict_entry_on_separate_line = True
# The number of columns to use for indentation.
indent_width = 4
# Join short lines into one line. E.g., single line if statements.
join_multiple_lines = True
# Do not include spaces around selected binary operators.
# Example: 1 + 2 * 3 - 4 / 5 => 1 + 2*3 - 4/5
no_spaces_around_selected_binary_operators = True
# Insert a space between the ending comma and closing bracket of a list, etc.
space_between_ending_comma_and_closing_bracket = True
# Split before arguments if the argument list is terminated by a comma.
split_arguments_when_comma_terminated = False
# If an argument / parameter list is going to be split, then split before the first argument.
split_before_first_argument = True
# Split named assignments onto individual lines.
split_before_named_assigns = False
split_penalty_after_opening_bracket = 500
split_penalty_for_added_line_split = 10