assorted whitespace nitpicking

This commit is contained in:
Brian S. Stephan 2011-01-20 14:15:10 -06:00
parent 7601b025e1
commit 18fc614a4a
4 changed files with 11 additions and 11 deletions

View File

@ -83,7 +83,7 @@ class Dice(Module):
else:
outstr += ",".join(str(i) for i in a)
outstr += "]"
return (total, outstr)
def process_roll(self, trials, mods, comment):
@ -173,7 +173,7 @@ class Dice(Module):
mods = p[1]
else:
mods = [p[1]]
p[0] = self.process_roll(None, mods, p[2])
p[0] = self.process_roll(None, mods, p[2])
output = p[0]
def p_comment(self, p):
@ -243,7 +243,7 @@ class Dice(Module):
else:
p[0] = None
def p_dice(self, p):
def p_dice(self, p):
'dice : NUMBER "d"'
p[0] = p[1]

View File

@ -36,7 +36,7 @@ class Help(Module):
self.helpre = re.compile('^!help(\s+(\S+)(\s+(.+))?)?\s*$')
def do(self, connection, event, nick, userhost, what, admin_unlocked):
"""look for !help and subcommands,
"""look for !help and subcommands,
and dispatch for further processing"""
match = self.helpre.search(what)
@ -56,7 +56,7 @@ class Help(Module):
description = module.help_description()
if description:
message += " %s - %s\n" % (module.__class__.__name__,
description)
description)
return message
def handle_help_module(self, modname):
@ -82,7 +82,7 @@ class Help(Module):
return "no help available for module '%s', command '%s'" % (modname, key)
else:
return "no module named '%s' is loaded" % (modname)
return "asked for help on module %s detail %s" % (modname, key)
def find_module(self, modname):
@ -103,7 +103,7 @@ class Help(Module):
If this returns None, the summary will be
"no help available for module foo"
"""
return """!help [module [detail]]
return """!help [module [detail]]
type '!help Help module' or '!help Help detail' for more information"""
def help_detail(self, command):
@ -113,7 +113,7 @@ type '!help Help module' or '!help Help detail' for more information"""
return """get a summary of a module's commands or function"""
elif command == 'detail':
return """get information on a specific module-defined detail"""
else:
else:
return None
if __name__ == "__main__":

View File

@ -177,7 +177,7 @@ class IrcAdmin(Module):
If this returns None, the summary will be
"no help available for module foo"
"""
return """Bot admin commands (do '!help IrcAdmin [cmd] for details):
return """Bot admin commands (do '!help IrcAdmin [cmd] for details):
!join, !part, !quit, !autojoin, !save, !nick, !load, !reload, !unload, !modules"""
def help_detail(self, command):

View File

@ -31,13 +31,13 @@ class Markov(Module):
"""
Create a chatterbot very similar to a MegaHAL, but simpler and
implemented in pure Python. Proof of concept code from Ape.
Ape wrote: based on this:
http://uswaretech.com/blog/2009/06/pseudo-random-text-markov-chains-python/
and this:
http://code.activestate.com/recipes/194364-the-markov-chain-algorithm/
"""
def __init__(self, irc, config, server):
"""Create the Markov chainer, and learn text from a file if available."""