jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/704967 )
Change subject: [doc] Fix doc of bot.input_choice answers parameter
......................................................................
[doc] Fix doc of bot.input_choice answers parameter
bot.input_choice answers parameter is a bot.Option
rather than a bot.ChoiceException.
Also fix bullet list in bot.Option dict.
Change-Id: I35aa7f1c28c0c606a7d2907fb1bd16212063ed7b
---
M pywikibot/bot.py
M pywikibot/bot_choice.py
2 files changed, 6 insertions(+), 5 deletions(-)
Approvals:
Damian: Looks good to me, but someone else must approve
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index b261d09..e49315f 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -520,8 +520,8 @@
:param question: The question asked without trailing spaces.
:param answers: The valid answers each containing a full length answer and
a shortcut. Each value must be unique.
- :type answers: iterable containing a sequence of length two or instances of
- ChoiceException
+ :type answers: iterable containing a sequence of length two or
+ instances of :py:class:`pywikibot.bot.Option`
:param default: The result if no answer was entered. It must not be in the
valid answers and can be disabled by setting it to None. If it should
be linked with the valid answers it must be its shortcut.
diff --git a/pywikibot/bot_choice.py b/pywikibot/bot_choice.py
index 89daa17..943db8a 100755
--- a/pywikibot/bot_choice.py
+++ b/pywikibot/bot_choice.py
@@ -27,9 +27,10 @@
A basic option for input_choice.
The following methods need to be implemented:
- * format(default=None)
- * result(value)
- * test(value)
+
+ - format(default=None)
+ - result(value)
+ - test(value)
The methods ``test`` and ``handled`` are in such a relationship that
when ``handled`` returns itself that ``test`` must return True for
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/704967
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I35aa7f1c28c0c606a7d2907fb1bd16212063ed7b
Gerrit-Change-Number: 704967
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Damian <atagar1(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged