How to use yapf as formatter of Python #6467
Unanswered
MoienBowen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I followed the documentation, it works with your suggested formater
black
asSo I tried with
yapf
, it works without any argument asHowever, I would like to change the tab length as 2, hence, I need to add the option
--style='{based_on_style: pep8, indent_width: 2}'
. It does not work when I modify the settings.json as followsIs there any one who could help me on this, please?
hits:
yapf --style='{based_on_style: pep8, indent_width: 2}' -I filename
echo filename | xargs yapf --style='{based_on_style: pep8, indent_width: 2}' -i
Beta Was this translation helpful? Give feedback.
All reactions