]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Removed distutils import from autoload/black.vim (#2607) (#2610)
authorMichal Siska <94260368+515k4@users.noreply.github.com>
Mon, 15 Nov 2021 16:51:56 +0000 (17:51 +0100)
committerGitHub <noreply@github.com>
Mon, 15 Nov 2021 16:51:56 +0000 (08:51 -0800)
CHANGES.md
autoload/black.vim

index 0d409d778af0338eb8f74ae7b0b2133f18cbd6be..c565fbe50ca0e5b86e68686c0ac72c92797d5243 100644 (file)
 - Add support for parenthesized with (#2586)
 - Declare support for Python 3.10 for running Black (#2562)
 
 - 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_
 ## 21.10b0
 
 ### _Black_
index 9ff5c2341fe71d7920aa8a35fbbdcb9496a40e66..6c3bbfea81d873e5fd2f55ea8243fc416ef4def2 100644 (file)
@@ -3,8 +3,13 @@ import collections
 import os
 import sys
 import vim
 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
 
 class Flag(collections.namedtuple("FlagBase", "name, cast")):
   @property