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

Change subject: [IMPR] split CaseChecker.__init__ to decrease code complexity
......................................................................

[IMPR] split CaseChecker.__init__ to decrease code complexity

Change-Id: I41140c1a30ee7d319d6aa678c1ad0ea35ade31ac
---
M scripts/casechecker.py
1 file changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/scripts/casechecker.py b/scripts/casechecker.py
index bcf662a..04465ac 100755
--- a/scripts/casechecker.py
+++ b/scripts/casechecker.py
@@ -83,8 +83,8 @@
     namespaces = []
     filterredir = 'nonredirects'

-    def __init__(self):
-        """Initializer with arg parsing."""
+    def handle_args(self):
+        """Arg parsing."""
         for arg in pywikibot.handle_args():
             arg, _, value = arg.partition(':')
             if arg == '-from':
@@ -120,6 +120,9 @@
                 pywikibot.show_help()
                 sys.exit()

+    def __init__(self):
+        """Initializer."""
+        self.handle_args()
         if not self.namespaces and not self.doFailed:
             if not self.apfrom:
                 # 0 should be after templates ns

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/634698
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: I41140c1a30ee7d319d6aa678c1ad0ea35ade31ac
Gerrit-Change-Number: 634698
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]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to