From 9ead9a3726080be760b0d73ef9bffb2109b19159 Mon Sep 17 00:00:00 2001 From: correctmost <134317971+correctmost@users.noreply.github.com> Date: Tue, 3 Jun 2025 07:10:46 -0400 Subject: [PATCH] Remove unused arguments from internal functions This makes it easier to run Pylint's unused-argument checks on the codebase. --- archinstall/lib/disk/filesystem.py | 11 ++--------- archinstall/lib/models/device_model.py | 1 - archinstall/lib/models/mirrors.py | 2 +- archinstall/tui/curses_menu.py | 3 +-- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py index 3726606a68..c5e29d81b8 100644 --- a/archinstall/lib/disk/filesystem.py +++ b/archinstall/lib/disk/filesystem.py @@ -63,18 +63,12 @@ def perform_filesystem_operations(self, show_countdown: bool = True) -> None: for mod in device_mods: if boot_part := mod.get_boot_partition(): debug(f'Formatting boot partition: {boot_part.dev_path}') - self._format_partitions( - [boot_part], - mod.device_path, - ) + self._format_partitions([boot_part]) self.perform_lvm_operations() else: for mod in device_mods: - self._format_partitions( - mod.partitions, - mod.device_path, - ) + self._format_partitions(mod.partitions) for part_mod in mod.partitions: if part_mod.fs_type == FilesystemType.Btrfs and part_mod.is_create_or_modify(): @@ -83,7 +77,6 @@ def perform_filesystem_operations(self, show_countdown: bool = True) -> None: def _format_partitions( self, partitions: list[PartitionModification], - device_path: Path, ) -> None: """ Format can be given an overriding path, for instance /dev/null to test diff --git a/archinstall/lib/models/device_model.py b/archinstall/lib/models/device_model.py index 176ab098a1..804db4aee0 100644 --- a/archinstall/lib/models/device_model.py +++ b/archinstall/lib/models/device_model.py @@ -84,7 +84,6 @@ def parse_arg( cls, disk_config: _DiskLayoutConfigurationSerialization, enc_password: Password | None = None, - disk_encryption: _DiskEncryptionSerialization | None = None, ) -> DiskLayoutConfiguration | None: from archinstall.lib.disk.device_handler import device_handler diff --git a/archinstall/lib/models/mirrors.py b/archinstall/lib/models/mirrors.py index 0cd3e96145..e8eeaaf18f 100644 --- a/archinstall/lib/models/mirrors.py +++ b/archinstall/lib/models/mirrors.py @@ -103,7 +103,7 @@ def validate_score(cls, value: float) -> int | None: return value @model_validator(mode='after') - def debug_output(self, validation_info) -> 'MirrorStatusEntryV3': + def debug_output(self) -> 'MirrorStatusEntryV3': self._hostname, *port = urllib.parse.urlparse(self.url).netloc.split(':', 1) self._port = int(port[0]) if port and len(port) >= 1 else None diff --git a/archinstall/tui/curses_menu.py b/archinstall/tui/curses_menu.py index 704a936cb4..2d1e2cbb93 100644 --- a/archinstall/tui/curses_menu.py +++ b/archinstall/tui/curses_menu.py @@ -140,7 +140,7 @@ def add_frame( # adjust the original rows and cols of the entries as # they need to be shrunk by 1 to make space for the frame - entries = self._adjust_entries(entries, dim) + entries = self._adjust_entries(entries) framed_entries = [ top_ve, @@ -242,7 +242,6 @@ def _get_frame_dim( def _adjust_entries( self, entries: list[ViewportEntry], - frame_dim: FrameDim, ) -> list[ViewportEntry]: for entry in entries: # top row frame offset