From 14e6a155b74bb8f98baf378186ae14b4782a7186 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 29 Aug 2012 01:36:36 -0400 Subject: [PATCH] pylint cleanup. --- Makefile | 5 +++++ irker.py | 20 +++++++------------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index a8620ae..508165a 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,11 @@ 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" +pylint: + @pylint --output-format=parseable $(PYLINTOPTS) irker.py + + SOURCES = README COPYING NEWS irker.py Makefile irker.xml irker-logo.jpg version: diff --git a/irker.py b/irker.py index d71a77b..78b7bf1 100755 --- a/irker.py +++ b/irker.py @@ -31,7 +31,7 @@ CONNECT_MAX = 18 # Max channels open per socket (freenet limit) # No user-serviceable parts below this line -import sys, json, exceptions, getopt, urlparse, time, socket +import sys, json, exceptions, getopt, urlparse, time import threading, Queue, SocketServer import irc.client, logging @@ -137,18 +137,12 @@ class Irker: def __init__(self, debuglevel=0): self.debuglevel = debuglevel self.irc = irc.client.IRC() - self.irc.add_global_handler("ping", - lambda c, e: self._handle_ping(c,e)) - self.irc.add_global_handler("welcome", - lambda c, e: self._handle_welcome(c,e)) - self.irc.add_global_handler("erroneusnickname", - lambda c, e: self._handle_badnick(c,e)) - self.irc.add_global_handler("nicknameinuse", - lambda c, e: self._handle_badnick(c,e)) - self.irc.add_global_handler("nickcollision", - lambda c, e: self._handle_badnick(c,e)) - self.irc.add_global_handler("unavailresource", - lambda c, e: self._handle_badnick(c,e)) + self.irc.add_global_handler("ping", self._handle_ping) + self.irc.add_global_handler("welcome", self._handle_welcome) + self.irc.add_global_handler("erroneusnickname", self._handle_badnick) + self.irc.add_global_handler("nicknameinuse", self._handle_badnick) + self.irc.add_global_handler("nickcollision", self._handle_badnick) + self.irc.add_global_handler("unavailresource", self._handle_badnick) thread = threading.Thread(target=self.irc.process_forever) self.irc._thread = thread thread.start() -- 2.26.2