From 9db6061d64fbec7470f4e4419d16c47fe9aeb322 Mon Sep 17 00:00:00 2001 From: Noah Lev Date: Thu, 11 Aug 2022 11:09:48 -0400 Subject: [PATCH] Fix line lengths --- src/etc/htmldocck.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/etc/htmldocck.py b/src/etc/htmldocck.py index e0cd089ac5e8..baf95627c702 100644 --- a/src/etc/htmldocck.py +++ b/src/etc/htmldocck.py @@ -544,17 +544,21 @@ def check_command(c, cache): cerr = "" if c.cmd in ['has', 'hasraw', 'matches', 'matchesraw']: # string test regexp = c.cmd.startswith('matches') - if len(c.args) == 1 and not regexp and 'raw' not in c.cmd: # @has = file existence + + # @has = file existence + if len(c.args) == 1 and not regexp and 'raw' not in c.cmd: try: cache.get_file(c.args[0]) ret = True except FailedCheck as err: cerr = str(err) ret = False - elif len(c.args) == 2 and 'raw' in c.cmd: # @hasraw/matchesraw = string test + # @hasraw/matchesraw = string test + elif len(c.args) == 2 and 'raw' in c.cmd: cerr = "`PATTERN` did not match" ret = check_string(cache.get_file(c.args[0]), c.args[1], regexp) - elif len(c.args) == 3 and 'raw' not in c.cmd: # @has/matches = XML tree test + # @has/matches = XML tree test + elif len(c.args) == 3 and 'raw' not in c.cmd: cerr = "`XPATH PATTERN` did not match" ret = get_nb_matching_elements(cache, c, regexp, True) != 0 else: