Trim docstrings and comments

This commit is contained in:
J. Nick Koston
2026-08-27 18:03:20 -05:00
parent a53ffa781a
commit 31aae57b2d
2 changed files with 9 additions and 17 deletions
+4 -8
View File
@@ -320,8 +320,7 @@ def _tar_extract_all(
data: File-like object containing the TAR archive
extract_dir: Directory to extract contents to
progress_header: If set, show a progress bar with this header
progress: If set, receives fractions in [0, 1] ending at 1.0 and
overrides ``progress_header``
progress: fraction callback (0..1, ends at 1.0); overrides progress_header
"""
import tarfile
@@ -402,8 +401,7 @@ def _zip_extract_all(
data: File-like object containing the ZIP archive
extract_dir: Directory to extract contents to
progress_header: If set, show a progress bar with this header
progress: If set, receives fractions in [0, 1] ending at 1.0 and
overrides ``progress_header``
progress: fraction callback (0..1, ends at 1.0); overrides progress_header
"""
import zipfile
@@ -502,8 +500,7 @@ def _7z_extract_all(
data: File-like object containing the 7z archive (must be seekable)
extract_dir: Directory to extract contents to
progress_header: If set, show a progress bar with this header
progress: If set, called with 1.0 on completion and overrides
``progress_header``
progress: called with 1.0 on completion; overrides progress_header
"""
import py7zr
@@ -590,8 +587,7 @@ def archive_extract_all(
archive: Path to archive file or file-like object
extract_dir: Directory to extract contents to
progress_header: If set, show a progress bar with this header
progress: If set, receives fractions in [0, 1] ending at 1.0 and
overrides ``progress_header``
progress: fraction callback (0..1, ends at 1.0); overrides progress_header
Raises:
TypeError: If archive is not a valid type
+5 -9
View File
@@ -304,9 +304,8 @@ def install_package(
# Persistent location so an interrupted download resumes across runs.
downloads_dir.mkdir(parents=True, exist_ok=True)
archive = _archive_path(downloads_dir, name, version)
# The batch header already names each package; a batched archive that
# unexpectedly needs a real download keeps the INFO line, since the
# shared bar shows no progress for it
# Batch header names each package; keep INFO when an archive
# unexpectedly needs a real download (the shared bar won't move)
log = (
_LOGGER.debug
if extract_progress is not None and archive.is_file()
@@ -346,12 +345,9 @@ def install_package(
def install_packages(specs: Collection[PackageSpec], downloads_dir: Path) -> None:
"""Install several packages, extracting verified archives in parallel.
Prefetched archives extract concurrently under one shared bar; the rest
(marker hits, mirror overrides, missing archives) take the sequential
``install_package`` path. The first failure is re-raised.
"""
"""Install several packages; prefetched archives extract in parallel under
one shared bar, the rest take the sequential ``install_package`` path.
The first failure is re-raised."""
pending: list[tuple[PackageSpec, int]] = []
rest: list[PackageSpec] = []
seen: set[str] = set()