88
99from __future__ import annotations
1010
11- from datetime import datetime , timezone
1211import re
12+ from datetime import datetime , timezone
1313from pathlib import Path
1414from threading import Thread
1515
2020from .check_package import check_package
2121from .check_rules import check_rules
2222from .check_stats import check_stats
23+ from .config import Config
2324from .extract_deps import repo_requirements
2425from .models import Analysis , Issue
25- from .config import Config
2626
2727
2828def search_files (base : Path , name : str , * , regex : bool = False ) -> list [Path ]:
@@ -37,11 +37,7 @@ def search_files(base: Path, name: str, *, regex: bool = False) -> list[Path]:
3737
3838 pattern = re .compile (name , re .IGNORECASE )
3939
40- return [
41- p
42- for p in base .rglob ("*" )
43- if pattern .fullmatch (str (p .relative_to (base )))
44- ]
40+ return [p for p in base .rglob ("*" ) if pattern .fullmatch (str (p .relative_to (base )))]
4541
4642
4743def check_file_present (
@@ -122,3 +118,4 @@ def start():
122118 date = datetime .strftime (datetime .now (timezone .utc ), "%Y-%m-%d" )
123119 reports .sort (key = lambda x : (- x .score , - x .stats .downloads_30d , x .name ))
124120 (output_dir / f"report-{ date } .html" ).write_text (fmt .report (reports ))
121+ (output_dir / f"report-{ date } .json" ).write_text (fmt .report_json (reports ))
0 commit comments