Fix type hint, add null checks for tf.extractfile() return value

Agent-Logs-Url: https://github.com/github/spec-kit/sessions/9fb9a8ea-0967-4baf-b95c-7101e423ff58

Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-28 18:14:52 +00:00
committed by GitHub
parent d78ead1802
commit 0c6cc4502c
2 changed files with 13 additions and 5 deletions

View File

@@ -146,7 +146,7 @@ def _detect_archive_format(url: str, content_type: str = "") -> str:
def _safe_extract_tarball(
archive_path: Path,
dest_dir: Path,
error_class: type = Exception,
error_class: "type[Exception]" = Exception,
) -> None:
"""Safely extract a ``.tar.gz`` or ``.tgz`` archive into *dest_dir*.