mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 06:04:21 +01:00
Removed extraneous whitespace, unused imports, and converted some sets.Set() calls to set().
This commit is contained in:
parent
0fde2393e6
commit
ec045afd9c
@ -95,6 +95,6 @@ class OwnerTestCase(PluginTestCase):
|
||||
|
||||
def testDefaultPluginErrorsWhenCommandNotInPlugin(self):
|
||||
self.assertError('defaultplugin foobar owner')
|
||||
|
||||
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||
|
@ -37,7 +37,7 @@ def error(s):
|
||||
if not s.endswith(os.linesep):
|
||||
sys.stderr.write(os.linesep)
|
||||
sys.exit(-1)
|
||||
|
||||
|
||||
if sys.version_info < (2, 3, 0):
|
||||
error('This program requires Python >= 2.3.0')
|
||||
|
||||
|
@ -33,8 +33,6 @@ Module for some slight database-independence for simple databases.
|
||||
|
||||
import csv
|
||||
import math
|
||||
import sets
|
||||
import random
|
||||
|
||||
import supybot.cdb as cdb
|
||||
import supybot.utils as utils
|
||||
@ -408,7 +406,7 @@ class Record(object):
|
||||
default = None
|
||||
self.defaults[name] = default
|
||||
self.converters[name] = converter
|
||||
seen = sets.Set()
|
||||
seen = set()
|
||||
for (name, value) in kwargs.iteritems():
|
||||
assert name in self.fields, 'name must be a record value.'
|
||||
seen.add(name)
|
||||
@ -424,7 +422,7 @@ class Record(object):
|
||||
return csv.join([repr(getattr(self, name)) for name in self.fields])
|
||||
|
||||
def deserialize(self, s):
|
||||
unseenRecords = sets.Set(self.fields)
|
||||
unseenRecords = set(self.fields)
|
||||
for (name, strValue) in zip(self.fields, csv.split(s)):
|
||||
setattr(self, name, self.converters[name](strValue))
|
||||
unseenRecords.remove(name)
|
||||
|
@ -33,8 +33,6 @@ Contains simple socket drivers. Asyncore bugged (haha, pun!) me.
|
||||
|
||||
from __future__ import division
|
||||
|
||||
|
||||
|
||||
import time
|
||||
import select
|
||||
import socket
|
||||
|
@ -29,14 +29,12 @@
|
||||
|
||||
from supybot.test import *
|
||||
|
||||
import sets
|
||||
|
||||
import supybot.irclib as irclib
|
||||
from supybot.utils.iter import all
|
||||
import supybot.ircutils as ircutils
|
||||
|
||||
class holder:
|
||||
users = sets.Set(map(str, range(1000)))
|
||||
users = set(map(str, range(1000)))
|
||||
|
||||
class FunctionsTestCase(SupyTestCase):
|
||||
class irc:
|
||||
|
Loading…
Reference in New Issue
Block a user