From 731aec8c0cf9f5fcfd29c5885124ae52825fa09d Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Fri, 30 Mar 2012 11:14:31 -0500 Subject: [PATCH] DrBotIRC, Facts: clean up some method header doc since it shows up in XML-RPC --- DrBotIRC.py | 18 ++++++++++++------ modules/Facts.py | 8 +++++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/DrBotIRC.py b/DrBotIRC.py index d473716..2063ace 100644 --- a/DrBotIRC.py +++ b/DrBotIRC.py @@ -40,7 +40,9 @@ class DrBotzoMethods: def echo(self, message): """ Just reply to the client, for testing purposes. - Arguments: message - the message to echo + + Keyword arguments: + message - the message to echo """ return message @@ -48,8 +50,10 @@ class DrBotzoMethods: def say(self, target, message): """ Say a message in a channel/to a nick. - Arguments: target - the nick/channel to privmsg - message - the message to send + + Keyword arguments: + target - the nick/channel to privmsg + message - the message to send """ self.irc.server.privmsg(target, message) @@ -58,9 +62,11 @@ class DrBotzoMethods: def execute_module_method(self, modname, method, args): """ Execute the method (with arguments) of the specified module. - Arguments: modname - the loaded module to retrieve - method - the method to call from that module - args - the arguments to provide to the method as a pythonic tuple + + Keyword arguments: + modname - the loaded module to retrieve + method - the method to call from that module + args - the arguments to provide to the method as a pythonic tuple """ for module in self.irc.modlist: diff --git a/modules/Facts.py b/modules/Facts.py index 0be6d9c..9572fd2 100644 --- a/modules/Facts.py +++ b/modules/Facts.py @@ -97,7 +97,13 @@ class Facts(Module): return self.reply(connection, event, "sqlite error: " + str(e)) def _get_fact(self, category, search=""): - """Get a fact in the given category from the database.""" + """ + Get a fact in the given category from the database. + + Keyword arguments: + category - the fact category to query + search - the optional regex to match against within that category + """ try: db = self.get_db()