Remove unused arguments from internal functions (#3571)

This makes it easier to run Pylint's unused-argument checks on the
codebase.
This commit is contained in:
correctmost 2025-06-03 13:17:10 +00:00 committed by GitHub
parent fe9b853d25
commit fafb180ffe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 13 deletions

View File

@ -63,18 +63,12 @@ class FilesystemHandler:
for mod in device_mods: for mod in device_mods:
if boot_part := mod.get_boot_partition(): if boot_part := mod.get_boot_partition():
debug(f'Formatting boot partition: {boot_part.dev_path}') debug(f'Formatting boot partition: {boot_part.dev_path}')
self._format_partitions( self._format_partitions([boot_part])
[boot_part],
mod.device_path,
)
self.perform_lvm_operations() self.perform_lvm_operations()
else: else:
for mod in device_mods: for mod in device_mods:
self._format_partitions( self._format_partitions(mod.partitions)
mod.partitions,
mod.device_path,
)
for part_mod in mod.partitions: for part_mod in mod.partitions:
if part_mod.fs_type == FilesystemType.Btrfs and part_mod.is_create_or_modify(): if part_mod.fs_type == FilesystemType.Btrfs and part_mod.is_create_or_modify():
@ -83,7 +77,6 @@ class FilesystemHandler:
def _format_partitions( def _format_partitions(
self, self,
partitions: list[PartitionModification], partitions: list[PartitionModification],
device_path: Path,
) -> None: ) -> None:
""" """
Format can be given an overriding path, for instance /dev/null to test Format can be given an overriding path, for instance /dev/null to test

View File

@ -84,7 +84,6 @@ class DiskLayoutConfiguration:
cls, cls,
disk_config: _DiskLayoutConfigurationSerialization, disk_config: _DiskLayoutConfigurationSerialization,
enc_password: Password | None = None, enc_password: Password | None = None,
disk_encryption: _DiskEncryptionSerialization | None = None,
) -> DiskLayoutConfiguration | None: ) -> DiskLayoutConfiguration | None:
from archinstall.lib.disk.device_handler import device_handler from archinstall.lib.disk.device_handler import device_handler

View File

@ -103,7 +103,7 @@ class MirrorStatusEntryV3(BaseModel):
return value return value
@model_validator(mode='after') @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._hostname, *port = urllib.parse.urlparse(self.url).netloc.split(':', 1)
self._port = int(port[0]) if port and len(port) >= 1 else None self._port = int(port[0]) if port and len(port) >= 1 else None

View File

@ -140,7 +140,7 @@ class AbstractViewport:
# adjust the original rows and cols of the entries as # adjust the original rows and cols of the entries as
# they need to be shrunk by 1 to make space for the frame # 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 = [ framed_entries = [
top_ve, top_ve,
@ -242,7 +242,6 @@ class AbstractViewport:
def _adjust_entries( def _adjust_entries(
self, self,
entries: list[ViewportEntry], entries: list[ViewportEntry],
frame_dim: FrameDim,
) -> list[ViewportEntry]: ) -> list[ViewportEntry]:
for entry in entries: for entry in entries:
# top row frame offset # top row frame offset