Commit a862795e authored by Bryan Forbes's avatar Bryan Forbes Committed by Jelle Zijlstra
Browse files

Format pyi files correctly (#599)

parent 66aa6762
Loading
Loading
Loading
Loading
+2 −0
Changes for plugin/black.vim: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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)