tests/hghave.py
changeset 51750 3cb2b5b6626f
parent 51376 54a75576287a
child 51759 7f0cb9ee0534
equal deleted inserted replaced
51749:493034cc3265 51750:3cb2b5b6626f
  1111     # 24.4, so we allow emacs 24.4, 24.5, and 25+ (24.5 was the last
  1111     # 24.4, so we allow emacs 24.4, 24.5, and 25+ (24.5 was the last
  1112     # 24 release)
  1112     # 24 release)
  1113     return matchoutput('emacs --version', b'GNU Emacs 2(4.4|4.5|5|6|7|8|9)')
  1113     return matchoutput('emacs --version', b'GNU Emacs 2(4.4|4.5|5|6|7|8|9)')
  1114 
  1114 
  1115 
  1115 
  1116 @check('black', 'the black formatter for python (>= 20.8b1)')
  1116 @check('black', 'the black formatter for python >=23.3.0')
  1117 def has_black():
  1117 def has_black():
  1118     blackcmd = 'black --version'
  1118     blackcmd = 'black --version'
  1119     version_regex = b'black, (?:version )?([0-9a-b.]+)'
  1119     version_regex = b'black, (?:version )?([0-9a-b.]+)'
  1120     version = matchoutput(blackcmd, version_regex)
  1120     version = matchoutput(blackcmd, version_regex)
  1121     sv = distutils.version.StrictVersion
  1121     sv = distutils.version.StrictVersion
  1122     return version and sv(_bytes2sys(version.group(1))) >= sv('20.8b1')
  1122     return version and sv(_bytes2sys(version.group(1))) >= sv('23.3.0')
  1123 
  1123 
  1124 
  1124 
  1125 @check('pytype', 'the pytype type checker')
  1125 @check('pytype', 'the pytype type checker')
  1126 def has_pytype():
  1126 def has_pytype():
  1127     pytypecmd = 'pytype --version'
  1127     pytypecmd = 'pytype --version'