From: Keith Smiley Date: Mon, 15 Jun 2020 15:55:42 +0000 (-0700) Subject: Move vim flag cast to outside of get (#1486) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/4ccc8c86f5081990000c4dc09868d0bf040fb484?ds=inline 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 --- 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 }