archey3
archey3 copied to clipboard
SyntaxWarning: invalid escape sequence '\s'
Has something recently changed in Python? I've not consciously changed anything on my system that could affect archey3 the way I describe below.
Whenever I execute archey3
I get this warning before the usual output:
/usr/bin/archey3:332: SyntaxWarning: invalid escape sequence '\s'
info = [re.sub("\s\s+", "", line) for line in line.split(' ') if\
/usr/bin/archey3:697: SyntaxWarning: invalid escape sequence '\w'
DISPLAY_PARSING_REGEX = "(?P<func>\w+)\((|(?P<args>[\w, /]+))\)"
the lines are these
https://github.com/lclarkmichalek/archey3/blob/ac687529ec6208954f09c29f01760c66f73b1d10/archey3#L332-L333
and this
https://github.com/lclarkmichalek/archey3/blob/ac687529ec6208954f09c29f01760c66f73b1d10/archey3#L697
and prepending r
to the first "string"
of both lines solves the problem.
I can make a PR if this project is still alive.