From 0529b0097105e0a3ebb3cba49e8c889ad9d19407 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 2 Oct 2012 22:09:19 -0400 Subject: [PATCH] pylint cleanup. --- irkerhook.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/irkerhook.py b/irkerhook.py index 799bc44..fabc754 100755 --- a/irkerhook.py +++ b/irkerhook.py @@ -168,18 +168,19 @@ class GenericExtractor: if self.color and self.color.lower() != "none": self.activate_color(self.color) -def has(dir, paths): +def has(dirname, paths): "Test for existence of a list of paths." - return all([os.path.exists(os.path.join(dir, x)) for x in paths]) + return all([os.path.exists(os.path.join(dirname, x)) for x in paths]) # VCS-dependent code begins here class GitExtractor(GenericExtractor): "Metadata extraction for the git version control system." @staticmethod - def is_repository(dir): + def is_repository(dirname): # Must detect both ordinary and bare repositories - return has(dir, [".git"]) or has(dir, ["HEAD", "refs", "objects"]) + return has(dirname, [".git"]) or \ + has(dirname, ["HEAD", "refs", "objects"]) def __init__(self, arguments): GenericExtractor.__init__(self, arguments) # Get all global config variables @@ -246,8 +247,8 @@ class GitExtractor(GenericExtractor): class SvnExtractor(GenericExtractor): "Metadata extraction for the svn version control system." @staticmethod - def is_repository(dir): - return has(dir, ["format", "hooks", "locks"]) + def is_repository(dirname): + return has(dirname, ["format", "hooks", "locks"]) def __init__(self, arguments): GenericExtractor.__init__(self, arguments) # Some things we need to have before metadata queries will work -- 2.26.2