Partial pylint cleanup.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 27 Sep 2012 05:07:56 +0000 (01:07 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 27 Sep 2012 05:07:56 +0000 (01:07 -0400)
Makefile
git-irkbot.py

index d255e1e18a15ad82956a91fa8c2ef710ff8fce55..598315303b269ec0669191113268d6c2bbc87a9d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,9 +22,10 @@ clean:
        rm -f irker irker.1 irker-*.rpm irker-*.tar.gz *~
        rm -f SHIPPER.* *.html
 
-PYLINTOPTS = --rcfile=/dev/null --reports=n --include-ids=y --disable="C0103,C0111,C0301,R0201,R0902,R0903,E1101"
+PYLINTOPTS = --rcfile=/dev/null --reports=n --include-ids=y --disable="C0103,C0111,C0301,R0201,R0902,R0903,E1101,W0621"
 pylint:
        @pylint --output-format=parseable $(PYLINTOPTS) irker
+       @pylint --output-format=parseable $(PYLINTOPTS) git-irkbot.py
 
 
 SOURCES = README COPYING NEWS irker Makefile irker.xml irker-logo.png
index 8193fc8c6bfc2768509102690ce297b3c8bafad6..d44c014b5be69b516fedf28767730096e45a7625 100755 (executable)
@@ -53,8 +53,8 @@ default_irker_port = 6659
 # through gitweb or something similar. The defaults will probably
 # work if you have a typical gitweb/cgit setup.
 #
-#urlprefix="http://%(host)s/cgi-bin/gitweb.cgi?p=%(repo)s;a=commit;h="
-urlprefix="http://%(host)s/cgi-bin/cgit.cgi/%(repo)s/commit/?id="
+#urlprefix = "http://%(host)s/cgi-bin/gitweb.cgi?p=%(repo)s;a=commit;h="
+urlprefix = "http://%(host)s/cgi-bin/cgit.cgi/%(repo)s/commit/?id="
 
 # The service used to turn your gitwebbish URL into a tinyurl so it
 # will take up less space on the IRC notification line.
@@ -102,7 +102,7 @@ def extract(refname, merged):
         rev = merged[:12]
 
     # Extract the meta-information for the commit
-    files=do("git diff-tree -r --name-only '"+ merged +"' | sed -e '1d' -e 's-.*-&-'")
+    files = do("git diff-tree -r --name-only '"+ merged +"' | sed -e '1d' -e 's-.*-&-'")
     metainfo = do("git log -1 '--pretty=format:%an <%ae>%n%at%n%s' " + merged)
     (author, ts, logmsg) = metainfo.split("\n")
 
@@ -179,8 +179,7 @@ if __name__ == "__main__":
         merges = arguments[1:]
 
     for merged in merges:
-        context = extract(refname, merged)
-        privmsg = template % context
+        privmsg = template % extract(refname, merged)
         channel_list = channels.split(",")
         structure = {"to":channel_list, "privmsg":privmsg}
         message = json.dumps(structure)