X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/e5f5d54a224254bb7227f0379d0af0dde81aff37..9db828c3def8f23f0d9e8650a7d2b009c8043eaf:/plugin/black.vim?ds=inline diff --git a/plugin/black.vim b/plugin/black.vim index 09261db..0b958b8 100644 --- a/plugin/black.vim +++ b/plugin/black.vim @@ -97,8 +97,9 @@ def Black(): start = time.time() fast = bool(int(vim.eval("g:black_fast"))) line_length = int(vim.eval("g:black_linelength")) + mode = black.FileMode.AUTO_DETECT if bool(int(vim.eval("g:black_skip_string_normalization"))): - mode = black.FileMode.AUTO_DETECT & black.FileMode.NO_STRING_NORMALIZATION + mode |= black.FileMode.NO_STRING_NORMALIZATION buffer_str = '\n'.join(vim.current.buffer) + '\n' try: new_buffer_str = black.format_file_contents(buffer_str, line_length=line_length, fast=fast, mode=mode)