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

Change subject: [W0120] Remove useless else clause on a loop
......................................................................

[W0120] Remove useless else clause on a loop

Without a break break statement on a loop, an else statement is useless.

Change-Id: I6c0e6fcbe99f5943a5413b7f23ecd9dc0c2a452c
---
M pywikibot/page/_category.py
M scripts/archivebot.py
2 files changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/page/_category.py b/pywikibot/page/_category.py
index a4aff25..398cd3c 100644
--- a/pywikibot/page/_category.py
+++ b/pywikibot/page/_category.py
@@ -97,9 +97,9 @@
                         total -= 1
                         if total == 0:
                             return
-            else:
-                # cache is valid only if all subcategories are fetched (T88217)
-                self._subcats = cache
+
+            # cache is valid only if all subcategories are fetched (T88217)
+            self._subcats = cache
         else:
             for subcat in self._subcats['data']:
                 yield subcat
diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index 2f69fcc..ec9e4db 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -726,9 +726,9 @@
                         params = self.get_params(thread.timestamp, counter)
                         archive = self.get_archive_page(
                             pattern % params, params)
-                    else:
-                        # There are only non existing pages found by count down
-                        counter_found = True
+
+                    # There are only non existing pages found by countdown
+                    counter_found = True

                     while archive.is_full(max_arch_size):
                         counter += 1

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/840104
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: I6c0e6fcbe99f5943a5413b7f23ecd9dc0c2a452c
Gerrit-Change-Number: 840104
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: Xqt <[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