Skip to content

Commit

Permalink
Removed distutils import from autoload/black.vim (#2607) (#2610)
Browse files Browse the repository at this point in the history
  • Loading branch information
515k4 committed Nov 15, 2021
1 parent 3cb010e commit 78317a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Expand Up @@ -12,6 +12,10 @@
- Add support for parenthesized with (#2586)
- Declare support for Python 3.10 for running Black (#2562)

### Integrations

- Fixed vim plugin with Python 3.10 by removing deprecated distutils import (#2610)

## 21.10b0

### _Black_
Expand Down
7 changes: 6 additions & 1 deletion autoload/black.vim
Expand Up @@ -3,8 +3,13 @@ import collections
import os
import sys
import vim
from distutils.util import strtobool

def strtobool(text):
if text.lower() in ['y', 'yes', 't', 'true' 'on', '1']:
return True
if text.lower() in ['n', 'no', 'f', 'false' 'off', '0']:
return False
raise ValueError(f"{text} is not convertable to boolean")

class Flag(collections.namedtuple("FlagBase", "name, cast")):
@property
Expand Down

0 comments on commit 78317a4

Please sign in to comment.