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
2 changes: 1 addition & 1 deletion archinstall/lib/crypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def encrypt(password: str, data: str) -> str:
return f"$argon2id${encoded_salt}${encoded_token}"


def decrypt(data: str, password: str):
def decrypt(data: str, password: str) -> str:
_, algo, encoded_salt, encoded_token = data.split("$")
salt = base64.urlsafe_b64decode(encoded_salt)
token = base64.urlsafe_b64decode(encoded_token)
Expand Down
6 changes: 3 additions & 3 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ def _config_uki(
if not self.mkinitcpio(["-P"]):
error("Error generating initramfs (continuing anyway)")

def add_bootloader(self, bootloader: Bootloader, uki_enabled: bool = False):
def add_bootloader(self, bootloader: Bootloader, uki_enabled: bool = False) -> None:
"""
Adds a bootloader to the installation instance.
Archinstall supports one of three types:
Expand All @@ -1530,7 +1530,7 @@ def add_bootloader(self, bootloader: Bootloader, uki_enabled: bool = False):
# Allow plugins to override the boot-loader handling.
# This allows for bot configuring and installing bootloaders.
if plugin.on_add_bootloader(self):
return True
return
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The callers do not check the return value of this function, so I removed True here


efi_partition = self._get_efi_partition()
boot_partition = self._get_boot_partition()
Expand Down Expand Up @@ -1560,7 +1560,7 @@ def add_bootloader(self, bootloader: Bootloader, uki_enabled: bool = False):
def add_additional_packages(self, packages: str | list[str]) -> None:
return self.pacman.strap(packages)

def enable_sudo(self, user: User, group: bool = False):
def enable_sudo(self, user: User, group: bool = False) -> None:
info(f"Enabling sudo permissions for {user.username}")

sudoers_dir = self.target / "etc/sudoers.d"
Expand Down
4 changes: 2 additions & 2 deletions archinstall/lib/mirrors.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,12 @@ def select_mirror_regions(preset: list[MirrorRegion]) -> list[MirrorRegion]:
return selected_mirrors


def add_custom_mirror_servers(preset: list[CustomServer] = []):
def add_custom_mirror_servers(preset: list[CustomServer] = []) -> list[CustomServer]:
custom_mirrors = CustomMirrorServersList(preset).run()
return custom_mirrors


def select_custom_mirror(preset: list[CustomRepository] = []):
def select_custom_mirror(preset: list[CustomRepository] = []) -> list[CustomRepository]:
custom_mirrors = CustomMirrorRepositoriesList(preset).run()
return custom_mirrors

Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/models/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def plaintext(self) -> str:
return self._plaintext

@plaintext.setter
def plaintext(self, value: str):
def plaintext(self, value: str) -> None:
self._plaintext = value
self.enc_password = crypt_yescrypt(value)

Expand Down