From a862795e1acf5010141939a11a33a694f6fe024e Mon Sep 17 00:00:00 2001 From: Bryan Forbes Date: Mon, 4 Feb 2019 21:08:06 -0600 Subject: [PATCH] Format pyi files correctly (#599) --- plugin/black.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/black.vim b/plugin/black.vim index 0a26aa0..34f30c5 100644 --- a/plugin/black.vim +++ b/plugin/black.vim @@ -102,6 +102,8 @@ def Black(): mode = black.FileMode.AUTO_DETECT if bool(int(vim.eval("g:black_skip_string_normalization"))): mode |= black.FileMode.NO_STRING_NORMALIZATION + if vim.current.buffer.name.endswith('.pyi'): + mode |= black.FileMode.PYI 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) -- 2.39.5