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