mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Removed some more unused imports.
This commit is contained in:
parent
a656fd0693
commit
e6beec2989
@ -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
|
||||
|
@ -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):
|
||||
|
@ -27,7 +27,6 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###
|
||||
|
||||
import sets
|
||||
import time
|
||||
|
||||
import supybot.conf as conf
|
||||
|
@ -29,7 +29,6 @@
|
||||
|
||||
import re
|
||||
import time
|
||||
import string
|
||||
|
||||
import supybot.log as log
|
||||
import supybot.conf as conf
|
||||
|
@ -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
|
||||
|
@ -34,7 +34,6 @@ the same as) DJB's CDB <http://cr.yp.to/cdb.html>.
|
||||
|
||||
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
|
||||
|
@ -31,7 +31,6 @@ import os
|
||||
import sys
|
||||
import time
|
||||
import socket
|
||||
import string
|
||||
|
||||
import supybot.cdb as cdb
|
||||
import supybot.utils as utils
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user