jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/944239 )

Change subject: [bugfix] bool(pywikibot.Page()) is always True
......................................................................

[bugfix] bool(pywikibot.Page()) is always True

Having a page its bool expression is always True. Therefore it
is unnecessary to check it. Remove it and decrease this nested
statement.

Change-Id: I4ab3cd1294a1bbaa52794369f1758f495ddacdf8
---
M scripts/interwiki.py
1 file changed, 15 insertions(+), 3 deletions(-)

Approvals:
  Matěj Suchánek: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index 66ee6b1..879e4ca 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -884,9 +884,8 @@
                     if newHint:
                         alternativePage = pywikibot.Page(
                             linkedPage.site, newHint)
-                        if alternativePage:
-                            # add the page that was entered by the user
-                            self.addIfNew(alternativePage, counter, None)
+                        # add the page that was entered by the user
+                        self.addIfNew(alternativePage, counter, None)
                 else:
                     pywikibot.info(
                         f'NOTE: ignoring {linkedPage} and its interwiki links')

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/944239
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: I4ab3cd1294a1bbaa52794369f1758f495ddacdf8
Gerrit-Change-Number: 944239
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to