Black is "the uncompromising Python code formatter." It can be configured to automatically format your code whenever you save a file in VSCode.
In...
For further actions, you may consider blocking this person and/or reporting abuse
I generally need to pass in the
blackpath as well. This might be compatibility issues with wsl.settings.json
additionally you can turn on automatic formatting on save
if you don't want automatic formatting on save for every language
Thanks
What if I want to override
(88)the default chars per line?You can add this to your
pyproject.toml,~/.black,$XDG_CONFIG_HOME/black, or~/.config/blackblack.readthedocs.io/en/stable/usa...
I'm a fan of using
pyproject.toml, but as an alternative to Waylon's comment regarding config files, you can also configure the line length in VSCode.I am just doing a code review and this post was perfect for me to link it inside a comment about an illformted code. Thank you.
good :D
Thanks for the quick write up Adam. I was recently referred to start using Black and was curious about getting it running with VSC. This is exactly what I was looking for!
Glad it was helpful! :)
can I use it with *.rpy Ren'Py files?