diff --git a/archinstall/lib/exceptions.py b/archinstall/lib/exceptions.py index 8d93c308c..2c2e8d4db 100644 --- a/archinstall/lib/exceptions.py +++ b/archinstall/lib/exceptions.py @@ -45,5 +45,6 @@ class DownloadTimeout(Exception): Download timeout exception raised by DownloadTimer. ''' + class PacmanIssue(Exception): pass diff --git a/archinstall/lib/pacman/__init__.py b/archinstall/lib/pacman/__init__.py index c5862ed72..cb7d0c146 100644 --- a/archinstall/lib/pacman/__init__.py +++ b/archinstall/lib/pacman/__init__.py @@ -148,7 +148,7 @@ def __init__( self.synced = synced self.rootdir = rootdir - self._temporary_pacman_root :pathlib.Path | None = None + self._temporary_pacman_root: pathlib.Path | None = None self._session = None self._source_config_mirrors = True if servers is None or include_config_mirrors is True else False @@ -186,7 +186,7 @@ def load_config(self) -> typing.Dict[str, Any]: print(f"Loading pacman configuration {self.config}") - config :typing.Dict[str, typing.Any] = {} + config: typing.Dict[str, typing.Any] = {} with self.config.open('r') as fh: _section = None for line in fh: @@ -200,7 +200,7 @@ def load_config(self) -> typing.Dict[str, Any]: config_item = line.strip() if _section and _section not in config: - config[_section] = {} + config[_section] = {} if _section and _section.lower() == 'options': if '=' in config_item: @@ -348,8 +348,8 @@ def install(self, *packages: str): [_transaction.add_pkg(pkg) for pkg in pyalpm_package_list] def search(self, *patterns: str, exact: bool = True): - results :typing.List[pyalpm.Package] = [] - queries :typing.List[str] = [] + results: typing.List[pyalpm.Package] = [] + queries: typing.List[str] = [] if not self._session: raise PacmanIssue("Pacman() needs to be executed in a context") @@ -382,8 +382,8 @@ def search(self, *patterns: str, exact: bool = True): return results def query(self, *patterns: str, exact: bool = True): - results :typing.List[pyalpm.Package] = [] - queries :typing.List[str] = [] + results: typing.List[pyalpm.Package] = [] + queries: typing.List[str] = [] if not self._session: raise PacmanIssue("Pacman() needs to be executed in a context")