From ae1679ac1852e6cdf43fb704286e3a7186580948 Mon Sep 17 00:00:00 2001 From: MistEO Date: Fri, 9 Feb 2024 22:08:33 +0800 Subject: [PATCH] Update scoring.py --- .github/scoring.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scoring.py b/.github/scoring.py index 00f8a17..53a1760 100644 --- a/.github/scoring.py +++ b/.github/scoring.py @@ -3,6 +3,9 @@ import pathlib +filter_ext = [".md", ".txt", ".png", ".jpg", ".gif", ".bmp"] + + def file_score(path: pathlib.Path) -> typing.Optional[typing.Tuple[int, int, int]]: """Return the score of a file based on its length and number of used characters.""" @@ -68,6 +71,5 @@ def best_file_score(path_list: typing.List[pathlib.Path]) -> typing.Optional[typ print('Usage: python scoring.py ') exit() - filter_ext = [".md", ".txt", ".png", ".jpg", ".gif", ".bmp"] paths = [pathlib.Path(arg) for arg in sys.argv[1:] if not pathlib.Path(arg).suffix in filter_ext] best_file_score(paths)