From 12a7ecda5afa649d43a388dd280c116f5505d071 Mon Sep 17 00:00:00 2001 From: Yuto Takano Date: Sat, 7 Aug 2021 00:40:29 +0100 Subject: [PATCH] Fix further pylint issues picked up by Travis CI Signed-off-by: Yuto Takano --- tests/scripts/check-names.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/scripts/check-names.py b/tests/scripts/check-names.py index f47d7e6c52..81fd5ffb84 100755 --- a/tests/scripts/check-names.py +++ b/tests/scripts/check-names.py @@ -386,13 +386,13 @@ class NameCheck(): # Match names of typedef instances, after closing bracket. r"}? *(\w+)[;[].*") exclusion_lines = re.compile(r"^(" - r"extern +\"C\"|" - r"(typedef +)?(struct|union|enum)( *{)?$|" - r"} *;?$|" - r"$|" - r"//|" - r"#" - r")") + r"extern +\"C\"|" + r"(typedef +)?(struct|union|enum)( *{)?$|" + r"} *;?$|" + r"$|" + r"//|" + r"#" + r")") self.log.debug("Looking for identifiers in {} files".format(len(header_files))) @@ -524,7 +524,7 @@ class NameCheck(): """ nm_undefined_regex = re.compile(r"^\S+: +U |^$|^\S+:$") nm_valid_regex = re.compile(r"^\S+( [0-9A-Fa-f]+)* . _*(?P\w+)") - nm_exclusions = ("FStar", "Hacl") + exclusions = ("FStar", "Hacl") symbols = [] @@ -542,8 +542,7 @@ class NameCheck(): for line in nm_output.splitlines(): if not nm_undefined_regex.match(line): symbol = nm_valid_regex.match(line) - if (symbol and not symbol.group("symbol").startswith( - nm_exclusions)): + if (symbol and not symbol.group("symbol").startswith(exclusions)): symbols.append(symbol.group("symbol")) else: self.log.error(line)