add exts
This commit is contained in:
parent
0b1f44a305
commit
af7752037f
1 changed files with 28 additions and 1 deletions
29
src/utils.py
29
src/utils.py
|
@ -26,7 +26,34 @@ def analyze_args(args: list) -> list[str]:
|
|||
|
||||
def check_ext(filename: str) -> bool:
|
||||
"""Vérifie qu'un fichier est supporté en se basant sur son extension"""
|
||||
supported_exts = ".c"
|
||||
supported_exts = tuple(
|
||||
map(
|
||||
lambda ext: "." + ext,
|
||||
[
|
||||
"cs",
|
||||
"java",
|
||||
"mjs",
|
||||
"js",
|
||||
"ts",
|
||||
"json",
|
||||
"m",
|
||||
"mm",
|
||||
"proto",
|
||||
"protodevel",
|
||||
"td",
|
||||
"textpb",
|
||||
"pb.txt",
|
||||
"textproto",
|
||||
"asciipb",
|
||||
"sv",
|
||||
"svh",
|
||||
"v",
|
||||
"vh",
|
||||
"c",
|
||||
"cpp",
|
||||
],
|
||||
)
|
||||
)
|
||||
|
||||
return filename.endswith(supported_exts)
|
||||
|
||||
|
|
Reference in a new issue