refactor: give each installer module one role

The split had pushed each helper down into the lowest module using it.
Names now sit with the concern they belong to (68 modules, 45 before),
each with a one-line docstring saying it, and the import graph stays
acyclic. Statement source and comments moved unchanged: every top-level
statement of install.py keeps an identical ast.dump.
This commit is contained in:
Abdessamad Derraz committed 2026-11-18 02:55:56 +01:00
1 parent 9b0c7a390c
commit 6b597f85a0
78 files changed
+30571 -30127

No files matched your search

+7 -1
View File
@@ -7,8 +7,9 @@ import weakref
from pathlib import Path
from typing import TYPE_CHECKING
from installer.constants import AVAILABLE_PLATFORMS, MAX_MANIFEST_BYTES
from installer.invocation import OFFLINE_VARIABLE, offline_requested
from installer.platforms import AVAILABLE_PLATFORMS
from installer.remote import MAX_MANIFEST_BYTES
if TYPE_CHECKING:
from installer.from_folders import FolderIndex
@@ -112,3 +113,8 @@ def local_manifest_platform(path: Path) -> str | None:
return None
plat = data.get("platform") if isinstance(data, dict) else None
return plat if plat in AVAILABLE_PLATFORMS else None
def _offline_only() -> bool:
"""--offline without a pack: what is not on this machine cannot come."""
return offline_requested() and LOCAL.pack is None