我正在使用2018年5月的Python扩展(2018年6月发布),用于Windows上的VS Code 1.23.1,通过Anaconda的python 3.6,conda将conda-forge中的黑色安装到我的conda环境中.
在我的用户settings.json中,我有以下内容:
"python.formatting.blackArgs": [
"--line-length 80"
],
Run Code Online (Sandbox Code Playgroud)
我认为这是在VS Code Python格式化中将参数传递给黑色的正确方法.
但是,在我的python输出窗格中,我得到以下内容:
Formatting with black failed.
Error: Error: no such option: --line-length 80
Run Code Online (Sandbox Code Playgroud)
编辑:如果我编辑我的settings.json没有args,例如:
"python.formatting.blackArgs": [],
Run Code Online (Sandbox Code Playgroud)
黑色按预期工作.
有谁知道如何正确地将参数传递给新的(截至2018年6月)黑色格式化程序?