From: Ian Jackson Date: Sun, 14 Oct 2018 13:18:05 +0000 (+0100) Subject: Escape: Add missing r in regexp literals ('...' => r'...') [10] X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=98daf0efb1bec8f41f2cae4266410fe42c5bdb3c;p=git-buildpackage.git Escape: Add missing r in regexp literals ('...' => r'...') [10] Detected by flake8, eg ./gbp/deb/git.py:35:6: W605 invalid escape sequence '\)' Signed-off-by: Ian Jackson --- diff --git a/tests/18_test_Config.py b/tests/18_test_Config.py index 60cd9cf..b234158 100644 --- a/tests/18_test_Config.py +++ b/tests/18_test_Config.py @@ -50,7 +50,7 @@ class TestConfigParser(unittest.TestCase, GbpLogTester): parser = GbpOptionParser('%scmd2' % prefix) self.assertEqual(parser.config['single_git_override_option1'], 'single_git_override_value1') for line in range(0, 2): - self._check_log(line, ".*Old style config section \[git-cmd2\] found please rename to \[cmd2\]") + self._check_log(line, r".*Old style config section \[git-cmd2\] found please rename to \[cmd2\]") def test_single_gbp_override(self): """ @@ -60,7 +60,7 @@ class TestConfigParser(unittest.TestCase, GbpLogTester): parser = GbpOptionParser('%scmd3' % prefix) self.assertEqual(parser.config['single_gbp_override_option1'], 'single_gbp_override_value1') for line in range(0, 2): - self._check_log(line, ".*Old style config section \[gbp-cmd3\] found please rename to \[cmd3\]") + self._check_log(line, r".*Old style config section \[gbp-cmd3\] found please rename to \[cmd3\]") def test_single_git_override_disabled_deprecations(self): """ diff --git a/tests/23_test_dch_extract_bts_cmds.py b/tests/23_test_dch_extract_bts_cmds.py index e1fb7e0..42d4bac 100644 --- a/tests/23_test_dch_extract_bts_cmds.py +++ b/tests/23_test_dch_extract_bts_cmds.py @@ -41,7 +41,7 @@ Closes: 456 """Test non-default BTS commands. We use the example given in the documentation manpages.""" options = OptionsStub() - options.meta_closes_bugnum = "(?:bug)?\s*ex-\d+" + options.meta_closes_bugnum = r"(?:bug)?\s*ex-\d+" lines = """This is a test commit some more lines...