As an optional extra, this package can also reformat partial buffers using black-macchiato, which is a small wrapper around
black which does just that.
(use-package python-black :demand t :after python)
Use one of these commands via
M-x or bind them to a key:
Reformat the current buffer.
Reformat the current region. (Requires
Reformat the current statement. (Requires
Automatically reformat the buffer on save.
This package deliberately has minimal configuration. Use
M-x customize-group RET python-black or change these variables in your
black itself, use an external configuration file for your project, which has the benefits that it can be per-project, and works outside Emacs as well.
BSD-3-clause. Copyright © 2019 wouter bolsterlee.
wouter bolsterlee. wbolster.
https://github.com/wbolster on github. star my repos. fork them. and so on.
https://twitter.com/wbolster on twitter. follow me. or say hi.