psf/black ? reverse-engineered prompt
Reverse engineered prompt
Build me a Python code formatter that works like Black.
I want a command line tool that takes a Python file or whole folder and rewrites the code into a clean, consistent style with sensible defaults, so people do not have to argue about formatting. It should format files in place, handle standard Python files well, and be safe by checking that the formatted code still means the same thing. Make it easy to run from the terminal, and let users use it on a single file, a project, or through a pre commit hook.
Please also support reading basic settings from a pyproject.toml file, and include good documentation for how to install it and use it. If it makes sense, add support for formatting Jupyter notebooks too. Keep the output deterministic and make the style opinionated so there are very few options to worry about. Use current Python best practices, and look up current docs online if you need to.
Are you gonna build this?
make sure you review the code using coderabbit