jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[IMPR] use default -always option instead of -ask

This inverts the behaviour when no option is given
and comes back to the common behaviour for framework scripts

Change-Id: I924b9b13d3c41ed7182ecfb2815fc96416db3940
---
M scripts/dataextend.py
1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/scripts/dataextend.py b/scripts/dataextend.py
index e75aefe..b8e5acb 100644
--- a/scripts/dataextend.py
+++ b/scripts/dataextend.py
@@ -17,9 +17,8 @@

There is currently one argument defined:

- -ask If this is supplied, the bot will after each external link
- has been handled, show which changes it intends to make, and
- ask for permission.
+-always If this is supplied, the bot will not ask for permission after
+ each external link has been handled.

The bot will load the corresponding pages for these identifiers, and try
to the meaning of that string for the specified type of thing (for
@@ -81,10 +80,6 @@
QRE = re.compile(r'Q\d+$')
PQRE = re.compile(r'[PQ]\d+$')

- avaliable_options = {
- 'ask': False,
- }
-
def __init__(self, **kwargs):
"""Initializer."""
super().__init__(**kwargs)
@@ -761,7 +756,7 @@
if newclaims is None:
failedprops.append(prop)
newclaims = []
- if not self.opt.ask:
+ if self.opt.always:
result = ''
else:
pywikibot.output('Found here:')
@@ -15208,8 +15203,8 @@
item = arg
elif arg.startswith('P') or arg in ('Data', 'Wiki'):
prop = arg
- elif arg == '-ask':
- options['ask'] = True
+ elif arg == '-always':
+ options['always'] = True
else:
unknownarguments.append(arg)


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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I924b9b13d3c41ed7182ecfb2815fc96416db3940
Gerrit-Change-Number: 778996
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki@aol.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged