jenkins-bot submitted this change.

View Change

Approvals: Matěj Suchánek: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
[cleanup] Raise a TypeError if BaseBot.init_page return None

Change-Id: I467753707f36e7961c03ff01267f52982064b39f
---
M pywikibot/bot.py
1 file changed, 1 insertion(+), 9 deletions(-)

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):

To view, visit change 737202. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I467753707f36e7961c03ff01267f52982064b39f
Gerrit-Change-Number: 737202
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Matěj Suchánek <matejsuchanek97@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged