diff --git a/archinstall/default_profiles/desktop.py b/archinstall/default_profiles/desktop.py index fc3b712c30..1196d47742 100644 --- a/archinstall/default_profiles/desktop.py +++ b/archinstall/default_profiles/desktop.py @@ -45,7 +45,7 @@ def default_greeter_type(self) -> GreeterType | None: combined_greeters[profile.default_greeter_type] += 1 if len(combined_greeters) >= 1: - return list(combined_greeters)[0] + return next(iter(combined_greeters)) return None diff --git a/archinstall/lib/disk/partitioning_menu.py b/archinstall/lib/disk/partitioning_menu.py index 11d33d8990..ce59b240d9 100644 --- a/archinstall/lib/disk/partitioning_menu.py +++ b/archinstall/lib/disk/partitioning_menu.py @@ -274,7 +274,7 @@ async def handle_action( data: list[DiskSegment], ) -> list[DiskSegment]: if not entry: - action_key = [k for k, v in self._actions.items() if v == action][0] + action_key = next(k for k, v in self._actions.items() if v == action) match action_key: case 'suggest_partition_layout': part_mods = self.get_part_mods(data) @@ -288,7 +288,7 @@ async def handle_action( data = [s for s in data if isinstance(s.segment, PartitionModification) and s.segment.is_exists_or_modify()] elif isinstance(entry.segment, PartitionModification): partition = entry.segment - action_key = [k for k, v in self._actions.items() if v == action][0] + action_key = next(k for k, v in self._actions.items() if v == action) match action_key: case 'assign_mountpoint': new_mountpoint = await self._prompt_mountpoint() diff --git a/pyproject.toml b/pyproject.toml index 1f6cc71e6f..9600beb81e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -227,7 +227,6 @@ ignore = [ "PLW1641", # eq-without-hash "PLW2901", # redefined-loop-name "RUF005", # collection-literal-concatenation - "RUF015", # unnecessary-iterable-allocation-for-first-element "RUF039", # unraw-re-pattern "W191", # tab-indentation ]