how to add rule to auto change strings to use double quotes with yapf formatter and add comma after the last item of the list?

1.6k Views Asked by At

In the doc don't have a list available properties, and i find one file with some properties in gist.github, but i don't find the key for this rules.

Example of my problem: I have this code:

endpoints = [
    path('check_email/', check_email)
]

and i want that this code will be formated to:

endpoints = [
    path("check_email/", check_email),
]

I have setup.cfg file with some settings:

[yapf]
# custom
based_on_style = google
split_before_logical_operator = True
align_closing_bracket_with_visual_indent = True
allow_multiline_dictionary_keys = True
allow_multiline_lambdas = True
blank_line_before_nested_class_or_def = True
indent_dictionary_value = True
dedent_closing_brackets = True
no_spaces_around_selected_binary_operators = set()
split_before_expression_after_opening_paren = True
split_arguments_when_comma_terminated = True
split_complex_comprehension = True
0

There are 0 best solutions below