mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
pylint cleanups
This commit is contained in:
parent
3e1be1858b
commit
efb7891f46
@ -96,7 +96,7 @@ class Channel(callbacks.Privmsg):
|
||||
channel limit. <channel> is only necessary if the message isn't sent
|
||||
in the channel itself.
|
||||
"""
|
||||
limit = privmsg.getArgs(args)
|
||||
limit = privmsgs.getArgs(args)
|
||||
try:
|
||||
limit = int(limit)
|
||||
if limit < 0:
|
||||
@ -122,7 +122,7 @@ class Channel(callbacks.Privmsg):
|
||||
if self.haveOps(irc, channel, 'moderate the channel'):
|
||||
irc.queueMsg(ircmsgs.mode(channel, ['+m']))
|
||||
moderate = privmsgs.checkChannelCapability(moderate, 'op')
|
||||
|
||||
|
||||
def unmoderate(self, irc, msg, args, channel):
|
||||
"""[<channel>]
|
||||
|
||||
@ -149,7 +149,7 @@ class Channel(callbacks.Privmsg):
|
||||
if self.haveOps(irc, channel, 'unset the keyword'):
|
||||
irc.queueMsg(ircmsgs.mode(channel, ['-k']))
|
||||
key = privmsgs.checkChannelCapability(key, 'op')
|
||||
|
||||
|
||||
def op(self, irc, msg, args, channel):
|
||||
"""[<channel>] [<nick> ...]
|
||||
|
||||
|
@ -126,7 +126,7 @@ conf.supybot.plugins.Owner.register('public', registry.Boolean(True,
|
||||
###
|
||||
# supybot.commands.
|
||||
###
|
||||
|
||||
|
||||
conf.registerGroup(conf.supybot.commands, 'defaultPlugins')
|
||||
conf.supybot.commands.defaultPlugins.help = utils.normalizeWhitespace("""
|
||||
Determines what commands have default plugins set, and which plugins are set to
|
||||
@ -241,8 +241,9 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
||||
self.log.error('Error loading src/ plugin %s. '
|
||||
'This is usually rather '
|
||||
'serious; these plugins are '
|
||||
'almost always be loaded.', s)
|
||||
|
||||
'almost always be loaded.',
|
||||
name)
|
||||
|
||||
except Exception, e:
|
||||
log.exception('Failed to load %s:', name)
|
||||
else:
|
||||
@ -650,7 +651,7 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
||||
setattr(cb.__class__, name, method)
|
||||
delattr(cb.__class__, command)
|
||||
irc.replySuccess()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -426,7 +426,7 @@ class RichReplyMethods(object):
|
||||
else:
|
||||
log.warning('Denying %s for some unspecified capability '
|
||||
'(or a default)', self.msg.prefix)
|
||||
v = conf.supybot.replies.genericNoCapability.get(msg.args[0])()
|
||||
v = conf.supybot.replies.genericNoCapability.get(self.msg.args[0])()
|
||||
self.error(self.__makeReply(v, s), **kwargs)
|
||||
|
||||
def errorPossibleBug(self, s='', **kwargs):
|
||||
@ -751,7 +751,7 @@ class CanonicalString(registry.NormalizedString):
|
||||
class CanonicalNameSet(utils.NormalizingSet):
|
||||
def normalize(self, s):
|
||||
return canonicalName(s)
|
||||
|
||||
|
||||
class CanonicalNameDict(utils.InsensitivePreservingDict):
|
||||
def key(self, s):
|
||||
return canonicalName(s)
|
||||
@ -759,12 +759,12 @@ class CanonicalNameDict(utils.InsensitivePreservingDict):
|
||||
class Disabled(registry.SpaceSeparatedListOf):
|
||||
Value = CanonicalString
|
||||
List = CanonicalNameSet
|
||||
|
||||
|
||||
conf.registerGlobalValue(conf.supybot.commands, 'disabled',
|
||||
Disabled([], """Determines what commands are currently disabled. Such
|
||||
commands will not appear in command lists, etc. They will appear not even
|
||||
to exist."""))
|
||||
|
||||
|
||||
class DisabledCommands(object):
|
||||
def __init__(self):
|
||||
self.d = CanonicalNameDict()
|
||||
|
Loading…
Reference in New Issue
Block a user