Path 1: 101 calls (1.0)

LinterStats (98) 1 (2) object (1)

'file_to_lint' (47) 'empty' (19) 'package' (6) 'test_pylint_runners' (3) 'logging_format_interpolation_style' (3) 'allow_reexport' (2) 'changing' (2) ...

'/Users/andrehora/Library/Caches/pylint' (101)

1def save_results(
2    results: LinterStats, base: str | Path, pylint_home: str | Path = PYLINT_HOME
3) -> None:
4    base = Path(base)
5    pylint_home = Path(pylint_home)
6    try:
7        pylint_home.mkdir(parents=True, exist_ok=True)
8    except OSError:  # pragma: no cover
9        print(f"Unable to create directory {pylint_home}", file=sys.stderr)
10    data_file = _get_pdata_path(base, 1)
11    try:
12        with open(data_file, "wb") as stream:
13            pickle.dump(results, stream)
14    except OSError as ex:  # pragma: no cover
15        print(f"Unable to create file {data_file}: {ex}", file=sys.stderr)