Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some deprecated typing.Dict and typing.List usage #2673

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions archinstall/default_profiles/applications/pipewire.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Union, Any, TYPE_CHECKING
from typing import Union, Any, TYPE_CHECKING

import archinstall

Expand All @@ -15,7 +15,7 @@ def __init__(self) -> None:
super().__init__('Pipewire', ProfileType.Application)

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return [
'pipewire',
'pipewire-alsa',
Expand All @@ -27,7 +27,7 @@ def packages(self) -> List[str]:
]

def _enable_pipewire_for_all(self, install_session: 'Installer') -> None:
users: Union[User, List[User]] = archinstall.arguments.get('!users', [])
users: Union[User, list[User]] = archinstall.arguments.get('!users', [])
if not isinstance(users, list):
users = [users]

Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/awesome.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Any, TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -13,7 +13,7 @@ def __init__(self) -> None:
super().__init__('Awesome', ProfileType.WindowMgr, description='')

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return super().packages + [
'awesome',
'alacritty',
Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/bspwm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional, Any, TYPE_CHECKING
from typing import Optional, Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -12,7 +12,7 @@ def __init__(self) -> None:
super().__init__('Bspwm', ProfileType.WindowMgr, description='')

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
# return super().packages + [
return [
'bspwm',
Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/budgie.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional, Any, TYPE_CHECKING
from typing import Optional, Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -12,7 +12,7 @@ def __init__(self) -> None:
super().__init__('Budgie', ProfileType.DesktopEnv, description='')

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return [
"arc-gtk-theme",
"budgie",
Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/cinnamon.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional, List, Any, TYPE_CHECKING
from typing import Optional, Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -12,7 +12,7 @@ def __init__(self) -> None:
super().__init__('Cinnamon', ProfileType.DesktopEnv, description='')

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return [
"cinnamon",
"system-config-printer",
Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/cosmic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional, Any, TYPE_CHECKING
from typing import Optional, Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -12,7 +12,7 @@ def __init__(self) -> None:
super().__init__('cosmic-epoch', ProfileType.DesktopEnv, description='', advanced=True)

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return [
"cosmic",
]
Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/cutefish.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional, List, Any, TYPE_CHECKING
from typing import Optional, Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -13,7 +13,7 @@ def __init__(self) -> None:
super().__init__('Cutefish', ProfileType.DesktopEnv, description='')

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return [
"cutefish",
"noto-fonts"
Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/deepin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional, Any, TYPE_CHECKING
from typing import Optional, Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -12,7 +12,7 @@ def __init__(self) -> None:
super().__init__('Deepin', ProfileType.DesktopEnv, description='')

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return [
"deepin",
"deepin-terminal",
Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/enlightenment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional, Any, TYPE_CHECKING
from typing import Optional, Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -12,7 +12,7 @@ def __init__(self) -> None:
super().__init__('Enlightenment', ProfileType.WindowMgr, description='')

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return [
"enlightenment",
"terminology"
Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/gnome.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional, Any, TYPE_CHECKING
from typing import Optional, Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -12,7 +12,7 @@ def __init__(self) -> None:
super().__init__('Gnome', ProfileType.DesktopEnv, description='')

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return [
'gnome',
'gnome-tweaks'
Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/i3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional, List, Any, TYPE_CHECKING
from typing import Optional, Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -12,7 +12,7 @@ def __init__(self) -> None:
super().__init__('i3-wm', ProfileType.WindowMgr, description='')

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return [
'i3-wm',
'i3lock',
Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/lxqt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional, Any, TYPE_CHECKING
from typing import Optional, Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -15,7 +15,7 @@ def __init__(self) -> None:
# LXQt works with lightdm, but since this is not supported, we will not default to this.
# https://github.com/lxqt/lxqt/issues/795
@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return [
"lxqt",
"breeze-icons",
Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/mate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional, Any, TYPE_CHECKING
from typing import Optional, Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -12,7 +12,7 @@ def __init__(self) -> None:
super().__init__('Mate', ProfileType.DesktopEnv, description='')

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return [
"mate",
"mate-extra"
Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/plasma.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional, Any, TYPE_CHECKING
from typing import Optional, Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -12,7 +12,7 @@ def __init__(self) -> None:
super().__init__('KDE Plasma', ProfileType.DesktopEnv, description='')

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return [
"plasma-meta",
"konsole",
Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/qtile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional, List, Any, TYPE_CHECKING
from typing import Optional, Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -12,7 +12,7 @@ def __init__(self) -> None:
super().__init__('Qtile', ProfileType.WindowMgr, description='')

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return [
'qtile',
'alacritty'
Expand Down
4 changes: 2 additions & 2 deletions archinstall/default_profiles/desktops/xfce4.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional, Any, TYPE_CHECKING
from typing import Optional, Any, TYPE_CHECKING

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.xorg import XorgProfile
Expand All @@ -12,7 +12,7 @@ def __init__(self) -> None:
super().__init__('Xfce4', ProfileType.DesktopEnv, description='')

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return [
"xfce4",
"xfce4-goodies",
Expand Down
6 changes: 2 additions & 4 deletions archinstall/default_profiles/servers/cockpit.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from typing import List

from archinstall.default_profiles.profile import Profile, ProfileType


Expand All @@ -11,9 +9,9 @@ def __init__(self) -> None:
)

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return ['cockpit', 'udisks2', 'packagekit']

@property
def services(self) -> List[str]:
def services(self) -> list[str]:
return ['cockpit.socket']
8 changes: 4 additions & 4 deletions archinstall/default_profiles/servers/docker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Union, TYPE_CHECKING
from typing import Union, TYPE_CHECKING

import archinstall

Expand All @@ -17,15 +17,15 @@ def __init__(self) -> None:
)

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return ['docker']

@property
def services(self) -> List[str]:
def services(self) -> list[str]:
return ['docker']

def post_install(self, install_session: 'Installer') -> None:
users: Union[User, List[User]] = archinstall.arguments.get('!users', [])
users: Union[User, list[User]] = archinstall.arguments.get('!users', [])
if not isinstance(users, list):
users = [users]

Expand Down
6 changes: 2 additions & 4 deletions archinstall/default_profiles/servers/httpd.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from typing import List

from archinstall.default_profiles.profile import Profile, ProfileType


Expand All @@ -11,9 +9,9 @@ def __init__(self) -> None:
)

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return ['apache']

@property
def services(self) -> List[str]:
def services(self) -> list[str]:
return ['httpd']
6 changes: 2 additions & 4 deletions archinstall/default_profiles/servers/lighttpd.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from typing import List

from archinstall.default_profiles.profile import Profile, ProfileType


Expand All @@ -11,9 +9,9 @@ def __init__(self) -> None:
)

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return ['lighttpd']

@property
def services(self) -> List[str]:
def services(self) -> list[str]:
return ['lighttpd']
6 changes: 3 additions & 3 deletions archinstall/default_profiles/servers/mariadb.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, TYPE_CHECKING
from typing import TYPE_CHECKING

from archinstall.default_profiles.profile import Profile, ProfileType

Expand All @@ -14,11 +14,11 @@ def __init__(self) -> None:
)

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return ['mariadb']

@property
def services(self) -> List[str]:
def services(self) -> list[str]:
return ['mariadb']

def post_install(self, install_session: 'Installer') -> None:
Expand Down
6 changes: 2 additions & 4 deletions archinstall/default_profiles/servers/nginx.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from typing import List

from archinstall.default_profiles.profile import Profile, ProfileType


Expand All @@ -11,9 +9,9 @@ def __init__(self) -> None:
)

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return ['nginx']

@property
def services(self) -> List[str]:
def services(self) -> list[str]:
return ['nginx']
6 changes: 3 additions & 3 deletions archinstall/default_profiles/servers/postgresql.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, TYPE_CHECKING
from typing import TYPE_CHECKING

from archinstall.default_profiles.profile import Profile, ProfileType

Expand All @@ -15,11 +15,11 @@ def __init__(self) -> None:
)

@property
def packages(self) -> List[str]:
def packages(self) -> list[str]:
return ['postgresql']

@property
def services(self) -> List[str]:
def services(self) -> list[str]:
return ['postgresql']

def post_install(self, install_session: 'Installer') -> None:
Expand Down
Loading