##// END OF EJS Templates
formatting: using black to check for formatting
marmoute -
r43656:87e6ee56 stable draft
parent child Browse files
Show More
@@ -980,12 +980,9 b' def has_emacs():'
980 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')
984 @check('grey', 'grey, the fork of the black formatter for python')
983 @check('black', 'the black formatter for python')
985 984 def has_black():
986 985 # use that to actual black as soon as possible
987 # blackcmd = 'black --version'
988 blackcmd = 'python3 $RUNTESTDIR/../contrib/grey.py --version'
989 # version_regex = b'black, version \d'
990 version_regex = b'grey.py, version \d'
986 blackcmd = 'black --version'
987 version_regex = b'black, version \d'
991 988 return matchoutput(blackcmd, version_regex)
@@ -1,7 +1,5 b''
1 #require grey
2
3 (this should use the actual black as soon as possible)
1 #require black
4 2
5 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