From c6ae2919ccce55f05a4d6eb7abc007003b6f04ce Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 17 Feb 2022 19:26:10 +0000 Subject: [PATCH] Restyled by yapf --- other/analysis/check_includes | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/other/analysis/check_includes b/other/analysis/check_includes index 7ca7eaa7d47..0d63a2fb2de 100755 --- a/other/analysis/check_includes +++ b/other/analysis/check_includes @@ -22,15 +22,14 @@ ALLOWLIST: Tuple[str, ...] = ( "vpx/vpx_image.h", ) -out = ( - subprocess.run( - ["grep", "-R", "^#include <.*>", "other", "toxav", "toxcore", "toxencryptsave"], - check=True, - capture_output=True, - ) - .stdout.decode("utf-8") - .rstrip() -) +out = (subprocess.run( + [ + "grep", "-R", "^#include <.*>", "other", "toxav", "toxcore", + "toxencryptsave" + ], + check=True, + capture_output=True, +).stdout.decode("utf-8").rstrip()) errors = 0 for line in out.split("\n"): @@ -45,15 +44,15 @@ for line in out.split("\n"): allowlist = ALLOWLIST if filename == "toxcore/ccompat.h": allowlist += ("assert.h", "alloca.h", "malloc.h", "stdlib.h") - header = include[include.index("<") + 1 : include.index(">")] + header = include[include.index("<") + 1:include.index(">")] if header not in allowlist: source = filename[:-2] + ".c" print( f"{filename}: includes system header <{header}>, which is not allowed in .h files" ) print( - " " * len(filename) - + f" consider including it in {source} and exporting an abstraction, instead" + " " * len(filename) + + f" consider including it in {source} and exporting an abstraction, instead" ) errors += 1