jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/583058 )
Change subject: [doc] Fix several doc warnings caused by @deprecated_args
......................................................................
[doc] Fix several doc warnings caused by @deprecated_args
@deprecated_args adds deprecated parameters to method's internal
OrderedDict for parameters. The order is the order of addition, which
adds POSITIONAL-OR-KEYWORD kind parameters after *args, KEYWORD-ONLY
kind parameters and **kwargs.
Sort OrderedDict according to parameters' kind there should fix
the issue.
See also:
https://docs.python.org/3/library/inspect.html#inspect.Parameter.kind
Bug: T244674
Change-Id: I40528a8e67c6a64730b35ad050bfbe4f521c270d
---
M pywikibot/tools/__init__.py
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index a4d2219..6c6b364 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -1806,6 +1806,8 @@
default='[deprecated name of ' + new_arg + ']'
if new_arg not in [True, False, None]
else NotImplemented)
+ params = collections.OrderedDict(sorted(params.items(),
+ key=lambda x: x[1].kind))
wrapper.__signature__ = inspect.Signature()
wrapper.__signature__._parameters = params
--
To view, visit https://gerrit.wikimedia.org/r/583058
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I40528a8e67c6a64730b35ad050bfbe4f521c270d
Gerrit-Change-Number: 583058
Gerrit-PatchSet: 5
Gerrit-Owner: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/583040 )
Change subject: [doc] Explain config parser for clean_sandbox.py
......................................................................
[doc] Explain config parser for clean_sandbox.py
Change-Id: Ice338e8a6e2eeb6cbe4c8c06b3c2667c24dc9c91
---
M scripts/clean_sandbox.py
1 file changed, 14 insertions(+), 1 deletion(-)
Approvals:
Dvorapa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/clean_sandbox.py b/scripts/clean_sandbox.py
index 8d16d9d..b775d90 100755
--- a/scripts/clean_sandbox.py
+++ b/scripts/clean_sandbox.py
@@ -21,8 +21,21 @@
-text The text that substitutes in the sandbox, you can use this
when you haven't configured clean_candbox for your wiki.
- -summary Summary of the edit made by bot.
+ -summary Summary of the edit made by bot. Overrides the default
+ from i18n.
+All local parameters can be given inside a scripts.ini file. Options
+passed to the script are priorized over options read from ini file. See:
+https://docs.python.org/3/library/configparser.html#supported-ini-file-structure
+
+For example:
+
+ [clean_sandbox]
+ # the parameter section for clean_sandbox script
+ summary = Bot: Cleaning sandbox
+ text = {{subst:Clean Sandbox}}
+ hours: 0.5
+ delay: 7
"""
#
# (C) Leonardo Gregianin, 2006
--
To view, visit https://gerrit.wikimedia.org/r/583040
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ice338e8a6e2eeb6cbe4c8c06b3c2667c24dc9c91
Gerrit-Change-Number: 583040
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki(a)aol.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/583036 )
Change subject: [cleanup] remove rewrite_path duplication
......................................................................
[cleanup] remove rewrite_path duplication
Change-Id: I110eec8fbbe4069732a6b2ddfc4607c45aec477d
---
M pwb.py
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
Dvorapa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pwb.py b/pwb.py
index 228c307..d820522 100755
--- a/pwb.py
+++ b/pwb.py
@@ -182,10 +182,9 @@
# Either it is '.' if the user's current working directory is the same,
# or it is the absolute path for the directory of pwb.py
absolute_path = abspath(os.path.dirname(sys.argv[0]))
-rewrite_path = absolute_path
-if rewrite_path not in sys.path[:2]:
- sys.path.insert(1, rewrite_path)
+if absolute_path not in sys.path[:2]:
+ sys.path.insert(1, absolute_path)
if not check_modules():
sys.exit()
--
To view, visit https://gerrit.wikimedia.org/r/583036
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I110eec8fbbe4069732a6b2ddfc4607c45aec477d
Gerrit-Change-Number: 583036
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/582965 )
Change subject: [bugfix] user_script_path must be a list
......................................................................
[bugfix] user_script_path must be a list
A tuple cannot be concatenated with a list; otherwise
TypeError: can only concatenate tuple (not "list") to tuple
occures.
Change-Id: I6b9122cd30532bfa34a5d7d82a9aba9616b5bf60
---
M pwb.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Dvorapa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pwb.py b/pwb.py
index 228c307..c8dc83e 100755
--- a/pwb.py
+++ b/pwb.py
@@ -288,10 +288,10 @@
'scripts.userscripts']
if config.user_script_paths:
- if isinstance(config.user_script_paths, (tuple, list)):
+ if isinstance(config.user_script_paths, list):
script_paths = config.user_script_paths + script_paths
else:
- warn("'user_script_paths' must be a list or tuple,\n"
+ warn("'user_script_paths' must be a list,\n"
'found: {0}. Ignoring this setting.'
.format(type(config.user_script_paths)))
--
To view, visit https://gerrit.wikimedia.org/r/582965
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6b9122cd30532bfa34a5d7d82a9aba9616b5bf60
Gerrit-Change-Number: 582965
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: Huji <huji.huji(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)