blackdaemon

Daemon to automatically run black, the uncompromising code formatter.


Keywords
daemon, black, automation, formatter, yapf, autopep8, pyfmt, gofmt, rustfmt
License
MIT
Install
pip install blackdaemon==0.1.0.1

Documentation

Code style: black

A daemon to automatically run the Uncompromising Code Formatter black by watching a directory or file for changes. Try black online now.

What is black?

Black is the uncompromising Python code formatter. By using it, you agree to cede control over minutiae of hand-formatting. In return, Black gives you speed, determinism, and freedom from pycodestyle nagging about formatting. You will save time and mental energy for more important matters.

Installation

pip install blackdaemon

Use

blackdaemon <directory or file>

API

>> python blackdaemon.py --help
usage: blackdaemon.py [-h] [--recursive | --non-recursive] [--no-run-on-start]
                      [-v] [-q]
                      [path]

positional arguments:
  path               path of file or directory to watch for changes

optional arguments:
  -h, --help         show this help message and exit
  --recursive        recursively watch director for changes (default)
  --non-recursive
  --no-run-on-start  run black only when files change, not on startup.
  -v, --version      print version of blackdaemon and black, then exit
  -q, --quiet        don't emit non-error messages to stderr. Errors are still
                     emitted, silence those with 2>/dev/null

Homepage

https://github.com/cs01/blackdaemon