后台程序自动运行黑色,不妥协的代码格式化程序。
blackdaemon的Python项目详细描述
通过监视目录或文件的更改,自动运行不妥协的代码格式化程序^{
安装
pip install blackdaemon
使用
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
主页
https://github.com/cs01/blackdaemon