X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/e64949ee69e2a7e7f1d96331f50e801c0979a866..e401b6bb1e1c0ed534bba59d9dc908caf7ba898c:/src/blackd/__init__.py?ds=sidebyside diff --git a/src/blackd/__init__.py b/src/blackd/__init__.py index cc96640..0463f16 100644 --- a/src/blackd/__init__.py +++ b/src/blackd/__init__.py @@ -174,10 +174,8 @@ def parse_python_variant_header(value: str) -> Tuple[bool, Set[black.TargetVersi raise InvalidVariantHeader("major version must be 2 or 3") if len(rest) > 0: minor = int(rest[0]) - if major == 2 and minor != 7: - raise InvalidVariantHeader( - "minor version must be 7 for Python 2" - ) + if major == 2: + raise InvalidVariantHeader("Python 2 is not supported") else: # Default to lowest supported minor version. minor = 7 if major == 2 else 3