diff --git a/src/pdm/models/caches.py b/src/pdm/models/caches.py index ef8c2f6d85..b763aa998e 100644 --- a/src/pdm/models/caches.py +++ b/src/pdm/models/caches.py @@ -3,7 +3,6 @@ import contextlib import dataclasses import hashlib -import io import json import os from functools import lru_cache @@ -273,7 +272,7 @@ def get(self, key: str) -> bytes | None: return None - def get_body(self, key: str) -> io.FileIO | None: + def get_body(self, key: str) -> BinaryIO | None: path = self._get_cache_path(key) with contextlib.suppress(OSError): return cast(BinaryIO, open(f"{path}.body", "rb"))