Skip to content

Commit dda3d61

Browse files
committed
Add some missing type annotations for return values
1 parent 97eeef8 commit dda3d61

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

archinstall/lib/crypt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def encrypt(password: str, data: str) -> str:
108108
return f"$argon2id${encoded_salt}${encoded_token}"
109109

110110

111-
def decrypt(data: str, password: str):
111+
def decrypt(data: str, password: str) -> str:
112112
_, algo, encoded_salt, encoded_token = data.split("$")
113113
salt = base64.urlsafe_b64decode(encoded_salt)
114114
token = base64.urlsafe_b64decode(encoded_token)

archinstall/lib/installer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ def _config_uki(
15131513
if not self.mkinitcpio(["-P"]):
15141514
error("Error generating initramfs (continuing anyway)")
15151515

1516-
def add_bootloader(self, bootloader: Bootloader, uki_enabled: bool = False):
1516+
def add_bootloader(self, bootloader: Bootloader, uki_enabled: bool = False) -> None:
15171517
"""
15181518
Adds a bootloader to the installation instance.
15191519
Archinstall supports one of three types:
@@ -1530,7 +1530,7 @@ def add_bootloader(self, bootloader: Bootloader, uki_enabled: bool = False):
15301530
# Allow plugins to override the boot-loader handling.
15311531
# This allows for bot configuring and installing bootloaders.
15321532
if plugin.on_add_bootloader(self):
1533-
return True
1533+
return
15341534

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

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

15661566
sudoers_dir = self.target / "etc/sudoers.d"

archinstall/lib/mirrors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,12 @@ def select_mirror_regions(preset: list[MirrorRegion]) -> list[MirrorRegion]:
336336
return selected_mirrors
337337

338338

339-
def add_custom_mirror_servers(preset: list[CustomServer] = []):
339+
def add_custom_mirror_servers(preset: list[CustomServer] = []) -> list[CustomServer]:
340340
custom_mirrors = CustomMirrorServersList(preset).run()
341341
return custom_mirrors
342342

343343

344-
def select_custom_mirror(preset: list[CustomRepository] = []):
344+
def select_custom_mirror(preset: list[CustomRepository] = []) -> list[CustomRepository]:
345345
custom_mirrors = CustomMirrorRepositoriesList(preset).run()
346346
return custom_mirrors
347347

archinstall/lib/models/users.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def plaintext(self) -> str:
132132
return self._plaintext
133133

134134
@plaintext.setter
135-
def plaintext(self, value: str):
135+
def plaintext(self, value: str) -> None:
136136
self._plaintext = value
137137
self.enc_password = crypt_yescrypt(value)
138138

0 commit comments

Comments
 (0)