Skip to content

Commit 13b1d02

Browse files
committed
Fix a flake8 warning concerning an invalid escape sequence '\.'.
This commit fixes the following flake8 warning: regression_tests/parsers/fileinfo_output_parser.py:112:51: W605 invalid escape sequence '\.' It seems to me that the flake8 parser is wrong here, as the following two strings should be equivalent, but flake8 reports a warning for the first one but not for the second one: r'.*GCC.*4\.7.*' '.*GCC.*4\\.7.*'
1 parent a26b48f commit 13b1d02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

regression_tests/parsers/fileinfo_output_parser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class FileinfoOutput(Text):
109109
110110
.. code-block:: python
111111
112-
assert fileinfo_output.contains(r'.*GCC.*4\.7.*')
112+
assert fileinfo_output.contains('.*GCC.*4\\.7.*')
113113
114114
The behavior of the ``in`` operator depends on the format of the output.
115115
For plain-text output, it behaves like regular ``in`` for strings,

0 commit comments

Comments
 (0)