Skip to content

Commit 7d4caa4

Browse files
committed
lint fix
1 parent 7b007f1 commit 7d4caa4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/codeplag/utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ def __init__(self: Self, parsed_args: dict[str, Any]) -> None:
3636
else:
3737
files_extension: Extension = parsed_args.pop("extension")
3838
github_urls: list[str] = parsed_args.pop("github_urls", [])
39-
self.github_files: list[str] = list(filter(lambda url: '.' + files_extension in url, github_urls))
40-
self.github_project_folders: list[str] = list(filter(lambda url: '.' + files_extension not in url, github_urls))
39+
40+
is_file = lambda url: '.' + files_extension in url
41+
self.github_files: list[str] = list(filter(is_file, github_urls))
42+
is_dir = lambda url: not is_file(url)
43+
self.github_project_folders: list[str] = list(filter(is_dir, github_urls))
44+
4145
self.github_user: str = parsed_args.pop("github_user", "")
4246
ignore_threshold: bool = parsed_args.pop("ignore_threshold")
4347
if ignore_threshold:

0 commit comments

Comments
 (0)