Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def build_dir_info(dir, files):
sources = [f for f in files if is_compilable(f)]
if len(sources) == 0:
return None
includes = [f for f in files if is_include(f)]
return DirInfo(dir, sources, includes)