From 20460e1c292d3f67cdbec3813bb439032b6bb8d3 Mon Sep 17 00:00:00 2001 From: codefiles <11915375+codefiles@users.noreply.github.com> Date: Wed, 14 Jan 2026 00:03:32 -0500 Subject: [PATCH] Use Self in default_profiles (#4125) --- archinstall/default_profiles/desktop.py | 6 +++--- archinstall/default_profiles/profile.py | 4 ++-- archinstall/default_profiles/server.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/archinstall/default_profiles/desktop.py b/archinstall/default_profiles/desktop.py index ab582186..cc49395e 100644 --- a/archinstall/default_profiles/desktop.py +++ b/archinstall/default_profiles/desktop.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, override +from typing import TYPE_CHECKING, Self, override from archinstall.default_profiles.profile import GreeterType, Profile, ProfileType, SelectResult from archinstall.lib.output import info @@ -13,7 +13,7 @@ if TYPE_CHECKING: class DesktopProfile(Profile): - def __init__(self, current_selection: list[Profile] = []) -> None: + def __init__(self, current_selection: list[Self] = []) -> None: super().__init__( 'Desktop', ProfileType.Desktop, @@ -68,7 +68,7 @@ class DesktopProfile(Profile): group = MenuItemGroup(items, sort_items=True, sort_case_sensitive=False) group.set_selected_by_value(self.current_selection) - result = SelectMenu[Profile]( + result = SelectMenu[Self]( group, multi=True, allow_reset=True, diff --git a/archinstall/default_profiles/profile.py b/archinstall/default_profiles/profile.py index 8f63df66..1ae40352 100644 --- a/archinstall/default_profiles/profile.py +++ b/archinstall/default_profiles/profile.py @@ -1,7 +1,7 @@ from __future__ import annotations from enum import Enum, auto -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Self from archinstall.lib.translationhandler import tr @@ -46,7 +46,7 @@ class Profile: self, name: str, profile_type: ProfileType, - current_selection: list[Profile] = [], + current_selection: list[Self] = [], packages: list[str] = [], services: list[str] = [], support_gfx_driver: bool = False, diff --git a/archinstall/default_profiles/server.py b/archinstall/default_profiles/server.py index 5526b9c6..3865462e 100644 --- a/archinstall/default_profiles/server.py +++ b/archinstall/default_profiles/server.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, override +from typing import TYPE_CHECKING, Self, override from archinstall.default_profiles.profile import Profile, ProfileType, SelectResult from archinstall.lib.output import info @@ -13,7 +13,7 @@ if TYPE_CHECKING: class ServerProfile(Profile): - def __init__(self, current_value: list[Profile] = []): + def __init__(self, current_value: list[Self] = []): super().__init__( 'Server', ProfileType.Server, @@ -34,7 +34,7 @@ class ServerProfile(Profile): group = MenuItemGroup(items, sort_items=True) group.set_selected_by_value(self.current_selection) - result = SelectMenu[Profile]( + result = SelectMenu[Self]( group, allow_reset=True, allow_skip=True,