home: vim: null-ls: prefer 'pflake8' if available

This commit is contained in:
Bruno BELANYI 2022-03-11 14:30:24 +01:00
parent 1801d008d9
commit bab317e2f4

View file

@ -38,8 +38,14 @@ null_ls.register({
-- Python -- Python
null_ls.register({ null_ls.register({
null_ls.builtins.diagnostics.flake8.with({ null_ls.builtins.diagnostics.flake8.with({
-- Only used if available, but prefer pflake8 if available
condition = function()
return utils.is_executable("flake8") and not utils.is_executable("pflake8")
end,
}),
null_ls.builtins.diagnostics.pyproject_flake8.with({
-- Only used if available -- Only used if available
condition = utils.is_executable_condition("flake8"), condition = utils.is_executable_condition("pflake8"),
}), }),
null_ls.builtins.diagnostics.mypy.with({ null_ls.builtins.diagnostics.mypy.with({
-- Only used if available -- Only used if available