jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
Fix type hints for *args and **kwargs

First of all, *args is not a list, it's a tuple. In addition to that,
and according to PEP 484[1], the type hint for *args should be the type
of its elements, otherwise it's obvious that the type of *args is
a tuple. Similarly, for **kwargs the type hint should mention the
dict's value types.

Use `typing.Sequence[T]` or `typing.Iterable[T]` for args (without *).

[1]:
https://www.python.org/dev/peps/pep-0484/#arbitrary-argument-lists-and-default-argument-values

Change-Id: I7f0db256b52714c5e46db0a9f609831bee74ac53
---
M generate_user_files.py
M pywikibot/bot.py
M pywikibot/comms/eventstreams.py
M pywikibot/site.py
M pywikibot/tools/__init__.py
M pywikibot/tools/djvu.py
M pywikibot/tools/formatter.py
M scripts/add_text.py
M scripts/archive/featured.py
M scripts/archivebot.py
M scripts/basic.py
M scripts/blockpageschecker.py
M scripts/capitalize_redirects.py
M scripts/catall.py
M scripts/category.py
M scripts/category_redirect.py
M scripts/cfd.py
M scripts/checkimages.py
M scripts/claimit.py
M scripts/clean_sandbox.py
M scripts/commons_link.py
M scripts/commonscat.py
M scripts/coordinate_import.py
M scripts/cosmetic_changes.py
M scripts/create_categories.py
M scripts/data_ingestion.py
M scripts/delete.py
M scripts/disambredir.py
M scripts/djvutext.py
M scripts/editarticle.py
M scripts/fixing_redirects.py
M scripts/flickrripper.py
M scripts/followlive.py
M scripts/freebasemappingupload.py
M scripts/harvest_template.py
M scripts/illustrate_wikidata.py
M scripts/image.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/login.py
M scripts/lonelypages.py
M scripts/maintenance/download_dump.py
M scripts/makecat.py
M scripts/misspelling.py
M scripts/movepages.py
M scripts/ndashredir.py
M scripts/newitem.py
M scripts/noreferences.py
M scripts/nowcommons.py
M scripts/pagefromfile.py
M scripts/protect.py
M scripts/redirect.py
M scripts/reflinks.py
M scripts/replace.py
M scripts/replicate_wiki.py
M scripts/revertbot.py
M scripts/script_wui.py
M scripts/selflink.py
M scripts/solve_disambiguation.py
M scripts/spamremove.py
M scripts/states_redirect.py
M scripts/surnames_redirects.py
M scripts/table2wiki.py
M scripts/template.py
M scripts/templatecount.py
M scripts/touch.py
M scripts/transferbot.py
M scripts/unlink.py
M scripts/unusedfiles.py
M scripts/upload.py
M scripts/watchlist.py
M scripts/weblinkchecker.py
M scripts/welcome.py
M scripts/wikisourcetext.py
M tests/utils.py
80 files changed, 80 insertions(+), 93 deletions(-)

diff --git a/generate_user_files.py b/generate_user_files.py
index 3033a18..aa502b7 100755
--- a/generate_user_files.py
+++ b/generate_user_files.py
@@ -427,7 +427,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
# set the config family and mylang values to an invalid state so that
# the script can detect that the command line arguments -family & -lang
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index e6fc79c..faaad1c 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -899,7 +899,7 @@
args may be passed as an argument, thereby overriding sys.argv

@param args: Command line arguments
- @type args: list of unicode
+ @type args: typing.Iterable
@param do_help: Handle parameter '-help' to show help and invoke sys.exit
@type do_help: bool
@return: list of arguments not recognised globally
@@ -1136,7 +1136,6 @@
Only accept options defined in availableOptions.

@param kwargs: bot options
- @type kwargs: dict
"""
self.setOptions(**kwargs)

@@ -1145,7 +1144,6 @@
Set the instance options.

@param kwargs: options
- @type kwargs: dict
"""
valid_options = set(self.availableOptions)
received_options = set(kwargs)
@@ -1203,7 +1201,6 @@
Only accept options defined in availableOptions.

@param kwargs: bot options
- @type kwargs: dict
"""
if 'generator' in kwargs:
self.generator = kwargs.pop('generator')
@@ -1760,7 +1757,6 @@
print a message. If None uses this instances default.
@type ignore_server_errors: bool or None
@param kwargs: Additional parameters directly given to L{Bot.userPut}.
- @type kwargs: dict
@return: whether the page was saved successfully
@rtype: bool
"""
diff --git a/pywikibot/comms/eventstreams.py b/pywikibot/comms/eventstreams.py
index 7731d5b..a4695b3 100644
--- a/pywikibot/comms/eventstreams.py
+++ b/pywikibot/comms/eventstreams.py
@@ -89,7 +89,6 @@
default url using _site.family settings and streamtype
@type url: str
@param kwargs: keyword arguments passed to SSEClient and requests lib
- @type kwargs: dict
@raises ImportError: sseclient is not installed
"""
if isinstance(EventSource, Exception):
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 6d7ef3e..8a15511 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -2470,7 +2470,7 @@
joined using MediaWiki message 'comma-separator'.

@param args: text to be expanded
- @type args: iterable of unicode
+ @type args: typing.Iterable[unicode]

@rtype: unicode
"""
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 05017ae..9d24df3 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -1493,9 +1493,7 @@
if the decorated decorator was called without arguments.

@param outer_args: args
- @type outer_args: list
@param outer_kwargs: kwargs
- @type outer_kwargs: dict
"""
def inner_wrapper(*args, **kwargs):
"""Replacement function.
@@ -1611,9 +1609,7 @@
"""Replacement function.

@param args: args passed to the decorated function.
- @type args: list
@param kwargs: kwargs passed to the decorated function.
- @type kwargs: dict
@return: the value returned by the decorated function
@rtype: any
"""
@@ -1705,9 +1701,7 @@
"""Replacement function.

@param __args: args passed to the decorated function
- @type __args: list
- @param __kwargs: kwargs passed to the decorated function
- @type __kwargs: dict
+ @param __kw: kwargs passed to the decorated function
@return: the value returned by the decorated function
@rtype: any
"""
@@ -1798,9 +1792,7 @@
"""Replacement function.

@param __args: args passed to the decorated function
- @type __args: list
- @param __kwargs: kwargs passed to the decorated function
- @type __kwargs: dict
+ @param __kw: kwargs passed to the decorated function
@return: the value returned by the decorated function
@rtype: any
"""
diff --git a/pywikibot/tools/djvu.py b/pywikibot/tools/djvu.py
index fe9ba04..a33659d 100644
--- a/pywikibot/tools/djvu.py
+++ b/pywikibot/tools/djvu.py
@@ -27,7 +27,7 @@
Tiny wrapper around subprocess.Popen().

@param args: same as Popen()
- @type args: sequence or string
+ @type args: typing.Sequence[string]

@param library: library to be logged in logging messages
@type library: string
diff --git a/pywikibot/tools/formatter.py b/pywikibot/tools/formatter.py
index 918bb89..ebeacf9 100644
--- a/pywikibot/tools/formatter.py
+++ b/pywikibot/tools/formatter.py
@@ -144,7 +144,7 @@
@param format_string: The format template string
@type format_string: unicode
@param args: The positional field values
- @type args: sequence
+ @type args: typing.Sequence
@param kwargs: The named field values
@type kwargs: dict
@return: The formatted string
diff --git a/scripts/add_text.py b/scripts/add_text.py
index 044a361..8c220c1 100755
--- a/scripts/add_text.py
+++ b/scripts/add_text.py
@@ -241,7 +241,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
# If none, the var is setted only for check purpose.
summary = None
diff --git a/scripts/archive/featured.py b/scripts/archive/featured.py
index c5a9d71..9fe974f 100755
--- a/scripts/archive/featured.py
+++ b/scripts/archive/featured.py
@@ -615,7 +615,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}
local_args = pywikibot.handle_args(args)
diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index 8839a79..188db6d 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -720,7 +720,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
filename = None
pagename = None
diff --git a/scripts/basic.py b/scripts/basic.py
index 1ef778a..bc9b550 100755
--- a/scripts/basic.py
+++ b/scripts/basic.py
@@ -158,7 +158,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}
# Process global arguments to determine desired site
diff --git a/scripts/blockpageschecker.py b/scripts/blockpageschecker.py
index bf22e22..085e487 100755
--- a/scripts/blockpageschecker.py
+++ b/scripts/blockpageschecker.py
@@ -222,7 +222,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
# Loading the comments
global categoryToCheck, project_inserted
diff --git a/scripts/capitalize_redirects.py b/scripts/capitalize_redirects.py
index dcc8442..063b8ab 100755
--- a/scripts/capitalize_redirects.py
+++ b/scripts/capitalize_redirects.py
@@ -93,7 +93,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}

diff --git a/scripts/catall.py b/scripts/catall.py
index 3a934ce..1e6ad4f 100755
--- a/scripts/catall.py
+++ b/scripts/catall.py
@@ -88,7 +88,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
docorrections = True
start = 'A'
diff --git a/scripts/category.py b/scripts/category.py
index 7d82892..757348d 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -1325,7 +1325,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
from_given = False
to_given = False
diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py
index dcc706f..1850d05 100755
--- a/scripts/category_redirect.py
+++ b/scripts/category_redirect.py
@@ -504,7 +504,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}
for arg in pywikibot.handle_args(args):
diff --git a/scripts/cfd.py b/scripts/cfd.py
index f19a279..4d15c8a 100755
--- a/scripts/cfd.py
+++ b/scripts/cfd.py
@@ -75,7 +75,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
cfd_page = DEFAULT_CFD_PAGE
local_args = pywikibot.handle_args(args)
diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index ccb3010..7d6ae91 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -1570,7 +1570,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
# Command line configurable parameters
repeat = True # Restart after having check all the images?
diff --git a/scripts/claimit.py b/scripts/claimit.py
index 3c523f8..c134ff4 100755
--- a/scripts/claimit.py
+++ b/scripts/claimit.py
@@ -106,7 +106,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
@rtype: bool
"""
exists_arg = ''
diff --git a/scripts/clean_sandbox.py b/scripts/clean_sandbox.py
index b946d74..8e11b95 100755
--- a/scripts/clean_sandbox.py
+++ b/scripts/clean_sandbox.py
@@ -246,7 +246,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
opts = {}
local_args = pywikibot.handle_args(args)
diff --git a/scripts/commons_link.py b/scripts/commons_link.py
index 0cfd3fd..c5525e3 100755
--- a/scripts/commons_link.py
+++ b/scripts/commons_link.py
@@ -123,7 +123,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}

diff --git a/scripts/commonscat.py b/scripts/commonscat.py
index f17b345..9ec63d4 100755
--- a/scripts/commonscat.py
+++ b/scripts/commonscat.py
@@ -512,7 +512,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}
checkcurrent = False
diff --git a/scripts/coordinate_import.py b/scripts/coordinate_import.py
index fce00a5..e8c4f4c 100755
--- a/scripts/coordinate_import.py
+++ b/scripts/coordinate_import.py
@@ -117,7 +117,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
# Process global args and prepare generator args parser
local_args = pywikibot.handle_args(args)
diff --git a/scripts/cosmetic_changes.py b/scripts/cosmetic_changes.py
index 8f53756..0c62f19 100644
--- a/scripts/cosmetic_changes.py
+++ b/scripts/cosmetic_changes.py
@@ -84,7 +84,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}

diff --git a/scripts/create_categories.py b/scripts/create_categories.py
index 3ed977d..9e43ccd 100755
--- a/scripts/create_categories.py
+++ b/scripts/create_categories.py
@@ -82,7 +82,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
parent = None
basename = None
diff --git a/scripts/data_ingestion.py b/scripts/data_ingestion.py
index 6e39a59..709dc5d 100755
--- a/scripts/data_ingestion.py
+++ b/scripts/data_ingestion.py
@@ -248,7 +248,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
# Process global args and prepare generator args parser
local_args = pywikibot.handle_args(args)
diff --git a/scripts/delete.py b/scripts/delete.py
index 8612e1d..6c995c1 100755
--- a/scripts/delete.py
+++ b/scripts/delete.py
@@ -226,7 +226,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
page_name = ''
summary = None
diff --git a/scripts/disambredir.py b/scripts/disambredir.py
index cbb1920..5b1e736 100755
--- a/scripts/disambredir.py
+++ b/scripts/disambredir.py
@@ -66,7 +66,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
local_args = pywikibot.handle_args(args)

diff --git a/scripts/djvutext.py b/scripts/djvutext.py
index bbe9ed6..79dbf16 100644
--- a/scripts/djvutext.py
+++ b/scripts/djvutext.py
@@ -130,7 +130,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
index = None
djvu_path = '.' # default djvu file directory
diff --git a/scripts/editarticle.py b/scripts/editarticle.py
index 4918e8d..b1dc3da 100755
--- a/scripts/editarticle.py
+++ b/scripts/editarticle.py
@@ -117,7 +117,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
app = ArticleEditor(*args)
app.run()
diff --git a/scripts/fixing_redirects.py b/scripts/fixing_redirects.py
index 8c3ee81..592806b 100755
--- a/scripts/fixing_redirects.py
+++ b/scripts/fixing_redirects.py
@@ -175,7 +175,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
featured = False
gen = None
diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py
index b75ec67..9efd9df 100755
--- a/scripts/flickrripper.py
+++ b/scripts/flickrripper.py
@@ -415,7 +415,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
local_args = pywikibot.handle_args(args)

diff --git a/scripts/followlive.py b/scripts/followlive.py
index 354ad32..4dbb70b 100644
--- a/scripts/followlive.py
+++ b/scripts/followlive.py
@@ -551,7 +551,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
# Generate the question text
pywikibot.handle_args(*args)
diff --git a/scripts/freebasemappingupload.py b/scripts/freebasemappingupload.py
index 07a40ed..7f397bd 100755
--- a/scripts/freebasemappingupload.py
+++ b/scripts/freebasemappingupload.py
@@ -110,7 +110,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
filename = 'fb2w.nt.gz' # Default filename
for arg in pywikibot.handle_args(args):
diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py
index b0ff2fd..228a3e9 100755
--- a/scripts/harvest_template.py
+++ b/scripts/harvest_template.py
@@ -317,7 +317,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
template_title = None

diff --git a/scripts/illustrate_wikidata.py b/scripts/illustrate_wikidata.py
index 94e79e4..7c050b3 100755
--- a/scripts/illustrate_wikidata.py
+++ b/scripts/illustrate_wikidata.py
@@ -90,7 +90,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
# Process global args and prepare generator args parser
local_args = pywikibot.handle_args(args)
diff --git a/scripts/image.py b/scripts/image.py
index dcae5af..78368bb 100755
--- a/scripts/image.py
+++ b/scripts/image.py
@@ -130,7 +130,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
old_image = None
new_image = None
diff --git a/scripts/imagerecat.py b/scripts/imagerecat.py
index feebfe1..be97bb6 100755
--- a/scripts/imagerecat.py
+++ b/scripts/imagerecat.py
@@ -450,7 +450,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
generator = None
onlyFilter = False
diff --git a/scripts/imagetransfer.py b/scripts/imagetransfer.py
index bc7db3e..6f606df 100755
--- a/scripts/imagetransfer.py
+++ b/scripts/imagetransfer.py
@@ -282,7 +282,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
gen = None

diff --git a/scripts/imageuncat.py b/scripts/imageuncat.py
index 870dbc3..46b8035 100755
--- a/scripts/imageuncat.py
+++ b/scripts/imageuncat.py
@@ -1316,7 +1316,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
generator = None

diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index 6d0304c..246d640 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -2387,7 +2387,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
singlePageTitle = ''
opthintsonly = False
diff --git a/scripts/interwikidata.py b/scripts/interwikidata.py
index 9e06001..8e5a71c 100644
--- a/scripts/interwikidata.py
+++ b/scripts/interwikidata.py
@@ -218,7 +218,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
local_args = pywikibot.handle_args(args)
gen_factory = pagegenerators.GeneratorFactory()
diff --git a/scripts/isbn.py b/scripts/isbn.py
index f0bec35..4c8ab93 100755
--- a/scripts/isbn.py
+++ b/scripts/isbn.py
@@ -1637,7 +1637,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}

diff --git a/scripts/listpages.py b/scripts/listpages.py
index b5d3ddb..bd95806 100755
--- a/scripts/listpages.py
+++ b/scripts/listpages.py
@@ -175,7 +175,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
gen = None
notitle = False
diff --git a/scripts/login.py b/scripts/login.py
index ece07018..8e949b1 100755
--- a/scripts/login.py
+++ b/scripts/login.py
@@ -116,7 +116,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
password = None
sysop = False
diff --git a/scripts/lonelypages.py b/scripts/lonelypages.py
index 0f8c4b4..317f4e0 100755
--- a/scripts/lonelypages.py
+++ b/scripts/lonelypages.py
@@ -230,7 +230,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}

diff --git a/scripts/maintenance/download_dump.py b/scripts/maintenance/download_dump.py
index 9844889..b2291b9 100644
--- a/scripts/maintenance/download_dump.py
+++ b/scripts/maintenance/download_dump.py
@@ -204,7 +204,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
opts = {}
unknown_args = []
diff --git a/scripts/makecat.py b/scripts/makecat.py
index c81504e..2ed0f0e 100755
--- a/scripts/makecat.py
+++ b/scripts/makecat.py
@@ -225,7 +225,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
global workingcat, parentcats
global checked, tocheck
diff --git a/scripts/misspelling.py b/scripts/misspelling.py
index 7aca9f6..b825999 100755
--- a/scripts/misspelling.py
+++ b/scripts/misspelling.py
@@ -166,7 +166,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
# the option that's always selected when the bot wonders what to do with
# a link. If it's None, the user is prompted (default behaviour).
diff --git a/scripts/movepages.py b/scripts/movepages.py
index 9ce5d48..6630f3d 100755
--- a/scripts/movepages.py
+++ b/scripts/movepages.py
@@ -180,7 +180,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
oldName = None
options = {}
diff --git a/scripts/ndashredir.py b/scripts/ndashredir.py
index 1928356..29eb67a 100644
--- a/scripts/ndashredir.py
+++ b/scripts/ndashredir.py
@@ -128,7 +128,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}
# Process global arguments to determine desired site
diff --git a/scripts/newitem.py b/scripts/newitem.py
index 82df37c..937910a 100755
--- a/scripts/newitem.py
+++ b/scripts/newitem.py
@@ -127,7 +127,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
# Process global args and prepare generator args parser
local_args = pywikibot.handle_args(args)
diff --git a/scripts/noreferences.py b/scripts/noreferences.py
index 39d67f0..b2964c1 100755
--- a/scripts/noreferences.py
+++ b/scripts/noreferences.py
@@ -731,7 +731,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}

diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py
index b29d7df..6a3f431 100755
--- a/scripts/nowcommons.py
+++ b/scripts/nowcommons.py
@@ -374,7 +374,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}

diff --git a/scripts/pagefromfile.py b/scripts/pagefromfile.py
index add9054..21d41ae 100755
--- a/scripts/pagefromfile.py
+++ b/scripts/pagefromfile.py
@@ -291,7 +291,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
filename = "dict.txt"
options = {}
diff --git a/scripts/protect.py b/scripts/protect.py
index bd1f24c..1aa5d5a 100755
--- a/scripts/protect.py
+++ b/scripts/protect.py
@@ -152,7 +152,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}
message_properties = {}
diff --git a/scripts/redirect.py b/scripts/redirect.py
index b4cd567..dff042e 100755
--- a/scripts/redirect.py
+++ b/scripts/redirect.py
@@ -688,7 +688,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}
gen_options = {}
diff --git a/scripts/reflinks.py b/scripts/reflinks.py
index 0821d1c..ef86f97 100755
--- a/scripts/reflinks.py
+++ b/scripts/reflinks.py
@@ -767,7 +767,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
xml_filename = None
xml_start = None
diff --git a/scripts/replace.py b/scripts/replace.py
index a0c04fa..00fb7bb 100755
--- a/scripts/replace.py
+++ b/scripts/replace.py
@@ -871,7 +871,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
add_cat = None
gen = None
diff --git a/scripts/replicate_wiki.py b/scripts/replicate_wiki.py
index 99394cf..fe486f0 100755
--- a/scripts/replicate_wiki.py
+++ b/scripts/replicate_wiki.py
@@ -244,7 +244,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
my_args = pywikibot.handle_args(args)

diff --git a/scripts/revertbot.py b/scripts/revertbot.py
index 0278d54..ddcea48 100755
--- a/scripts/revertbot.py
+++ b/scripts/revertbot.py
@@ -145,7 +145,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
user = None
rollback = False
diff --git a/scripts/script_wui.py b/scripts/script_wui.py
index 50c9bf4..40c4d10 100755
--- a/scripts/script_wui.py
+++ b/scripts/script_wui.py
@@ -330,7 +330,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
global __simulate, __sys_argv

diff --git a/scripts/selflink.py b/scripts/selflink.py
index 38ee6df..4c08e6a 100755
--- a/scripts/selflink.py
+++ b/scripts/selflink.py
@@ -80,7 +80,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
# Process global args and prepare generator args parser
local_args = pywikibot.handle_args(args)
diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py
index 50d4ce8..d08a7e0 100755
--- a/scripts/solve_disambiguation.py
+++ b/scripts/solve_disambiguation.py
@@ -1174,7 +1174,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
# the option that's always selected when the bot wonders what to do with
# a link. If it's None, the user is prompted (default behaviour).
diff --git a/scripts/spamremove.py b/scripts/spamremove.py
index 6e94a66..db76bd3 100755
--- a/scripts/spamremove.py
+++ b/scripts/spamremove.py
@@ -125,7 +125,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
spam_external_url = None
protocol = 'http'
diff --git a/scripts/states_redirect.py b/scripts/states_redirect.py
index bdac42b..2cc6012 100755
--- a/scripts/states_redirect.py
+++ b/scripts/states_redirect.py
@@ -115,7 +115,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
local_args = pywikibot.handle_args(args)
start = None
diff --git a/scripts/surnames_redirects.py b/scripts/surnames_redirects.py
index 5071c2d..635815f 100755
--- a/scripts/surnames_redirects.py
+++ b/scripts/surnames_redirects.py
@@ -106,7 +106,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}

diff --git a/scripts/table2wiki.py b/scripts/table2wiki.py
index 4235578..cb66d7d 100644
--- a/scripts/table2wiki.py
+++ b/scripts/table2wiki.py
@@ -522,7 +522,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}
gen = None
diff --git a/scripts/template.py b/scripts/template.py
index 0a729b9..b9f546c 100755
--- a/scripts/template.py
+++ b/scripts/template.py
@@ -269,7 +269,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
template_names = []
templates = {}
diff --git a/scripts/templatecount.py b/scripts/templatecount.py
index ff383a0..adc0896 100755
--- a/scripts/templatecount.py
+++ b/scripts/templatecount.py
@@ -154,7 +154,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
operation = None
args_list = []
diff --git a/scripts/touch.py b/scripts/touch.py
index b5ee1bd..732f56b 100755
--- a/scripts/touch.py
+++ b/scripts/touch.py
@@ -74,7 +74,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
gen = None
options = {}
diff --git a/scripts/transferbot.py b/scripts/transferbot.py
index 48d2846..c0b0d8e 100755
--- a/scripts/transferbot.py
+++ b/scripts/transferbot.py
@@ -87,7 +87,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
local_args = pywikibot.handle_args(args)

diff --git a/scripts/unlink.py b/scripts/unlink.py
index dd9abe5..89097a4 100755
--- a/scripts/unlink.py
+++ b/scripts/unlink.py
@@ -62,7 +62,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
# This temporary string is used to read the title
# of the page that should be unlinked.
diff --git a/scripts/unusedfiles.py b/scripts/unusedfiles.py
index 3b7a428..cad7df0 100755
--- a/scripts/unusedfiles.py
+++ b/scripts/unusedfiles.py
@@ -108,7 +108,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
options = {}
total = None
diff --git a/scripts/upload.py b/scripts/upload.py
index 8e81522..5faf354 100755
--- a/scripts/upload.py
+++ b/scripts/upload.py
@@ -100,7 +100,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
url = u''
description = []
diff --git a/scripts/watchlist.py b/scripts/watchlist.py
index 716f424..206d21b 100755
--- a/scripts/watchlist.py
+++ b/scripts/watchlist.py
@@ -91,7 +91,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
all = False
new = False
diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py
index f29edf6..0a232c6 100755
--- a/scripts/weblinkchecker.py
+++ b/scripts/weblinkchecker.py
@@ -953,7 +953,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
gen = None
xmlFilename = None
diff --git a/scripts/welcome.py b/scripts/welcome.py
index 42f2781..17419b4 100755
--- a/scripts/welcome.py
+++ b/scripts/welcome.py
@@ -902,7 +902,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
for arg in pywikibot.handle_args(args):
arg, sep, val = arg.partition(':')
diff --git a/scripts/wikisourcetext.py b/scripts/wikisourcetext.py
index df3f5c4..8286604 100644
--- a/scripts/wikisourcetext.py
+++ b/scripts/wikisourcetext.py
@@ -131,7 +131,7 @@
If args is an empty list, sys.argv is used.

@param args: command line arguments
- @type args: list of unicode
+ @type args: unicode
"""
index = None
pages = '1-'
diff --git a/tests/utils.py b/tests/utils.py
index fe8a9ed..c6ce1c6 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -727,7 +727,7 @@
Execute the pwb.py script and capture outputs.

@param args: list of arguments for pwb.py
- @type args: list of unicode
+ @type args: typing.Sequence[unicode]
@param overrides: mapping of pywikibot symbols to test replacements
@type overrides: dict
"""

To view, visit change 459270. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I7f0db256b52714c5e46db0a9f609831bee74ac53
Gerrit-Change-Number: 459270
Gerrit-PatchSet: 3
Gerrit-Owner: Dalba <dalba.wiki@gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)