jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/778996 )
Change subject: [IMPR] use default -always option instead of -ask ......................................................................
[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(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
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)
pywikibot-commits@lists.wikimedia.org