Skip to content

Commit

Permalink
Merge "Allow no replacements by default"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Jun 18, 2017
2 parents 01376f1 + 4ea8d38 commit 8bfbe99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pywikibot/bot.py
Expand Up @@ -641,7 +641,7 @@ class InteractiveReplace(object):
It shows various options which can be switched on and off:
* allow_skip_link = True (skip the current link)
* allow_unlink = True (unlink)
* allow_replace = True (just replace target, keep section and label)
* allow_replace = False (just replace target, keep section and label)
* allow_replace_section = False (replace target and section, keep label)
* allow_replace_label = False (replace target and label, keep section)
* allow_replace_all = False (replace target, section and label)
Expand Down Expand Up @@ -691,7 +691,7 @@ def __init__(self, old_link, new_link, default=None, automatic_quit=True):
self.context_delta = 0
self.allow_skip_link = True
self.allow_unlink = True
self.allow_replace = True
self.allow_replace = False
self.allow_replace_section = False
self.allow_replace_label = False
self.allow_replace_all = False
Expand Down
3 changes: 2 additions & 1 deletion scripts/disambredir.py
Expand Up @@ -12,7 +12,7 @@
"""
#
# (C) André Engels, 2006-2009
# (C) Pywikibot team, 2006-2015
# (C) Pywikibot team, 2006-2017
#
# Distributed under the terms of the MIT license.
#
Expand All @@ -36,6 +36,7 @@ class DisambiguationRedirectBot(MultipleSitesBot, AutomaticTWSummaryBot):
def _create_callback(self, old, new):
replace_callback = InteractiveReplace(
old, new, default='n', automatic_quit=False)
replace_callback.allow_replace = True
replace_callback.allow_replace_label = True
replace_callback.allow_replace_section = True
replace_callback.allow_replace_all = True
Expand Down
3 changes: 1 addition & 2 deletions scripts/unlink.py
Expand Up @@ -21,7 +21,7 @@
descriptions.
"""
#
# (C) Pywikibot team, 2007-2016
# (C) Pywikibot team, 2007-2017
#
# Distributed under the terms of the MIT license.
#
Expand Down Expand Up @@ -62,7 +62,6 @@ def __init__(self, bot):
self.additional_choices = [AlwaysChoice(self, 'unlink all on page', 'p'),
self._always, EditReplacement()]
self._bot = bot
self.allow_replace = False
self.context = 100
self.context_change = 100

Expand Down

0 comments on commit 8bfbe99

Please sign in to comment.