Skip to content

Commit 01eeec4

Browse files
committed
Use Self in default_profiles
1 parent 2e9d5e4 commit 01eeec4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

archinstall/default_profiles/desktop.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import TYPE_CHECKING, override
1+
from typing import TYPE_CHECKING, Self, override
22

33
from archinstall.default_profiles.profile import GreeterType, Profile, ProfileType, SelectResult
44
from archinstall.lib.output import info
@@ -13,7 +13,7 @@
1313

1414

1515
class DesktopProfile(Profile):
16-
def __init__(self, current_selection: list[Profile] = []) -> None:
16+
def __init__(self, current_selection: list[Self] = []) -> None:
1717
super().__init__(
1818
'Desktop',
1919
ProfileType.Desktop,
@@ -68,7 +68,7 @@ def do_on_select(self) -> SelectResult:
6868
group = MenuItemGroup(items, sort_items=True, sort_case_sensitive=False)
6969
group.set_selected_by_value(self.current_selection)
7070

71-
result = SelectMenu[Profile](
71+
result = SelectMenu[Self](
7272
group,
7373
multi=True,
7474
allow_reset=True,

archinstall/default_profiles/profile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
from enum import Enum, auto
4-
from typing import TYPE_CHECKING
4+
from typing import TYPE_CHECKING, Self
55

66
from archinstall.lib.translationhandler import tr
77

@@ -46,7 +46,7 @@ def __init__(
4646
self,
4747
name: str,
4848
profile_type: ProfileType,
49-
current_selection: list[Profile] = [],
49+
current_selection: list[Self] = [],
5050
packages: list[str] = [],
5151
services: list[str] = [],
5252
support_gfx_driver: bool = False,

archinstall/default_profiles/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import TYPE_CHECKING, override
1+
from typing import TYPE_CHECKING, Self, override
22

33
from archinstall.default_profiles.profile import Profile, ProfileType, SelectResult
44
from archinstall.lib.output import info
@@ -13,7 +13,7 @@
1313

1414

1515
class ServerProfile(Profile):
16-
def __init__(self, current_value: list[Profile] = []):
16+
def __init__(self, current_value: list[Self] = []):
1717
super().__init__(
1818
'Server',
1919
ProfileType.Server,
@@ -34,7 +34,7 @@ def do_on_select(self) -> SelectResult:
3434
group = MenuItemGroup(items, sort_items=True)
3535
group.set_selected_by_value(self.current_selection)
3636

37-
result = SelectMenu[Profile](
37+
result = SelectMenu[Self](
3838
group,
3939
allow_reset=True,
4040
allow_skip=True,

0 commit comments

Comments
 (0)