Gentoo Archives: gentoo-catalyst

From: Mike Frysinger <vapier@g.o>
To: gentoo-catalyst@l.g.o
Subject: [gentoo-catalyst] [PATCH] lint: fix anomalous-backslash-in-string
Date: Tue, 06 Oct 2015 03:48:02
Message-Id: 1444103275-14433-1-git-send-email-vapier@gentoo.org
1 All strings using escape sequences should be raw strings.
2 This way we don't end up with accidental misbehavior.
3 ---
4 catalyst/config.py | 2 +-
5 1 file changed, 1 insertion(+), 1 deletion(-)
6
7 diff --git a/catalyst/config.py b/catalyst/config.py
8 index 67d4e77..5d74dce 100644
9 --- a/catalyst/config.py
10 +++ b/catalyst/config.py
11 @@ -42,7 +42,7 @@ class ParserBase:
12 values = {}
13 cur_array = []
14
15 - trailing_comment=re.compile('\s*#.*$')
16 + trailing_comment=re.compile(r'\s*#.*$')
17 #white_space=re.compile('\s+')
18
19 for x, myline in enumerate(self.lines):
20 --
21 2.5.2

Replies