Skip to content

Fix SyntaxWarning in regex patterns (Bug #1085657)

This merge request fixes a trivial but annoying bug in the jube package (version 2.7.1-2). During piuparts tests, SyntaxWarnings were emitted due to invalid escape sequences in two regex patterns:

  • In jube/benchmark.py, the regex used for splitting filenames was causing a warning because the escape sequence '\.' was not interpreted literally.
  • In jube/util/util.py, a similar warning occurred for the pattern '\$'.

To resolve these warnings, this patch adds the raw string prefix (r"") to both regex patterns. This change ensures that backslashes are treated as literal characters, thus eliminating the SyntaxWarnings.

Merge request reports

Loading