Typo and grammar fixes (#3970)
* Menu now filters and sorts using priority, improving UX. * Refactor: improve logic, removed redundancy * Refactor: improve logic, removed redundancy * Typo and grammar fixes * Typo and grammar fixes * Fix comment formatting in .gitlab-ci.yml * Fix comment * Removed code from separate pull request * Update menu_item.py * removed white space * Remove unnecessary blank lines in menu_item.py >:(
This commit is contained in:
parent
d176b9514c
commit
7398e2785d
|
|
@ -36,7 +36,7 @@ flake8:
|
|||
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
|
||||
# We currently do not have unit tests implemented but this stage is written in anticipation of their future usage.
|
||||
# When a stage name is preceeded with a '.' it's treated as "disabled" by GitLab and is not executed, so it's fine for it to be declared.
|
||||
# When a stage name is preceded with a '.' it's treated as "disabled" by GitLab and is not executed, so it's fine for it to be declared.
|
||||
.pytest:
|
||||
stage: test
|
||||
tags:
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ archinstall --config <path to user config file or URL> --creds <path to user cre
|
|||
```
|
||||
|
||||
### Credentials configuration file encryption
|
||||
By default all user account credentials are hashed with `yescrypt` and only the hash is stored in the saved `user_credentials.json` file.
|
||||
By default, all user account credentials are hashed with `yescrypt` and only the hash is stored in the saved `user_credentials.json` file.
|
||||
This is not possible for disk encryption password which needs to be stored in plaintext to be able to apply it.
|
||||
|
||||
However, when selecting to save configuration files, `archinstall` will prompt for the option to encrypt the `user_credentials.json` file content.
|
||||
|
|
@ -75,7 +75,7 @@ there are multiple ways to provide the decryption key:
|
|||
|
||||
# Help or Issues
|
||||
|
||||
If you come across any issues, kindly submit your issue here on Github or post your query in the
|
||||
If you come across any issues, kindly submit your issue here on GitHub or post your query in the
|
||||
[discord](https://discord.gg/aDeMffrxNg) help channel.
|
||||
|
||||
When submitting an issue, please:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from archinstall.default_profiles.profile import GreeterType, ProfileType
|
|||
from archinstall.default_profiles.xorg import XorgProfile
|
||||
|
||||
|
||||
class EnlighenmentProfile(XorgProfile):
|
||||
class EnlightenmentProfile(XorgProfile):
|
||||
def __init__(self) -> None:
|
||||
super().__init__('Enlightenment', ProfileType.WindowMgr)
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ class ApplicationMenu(AbstractSubMenu[ApplicationConfiguration]):
|
|||
else:
|
||||
self._app_config = ApplicationConfiguration()
|
||||
|
||||
menu_optioons = self._define_menu_options()
|
||||
self._item_group = MenuItemGroup(menu_optioons, checkmarks=True)
|
||||
menu_options = self._define_menu_options()
|
||||
self._item_group = MenuItemGroup(menu_options, checkmarks=True)
|
||||
|
||||
super().__init__(
|
||||
self._item_group,
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ class ArchConfig:
|
|||
arch_config.auth_config = AuthenticationConfiguration()
|
||||
arch_config.auth_config.root_enc_password = root_password
|
||||
|
||||
# DEPRECATED: backwards copatibility
|
||||
# DEPRECATED: backwards compatibility
|
||||
users: list[User] = []
|
||||
if args_users := args_config.get('!users', None):
|
||||
users = User.parse_arguments(args_users)
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ class AuthenticationMenu(AbstractSubMenu[AuthenticationConfiguration]):
|
|||
else:
|
||||
self._auth_config = AuthenticationConfiguration()
|
||||
|
||||
menu_optioons = self._define_menu_options()
|
||||
self._item_group = MenuItemGroup(menu_optioons, checkmarks=True)
|
||||
menu_options = self._define_menu_options()
|
||||
self._item_group = MenuItemGroup(menu_options, checkmarks=True)
|
||||
|
||||
super().__init__(
|
||||
self._item_group,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ def crypt_gen_salt(prefix: str | bytes, rounds: int) -> bytes:
|
|||
|
||||
def crypt_yescrypt(plaintext: str) -> str:
|
||||
"""
|
||||
By default chpasswd in Arch uses PAM to to hash the password with crypt_yescrypt
|
||||
By default chpasswd in Arch uses PAM to hash the password with crypt_yescrypt
|
||||
the PAM code https://github.com/linux-pam/linux-pam/blob/master/modules/pam_unix/support.c
|
||||
shows that the hashing rounds are determined from YESCRYPT_COST_FACTOR in /etc/login.defs
|
||||
If no value was specified (or commented out) a default of 5 is choosen
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@ class DiskLayoutConfigurationMenu(AbstractSubMenu[DiskLayoutConfiguration]):
|
|||
btrfs_snapshot_config=snapshot_config,
|
||||
)
|
||||
|
||||
menu_optioons = self._define_menu_options()
|
||||
self._item_group = MenuItemGroup(menu_optioons, sort_items=False, checkmarks=True)
|
||||
menu_options = self._define_menu_options()
|
||||
self._item_group = MenuItemGroup(menu_options, sort_items=False, checkmarks=True)
|
||||
|
||||
super().__init__(
|
||||
self._item_group,
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ class DiskEncryptionMenu(AbstractSubMenu[DiskEncryption]):
|
|||
self._device_modifications = device_modifications
|
||||
self._lvm_config = lvm_config
|
||||
|
||||
menu_optioons = self._define_menu_options()
|
||||
self._item_group = MenuItemGroup(menu_optioons, sort_items=False, checkmarks=True)
|
||||
menu_options = self._define_menu_options()
|
||||
self._item_group = MenuItemGroup(menu_options, sort_items=False, checkmarks=True)
|
||||
|
||||
super().__init__(
|
||||
self._item_group,
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ from .translationhandler import Language, tr, translation_handler
|
|||
class GlobalMenu(AbstractMenu[None]):
|
||||
def __init__(self, arch_config: ArchConfig) -> None:
|
||||
self._arch_config = arch_config
|
||||
menu_optioons = self._get_menu_options()
|
||||
menu_options = self._get_menu_options()
|
||||
|
||||
self._item_group = MenuItemGroup(
|
||||
menu_optioons,
|
||||
menu_options,
|
||||
sort_items=False,
|
||||
checkmarks=True,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ class Installer:
|
|||
self.sync_log_to_install_medium()
|
||||
|
||||
# We avoid printing /mnt/<log path> because that might confuse people if they note it down
|
||||
# and then reboot, and a identical log file will be found in the ISO medium anyway.
|
||||
# and then reboot, and an identical log file will be found in the ISO medium anyway.
|
||||
Tui.print(str(tr('[!] A log file has been created here: {}').format(logger.path)))
|
||||
Tui.print(tr('Please submit this issue (and file) to https://github.com/archlinux/archinstall/issues'))
|
||||
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ class LocaleMenu(AbstractSubMenu[LocaleConfiguration]):
|
|||
locale_conf: LocaleConfiguration,
|
||||
):
|
||||
self._locale_conf = locale_conf
|
||||
menu_optioons = self._define_menu_options()
|
||||
menu_options = self._define_menu_options()
|
||||
|
||||
self._item_group = MenuItemGroup(menu_optioons, sort_items=False, checkmarks=True)
|
||||
self._item_group = MenuItemGroup(menu_options, sort_items=False, checkmarks=True)
|
||||
super().__init__(
|
||||
self._item_group,
|
||||
config=self._locale_conf,
|
||||
|
|
|
|||
|
|
@ -141,6 +141,6 @@ class ListManager[ValueT]:
|
|||
|
||||
def filter_options(self, selection: ValueT, options: list[str]) -> list[str]:
|
||||
"""
|
||||
filter which actions to show for an specific selection
|
||||
filter which actions to show for a specific selection
|
||||
"""
|
||||
return options
|
||||
|
|
|
|||
|
|
@ -217,8 +217,8 @@ class MirrorMenu(AbstractSubMenu[MirrorConfiguration]):
|
|||
else:
|
||||
self._mirror_config = MirrorConfiguration()
|
||||
|
||||
menu_optioons = self._define_menu_options()
|
||||
self._item_group = MenuItemGroup(menu_optioons, checkmarks=True)
|
||||
menu_options = self._define_menu_options()
|
||||
self._item_group = MenuItemGroup(menu_options, checkmarks=True)
|
||||
|
||||
super().__init__(
|
||||
self._item_group,
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class MirrorStatusEntryV3(BaseModel):
|
|||
@property
|
||||
def latency(self) -> float | None:
|
||||
"""
|
||||
Latency measures the miliseconds between one ICMP request & response.
|
||||
Latency measures the milliseconds between one ICMP request & response.
|
||||
It only does so once because we check if self._latency is None, and a ICMP timeout result in -1
|
||||
We do this because some hosts blocks ICMP so we'll have to rely on .speed() instead which is slower.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ def find_packages(*names: str) -> dict[str, PackageSearchResult]:
|
|||
def validate_package_list(packages: list[str]) -> tuple[list[str], list[str]]:
|
||||
"""
|
||||
Validates a list of given packages.
|
||||
return: Tuple of lists containing valid packavges in the first and invalid
|
||||
return: Tuple of lists containing valid packages in the first and invalid
|
||||
packages in the second entry
|
||||
"""
|
||||
valid_packages = {package for package in packages if find_package(package)}
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ class ProfileMenu(AbstractSubMenu[ProfileConfiguration]):
|
|||
else:
|
||||
self._profile_config = ProfileConfiguration()
|
||||
|
||||
menu_optioons = self._define_menu_options()
|
||||
self._item_group = MenuItemGroup(menu_optioons, checkmarks=True)
|
||||
menu_options = self._define_menu_options()
|
||||
self._item_group = MenuItemGroup(menu_options, checkmarks=True)
|
||||
|
||||
super().__init__(
|
||||
self._item_group,
|
||||
|
|
|
|||
|
|
@ -147,8 +147,8 @@ def perform_installation(mountpoint: Path) -> None:
|
|||
|
||||
# If the user provided a list of services to be enabled, pass the list to the enable_service function.
|
||||
# Note that while it's called enable_service, it can actually take a list of services and iterate it.
|
||||
if servies := config.services:
|
||||
installation.enable_service(servies)
|
||||
if services := config.services:
|
||||
installation.enable_service(services)
|
||||
|
||||
if disk_config.has_default_btrfs_vols():
|
||||
btrfs_options = disk_config.btrfs_options
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ class MenuItemsState:
|
|||
self._prev_visible_rows: list[int] = []
|
||||
self._view_items: list[list[MenuItem]] = []
|
||||
|
||||
def _determine_foucs_row(self) -> int | None:
|
||||
def _determine_focus_row(self) -> int | None:
|
||||
focus_index = self._item_group.index_focus()
|
||||
|
||||
if focus_index is None:
|
||||
|
|
@ -406,7 +406,7 @@ class MenuItemsState:
|
|||
|
||||
def get_view_items(self) -> list[list[MenuItem]]:
|
||||
enabled_items = self._item_group.get_enabled_items()
|
||||
focus_row_idx = self._determine_foucs_row()
|
||||
focus_row_idx = self._determine_focus_row()
|
||||
|
||||
if focus_row_idx is None:
|
||||
return []
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from archinstall.tui import Tui
|
|||
|
||||
for _profile in profile_handler.get_mac_addr_profiles():
|
||||
# Tailored means it's a match for this machine
|
||||
# based on it's MAC address (or some other criteria
|
||||
# based on its MAC address (or some other criteria
|
||||
# that fits the requirements for this machine specifically).
|
||||
info(f'Found a tailored profile for this machine called: "{_profile.name}"')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue