Remove unused description fields from profiles (#3357)

This commit is contained in:
correctmost 2025-04-07 04:26:17 +00:00 committed by GitHub
parent 390f4f15f4
commit 873e7b2c64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
30 changed files with 19 additions and 51 deletions

View File

@ -119,7 +119,6 @@
# super().__init__( # super().__init__(
# 'Custom', # 'Custom',
# ProfileType.Custom, # ProfileType.Custom,
# description=str(_('Create your own'))
# ) # )
# #
# def json(self) -> Dict[str, Any]: # def json(self) -> Dict[str, Any]:

View File

@ -8,12 +8,7 @@ from archinstall.tui.menu_item import MenuItem, MenuItemGroup
from archinstall.tui.types import FrameProperties, PreviewStyle, ResultType from archinstall.tui.types import FrameProperties, PreviewStyle, ResultType
if TYPE_CHECKING: if TYPE_CHECKING:
from collections.abc import Callable
from archinstall.lib.installer import Installer from archinstall.lib.installer import Installer
from archinstall.lib.translationhandler import DeferredTranslation
_: Callable[[str], DeferredTranslation]
class DesktopProfile(Profile): class DesktopProfile(Profile):
@ -21,7 +16,6 @@ class DesktopProfile(Profile):
super().__init__( super().__init__(
'Desktop', 'Desktop',
ProfileType.Desktop, ProfileType.Desktop,
description=str(_('Provides a selection of desktop environments and tiling window managers, e.g. GNOME, KDE Plasma, Sway')),
current_selection=current_selection, current_selection=current_selection,
support_greeter=True support_greeter=True
) )

View File

@ -9,7 +9,7 @@ if TYPE_CHECKING:
class AwesomeProfile(XorgProfile): class AwesomeProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('Awesome', ProfileType.WindowMgr, description='') super().__init__('Awesome', ProfileType.WindowMgr)
@property @property
@override @override

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class BspwmProfile(XorgProfile): class BspwmProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('Bspwm', ProfileType.WindowMgr, description='') super().__init__('Bspwm', ProfileType.WindowMgr)
@property @property
@override @override

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class BudgieProfile(XorgProfile): class BudgieProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('Budgie', ProfileType.DesktopEnv, description='') super().__init__('Budgie', ProfileType.DesktopEnv)
@property @property
@override @override

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class CinnamonProfile(XorgProfile): class CinnamonProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('Cinnamon', ProfileType.DesktopEnv, description='') super().__init__('Cinnamon', ProfileType.DesktopEnv)
@property @property
@override @override

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class CosmicProfile(XorgProfile): class CosmicProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('cosmic-epoch', ProfileType.DesktopEnv, description='', advanced=True) super().__init__('cosmic-epoch', ProfileType.DesktopEnv, advanced=True)
@property @property
@override @override

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class CutefishProfile(XorgProfile): class CutefishProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('Cutefish', ProfileType.DesktopEnv, description='') super().__init__('Cutefish', ProfileType.DesktopEnv)
@property @property
@override @override

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class DeepinProfile(XorgProfile): class DeepinProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('Deepin', ProfileType.DesktopEnv, description='') super().__init__('Deepin', ProfileType.DesktopEnv)
@property @property
@override @override

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class EnlighenmentProfile(XorgProfile): class EnlighenmentProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('Enlightenment', ProfileType.WindowMgr, description='') super().__init__('Enlightenment', ProfileType.WindowMgr)
@property @property
@override @override

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class GnomeProfile(XorgProfile): class GnomeProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('GNOME', ProfileType.DesktopEnv, description='') super().__init__('GNOME', ProfileType.DesktopEnv)
@property @property
@override @override

View File

@ -17,7 +17,7 @@ if TYPE_CHECKING:
class HyprlandProfile(XorgProfile): class HyprlandProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('Hyprland', ProfileType.DesktopEnv, description='') super().__init__('Hyprland', ProfileType.DesktopEnv)
self.custom_settings = {'seat_access': None} self.custom_settings = {'seat_access': None}

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class I3wmProfile(XorgProfile): class I3wmProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('i3-wm', ProfileType.WindowMgr, description='') super().__init__('i3-wm', ProfileType.WindowMgr)
@property @property
@override @override

View File

@ -20,7 +20,6 @@ class LabwcProfile(XorgProfile):
super().__init__( super().__init__(
'Labwc', 'Labwc',
ProfileType.WindowMgr, ProfileType.WindowMgr,
description=''
) )
self.custom_settings = {'seat_access': None} self.custom_settings = {'seat_access': None}

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class LxqtProfile(XorgProfile): class LxqtProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('Lxqt', ProfileType.DesktopEnv, description='') super().__init__('Lxqt', ProfileType.DesktopEnv)
# NOTE: SDDM is the only officially supported greeter for LXQt, so unlike other DEs, lightdm is not used here. # NOTE: SDDM is the only officially supported greeter for LXQt, so unlike other DEs, lightdm is not used here.
# LXQt works with lightdm, but since this is not supported, we will not default to this. # LXQt works with lightdm, but since this is not supported, we will not default to this.

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class MateProfile(XorgProfile): class MateProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('Mate', ProfileType.DesktopEnv, description='') super().__init__('Mate', ProfileType.DesktopEnv)
@property @property
@override @override

View File

@ -20,7 +20,6 @@ class NiriProfile(XorgProfile):
super().__init__( super().__init__(
'Niri', 'Niri',
ProfileType.WindowMgr, ProfileType.WindowMgr,
description=''
) )
self.custom_settings = {'seat_access': None} self.custom_settings = {'seat_access': None}

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class PlasmaProfile(XorgProfile): class PlasmaProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('KDE Plasma', ProfileType.DesktopEnv, description='') super().__init__('KDE Plasma', ProfileType.DesktopEnv)
@property @property
@override @override

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class QtileProfile(XorgProfile): class QtileProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('Qtile', ProfileType.WindowMgr, description='') super().__init__('Qtile', ProfileType.WindowMgr)
@property @property
@override @override

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class RiverProfile(XorgProfile): class RiverProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('River', ProfileType.WindowMgr, description='') super().__init__('River', ProfileType.WindowMgr)
@property @property
@override @override

View File

@ -20,7 +20,6 @@ class SwayProfile(XorgProfile):
super().__init__( super().__init__(
'Sway', 'Sway',
ProfileType.WindowMgr, ProfileType.WindowMgr,
description=''
) )
self.custom_settings = {'seat_access': None} self.custom_settings = {'seat_access': None}

View File

@ -9,7 +9,6 @@ class WayfireProfile(XorgProfile):
super().__init__( super().__init__(
"Wayfire", "Wayfire",
ProfileType.WindowMgr, ProfileType.WindowMgr,
description="Wayfire is a 3D Wayland compositor",
) )
@property @property

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class Xfce4Profile(XorgProfile): class Xfce4Profile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('Xfce4', ProfileType.DesktopEnv, description='') super().__init__('Xfce4', ProfileType.DesktopEnv)
@property @property
@override @override

View File

@ -6,7 +6,7 @@ from archinstall.default_profiles.xorg import XorgProfile
class XmonadProfile(XorgProfile): class XmonadProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('Xmonad', ProfileType.WindowMgr, description='') super().__init__('Xmonad', ProfileType.WindowMgr)
@property @property
@override @override

View File

@ -1,19 +1,9 @@
from typing import TYPE_CHECKING
from archinstall.default_profiles.profile import Profile, ProfileType from archinstall.default_profiles.profile import Profile, ProfileType
if TYPE_CHECKING:
from collections.abc import Callable
from archinstall.lib.translationhandler import DeferredTranslation
_: Callable[[str], DeferredTranslation]
class MinimalProfile(Profile): class MinimalProfile(Profile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__( super().__init__(
'Minimal', 'Minimal',
ProfileType.Minimal, ProfileType.Minimal,
description=str(_('A very basic installation that allows you to customize Arch Linux as you see fit.'))
) )

View File

@ -54,7 +54,6 @@ class Profile:
self, self,
name: str, name: str,
profile_type: ProfileType, profile_type: ProfileType,
description: str = '',
current_selection: list[Profile] = [], current_selection: list[Profile] = [],
packages: list[str] = [], packages: list[str] = [],
services: list[str] = [], services: list[str] = [],
@ -63,7 +62,6 @@ class Profile:
advanced: bool = False advanced: bool = False
) -> None: ) -> None:
self.name = name self.name = name
self.description = description
self.profile_type = profile_type self.profile_type = profile_type
self.custom_settings: dict[str, str | None] = {} self.custom_settings: dict[str, str | None] = {}
self.advanced = advanced self.advanced = advanced

View File

@ -8,12 +8,7 @@ from archinstall.tui.menu_item import MenuItem, MenuItemGroup
from archinstall.tui.types import FrameProperties, PreviewStyle, ResultType from archinstall.tui.types import FrameProperties, PreviewStyle, ResultType
if TYPE_CHECKING: if TYPE_CHECKING:
from collections.abc import Callable
from archinstall.lib.installer import Installer from archinstall.lib.installer import Installer
from archinstall.lib.translationhandler import DeferredTranslation
_: Callable[[str], DeferredTranslation]
class ServerProfile(Profile): class ServerProfile(Profile):
@ -21,7 +16,6 @@ class ServerProfile(Profile):
super().__init__( super().__init__(
'Server', 'Server',
ProfileType.Server, ProfileType.Server,
description=str(_('Provides a selection of various server packages to install and enable, e.g. httpd, nginx, mariadb')),
current_selection=current_value current_selection=current_value
) )

View File

@ -11,7 +11,6 @@ class PostgresqlProfile(Profile):
super().__init__( super().__init__(
'Postgresql', 'Postgresql',
ProfileType.ServerType, ProfileType.ServerType,
''
) )
@property @property

View File

@ -9,7 +9,7 @@ if TYPE_CHECKING:
class TailoredProfile(XorgProfile): class TailoredProfile(XorgProfile):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__('52-54-00-12-34-56', ProfileType.Tailored, description='') super().__init__('52-54-00-12-34-56', ProfileType.Tailored)
@property @property
@override @override

View File

@ -15,13 +15,11 @@ class XorgProfile(Profile):
self, self,
name: str = 'Xorg', name: str = 'Xorg',
profile_type: ProfileType = ProfileType.Xorg, profile_type: ProfileType = ProfileType.Xorg,
description: str = str(_('Installs a minimal system as well as xorg and graphics drivers.')),
advanced: bool = False advanced: bool = False
): ):
super().__init__( super().__init__(
name, name,
profile_type, profile_type,
description=description,
support_gfx_driver=True, support_gfx_driver=True,
advanced=advanced advanced=advanced
) )