Unverified Commit 4ccc8c86 authored by Keith Smiley's avatar Keith Smiley Committed by GitHub
Browse files

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
parent 88d12f88
Loading
Loading
Loading
Loading
+1 −1
Changes for plugin/black.vim: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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
  }