jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/439481 )
Change subject: [IMPR] use ShowingListOption with pagegenerators.py ......................................................................
[IMPR] use ShowingListOption with pagegenerators.py
Change-Id: I3c6019845569819b275532a958bd4f7b33f4652d --- M pywikibot/pagegenerators.py 1 file changed, 3 insertions(+), 7 deletions(-)
Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index 25db7bb..638bb7b 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -14,7 +14,7 @@ ¶ms; """ # -# (C) Pywikibot team, 2008-2019 +# (C) Pywikibot team, 2008-2020 # # Distributed under the terms of the MIT license. # @@ -48,7 +48,7 @@ )
from pywikibot import date, config, i18n, xmlreader -from pywikibot.bot import ListOption +from pywikibot.bot import ShowingListOption from pywikibot.comms import http from pywikibot.exceptions import ( ArgumentDeprecationWarning, @@ -804,12 +804,8 @@ pnames = self.site.get_property_names() # also use the default by <enter> key if value in '?' or value not in pnames: - for i, item in enumerate(pnames, start=1): - pywikibot.output( - '{0:{1}}: {2}'.format(i, len(str(len(pnames))), - item)) prefix, value = pywikibot.input_choice( - question, ListOption(self.site.get_property_names())) + question, ShowingListOption(pnames)) return page_with_property_generator(value, site=self.site)
def _handle_usercontribs(self, value):
pywikibot-commits@lists.wikimedia.org