From 4ccc8c86f5081990000c4dc09868d0bf040fb484 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Mon, 15 Jun 2020 08:55:42 -0700 Subject: [PATCH] Move vim flag cast to outside of get (#1486) With this config: ```toml [tool.black] line-length = 79 ``` In neovim, this is loaded as a string which later causes an exception to be thrown. This makes sure the value is always cast to an int --- plugin/black.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/black.vim b/plugin/black.vim index a0de953..4af044e 100644 --- a/plugin/black.vim +++ b/plugin/black.vim @@ -190,7 +190,7 @@ def get_configs(): toml_config = {} return { - flag.var_name: toml_config.get(flag.name, flag.cast(vim.eval(flag.vim_rc_name))) + flag.var_name: flag.cast(toml_config.get(flag.name, vim.eval(flag.vim_rc_name))) for flag in FLAGS } -- 2.39.5