From: Jelle Zijlstra Date: Tue, 16 Nov 2021 03:03:47 +0000 (-0800) Subject: vim: Parse skip_magic_trailing_comma from pyproject.toml (#2613) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/1d7260050d846d2ba2dd5bb22944b032245c7e51?ds=sidebyside;hp=1d7163957a34e8f071aaf9ac59467b912449fb07 vim: Parse skip_magic_trailing_comma from pyproject.toml (#2613) Co-authored-by: Kyle Kovacs --- diff --git a/CHANGES.md b/CHANGES.md index c565fbe..4e99c94 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,7 @@ ### Integrations - Fixed vim plugin with Python 3.10 by removing deprecated distutils import (#2610) +- The vim plugin now parses `skip_magic_trailing_comma` from pyproject.toml (#2613) ## 21.10b0 diff --git a/autoload/black.vim b/autoload/black.vim index 6c3bbfe..66c5b9c 100644 --- a/autoload/black.vim +++ b/autoload/black.vim @@ -29,6 +29,7 @@ FLAGS = [ Flag(name="fast", cast=strtobool), Flag(name="skip_string_normalization", cast=strtobool), Flag(name="quiet", cast=strtobool), + Flag(name="skip_magic_trailing_comma", cast=strtobool), ] @@ -143,6 +144,7 @@ def Black(**kwargs): line_length=configs["line_length"], string_normalization=not configs["skip_string_normalization"], is_pyi=vim.current.buffer.name.endswith('.pyi'), + magic_trailing_comma=not configs["skip_magic_trailing_comma"], **black_kwargs, ) quiet = configs["quiet"]