Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.md
Expand Up @@ -10,6 +10,10 @@
- Add partial support for the match statement. As it's experimental, it's only enabled
when `--target-version py310` is explicitly specified (#2586)
- Add support for parenthesized with (#2586)

### Integrations

- Fixed vim plugin with Python 3.10 by removing deprecated distutils import (#2610)
- Declare support for Python 3.10 for running Black (#2562)
515k4 marked this conversation as resolved.
Show resolved Hide resolved

## 21.10b0
Expand Down
7 changes: 6 additions & 1 deletion autoload/black.vim
Expand Up @@ -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']:
515k4 marked this conversation as resolved.
Show resolved Hide resolved
return True
if text.lower() in ['n', 'no', 'f', 'false' 'off', '0']:
return False
raise ValueError("{} is not convertable to boolean".format(text))

class Flag(collections.namedtuple("FlagBase", "name, cast")):
@property
Expand Down