[PATCH 2 of 2] tests: avoid using black >= 21
Mads Kiilerich
mads at kiilerich.com
Tue Mar 21 16:49:04 UTC 2023
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1679416596 -3600
# Tue Mar 21 17:36:36 2023 +0100
# Branch stable
# Node ID c6a1fc106a05b608983caced38a1849b2f4b476f
# Parent 812482250f8d49159bb3024f08e0db38d0bad565
tests: avoid using black >= 21
Different formatting will make test-check-format.t fail.
diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -1115,7 +1115,7 @@ def has_black():
version_regex = b'black, (?:version )?([0-9a-b.]+)'
version = matchoutput(blackcmd, version_regex)
sv = distutils.version.StrictVersion
- return version and sv(_bytes2sys(version.group(1))) >= sv('20.8b1')
+ return version and sv('20.8b1') <= sv(_bytes2sys(version.group(1))) < sv('21')
@check('pytype', 'the pytype type checker')
More information about the Mercurial-devel
mailing list