jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/737202 )
Change subject: [cleanup] Raise a TypeError if BaseBot.init_page return None ......................................................................
[cleanup] Raise a TypeError if BaseBot.init_page return None
Change-Id: I467753707f36e7961c03ff01267f52982064b39f --- M pywikibot/bot.py 1 file changed, 1 insertion(+), 9 deletions(-)
Approvals: Matěj Suchánek: 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 2777fad6..b8df65d 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -1575,15 +1575,7 @@ try: for item in self.generator: # preprocessing of the page - initialized_page = self.init_page(item) - if initialized_page is None: - issue_deprecation_warning( - 'Returning None from init_page() method', - 'return a pywikibot.page.BasePage object', - since='20200406') - page = item - else: - page = initialized_page + page = self.init_page(item)
# validate page type if not isinstance(page, self.treat_page_type):