John Vandenberg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/246421

Change subject: Add missing docstrings to botirc module.
......................................................................

Add missing docstrings to botirc module.

Change-Id: I6dd398a070e03ae0112e511967cee0cb83d735ce
---
M pywikibot/botirc.py
M tox.ini
2 files changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/21/246421/1

diff --git a/pywikibot/botirc.py b/pywikibot/botirc.py
index 35e2155..b509221 100644
--- a/pywikibot/botirc.py
+++ b/pywikibot/botirc.py
@@ -57,6 +57,7 @@
     }
 
     def __init__(self, site, channel, nickname, server, port=6667, **kwargs):
+        """Constructor."""
         pywikibot.Bot.__init__(self, **kwargs)
         SingleServerIRCBot.__init__(self, [(server, port)], nickname, nickname)
         self.channel = channel
@@ -75,15 +76,19 @@
             .replace('^B', '\002').replace('^C', '\003').replace('^U', '\037'))
 
     def on_nicknameinuse(self, c, e):
+        """Provide an alternative nickname."""
         c.nick(c.get_nickname() + "_")
 
     def on_welcome(self, c, e):
+        """Join channel."""
         c.join(self.channel)
 
     def on_privmsg(self, c, e):
+        """Ignore private message."""
         pass
 
     def on_pubmsg(self, c, e):
+        """Respond to public message."""
         match = self.re_edit.match(e.arguments()[0])
         if not match:
             return
@@ -108,13 +113,17 @@
         pywikibot.output(str((entry[0], name)))
 
     def on_dccmsg(self, c, e):
+        """Ignore DCC message."""
         pass
 
     def on_dccchat(self, c, e):
+        """Ignore DCC chat."""
         pass
 
     def do_command(self, e, cmd):
+        """Ignore command request."""
         pass
 
     def on_quit(self, e, cmd):
+        """Ignore quit request."""
         pass
diff --git a/tox.ini b/tox.ini
index 529dd3d..cc1305a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -58,6 +58,7 @@
     pywikibot/backports.py \
     pywikibot/bot.py \
     pywikibot/bot_choice.py \
+    pywikibot/botirc.py \
     pywikibot/comms/ \
     pywikibot/compat/ \
     pywikibot/config2.py \

-- 
To view, visit https://gerrit.wikimedia.org/r/246421
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6dd398a070e03ae0112e511967cee0cb83d735ce
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jay...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to