Open fpagnoux opened 6 years ago
My .style.yapf
:
[style]
based_on_style = pep8
align_closing_bracket_with_visual_indent = true
I'm having a similar problem. I've tried align_closing_bracket_with_visual_indent=true
and dedent_closing_brackets=false
separately and in combination. Despite the implication of those setting names, neither seems to produce hanging braces. yapf 0.28.0
It looks like, for formatting, the rule to effectively control this specific behavior is
indent_closing_brackets = true
Hey everyone,
Thanks for developing this tool! I'm trying to use in a project where the code style is to hang closing parenthesis. That's the E133 rule from
pep8
, that can be enabled with the--hang-closing
option . For instance, we prefer:over
I'm trying to set up
yapf
to enforce this, but it seems to always dedent the closing brackets... I thought settingalign_closing_bracket_with_visual_indent
totrue
was precisely made for this, but it doesn't seem to change anything...Am I doing something wrong? Can I make
yapf
enforce hanging closing brackets? Thanks in advance!