Black是一个毫不妥协的python代码格式化工具, 特点是可配置项较少 Black依赖于python3.6+, 官方地址在https://github.com/psf/black
Install
pip install black
Configure
-
pyproject.toml
[tool.black] skip-string-normalization = true # 禁用双引号风格
-
pycharm
-
Create external tools
windows: File -> Settings -> Tools -> External Tools
-
Configure file watcher
-