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