jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/800928 )
Change subject: [IMPR] Fix unnecessary "else" after "return" ......................................................................
[IMPR] Fix unnecessary "else" after "return"
Change-Id: I241a361acac52b2172b2173956ee63bbd81e0e2e --- M pywikibot/page/_pages.py 1 file changed, 2 insertions(+), 4 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/page/_pages.py b/pywikibot/page/_pages.py index aa5d930..a5c5bff 100644 --- a/pywikibot/page/_pages.py +++ b/pywikibot/page/_pages.py @@ -1836,8 +1836,7 @@ if answer == 'y': self.site.delete(self, reason, deletetalk=deletetalk) return 1 - else: - return 0 + return 0
# Otherwise mark it for deletion if mark or hasattr(self.site, '_noMarkDeletePrompt'): @@ -1862,8 +1861,7 @@ target.text = template + target.text target.save(summary=reason) return -1 - else: - return 0 + return 0
def has_deleted_revisions(self) -> bool: """Return True if the page has deleted revisions.
pywikibot-commits@lists.wikimedia.org