jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/467916 )
Change subject: [IMPR] early continues in parse_page_tuples instead of scrolling down the code ......................................................................
[IMPR] early continues in parse_page_tuples instead of scrolling down the code
detached from I4ef9009c91e485509e4ae05a04404b3c06a5331c
Change-Id: I4a17f1bba72e9add0579190e59b8d2a42706d43a --- M scripts/patrol.py 1 file changed, 4 insertions(+), 2 deletions(-)
Approvals: jenkins-bot: Verified Dalba: Looks good to me, approved
diff --git a/scripts/patrol.py b/scripts/patrol.py index e72e7ad..d359b3c 100755 --- a/scripts/patrol.py +++ b/scripts/patrol.py @@ -202,10 +202,12 @@ if isinstance(node, mwparserfromhell.nodes.tag.Tag): if node.tag == 'li': current_user = None - elif isinstance(node, mwparserfromhell.nodes.text.Text): + continue + if isinstance(node, mwparserfromhell.nodes.text.Text): if node.endswith('\n'): current_user = False - elif isinstance(node, mwparserfromhell.nodes.wikilink.Wikilink): + continue + if isinstance(node, mwparserfromhell.nodes.wikilink.Wikilink): if current_user is False: pywikibot.debug('Link to "{0}" ignored as outside ' 'list'.format(node.title), _logger)