Path 1: 218 calls (0.51)

'file_to_lint' (100) 'empty' (38) 'package' (26) 'test_pylint_runners' (6) 'logging_format_interpolation_style' (6) 'test_directory' (4) 'allow_reexpo...

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

1def load_results(
2    base: str | Path, pylint_home: str | Path = PYLINT_HOME
3) -> LinterStats | None:
4    base = Path(base)
5    pylint_home = Path(pylint_home)
6    data_file = _get_pdata_path(base, 1, pylint_home)
7
8    if not data_file.exists():
9        return None
10
11    try:
12        with open(data_file, "rb") as stream:
13            data = pickle.load(stream)
14            if not isinstance(data, LinterStats):
15                warnings.warn(
16                    "You're using an old pylint cache with invalid data following "
17                    f"an upgrade, please delete '{data_file}'.",
18                    UserWarning,
19                )
20                raise TypeError
21            return data
22    except Exception:  # pylint: disable=broad-except
23        # There's an issue with the cache but we just continue as if it isn't there
24        return None
            

Path 2: 210 calls (0.49)

'fail_under_plus7_5' (40) 'fail_under_minus10' (24) 'unused_variable' (18) 'fail_on' (18) 'fail_on_info_only' (18) 'meta' (6) 'application_crash' (6) ...

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

None (210)

1def load_results(
2    base: str | Path, pylint_home: str | Path = PYLINT_HOME
3) -> LinterStats | None:
4    base = Path(base)
5    pylint_home = Path(pylint_home)
6    data_file = _get_pdata_path(base, 1, pylint_home)
7
8    if not data_file.exists():
9        return None
10
11    try:
12        with open(data_file, "rb") as stream:
13            data = pickle.load(stream)
14            if not isinstance(data, LinterStats):
15                warnings.warn(
16                    "You're using an old pylint cache with invalid data following "
17                    f"an upgrade, please delete '{data_file}'.",
18                    UserWarning,
19                )
20                raise TypeError
21            return data
22    except Exception:  # pylint: disable=broad-except
23        # There's an issue with the cache but we just continue as if it isn't there
24        return None
            

Path 3: 3 calls (0.01)

'' (1) '.tests' (1) '.tests/a/path/' (1)

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

None (3)

TypeError (3)

1def load_results(
2    base: str | Path, pylint_home: str | Path = PYLINT_HOME
3) -> LinterStats | None:
4    base = Path(base)
5    pylint_home = Path(pylint_home)
6    data_file = _get_pdata_path(base, 1, pylint_home)
7
8    if not data_file.exists():
9        return None
10
11    try:
12        with open(data_file, "rb") as stream:
13            data = pickle.load(stream)
14            if not isinstance(data, LinterStats):
15                warnings.warn(
16                    "You're using an old pylint cache with invalid data following "
17                    f"an upgrade, please delete '{data_file}'.",
18                    UserWarning,
19                )
20                raise TypeError
21            return data
22    except Exception:  # pylint: disable=broad-except
23        # There's an issue with the cache but we just continue as if it isn't there
24        return None