parent
3cb010ec8e
commit
78317a4cfb
@ -12,6 +12,10 @@
|
|||||||
- Add support for parenthesized with (#2586)
|
- Add support for parenthesized with (#2586)
|
||||||
- Declare support for Python 3.10 for running Black (#2562)
|
- 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
|
## 21.10b0
|
||||||
|
|
||||||
### _Black_
|
### _Black_
|
||||||
|
@ -3,8 +3,13 @@ import collections
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import vim
|
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")):
|
class Flag(collections.namedtuple("FlagBase", "name, cast")):
|
||||||
@property
|
@property
|
||||||
|
Loading…
Reference in New Issue
Block a user