jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/656558 )
Change subject: Rename handleArg to handle_arg
......................................................................
Rename handleArg to handle_arg
Bug: T271437
Change-Id: I6e9cf7a323e728b6155947c5fbb616e35882d24c
---
M scripts/capitalize_redirects.py
M scripts/imagecopy_self.py
M scripts/imagerecat.py
M scripts/imagetransfer.py
M scripts/imageuncat.py
M scripts/interwiki.py
M scripts/interwikidata.py
M scripts/isbn.py
M scripts/listpages.py
M scripts/lonelypages.py
M scripts/movepages.py
M scripts/ndashredir.py
M scripts/newitem.py
M scripts/noreferences.py
M scripts/patrol.py
M scripts/piper.py
M scripts/protect.py
M scripts/redirect.py
M scripts/reflinks.py
M scripts/replace.py
M scripts/selflink.py
M scripts/solve_disambiguation.py
M scripts/spamremove.py
M scripts/surnames_redirects.py
M scripts/table2wiki.py
M scripts/template.py
M scripts/touch.py
M scripts/transferbot.py
M scripts/weblinkchecker.py
29 files changed, 30 insertions(+), 30 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/capitalize_redirects.py b/scripts/capitalize_redirects.py
index deb8eb9..308d082 100755
--- a/scripts/capitalize_redirects.py
+++ b/scripts/capitalize_redirects.py
@@ -103,7 +103,7 @@
elif arg == '-titlecase':
options['titlecase'] = True
else:
- gen_factory.handleArg(arg)
+ gen_factory.handle_arg(arg)
gen = gen_factory.getCombinedGenerator(preload=True)
if gen:
diff --git a/scripts/imagecopy_self.py b/scripts/imagecopy_self.py
index 5ebfdb2..7963a94 100644
--- a/scripts/imagecopy_self.py
+++ b/scripts/imagecopy_self.py
@@ -1036,7 +1036,7 @@
elif arg == '-autonomous':
autonomous = True
else:
- genFactory.handleArg(arg)
+ genFactory.handle_arg()(arg)
pregenerator = genFactory.getCombinedGenerator(preload=True)
additional_text = ('' if supportedSite()
diff --git a/scripts/imagerecat.py b/scripts/imagerecat.py
index 9b6f357..ee68444 100755
--- a/scripts/imagerecat.py
+++ b/scripts/imagerecat.py
@@ -189,7 +189,7 @@
if arg == '-onlyuncat':
onlyUncat = True
else:
- genFactory.handleArg(arg)
+ genFactory.handle_arg(arg)
generator = genFactory.getCombinedGenerator()
if not generator:
diff --git a/scripts/imagetransfer.py b/scripts/imagetransfer.py
index 6f86b0f..05f9074 100755
--- a/scripts/imagetransfer.py
+++ b/scripts/imagetransfer.py
@@ -342,7 +342,7 @@
elif opt == '-tosite':
options['target'] = value
else:
- generator_factory.handleArg(arg)
+ generator_factory.handle_arg(arg)
gen = generator_factory.getCombinedGenerator()
if not gen:
diff --git a/scripts/imageuncat.py b/scripts/imageuncat.py
index 66ccbd8..25a75f1 100755
--- a/scripts/imageuncat.py
+++ b/scripts/imageuncat.py
@@ -1347,7 +1347,7 @@
'-logevents:"upload,,YYYYMMDD,YYYYMMDD"',
2, ArgumentDeprecationWarning, since='20160305')
else:
- gen_factory.handleArg(arg)
+ gen_factory.handle_arg(arg)
generator = gen_factory.getCombinedGenerator(gen=generator, preload=True)
if not generator:
diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index f5582b3..06ce5b1 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -2455,7 +2455,7 @@
elif arg.startswith('-until:'):
until = arg[7:]
else:
- if not genFactory.handleArg(arg):
+ if not genFactory.handle_arg(arg):
if not singlePageTitle:
singlePageTitle = arg
diff --git a/scripts/interwikidata.py b/scripts/interwikidata.py
index 9c1517f..bc1e139 100644
--- a/scripts/interwikidata.py
+++ b/scripts/interwikidata.py
@@ -224,7 +224,7 @@
gen_factory = pagegenerators.GeneratorFactory()
options = {}
for arg in local_args:
- if gen_factory.handleArg(arg):
+ if gen_factory.handle_arg(arg):
continue
option, sep, value = arg.partition(':')
option = option[1:] if option.startswith('-') else None
diff --git a/scripts/isbn.py b/scripts/isbn.py
index 26c3c58..b039f3b 100755
--- a/scripts/isbn.py
+++ b/scripts/isbn.py
@@ -332,7 +332,7 @@
elif arg.startswith('-') and arg[1:] in ('always', 'to13', 'format'):
options[arg[1:]] = True
else:
- genFactory.handleArg(arg)
+ genFactory.handle_arg(arg)
gen = genFactory.getCombinedGenerator(preload=True)
diff --git a/scripts/listpages.py b/scripts/listpages.py
index bd79ffa..82228e7 100755
--- a/scripts/listpages.py
+++ b/scripts/listpages.py
@@ -213,7 +213,7 @@
elif option == '-summary':
summary = value
else:
- gen_factory.handleArg(arg)
+ gen_factory.handle_arg(arg)
if base_dir:
base_dir = os.path.expanduser(base_dir)
diff --git a/scripts/lonelypages.py b/scripts/lonelypages.py
index 03a724e..b1d738a 100755
--- a/scripts/lonelypages.py
+++ b/scripts/lonelypages.py
@@ -255,7 +255,7 @@
elif arg == '-always':
options['always'] = True
else:
- gen_factory.handleArg(arg)
+ gen_factory.handle_arg(arg)
generator = gen_factory.getCombinedGenerator()
diff --git a/scripts/movepages.py b/scripts/movepages.py
index 98047cc..c340921 100755
--- a/scripts/movepages.py
+++ b/scripts/movepages.py
@@ -190,7 +190,7 @@
genFactory = pagegenerators.GeneratorFactory()
for arg in local_args:
- if genFactory.handleArg(arg):
+ if genFactory.handle_arg(arg):
continue
if arg.startswith('-pairsfile'):
if len(arg) == len('-pairsfile'):
diff --git a/scripts/ndashredir.py b/scripts/ndashredir.py
index d85e1a5..ce5e717 100644
--- a/scripts/ndashredir.py
+++ b/scripts/ndashredir.py
@@ -134,7 +134,7 @@
for arg in local_args:
# Catch the pagegenerators options
- if gen_factory.handleArg(arg):
+ if gen_factory.handle_arg(arg):
continue # nothing to do here
# Now pick up custom options
diff --git a/scripts/newitem.py b/scripts/newitem.py
index 76e3ba1..f3cea28 100755
--- a/scripts/newitem.py
+++ b/scripts/newitem.py
@@ -204,7 +204,7 @@
if arg.startswith(('-pageage:', '-lastedit:')):
key, val = arg.split(':', 1)
options[key[1:]] = int(val)
- elif gen.handleArg(arg):
+ elif gen.handle_arg(arg):
pass
else:
options[arg[1:].lower()] = True
diff --git a/scripts/noreferences.py b/scripts/noreferences.py
index dd65741..54be11c 100755
--- a/scripts/noreferences.py
+++ b/scripts/noreferences.py
@@ -762,7 +762,7 @@
elif opt == '-quiet':
options['verbose'] = False
else:
- genFactory.handleArg(arg)
+ genFactory.handle_arg(arg)
gen = genFactory.getCombinedGenerator(gen, preload=True)
if not gen:
diff --git a/scripts/patrol.py b/scripts/patrol.py
index 8104539..e465c55 100755
--- a/scripts/patrol.py
+++ b/scripts/patrol.py
@@ -451,7 +451,7 @@
elif arg.startswith('-whitelist:'):
options['whitelist'] = arg[len('-whitelist:'):]
else:
- generator = gen_factory.handleArg(arg)
+ generator = gen_factory.handle_arg(arg)
if not generator:
if ':' in arg:
m = arg.split(':')
diff --git a/scripts/piper.py b/scripts/piper.py
index 5e2fb34..5c1f97f 100755
--- a/scripts/piper.py
+++ b/scripts/piper.py
@@ -132,7 +132,7 @@
else:
# check if a standard argument like
# -start:XYZ or -ref:Asdf was given.
- gen_factory.handleArg(arg)
+ gen_factory.handle_arg(arg)
options['filters'] = filters
diff --git a/scripts/protect.py b/scripts/protect.py
index 4f0aa1f..1366355 100755
--- a/scripts/protect.py
+++ b/scripts/protect.py
@@ -195,7 +195,7 @@
elif option in protection_types and value:
protections[option] = value
else:
- if not gen_factory.handleArg(arg):
+ if not gen_factory.handle_arg(arg):
raise ValueError('Unknown parameter "{0}"'.format(arg))
if value:
message_properties.update({'cat': value, 'page': value})
diff --git a/scripts/redirect.py b/scripts/redirect.py
index bdf8f84..e03832b 100755
--- a/scripts/redirect.py
+++ b/scripts/redirect.py
@@ -685,7 +685,7 @@
gen_options[option] = value
elif option == 'limit':
options['limit'] = gen_options['limit'] = int(value)
- elif gen_factory.handleArg(argument):
+ elif gen_factory.handle_arg(argument):
pass
else:
pywikibot.output('Unknown argument: ' + arg)
diff --git a/scripts/reflinks.py b/scripts/reflinks.py
index 78ded1a..61fa1e0 100755
--- a/scripts/reflinks.py
+++ b/scripts/reflinks.py
@@ -759,7 +759,7 @@
else:
xml_filename = arg[5:]
else:
- gen_factory.handleArg(arg)
+ gen_factory.handle_arg(arg)
if xml_filename:
generator = XmlDumpPageGenerator(xml_filename, xml_start,
diff --git a/scripts/replace.py b/scripts/replace.py
index c5f2256..b1f20e1 100755
--- a/scripts/replace.py
+++ b/scripts/replace.py
@@ -838,7 +838,7 @@
genFactory = pagegenerators.GeneratorFactory()
for arg in local_args:
- if genFactory.handleArg(arg):
+ if genFactory.handle_arg(arg):
continue
if arg == '-regex':
regex = True
@@ -980,7 +980,7 @@
if isinstance(gen_args, str):
gen_args = [gen_args]
for gen_arg in gen_args:
- genFactory.handleArg(gen_arg)
+ genFactory.handle_arg(gen_arg)
replacement_set = ReplacementList(fix.get('regex'),
fix.get('exceptions'),
fix.get('nocase'),
diff --git a/scripts/selflink.py b/scripts/selflink.py
index d6b39df..3b7576c 100755
--- a/scripts/selflink.py
+++ b/scripts/selflink.py
@@ -89,7 +89,7 @@
if arg == '-always':
bot_args['always'] = True
else:
- gen_factory.handleArg(arg)
+ gen_factory.handle_arg(arg)
gen = gen_factory.getCombinedGenerator(preload=True)
if not gen:
diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py
index 75d3811..15b557c 100755
--- a/scripts/solve_disambiguation.py
+++ b/scripts/solve_disambiguation.py
@@ -1320,7 +1320,7 @@
'Disambiguation category for your wiki is not known.')
raise
else:
- generator_factory.handleArg(argument)
+ generator_factory.handle_arg(argument)
generator = generator_factory.getCombinedGenerator(generator)
if not generator:
diff --git a/scripts/spamremove.py b/scripts/spamremove.py
index 2eb8f29..029c5e8 100755
--- a/scripts/spamremove.py
+++ b/scripts/spamremove.py
@@ -135,7 +135,7 @@
protocol = arg.partition(':')[2]
elif arg.startswith('-summary:'):
options['summary'] = arg.partition(':')[2]
- elif gen_factory.handleArg(arg):
+ elif gen_factory.handle_arg(arg):
continue
else:
spam_external_url = arg
diff --git a/scripts/surnames_redirects.py b/scripts/surnames_redirects.py
index a0a1cd1..4684799 100755
--- a/scripts/surnames_redirects.py
+++ b/scripts/surnames_redirects.py
@@ -117,7 +117,7 @@
if arg == '-surnames_last':
options['surnames_last'] = True
else:
- gen_factory.handleArg(arg)
+ gen_factory.handle_arg(arg)
gen = gen_factory.getCombinedGenerator()
if gen:
diff --git a/scripts/table2wiki.py b/scripts/table2wiki.py
index 100bf6b..8589d28 100644
--- a/scripts/table2wiki.py
+++ b/scripts/table2wiki.py
@@ -546,7 +546,7 @@
WHERE old_text LIKE '%<table%'
"""
arg = '-mysqlquery:' + query
- gen_factory.handleArg(arg)
+ gen_factory.handle_arg(arg)
if gen:
gen = pagegenerators.NamespaceFilterPageGenerator(
diff --git a/scripts/template.py b/scripts/template.py
index e80c293..cfcfb13 100755
--- a/scripts/template.py
+++ b/scripts/template.py
@@ -262,7 +262,7 @@
elif arg.startswith('-timestamp:'):
timestamp = arg[len('-timestamp:'):]
else:
- if not gen_factory.handleArg(arg):
+ if not gen_factory.handle_arg(arg):
template_name = pywikibot.Page(site, arg, ns=10)
template_names.append(template_name.title(with_ns=False))
diff --git a/scripts/touch.py b/scripts/touch.py
index ec8014c..34cec15 100755
--- a/scripts/touch.py
+++ b/scripts/touch.py
@@ -98,7 +98,7 @@
bot_class = TouchBot
for arg in local_args:
- if gen_factory.handleArg(arg):
+ if gen_factory.handle_arg(arg):
continue
if arg == '-purge':
bot_class = PurgeBot
diff --git a/scripts/transferbot.py b/scripts/transferbot.py
index d55389e..c4df3e1 100755
--- a/scripts/transferbot.py
+++ b/scripts/transferbot.py
@@ -96,7 +96,7 @@
gen_factory = pagegenerators.GeneratorFactory(site=tosite if target
else fromsite)
- unknown_args = [arg for arg in gen_args if not gen_factory.handleArg(arg)]
+ unknown_args = [arg for arg in gen_args if not gen_factory.handle_arg(arg)]
gen = gen_factory.getCombinedGenerator()
diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py
index bf96ee0..ee37520 100755
--- a/scripts/weblinkchecker.py
+++ b/scripts/weblinkchecker.py
@@ -945,7 +945,7 @@
else:
xmlFilename = arg[5:]
else:
- genFactory.handleArg(arg)
+ genFactory.handle_arg(arg)
if xmlFilename:
try:
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/656558
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: I6e9cf7a323e728b6155947c5fbb616e35882d24c
Gerrit-Change-Number: 656558
Gerrit-PatchSet: 4
Gerrit-Owner: Bharatkhatri <[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