fix Ruff(E501)

This commit is contained in:
Mylloon 2023-04-18 22:12:50 +02:00
parent c0e175ba23
commit 844c135fc9
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -18,7 +18,8 @@ def clang_format(file_path):
def parse_clang_format_output(output):
error_pattern = r"(?P<filename>.+):(?P<line_number>\d+):(?P<column_number>\d+): warning: code should be clang-formatted \[(?P<warning_message>.+)\]"
error_pattern = r"(?P<filename>.+):(?P<line_number>\d+):(?P<column_number>\d+):" + \
r" warning: code should be clang-formatted \[(?P<warning_message>.+)\]"
error_matches = re.finditer(error_pattern, output)
if error_matches:
@ -48,6 +49,7 @@ if __name__ == "__main__":
if parsed_output:
for error in parsed_output:
print(
f"Warning dans {error['filename']} à la ligne {error['line_number']}, caractère {error['column_number']} : {error['warning_message']}")
f"Warning dans {error['filename']} à la ligne {error['line_number']}," +
f" caractère {error['column_number']} : {error['warning_message']}")
else:
print("No warnings found.")