google/yapf ? reverse-engineered prompt
Reverse engineered prompt
Build me a Python code formatter like YAPF.
I want a tool that can clean up messy Python files and make them follow a chosen style automatically, with sensible defaults like pep8 and support for a Google style too. It should be able to format a single file, a whole folder recursively, or just show the diff without changing anything. If I want, it should also rewrite files in place and let me format only certain lines.
Please make it read style settings from config files when they exist, and let me override the style from the command line. It should also ignore files based on a simple ignore file or project config, and work nicely from the terminal or when called from Python code.
Keep it usable with current Python versions, and include a few examples so I can see how to run it on a file, a directory, or from another script. If you need to check current docs or behavior, look them up online.
Are you gonna build this?
make sure you review the code using coderabbit