Incorrect formatting with "Reformate code"

已回答

I like to write django queries in this style.

This formatting seems perfect and there are no error warnings.

But after performing the "Reformat code", the lines are shifted and an error appears: "PEP 8: E131 continuation line unaligned for hanging indent"

Tabs and indents settings as default. All style settings too.

I tried different settings in "Editor -> Code style -> Python", but could not achieve the desired behavior.

Can I customize "Reformate code" to avoid such formatting?

1

This is a known issue https://youtrack.jetbrains.com/issue/PY-28496

>Can I customize "Reformate code" to avoid such formatting?

Unfortunately, it can't be customized.

-1

请先登录再写评论。