matej_suchanek added a comment.

  `UI.input_list_choice` does not handle the default from `self.input(...)`:
  
    while True:
        choice = self.input(question, default=default, force=force)
        try:
            choice = int(choice) - 1
        except (TypeError, ValueError):
            if choice in answers:
                return choice
            choice = -1
        # User typed choice number
        if 0 <= choice < len(answers):
            return answers[choice]
  
  I also think the `default` argument of `UI.input` is not typed correctly and 
its default value should be `None`.

TASK DETAIL
  https://phabricator.wikimedia.org/T305937

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: matej_suchanek
Cc: matej_suchanek, Aklapper, pywikibot-bugs-list, Xqt, Jyoo1011, JohnsonLee01, 
SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, 
JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to