parent
3cb010ec8e
commit
78317a4cfb
@ -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_
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user