Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion archinstall/lib/boot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import time
from collections.abc import Iterator
from types import TracebackType
from typing import Self

from .exceptions import SysCallError
from .general import SysCommand, SysCommandWorker, locate_binary
Expand All @@ -16,7 +17,7 @@ def __init__(self, installation: Installer):
self.session: SysCommandWorker | None = None
self.ready = False

def __enter__(self) -> 'Boot':
def __enter__(self) -> Self:
if (existing_session := storage.get('active_boot', None)) and existing_session.instance != self.instance:
raise KeyError('Archinstall only supports booting up one instance and another session is already active.')

Expand Down
4 changes: 2 additions & 2 deletions archinstall/lib/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from select import EPOLLHUP, EPOLLIN, epoll
from shutil import which
from types import TracebackType
from typing import Any, override
from typing import Any, Self, override

from .exceptions import RequirementError, SysCallError
from .output import debug, error, logger
Expand Down Expand Up @@ -177,7 +177,7 @@ def __str__(self) -> str:
except UnicodeDecodeError:
return str(self._trace_log)

def __enter__(self) -> 'SysCommandWorker':
def __enter__(self) -> Self:
return self

def __exit__(self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None) -> None:
Expand Down
4 changes: 2 additions & 2 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from pathlib import Path
from subprocess import CalledProcessError
from types import TracebackType
from typing import Any
from typing import Any, Self

from archinstall.lib.disk.device_handler import device_handler
from archinstall.lib.disk.fido import Fido2
Expand Down Expand Up @@ -123,7 +123,7 @@ def __init__(

self.pacman = Pacman(self.target, arch_config_handler.args.silent)

def __enter__(self) -> 'Installer':
def __enter__(self) -> Self:
return self

def __exit__(self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None) -> bool | None:
Expand Down