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