Removed distutils import from autoload/black.vim (#2607) (#2610)

This commit is contained in:
Michal Siska 2021-11-15 17:51:56 +01:00 committed by GitHub
parent 3cb010ec8e
commit 78317a4cfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -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_

View File

@ -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