2

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
  • double quotes aren't pythonic (just check the docs, or "snth" in a repl), but if you want both of these things https://github.com/psf/black does it – acushner Apr 02 '20 at 22:43
  • @acushner have so many words that contains ' (such as don't, i'm etc), use double quotes as patterns makes more sense. And with black i will use two formatters? o.0 – marcos souza Apr 02 '20 at 22:57
  • ah, for sentences like that, double quotes are pythonic. try it in a repl, you'll see. – acushner Apr 03 '20 at 17:00

0 Answers0