X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/4a007a881fa9d7757820657056aa376c05e49e9e..8c04847aa22d14f01bb206cfc1b1e1cebd2ae538:/autoload/black.vim?ds=sidebyside diff --git a/autoload/black.vim b/autoload/black.vim index 0d93aa8..29d8f2b 100644 --- a/autoload/black.vim +++ b/autoload/black.vim @@ -22,7 +22,7 @@ class Flag(collections.namedtuple("FlagBase", "name, cast")): FLAGS = [ Flag(name="line_length", cast=int), Flag(name="fast", cast=strtobool), - Flag(name="string_normalization", cast=strtobool), + Flag(name="skip_string_normalization", cast=strtobool), Flag(name="quiet", cast=strtobool), ] @@ -103,7 +103,7 @@ def Black(): configs = get_configs() mode = black.FileMode( line_length=configs["line_length"], - string_normalization=configs["string_normalization"], + string_normalization=not configs["skip_string_normalization"], is_pyi=vim.current.buffer.name.endswith('.pyi'), ) quiet = configs["quiet"] @@ -147,7 +147,7 @@ def get_configs(): toml_config = {} return { - flag.var_name: flag.cast(toml_config.get(flag.name, vim.eval(flag.vim_rc_name))) + flag.var_name: toml_config.get(flag.name, flag.cast(vim.eval(flag.vim_rc_name))) for flag in FLAGS }