|
| 1 | +[style] |
| 2 | +# Align closing bracket with visual indentation. |
| 3 | +align_closing_bracket_with_visual_indent=False |
| 4 | + |
| 5 | +# Allow dictionary keys to exist on multiple lines. For example: |
| 6 | +# |
| 7 | +# x = { |
| 8 | +# ('this is the first element of a tuple', |
| 9 | +# 'this is the second element of a tuple'): |
| 10 | +# value, |
| 11 | +# } |
| 12 | +allow_multiline_dictionary_keys=False |
| 13 | + |
| 14 | +# Allow lambdas to be formatted on more than one line. |
| 15 | +allow_multiline_lambdas=False |
| 16 | + |
| 17 | +# Allow splitting before a default / named assignment in an argument list. |
| 18 | +allow_split_before_default_or_named_assigns=True |
| 19 | + |
| 20 | +# Allow splits before the dictionary value. |
| 21 | +allow_split_before_dict_value=True |
| 22 | + |
| 23 | +# Let spacing indicate operator precedence. For example: |
| 24 | +# |
| 25 | +# a = 1 * 2 + 3 / 4 |
| 26 | +# b = 1 / 2 - 3 * 4 |
| 27 | +# c = (1 + 2) * (3 - 4) |
| 28 | +# d = (1 - 2) / (3 + 4) |
| 29 | +# e = 1 * 2 - 3 |
| 30 | +# f = 1 + 2 + 3 + 4 |
| 31 | +# |
| 32 | +# will be formatted as follows to indicate precedence: |
| 33 | +# |
| 34 | +# a = 1*2 + 3/4 |
| 35 | +# b = 1/2 - 3*4 |
| 36 | +# c = (1+2) * (3-4) |
| 37 | +# d = (1-2) / (3+4) |
| 38 | +# e = 1*2 - 3 |
| 39 | +# f = 1 + 2 + 3 + 4 |
| 40 | +# |
| 41 | +arithmetic_precedence_indication=False |
| 42 | + |
| 43 | +# Number of blank lines surrounding top-level function and class |
| 44 | +# definitions. |
| 45 | +blank_lines_around_top_level_definition=2 |
| 46 | + |
| 47 | +# Insert a blank line before a class-level docstring. |
| 48 | +blank_line_before_class_docstring=False |
| 49 | + |
| 50 | +# Insert a blank line before a module docstring. |
| 51 | +blank_line_before_module_docstring=False |
| 52 | + |
| 53 | +# Insert a blank line before a 'def' or 'class' immediately nested |
| 54 | +# within another 'def' or 'class'. For example: |
| 55 | +# |
| 56 | +# class Foo: |
| 57 | +# # <------ this blank line |
| 58 | +# def method(): |
| 59 | +# ... |
| 60 | +blank_line_before_nested_class_or_def=False |
| 61 | + |
| 62 | +# Do not split consecutive brackets. Only relevant when |
| 63 | +# dedent_closing_brackets is set. For example: |
| 64 | +# |
| 65 | +# call_func_that_takes_a_dict( |
| 66 | +# { |
| 67 | +# 'key1': 'value1', |
| 68 | +# 'key2': 'value2', |
| 69 | +# } |
| 70 | +# ) |
| 71 | +# |
| 72 | +# would reformat to: |
| 73 | +# |
| 74 | +# call_func_that_takes_a_dict({ |
| 75 | +# 'key1': 'value1', |
| 76 | +# 'key2': 'value2', |
| 77 | +# }) |
| 78 | +coalesce_brackets=True |
| 79 | + |
| 80 | +# The column limit. |
| 81 | +column_limit=80 |
| 82 | + |
| 83 | +# The style for continuation alignment. Possible values are: |
| 84 | +# |
| 85 | +# - SPACE: Use spaces for continuation alignment. This is default behavior. |
| 86 | +# - FIXED: Use fixed number (CONTINUATION_INDENT_WIDTH) of columns |
| 87 | +# (ie: CONTINUATION_INDENT_WIDTH/INDENT_WIDTH tabs or |
| 88 | +# CONTINUATION_INDENT_WIDTH spaces) for continuation alignment. |
| 89 | +# - VALIGN-RIGHT: Vertically align continuation lines to multiple of |
| 90 | +# INDENT_WIDTH columns. Slightly right (one tab or a few spaces) if |
| 91 | +# cannot vertically align continuation lines with indent characters. |
| 92 | +continuation_align_style=SPACE |
| 93 | + |
| 94 | +# Indent width used for line continuations. |
| 95 | +continuation_indent_width=4 |
| 96 | + |
| 97 | +# Put closing brackets on a separate line, dedented, if the bracketed |
| 98 | +# expression can't fit in a single line. Applies to all kinds of brackets, |
| 99 | +# including function definitions and calls. For example: |
| 100 | +# |
| 101 | +# config = { |
| 102 | +# 'key1': 'value1', |
| 103 | +# 'key2': 'value2', |
| 104 | +# } # <--- this bracket is dedented and on a separate line |
| 105 | +# |
| 106 | +# time_series = self.remote_client.query_entity_counters( |
| 107 | +# entity='dev3246.region1', |
| 108 | +# key='dns.query_latency_tcp', |
| 109 | +# transform=Transformation.AVERAGE(window=timedelta(seconds=60)), |
| 110 | +# start_ts=now()-timedelta(days=3), |
| 111 | +# end_ts=now(), |
| 112 | +# ) # <--- this bracket is dedented and on a separate line |
| 113 | +dedent_closing_brackets=False |
| 114 | + |
| 115 | +# Disable the heuristic which places each list element on a separate line |
| 116 | +# if the list is comma-terminated. |
| 117 | +disable_ending_comma_heuristic=False |
| 118 | + |
| 119 | +# Place each dictionary entry onto its own line. |
| 120 | +each_dict_entry_on_separate_line=True |
| 121 | + |
| 122 | +# Require multiline dictionary even if it would normally fit on one line. |
| 123 | +# For example: |
| 124 | +# |
| 125 | +# config = { |
| 126 | +# 'key1': 'value1' |
| 127 | +# } |
| 128 | +force_multiline_dict=False |
| 129 | + |
| 130 | +# The regex for an i18n comment. The presence of this comment stops |
| 131 | +# reformatting of that line, because the comments are required to be |
| 132 | +# next to the string they translate. |
| 133 | +i18n_comment= |
| 134 | + |
| 135 | +# The i18n function call names. The presence of this function stops |
| 136 | +# reformattting on that line, because the string it has cannot be moved |
| 137 | +# away from the i18n comment. |
| 138 | +i18n_function_call= |
| 139 | + |
| 140 | +# Indent blank lines. |
| 141 | +indent_blank_lines=False |
| 142 | + |
| 143 | +# Put closing brackets on a separate line, indented, if the bracketed |
| 144 | +# expression can't fit in a single line. Applies to all kinds of brackets, |
| 145 | +# including function definitions and calls. For example: |
| 146 | +# |
| 147 | +# config = { |
| 148 | +# 'key1': 'value1', |
| 149 | +# 'key2': 'value2', |
| 150 | +# } # <--- this bracket is indented and on a separate line |
| 151 | +# |
| 152 | +# time_series = self.remote_client.query_entity_counters( |
| 153 | +# entity='dev3246.region1', |
| 154 | +# key='dns.query_latency_tcp', |
| 155 | +# transform=Transformation.AVERAGE(window=timedelta(seconds=60)), |
| 156 | +# start_ts=now()-timedelta(days=3), |
| 157 | +# end_ts=now(), |
| 158 | +# ) # <--- this bracket is indented and on a separate line |
| 159 | +indent_closing_brackets=False |
| 160 | + |
| 161 | +# Indent the dictionary value if it cannot fit on the same line as the |
| 162 | +# dictionary key. For example: |
| 163 | +# |
| 164 | +# config = { |
| 165 | +# 'key1': |
| 166 | +# 'value1', |
| 167 | +# 'key2': value1 + |
| 168 | +# value2, |
| 169 | +# } |
| 170 | +indent_dictionary_value=True |
| 171 | + |
| 172 | +# The number of columns to use for indentation. |
| 173 | +indent_width=4 |
| 174 | + |
| 175 | +# Join short lines into one line. E.g., single line 'if' statements. |
| 176 | +join_multiple_lines=True |
| 177 | + |
| 178 | +# Do not include spaces around selected binary operators. For example: |
| 179 | +# |
| 180 | +# 1 + 2 * 3 - 4 / 5 |
| 181 | +# |
| 182 | +# will be formatted as follows when configured with "*,/": |
| 183 | +# |
| 184 | +# 1 + 2*3 - 4/5 |
| 185 | +no_spaces_around_selected_binary_operators=set() |
| 186 | + |
| 187 | +# Use spaces around default or named assigns. |
| 188 | +spaces_around_default_or_named_assign=False |
| 189 | + |
| 190 | +# Adds a space after the opening '{' and before the ending '}' dict delimiters. |
| 191 | +# |
| 192 | +# {1: 2} |
| 193 | +# |
| 194 | +# will be formatted as: |
| 195 | +# |
| 196 | +# { 1: 2 } |
| 197 | +spaces_around_dict_delimiters=False |
| 198 | + |
| 199 | +# Adds a space after the opening '[' and before the ending ']' list delimiters. |
| 200 | +# |
| 201 | +# [1, 2] |
| 202 | +# |
| 203 | +# will be formatted as: |
| 204 | +# |
| 205 | +# [ 1, 2 ] |
| 206 | +spaces_around_list_delimiters=False |
| 207 | + |
| 208 | +# Use spaces around the power operator. |
| 209 | +spaces_around_power_operator=True |
| 210 | + |
| 211 | +# Use spaces around the subscript / slice operator. For example: |
| 212 | +# |
| 213 | +# my_list[1 : 10 : 2] |
| 214 | +spaces_around_subscript_colon=False |
| 215 | + |
| 216 | +# Adds a space after the opening '(' and before the ending ')' tuple delimiters. |
| 217 | +# |
| 218 | +# (1, 2, 3) |
| 219 | +# |
| 220 | +# will be formatted as: |
| 221 | +# |
| 222 | +# ( 1, 2, 3 ) |
| 223 | +spaces_around_tuple_delimiters=False |
| 224 | + |
| 225 | +# The number of spaces required before a trailing comment. |
| 226 | +# This can be a single value (representing the number of spaces |
| 227 | +# before each trailing comment) or list of values (representing |
| 228 | +# alignment column values; trailing comments within a block will |
| 229 | +# be aligned to the first column value that is greater than the maximum |
| 230 | +# line length within the block). For example: |
| 231 | +# |
| 232 | +# With spaces_before_comment=5: |
| 233 | +# |
| 234 | +# 1 + 1 # Adding values |
| 235 | +# |
| 236 | +# will be formatted as: |
| 237 | +# |
| 238 | +# 1 + 1 # Adding values <-- 5 spaces between the end of the statement and comment |
| 239 | +# |
| 240 | +# With spaces_before_comment=15, 20: |
| 241 | +# |
| 242 | +# 1 + 1 # Adding values |
| 243 | +# two + two # More adding |
| 244 | +# |
| 245 | +# longer_statement # This is a longer statement |
| 246 | +# short # This is a shorter statement |
| 247 | +# |
| 248 | +# a_very_long_statement_that_extends_beyond_the_final_column # Comment |
| 249 | +# short # This is a shorter statement |
| 250 | +# |
| 251 | +# will be formatted as: |
| 252 | +# |
| 253 | +# 1 + 1 # Adding values <-- end of line comments in block aligned to col 15 |
| 254 | +# two + two # More adding |
| 255 | +# |
| 256 | +# longer_statement # This is a longer statement <-- end of line comments in block aligned to col 20 |
| 257 | +# short # This is a shorter statement |
| 258 | +# |
| 259 | +# a_very_long_statement_that_extends_beyond_the_final_column # Comment <-- the end of line comments are aligned based on the line length |
| 260 | +# short # This is a shorter statement |
| 261 | +# |
| 262 | +spaces_before_comment=2 |
| 263 | + |
| 264 | +# Insert a space between the ending comma and closing bracket of a list, |
| 265 | +# etc. |
| 266 | +space_between_ending_comma_and_closing_bracket=True |
| 267 | + |
| 268 | +# Use spaces inside brackets, braces, and parentheses. For example: |
| 269 | +# |
| 270 | +# method_call( 1 ) |
| 271 | +# my_dict[ 3 ][ 1 ][ get_index( *args, **kwargs ) ] |
| 272 | +# my_set = { 1, 2, 3 } |
| 273 | +space_inside_brackets=False |
| 274 | + |
| 275 | +# Split before arguments |
| 276 | +split_all_comma_separated_values=False |
| 277 | + |
| 278 | +# Split before arguments, but do not split all subexpressions recursively |
| 279 | +# (unless needed). |
| 280 | +split_all_top_level_comma_separated_values=False |
| 281 | + |
| 282 | +# Split before arguments if the argument list is terminated by a |
| 283 | +# comma. |
| 284 | +split_arguments_when_comma_terminated=False |
| 285 | + |
| 286 | +# Set to True to prefer splitting before '+', '-', '*', '/', '//', or '@' |
| 287 | +# rather than after. |
| 288 | +split_before_arithmetic_operator=False |
| 289 | + |
| 290 | +# Set to True to prefer splitting before '&', '|' or '^' rather than |
| 291 | +# after. |
| 292 | +split_before_bitwise_operator=True |
| 293 | + |
| 294 | +# Split before the closing bracket if a list or dict literal doesn't fit on |
| 295 | +# a single line. |
| 296 | +split_before_closing_bracket=False |
| 297 | + |
| 298 | +# Split before a dictionary or set generator (comp_for). For example, note |
| 299 | +# the split before the 'for': |
| 300 | +# |
| 301 | +# foo = { |
| 302 | +# variable: 'Hello world, have a nice day!' |
| 303 | +# for variable in bar if variable != 42 |
| 304 | +# } |
| 305 | +split_before_dict_set_generator=True |
| 306 | + |
| 307 | +# Split before the '.' if we need to split a longer expression: |
| 308 | +# |
| 309 | +# foo = ('This is a really long string: {}, {}, {}, {}'.format(a, b, c, d)) |
| 310 | +# |
| 311 | +# would reformat to something like: |
| 312 | +# |
| 313 | +# foo = ('This is a really long string: {}, {}, {}, {}' |
| 314 | +# .format(a, b, c, d)) |
| 315 | +split_before_dot=False |
| 316 | + |
| 317 | +# Split after the opening paren which surrounds an expression if it doesn't |
| 318 | +# fit on a single line. |
| 319 | +split_before_expression_after_opening_paren=False |
| 320 | + |
| 321 | +# If an argument / parameter list is going to be split, then split before |
| 322 | +# the first argument. |
| 323 | +split_before_first_argument=True |
| 324 | + |
| 325 | +# Set to True to prefer splitting before 'and' or 'or' rather than |
| 326 | +# after. |
| 327 | +split_before_logical_operator=True |
| 328 | + |
| 329 | +# Split named assignments onto individual lines. |
| 330 | +split_before_named_assigns=True |
| 331 | + |
| 332 | +# Set to True to split list comprehensions and generators that have |
| 333 | +# non-trivial expressions and multiple clauses before each of these |
| 334 | +# clauses. For example: |
| 335 | +# |
| 336 | +# result = [ |
| 337 | +# a_long_var + 100 for a_long_var in xrange(1000) |
| 338 | +# if a_long_var % 10] |
| 339 | +# |
| 340 | +# would reformat to something like: |
| 341 | +# |
| 342 | +# result = [ |
| 343 | +# a_long_var + 100 |
| 344 | +# for a_long_var in xrange(1000) |
| 345 | +# if a_long_var % 10] |
| 346 | +split_complex_comprehension=True |
| 347 | + |
| 348 | +# The penalty for splitting right after the opening bracket. |
| 349 | +split_penalty_after_opening_bracket=0 |
| 350 | + |
| 351 | +# The penalty for splitting the line after a unary operator. |
| 352 | +split_penalty_after_unary_operator=10000 |
| 353 | + |
| 354 | +# The penalty of splitting the line around the '+', '-', '*', '/', '//', |
| 355 | +# ``%``, and '@' operators. |
| 356 | +split_penalty_arithmetic_operator=300 |
| 357 | + |
| 358 | +# The penalty for splitting right before an if expression. |
| 359 | +split_penalty_before_if_expr=30 |
| 360 | + |
| 361 | +# The penalty of splitting the line around the '&', '|', and '^' |
| 362 | +# operators. |
| 363 | +split_penalty_bitwise_operator=300 |
| 364 | + |
| 365 | +# The penalty for splitting a list comprehension or generator |
| 366 | +# expression. |
| 367 | +split_penalty_comprehension=80 |
| 368 | + |
| 369 | +# The penalty for characters over the column limit. |
| 370 | +split_penalty_excess_character=4500 |
| 371 | + |
| 372 | +# The penalty incurred by adding a line split to the unwrapped line. The |
| 373 | +# more line splits added the higher the penalty. |
| 374 | +split_penalty_for_added_line_split=30 |
| 375 | + |
| 376 | +# The penalty of splitting a list of "import as" names. For example: |
| 377 | +# |
| 378 | +# from a_very_long_or_indented_module_name_yada_yad import (long_argument_1, |
| 379 | +# long_argument_2, |
| 380 | +# long_argument_3) |
| 381 | +# |
| 382 | +# would reformat to something like: |
| 383 | +# |
| 384 | +# from a_very_long_or_indented_module_name_yada_yad import ( |
| 385 | +# long_argument_1, long_argument_2, long_argument_3) |
| 386 | +split_penalty_import_names=0 |
| 387 | + |
| 388 | +# The penalty of splitting the line around the 'and' and 'or' |
| 389 | +# operators. |
| 390 | +split_penalty_logical_operator=300 |
| 391 | + |
| 392 | +# Use the Tab character for indentation. |
| 393 | +use_tabs=False |
0 commit comments