X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/3cb010ec8ec02392dee5073b74e6eff80030c5f0..78317a4cfb2cc7958ebd553ff6d7cc1aff0d8296:/autoload/black.vim?ds=sidebyside diff --git a/autoload/black.vim b/autoload/black.vim index 9ff5c23..6c3bbfe 100644 --- a/autoload/black.vim +++ b/autoload/black.vim @@ -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