Show More
@@ -1,5 +1,6 b'' | |||||
1 | from __future__ import absolute_import, print_function |
|
1 | from __future__ import absolute_import, print_function | |
2 |
|
2 | |||
|
3 | import distutils.version | |||
3 | import os |
|
4 | import os | |
4 | import re |
|
5 | import re | |
5 | import socket |
|
6 | import socket | |
@@ -982,7 +983,8 b' def has_emacs():' | |||||
982 |
|
983 | |||
983 | @check('black', 'the black formatter for python') |
|
984 | @check('black', 'the black formatter for python') | |
984 | def has_black(): |
|
985 | def has_black(): | |
985 | # use that to actual black as soon as possible |
|
|||
986 | blackcmd = 'black --version' |
|
986 | blackcmd = 'black --version' | |
987 |
version_regex = b'black, version |
|
987 | version_regex = b'black, version ([0-9a-b.]+)' | |
988 |
|
|
988 | version = matchoutput(blackcmd, version_regex) | |
|
989 | sv = distutils.version.StrictVersion | |||
|
990 | return version and sv(version.group(1)) >= sv('19.10b0') |
General Comments 0
You need to be logged in to leave comments.
Login now