Skip to content

Commit

Permalink
Update scoring.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO authored Feb 9, 2024
1 parent d483b11 commit ae1679a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down Expand Up @@ -68,6 +71,5 @@ def best_file_score(path_list: typing.List[pathlib.Path]) -> typing.Optional[typ
print('Usage: python scoring.py <files>')
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)

0 comments on commit ae1679a

Please sign in to comment.