X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/e5f5d54a224254bb7227f0379d0af0dde81aff37..9e15cacc6708a7b0dd4d86c943b591bb66c28e29:/plugin/black.vim 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)