diff --git a/tools/check_format.py b/tools/check_format.py index 7bfd218ee3382..b212e3075247b 100755 --- a/tools/check_format.py +++ b/tools/check_format.py @@ -41,9 +41,7 @@ def checkNamespace(file_path): # To avoid breaking the Lyft import, we just check for path inclusion here. def whitelistedForProtobufDeps(file_path): - return len( - [path_segment in file_path - for path_segment in GOOGLE_PROTOBUF_WHITELIST]) > 0 + return any(path_segment in file_path for path_segment in GOOGLE_PROTOBUF_WHITELIST) def checkProtobufExternalDepsBuild(file_path): if whitelistedForProtobufDeps(file_path):