pyflakes cleanups
This commit is contained in:
parent
0a2aa21777
commit
8b2269c441
@ -25,7 +25,6 @@ import sys
|
||||
import MySQLdb as mdb
|
||||
|
||||
import DrBotIRC
|
||||
from extlib import irclib
|
||||
|
||||
config_file = 'dr.botzo.cfg'
|
||||
# check argv
|
||||
|
@ -20,8 +20,6 @@ import re
|
||||
import urllib2
|
||||
from urllib import urlencode
|
||||
|
||||
from extlib import irclib
|
||||
|
||||
from Module import Module
|
||||
|
||||
class Babelfish(Module):
|
||||
|
@ -23,7 +23,6 @@ import re
|
||||
from dateutil.parser import *
|
||||
from dateutil.relativedelta import *
|
||||
from dateutil.tz import *
|
||||
from extlib import irclib
|
||||
|
||||
from Module import Module
|
||||
|
||||
|
@ -20,13 +20,11 @@ import math
|
||||
import re
|
||||
import random
|
||||
|
||||
from extlib import irclib
|
||||
|
||||
from Module import Module
|
||||
|
||||
import ply.lex as lex
|
||||
import ply.yacc as yacc
|
||||
|
||||
from Module import Module
|
||||
|
||||
class Dice(Module):
|
||||
|
||||
"""Roll simple or complex dice strings."""
|
||||
@ -307,7 +305,6 @@ class Dice(Module):
|
||||
matches = regex.search(roll)
|
||||
if matches is not None:
|
||||
dice = int(matches.group(1))
|
||||
comment = ''
|
||||
modifier = 0
|
||||
|
||||
if matches.group(2) is not None and matches.group(3) is not None:
|
||||
@ -316,9 +313,6 @@ class Dice(Module):
|
||||
else:
|
||||
modifier = int(matches.group(3))
|
||||
|
||||
if matches.group(4) is not None:
|
||||
comment = matches.group(4)
|
||||
|
||||
result = roll + ': '
|
||||
|
||||
rolls = []
|
||||
|
@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import re
|
||||
|
||||
from extlib import irclib
|
||||
|
||||
from Module import Module
|
||||
|
||||
class Echo(Module):
|
||||
|
@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
import random
|
||||
import re
|
||||
|
||||
from extlib import irclib
|
||||
|
||||
from Module import Module
|
||||
|
||||
class EightBall(Module):
|
||||
|
@ -21,8 +21,6 @@ import re
|
||||
|
||||
import MySQLdb as mdb
|
||||
|
||||
from extlib import irclib
|
||||
|
||||
from Module import Module
|
||||
|
||||
class Facts(Module):
|
||||
@ -129,7 +127,7 @@ class Facts(Module):
|
||||
except mdb.Error as e:
|
||||
self.log.error("database error in _get_fact")
|
||||
self.log.exception(e)
|
||||
return self.reply(connection, event, "database error in _get_fact")
|
||||
raise
|
||||
finally: cur.close()
|
||||
|
||||
# vi:tabstop=4:expandtab:autoindent
|
||||
|
@ -20,8 +20,6 @@ import re
|
||||
from urllib2 import urlopen
|
||||
from urllib import urlencode
|
||||
|
||||
from extlib import irclib
|
||||
|
||||
from Module import Module
|
||||
|
||||
class GoogleTranslate(Module):
|
||||
|
@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
from ConfigParser import NoOptionError
|
||||
import signal
|
||||
import sys
|
||||
|
||||
from extlib import irclib
|
||||
|
||||
|
@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from math import floor
|
||||
import re
|
||||
import string
|
||||
|
||||
import MySQLdb as mdb
|
||||
|
||||
|
@ -16,19 +16,15 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import cPickle
|
||||
from datetime import datetime
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
import sys
|
||||
import thread
|
||||
import time
|
||||
|
||||
from dateutil.relativedelta import *
|
||||
import MySQLdb as mdb
|
||||
|
||||
from dateutil.parser import *
|
||||
from dateutil.relativedelta import *
|
||||
from extlib import irclib
|
||||
|
||||
from Module import Module
|
||||
@ -453,7 +449,6 @@ class Markov(Module):
|
||||
def _get_chatter_targets(self):
|
||||
"""Get all possible chatter targets."""
|
||||
|
||||
values = []
|
||||
db = self.get_db()
|
||||
try:
|
||||
# need to create our own db object, since this is likely going to be in a new thread
|
||||
|
@ -22,8 +22,6 @@ import re
|
||||
|
||||
import MySQLdb as mdb
|
||||
|
||||
from extlib import irclib
|
||||
|
||||
from Module import Module
|
||||
|
||||
class Pi(Module):
|
||||
|
@ -18,11 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import re
|
||||
|
||||
import MySQLdb as mdb
|
||||
|
||||
from datetime import datetime
|
||||
from dateutil.tz import *
|
||||
from extlib import irclib
|
||||
import MySQLdb as mdb
|
||||
|
||||
from Module import Module
|
||||
|
||||
|
@ -20,7 +20,6 @@ import random
|
||||
import re
|
||||
import time
|
||||
|
||||
from datetime import datetime
|
||||
from dateutil.tz import *
|
||||
import MySQLdb as mdb
|
||||
|
||||
@ -1141,7 +1140,6 @@ class Storycraft(Module):
|
||||
|
||||
f.write(line.line + '\n')
|
||||
|
||||
legend = ''
|
||||
f.write('\n')
|
||||
for player in lines_by_player.keys():
|
||||
f.write(player + ':' + ','.join(lines_by_player[player]) + '\n')
|
||||
|
@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
import base64
|
||||
import re
|
||||
|
||||
from extlib import irclib
|
||||
|
||||
from Module import Module
|
||||
|
||||
class TextTransform(Module):
|
||||
|
@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
from ConfigParser import NoSectionError, NoOptionError
|
||||
import oauth2 as oauth
|
||||
import re
|
||||
import thread
|
||||
@ -25,7 +24,6 @@ import urlparse
|
||||
|
||||
import MySQLdb as mdb
|
||||
|
||||
from extlib import irclib
|
||||
from extlib import twitter
|
||||
|
||||
from Module import Module
|
||||
@ -298,7 +296,7 @@ class Twitter(Module):
|
||||
|
||||
try:
|
||||
return self.twit.VerifyCredentials()
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
def _log_in_to_twitter(self, oauth_token, oauth_token_secret):
|
||||
|
@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import re
|
||||
|
||||
from extlib import irclib
|
||||
from extlib import pywapi
|
||||
|
||||
from urllib import quote
|
||||
|
Loading…
Reference in New Issue
Block a user