Skip to content

sessions: Use raw string for regular expression

Running pydoc on dogtail.sessionproduces some errors related to escaping, hinting at an issue in the module code:

$ pydoc3 dogtail.session
[...at exit...]
<unknown>:84: SyntaxWarning: invalid escape sequence '\.'
<unknown>:84: SyntaxWarning: invalid escape sequence '\.'
<unknown>:84: SyntaxWarning: invalid escape sequence '\.'
<unknown>:84: SyntaxWarning: invalid escape sequence '\.'

As it says, \. isn't a valid escape in Python strings — it should either be \\., or r'\.'. This MR goes with the latter.

Merge request reports