Skip to content

Commit df4c1bf

Browse files
committed
Try yapf
1 parent 82e2cba commit df4c1bf

84 files changed

Lines changed: 334 additions & 602 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

archinstall/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,9 @@ def plugin(f, *args, **kwargs) -> None: # type: ignore[no-untyped-def]
3131

3232
def _log_sys_info() -> None:
3333
# Log various information about hardware before starting the installation. This might assist in troubleshooting
34-
debug(
35-
f'Hardware model detected: {SysInfo.sys_vendor()} {SysInfo.product_name()}; UEFI mode: {SysInfo.has_uefi()}',
36-
)
34+
debug(f'Hardware model detected: {SysInfo.sys_vendor()} {SysInfo.product_name()}; UEFI mode: {SysInfo.has_uefi()}', )
3735
debug(f'Processor model detected: {SysInfo.cpu_model()}')
38-
debug(
39-
f'Memory statistics: {SysInfo.mem_available()} available out of {SysInfo.mem_total()} total installed',
40-
)
36+
debug(f'6emory statistics: {SysInfo.mem_available()} available out of {SysInfo.mem_total()} total installed', )
4137
debug(f'Virtualization detected: {SysInfo.virtualization()}; is VM: {SysInfo.is_vm()}')
4238
debug(f'Graphics devices detected: {SysInfo._graphics_devices().keys()}')
4339

archinstall/default_profiles/applications/pipewire.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99

1010
class PipewireProfile(Profile):
11+
1112
def __init__(self) -> None:
1213
super().__init__('Pipewire', ProfileType.Application)
1314

@@ -34,21 +35,11 @@ def _enable_pipewire_for_all(self, install_session: 'Installer') -> None:
3435

3536
for user in users:
3637
# Create the full path for enabling the pipewire systemd items
37-
service_dir = (
38-
install_session.target
39-
/ 'home'
40-
/ user.username
41-
/ '.config'
42-
/ 'systemd'
43-
/ 'user'
44-
/ 'default.target.wants'
45-
)
38+
service_dir = install_session.target / 'home' / user.username / '.config' / 'systemd' / 'user' / 'default.target.wants'
4639
service_dir.mkdir(parents=True, exist_ok=True)
4740

4841
# Set ownership of the entire user catalogue
49-
install_session.arch_chroot(
50-
f'chown -R {user.username}:{user.username} /home/{user.username}',
51-
)
42+
install_session.arch_chroot(f'chown -R {user.username}:{user.username} /home/{user.username}', )
5243

5344
# symlink in the correct pipewire systemd items
5445
install_session.arch_chroot(

archinstall/default_profiles/desktop.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414

1515
class DesktopProfile(Profile):
16+
1617
def __init__(self, current_selection: list[Profile] = []) -> None:
1718
super().__init__(
1819
'Desktop',
@@ -57,14 +58,11 @@ def _do_on_select_profiles(self) -> None:
5758

5859
@override
5960
def do_on_select(self) -> SelectResult:
60-
items = [
61-
MenuItem(
62-
p.name,
63-
value=p,
64-
preview_action=lambda x: x.value.preview_text(),
65-
)
66-
for p in profile_handler.get_desktop_profiles()
67-
]
61+
items = [MenuItem(
62+
p.name,
63+
value=p,
64+
preview_action=lambda x: x.value.preview_text(),
65+
) for p in profile_handler.get_desktop_profiles()]
6866

6967
group = MenuItemGroup(items, sort_items=True, sort_case_sensitive=False)
7068
group.set_selected_by_value(self.current_selection)

archinstall/default_profiles/desktops/awesome.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99

1010
class AwesomeProfile(XorgProfile):
11+
1112
def __init__(self) -> None:
1213
super().__init__('Awesome', ProfileType.WindowMgr)
1314

archinstall/default_profiles/desktops/bspwm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66

77
class BspwmProfile(XorgProfile):
8+
89
def __init__(self) -> None:
910
super().__init__('Bspwm', ProfileType.WindowMgr)
1011

archinstall/default_profiles/desktops/budgie.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66

77
class BudgieProfile(XorgProfile):
8+
89
def __init__(self) -> None:
910
super().__init__('Budgie', ProfileType.DesktopEnv)
1011

archinstall/default_profiles/desktops/cinnamon.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66

77
class CinnamonProfile(XorgProfile):
8+
89
def __init__(self) -> None:
910
super().__init__('Cinnamon', ProfileType.DesktopEnv)
1011

archinstall/default_profiles/desktops/cosmic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66

77
class CosmicProfile(XorgProfile):
8+
89
def __init__(self) -> None:
910
super().__init__('cosmic-epoch', ProfileType.DesktopEnv, advanced=True)
1011

archinstall/default_profiles/desktops/cutefish.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66

77
class CutefishProfile(XorgProfile):
8+
89
def __init__(self) -> None:
910
super().__init__('Cutefish', ProfileType.DesktopEnv)
1011

archinstall/default_profiles/desktops/deepin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66

77
class DeepinProfile(XorgProfile):
8+
89
def __init__(self) -> None:
910
super().__init__('Deepin', ProfileType.DesktopEnv)
1011

0 commit comments

Comments
 (0)