INNER CODE UNIT · Python
get_source_files_from_dir
multitheftauto/mtasa-blue · utils/localization/build_gettext_catalog.py:20
def get_source_files_from_dir(dir: Path) -> t.List[Path]:
file_types = [".c", ".cpp", ".h", ".hpp"]
return [
file_path
for file_type in file_types
for file_path in dir.glob(f"**/*{file_type}")
if not str(file_path).endswith(".lua.h")
]
def get_source_files_from_dirs(dirs: t.List[Path]) -> t.List[Path]:
return [
file_path
for dir_path in dirs
for file_path in get_source_files_from_dir(dir_path)
]