From 1d947b30342163b723c96db563967323535fef45 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 25 Oct 2012 12:23:11 +0900 Subject: Even more coding style cleanup Fixing some more pylint warnings: W1401: Anomalous backslash in string W0623: Redefining name 'name' from outer scope W0702: No exception type(s) specified E0102: name: function already defined line n Change-Id: I5afcdb4771ce210390a79981937806e30900a93c --- git_config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'git_config.py') diff --git a/git_config.py b/git_config.py index ae288558..d6510aae 100644 --- a/git_config.py +++ b/git_config.py @@ -35,7 +35,7 @@ from git_command import terminate_ssh_clients R_HEADS = 'refs/heads/' R_TAGS = 'refs/tags/' -ID_RE = re.compile('^[0-9a-f]{40}$') +ID_RE = re.compile(r'^[0-9a-f]{40}$') REVIEW_CACHE = dict() @@ -288,7 +288,8 @@ class GitConfig(object): d = self._do('--null', '--list') if d is None: return c - for line in d.rstrip('\0').split('\0'): + for line in d.rstrip('\0').split('\0'): # pylint: disable=W1401 + # Backslash is not anomalous if '\n' in line: key, val = line.split('\n', 1) else: -- cgit v1.2.3-54-g00ecf