Patchwork D12220: tests: require black 22.1.0

login
register
mail settings
Submitter phabricator
Date March 2, 2022, 12:18 a.m.
Message ID <differential-rev-PHID-DREV-r6rzbrezzm455az5cqhe-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50559/
State New
Headers show

Comments

phabricator - March 2, 2022, 12:18 a.m.
indygreg created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  We recently reformatted the repo with black 22.1.0. Since black 22.1.0
  is the first non-beta release of black and black is committed to
  keeping the style stable for 1 year, I think it makes sense to bump
  the required black verion to this version.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D12220

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -1119,13 +1119,13 @@ 
     return matchoutput('emacs --version', b'GNU Emacs 2(4.4|4.5|5|6|7|8|9)')
 
 
-@check('black', 'the black formatter for python (>= 20.8b1)')
+@check('black', 'the black formatter for python (>= 22.1.0)')
 def has_black():
     blackcmd = 'black --version'
     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(_bytes2sys(version.group(1))) >= sv('22.1.0')
 
 
 @check('pytype', 'the pytype type checker')