Skip to content

Commit

Permalink
vim: Parse skip_magic_trailing_comma from pyproject.toml (#2613)
Browse files Browse the repository at this point in the history
Co-authored-by: Kyle Kovacs <kkovacs@diconfiberoptics.com>
  • Loading branch information
JelleZijlstra and Kyle Kovacs committed Nov 16, 2021
1 parent 1d71639 commit 1d72600
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions autoload/black.vim
Expand Up @@ -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),
]


Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit 1d72600

Please sign in to comment.