diff --git a/plugins/Format/plugin.py b/plugins/Format/plugin.py index edcd0f11c..433a1bf47 100644 --- a/plugins/Format/plugin.py +++ b/plugins/Format/plugin.py @@ -1,5 +1,5 @@ ### -# Copyright (c) 2004, Jeremiah Fincher +# Copyright (c) 2004-2005, Jeremiah Fincher # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/plugins/Karma/plugin.py b/plugins/Karma/plugin.py index bf4bf41e2..bf90c5242 100644 --- a/plugins/Karma/plugin.py +++ b/plugins/Karma/plugin.py @@ -29,8 +29,6 @@ import os import csv -import sets -from itertools import imap import supybot.conf as conf import supybot.utils as utils @@ -38,7 +36,6 @@ from supybot.commands import * import supybot.plugins as plugins import supybot.ircmsgs as ircmsgs import supybot.ircutils as ircutils -import supybot.registry as registry import supybot.callbacks as callbacks class SqliteKarmaDB(object): diff --git a/plugins/Scheduler/plugin.py b/plugins/Scheduler/plugin.py index bdbbf5319..f48d077b9 100644 --- a/plugins/Scheduler/plugin.py +++ b/plugins/Scheduler/plugin.py @@ -27,7 +27,6 @@ # POSSIBILITY OF SUCH DAMAGE. ### -import sets import time import supybot.conf as conf diff --git a/plugins/Seen/plugin.py b/plugins/Seen/plugin.py index e12fa9891..e911a5819 100644 --- a/plugins/Seen/plugin.py +++ b/plugins/Seen/plugin.py @@ -29,7 +29,6 @@ import re import time -import string import supybot.log as log import supybot.conf as conf diff --git a/src/callbacks.py b/src/callbacks.py index 12c8ee73a..739e8e68e 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -40,11 +40,9 @@ import supybot import re import copy -import sets import time import shlex import getopt -import string import inspect import operator from cStringIO import StringIO @@ -1307,7 +1305,7 @@ class PrivmsgRegexp(Privmsg): self.log.info('%s not running due to msg.isError.', self.name()) return for (r, name) in self.res: - spans = sets.Set() + spans = set() for m in r.finditer(msg.args[1]): # There's a bug in finditer: http://www.python.org/sf/817234 if m.span() in spans: @@ -1320,7 +1318,7 @@ class PrivmsgRegexp(Privmsg): class PrivmsgCommandAndRegexp(Privmsg): """Same as Privmsg, except allows the user to also include regexp-based - callbacks. All regexp-based callbacks must be specified in a sets.Set + callbacks. All regexp-based callbacks must be specified in a set (or list) attribute "regexps". """ flags = re.I diff --git a/src/cdb.py b/src/cdb.py index abf966e46..830fadd56 100644 --- a/src/cdb.py +++ b/src/cdb.py @@ -34,7 +34,6 @@ the same as) DJB's CDB . import os import sys -import sets import struct import os.path import cPickle as pickle @@ -289,7 +288,7 @@ class ReaderWriter(utils.IterableMap): self._readJournal() self._openFiles() self.adds = {} - self.removals = sets.Set() + self.removals = set() def _openFiles(self): self.cdb = Reader(self.filename) @@ -310,7 +309,7 @@ class ReaderWriter(utils.IterableMap): self.journal.flush() def _readJournal(self): - removals = sets.Set() + removals = set() adds = {} try: fd = file(self.journalName, 'r') @@ -415,7 +414,7 @@ class ReaderWriter(utils.IterableMap): has_key = __contains__ def iteritems(self): - already = sets.Set() + already = set() for (key, value) in self.cdb.iteritems(): if key in self.removals or key in already: continue diff --git a/src/conf.py b/src/conf.py index 0cb33d411..43e5e249d 100644 --- a/src/conf.py +++ b/src/conf.py @@ -31,7 +31,6 @@ import os import sys import time import socket -import string import supybot.cdb as cdb import supybot.utils as utils diff --git a/src/ircdb.py b/src/ircdb.py index 441dce139..a6c4bb07b 100644 --- a/src/ircdb.py +++ b/src/ircdb.py @@ -30,9 +30,7 @@ from __future__ import division import os -import sets import time -import string import operator import supybot.log as log @@ -113,7 +111,7 @@ def unWildcardHostmask(hostmask): return hostmask.translate(utils.str.chars, '!@*?') _invert = invertCapability -class CapabilitySet(sets.Set): +class CapabilitySet(set): """A subclass of set handling basic capability stuff.""" def __init__(self, capabilities=()): self.__parent = super(CapabilitySet, self) @@ -643,7 +641,7 @@ class UsersDictionary(utils.IterableMap): try: self._hostmaskCache[id].add(s) except KeyError: - self._hostmaskCache[id] = sets.Set([s]) + self._hostmaskCache[id] = set([s]) return id elif len(ids) == 0: raise KeyError, s diff --git a/src/ircmsgs.py b/src/ircmsgs.py index 12fb64a83..25233eaab 100644 --- a/src/ircmsgs.py +++ b/src/ircmsgs.py @@ -36,7 +36,6 @@ object (which, as you'll read later, is quite...full-featured :)) import re import time -import string import supybot.conf as conf import supybot.utils as utils diff --git a/src/registry.py b/src/registry.py index e1a51e287..b6661cee4 100644 --- a/src/registry.py +++ b/src/registry.py @@ -29,7 +29,6 @@ import re import os -import sets import time import string import textwrap @@ -607,7 +606,7 @@ class SpaceSeparatedListOfStrings(SpaceSeparatedListOf): Value = String class SpaceSeparatedSetOfStrings(SpaceSeparatedListOfStrings): - List = sets.Set + List = set class CommaSeparatedListOfStrings(SeparatedListOf): Value = String