Skip to content
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
2 changes: 1 addition & 1 deletion archinstall/default_profiles/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
# def info(self) -> Optional[ProfileInfo]:
# enabled_profiles = [p for p in self._current_selection if p.custom_enabled]
# if enabled_profiles:
# details = ', '.join([p.name for p in enabled_profiles])
# details = ', '.join(p.name for p in enabled_profiles)
# gfx_driver = self.gfx_driver
# return ProfileInfo(self.name, details, gfx_driver)
#
Expand Down
6 changes: 3 additions & 3 deletions archinstall/lib/disk/device_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def _lvm_info(

# for whatever reason the output sometimes contains
# "File descriptor X leaked leaked on vgs invocation
data = '\n'.join([raw for raw in raw_info if 'File descriptor' not in raw])
data = '\n'.join(raw for raw in raw_info if 'File descriptor' not in raw)

debug(f'LVM info: {data}')

Expand Down Expand Up @@ -489,7 +489,7 @@ def lvm_vol_reduce(self, vol_path: Path, amount: Size) -> None:
SysCommand(cmd)

def lvm_pv_create(self, pvs: Iterable[Path]) -> None:
pvs_str = ' '.join([str(pv) for pv in pvs])
pvs_str = ' '.join(str(pv) for pv in pvs)
# Signatures are already wiped by wipefs, -f is just for safety
cmd = f'pvcreate -f --yes {pvs_str}'
# note flags used in scripting
Expand All @@ -500,7 +500,7 @@ def lvm_pv_create(self, pvs: Iterable[Path]) -> None:
self.udev_sync()

def lvm_vg_create(self, pvs: Iterable[Path], vg_name: str) -> None:
pvs_str = ' '.join([str(pv) for pv in pvs])
pvs_str = ' '.join(str(pv) for pv in pvs)
cmd = f'vgcreate --yes --force {vg_name} {pvs_str}'

debug(f'Creating LVM group: {cmd}')
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/global_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def _prev_mirror_config(self, item: MenuItem) -> str | None:
if mirror_config.optional_repositories:
title = tr('Optional repositories')
divider = '-' * len(title)
repos = ', '.join([r.value for r in mirror_config.optional_repositories])
repos = ', '.join(r.value for r in mirror_config.optional_repositories)
output += f'{title}\n{divider}\n{repos}\n\n'

if mirror_config.custom_repositories:
Expand Down
4 changes: 2 additions & 2 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,7 @@ def _add_limine_bootloader(
f'cmdline: {kernel_params}',
]
config_contents += f'\n/Arch Linux ({kernel})\n'
config_contents += '\n'.join([f' {it}' for it in entry]) + '\n'
config_contents += '\n'.join(f' {it}' for it in entry) + '\n'
else:
entry = [
'protocol: linux',
Expand All @@ -1558,7 +1558,7 @@ def _add_limine_bootloader(
f'module_path: {path_root}:/initramfs-{kernel}.img',
]
config_contents += f'\n/Arch Linux ({kernel})\n'
config_contents += '\n'.join([f' {it}' for it in entry]) + '\n'
config_contents += '\n'.join(f' {it}' for it in entry) + '\n'

config_path.write_text(config_contents)

Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/interactions/disk_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def suggest_multi_disk_layout(
if filesystem_type == FilesystemType.Btrfs:
mount_options = select_mount_options()

device_paths = ', '.join([str(d.device_info.path) for d in devices])
device_paths = ', '.join(str(d.device_info.path) for d in devices)

debug(f'Suggesting multi-disk-layout for devices: {device_paths}')
debug(f'/root: {root_device.device_info.path}')
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/interactions/general_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def ask_additional_packages_to_install(
) -> list[str]:
repositories |= {Repository.Core, Repository.Extra}

respos_text = ', '.join([r.value for r in repositories])
respos_text = ', '.join(r.value for r in repositories)
output = tr('Repositories: {}').format(respos_text) + '\n'

output += tr('Loading packages...')
Expand Down
4 changes: 2 additions & 2 deletions archinstall/lib/mirrors.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def _prev_regions(self, item: MenuItem) -> str:
def _prev_additional_repos(self, item: MenuItem) -> str | None:
if item.value:
repositories: list[Repository] = item.value
repos = ', '.join([repo.value for repo in repositories])
repos = ', '.join(repo.value for repo in repositories)
return f'{tr("Additional repositories")}: {repos}'
return None

Expand All @@ -292,7 +292,7 @@ def _prev_custom_servers(self, item: MenuItem) -> str | None:
return None

custom_servers: list[CustomServer] = item.value
output = '\n'.join([server.url for server in custom_servers])
output = '\n'.join(server.url for server in custom_servers)
return output.strip()

@override
Expand Down
4 changes: 2 additions & 2 deletions archinstall/lib/models/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ def table_data(self) -> dict[str, str]:
'Start': self.start.format_size(Unit.sectors, self.sector_size, include_unit=False),
'End': end.format_size(Unit.sectors, self.sector_size, include_unit=False),
'Size': self.length.format_highest(),
'Flags': ', '.join([f.description for f in self.flags]),
'Flags': ', '.join(f.description for f in self.flags),
}

if self.btrfs_subvol_infos:
Expand Down Expand Up @@ -1044,7 +1044,7 @@ def table_data(self) -> dict[str, str]:
'FS type': self.fs_type.value if self.fs_type else 'Unknown',
'Mountpoint': str(self.mountpoint) if self.mountpoint else '',
'Mount options': ', '.join(self.mount_options),
'Flags': ', '.join([f.description for f in self.flags]),
'Flags': ', '.join(f.description for f in self.flags),
}

if self.btrfs_subvols:
Expand Down
4 changes: 2 additions & 2 deletions archinstall/lib/models/mirrors.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,11 @@ class MirrorConfiguration:

@property
def region_names(self) -> str:
return '\n'.join([m.name for m in self.mirror_regions])
return '\n'.join(m.name for m in self.mirror_regions)

@property
def custom_server_urls(self) -> str:
return '\n'.join([s.url for s in self.custom_servers])
return '\n'.join(s.url for s in self.custom_servers)

def json(self) -> _MirrorConfigurationSerialization:
regions = {}
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/models/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def as_systemd_config(self) -> str:
config_str = ''
for top, entries in config.items():
config_str += f'[{top}]\n'
config_str += '\n'.join([f'{k}={v}' for k, v in entries])
config_str += '\n'.join(f'{k}={v}' for k, v in entries)
config_str += '\n\n'

return config_str
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def log(
reset: bool = False,
font: list[Font] = [],
) -> None:
text = ' '.join([str(x) for x in msgs])
text = ' '.join(str(x) for x in msgs)

logger.log(level, text)

Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/profile/profile_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def _preview_profile(self, item: MenuItem) -> str | None:
if profile:
if (sub_profiles := profile.current_selection) is not None:
text += tr('Selected profiles: ')
text += ', '.join([p.name for p in sub_profiles]) + '\n'
text += ', '.join(p.name for p in sub_profiles) + '\n'

if packages := profile.packages_text(include_sub_packages=True):
text += f'{packages}'
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/utils/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,5 @@ def format_cols(items: list[str], header: str | None = None) -> str:

text += FormattedOutput.as_columns(items, col)
# remove whitespaces on each row
text = '\n'.join([t.strip() for t in text.split('\n')])
text = '\n'.join(t.strip() for t in text.split('\n'))
return text
2 changes: 1 addition & 1 deletion archinstall/tui/curses_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ def _process_input_key(self, key: int) -> Result[ValueT] | None:

if len(key_handles) > 1:
decoded = MenuKeys.decode(key)
handles = ', '.join([k.name for k in key_handles])
handles = ', '.join(k.name for k in key_handles)
raise ValueError(f'Multiple key matches for key {decoded}: {handles}')
elif len(key_handles) == 0:
return None
Expand Down