add black python formatter (#182)

This commit is contained in:
Benjamin Schmidt 2021-03-28 20:49:56 +02:00 committed by GitHub
parent 8ce7e8d800
commit 4f9a07d428
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,6 +13,7 @@ local flake8 = {
local isort = {formatCommand = "isort --quiet -", formatStdin = true}
local yapf = {formatCommand = "yapf --quiet", formatStdin = true}
local black = {formatCommand = "black --quiet --stdin-filename ", formatStdin = true}
if O.python.linter == 'flake8' then
table.insert(python_arguments, flake8)
@ -20,6 +21,8 @@ end
if O.python.formatter == 'yapf' then
table.insert(python_arguments, yapf)
elseif O.python.formatter == 'black' then
table.insert(python_arguments, black)
end
if O.python.isort then