autopep8 and black work in vscode, but only yapf does not work
~ / .config / yapf / style
was an empty file.
Write appropriately
~/.config/yapf/style
[style]
based_on_style = pep8
spaces_before_comment = 4
Open the command palette with ctrl + shift + p
in vscode and check Show logs> window> python
It looks like > ~ / .local / bin / yapf --diff ~ / test.py
, so try the same on your terminal.
$ yapf --diff ~/test.py
// yapf: Unable to find section [style] in ~/.config/yapf/style
The lack of [style] is the cause of the error, so if you add it, it will work.
Recommended Posts