diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index e0f6da2d4e..7d918511fd 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -92,8 +92,6 @@ def __init__( self.post_base_install: list[Callable] = [] # type: ignore[type-arg] - # TODO: Figure out which one of these two we'll use.. But currently we're mixing them.. - storage['session'] = self storage['installation_session'] = self self._modules: list[str] = [] diff --git a/archinstall/lib/storage.py b/archinstall/lib/storage.py index d8474fe10d..7c89609a8d 100644 --- a/archinstall/lib/storage.py +++ b/archinstall/lib/storage.py @@ -6,9 +6,21 @@ # # And Keeping this in dict ensures that variables are shared across imports. from pathlib import Path -from typing import Any +from typing import TYPE_CHECKING, NotRequired, TypedDict -storage: dict[str, Any] = { - 'LOG_PATH': Path('/var/log/archinstall'), +if TYPE_CHECKING: + from archinstall.lib.boot import Boot + from archinstall.lib.installer import Installer + + +class _StorageDict(TypedDict): + LOG_FILE: Path + LOG_PATH: Path + active_boot: NotRequired['Boot | None'] + installation_session: NotRequired['Installer'] + + +storage: _StorageDict = { 'LOG_FILE': Path('install.log'), + 'LOG_PATH': Path('/var/log/archinstall'), }