This little step-by-step guide show you how to setup YAPF
formatting in PyCharm.
- Install
yapf
usingpip
pip install yapf
- Make sure the YAPF formatting file
.style.yapf
exists in the root folder of your codebase. - Setup YAPF as External Tools in PyCharm.
- Setup File Watchers in PyCharm to apply YAPF settings on file save.
- Done.
Note: you can use the command which yapf
to get the path of yapf
.