##// END OF EJS Templates
formatting: using black to check for formatting
marmoute -
r43664:abb95b6f stable
parent child Browse files
Show More
@@ -980,12 +980,9 b' def has_emacs():'
980 return matchoutput('emacs --version', b'GNU Emacs 2(4.4|4.5|5|6|7|8|9)')
980 return matchoutput('emacs --version', b'GNU Emacs 2(4.4|4.5|5|6|7|8|9)')
981
981
982
982
983 # @check('black', 'the black formatter for python')
983 @check('black', 'the black formatter for python')
984 @check('grey', 'grey, the fork of the black formatter for python')
985 def has_black():
984 def has_black():
986 # use that to actual black as soon as possible
985 # use that to actual black as soon as possible
987 # blackcmd = 'black --version'
986 blackcmd = 'black --version'
988 blackcmd = 'python3 $RUNTESTDIR/../contrib/grey.py --version'
987 version_regex = b'black, version \d'
989 # version_regex = b'black, version \d'
990 version_regex = b'grey.py, version \d'
991 return matchoutput(blackcmd, version_regex)
988 return matchoutput(blackcmd, version_regex)
@@ -1,7 +1,5 b''
1 #require grey
1 #require black
2
3 (this should use the actual black as soon as possible)
4
2
5 $ cd $RUNTESTDIR/..
3 $ cd $RUNTESTDIR/..
6 $ python3 contrib/grey.py --config=black.toml --check --diff `hg files 'set:**.py - hgext/fsmonitor/pywatchman/** - mercurial/thirdparty/** - "contrib/python-zstandard/**" - contrib/grey.py'`
4 $ black --config=black.toml --check --diff `hg files 'set:**.py - hgext/fsmonitor/pywatchman/** - mercurial/thirdparty/** - "contrib/python-zstandard/**" - contrib/grey.py'`
7
5
General Comments 0
You need to be logged in to leave comments. Login now