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/lib/authentication/authentication_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _define_menu_options(self) -> list[MenuItem]:
return [
MenuItem(
text=tr('Root password'),
action=lambda x: select_root_password(),
action=lambda _: select_root_password(),
preview_action=self._prev_root_pwd,
key='root_enc_password',
),
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async def confirm_config(config: ArchConfig) -> bool:
header += tr('Would you like to continue?') + '\n'

group = MenuItemGroup.yes_no()
group.set_preview_for_all(lambda x: config.user_config_to_json())
group.set_preview_for_all(lambda _: config.user_config_to_json())

result = await Confirmation(
group=group,
Expand Down
4 changes: 2 additions & 2 deletions archinstall/lib/disk/encryption_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _define_menu_options(self) -> list[MenuItem]:
),
MenuItem(
text=tr('Encryption password'),
action=lambda x: select_encrypted_password(),
action=lambda _: select_encrypted_password(),
value=self._enc_config.encryption_password,
dependencies=[self._check_dep_enc_type],
preview_action=self._prev_password,
Expand Down Expand Up @@ -181,7 +181,7 @@ def _preview(self, item: MenuItem) -> str | None:

return output

def _prev_type(self, item: MenuItem) -> str | None:
def _prev_type(self, _item: MenuItem) -> str | None:
enc_type = self._item_group.find_by_key('encryption_type').value

if enc_type:
Expand Down
4 changes: 2 additions & 2 deletions archinstall/lib/global_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def _get_menu_options(self) -> list[MenuItem]:
),
MenuItem(
text=tr('Save configuration'),
action=lambda x: self._safe_config(),
action=lambda _: self._safe_config(),
key=SpecialMenuKey.SAVE.value,
),
MenuItem(
Expand Down Expand Up @@ -502,7 +502,7 @@ def _get_install_warnings(self) -> list[str]:

return warnings

def _prev_install_invalid_config(self, item: MenuItem) -> PreviewResult | None:
def _prev_install_invalid_config(self, _item: MenuItem) -> PreviewResult | None:
self.sync_all_to_config()

warnings = self._get_install_warnings()
Expand Down
3 changes: 1 addition & 2 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ def _verify_boot_part(self) -> None:

def sanity_check(
self,
offline: bool = False,
skip_ntp: bool = False,
skip_wkd: bool = False,
) -> None:
Expand Down Expand Up @@ -547,7 +546,7 @@ def add_swapfile(self, size: str = '4G', enable_resume: bool = True, file: str =
self._kernel_params.append(f'resume=UUID={resume_uuid}')
self._kernel_params.append(f'resume_offset={resume_offset}')

def post_install_check(self, *args: str, **kwargs: str) -> list[str]:
def post_install_check(self) -> list[str]:
return [step for step, flag in self._helper_flags.items() if flag is False]

def set_mirrors(
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/menu/list_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ async def handle_action(self, action: str, entry: ValueT | None, data: list[Valu
"""
raise NotImplementedError('Please implement me in the child class')

def filter_options(self, selection: ValueT, options: list[str]) -> list[str]:
def filter_options(self, _selection: ValueT, options: list[str]) -> list[str]:
"""
filter which actions to show for a specific selection
"""
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, timeout: int = 5) -> None:
self.previous_handler = None
self.previous_timer: int | None = None

def raise_timeout(self, signl: int, frame: FrameType | None) -> None:
def raise_timeout(self, _signl: int, _frame: FrameType | None) -> None:
"""
Raise the DownloadTimeout exception.
"""
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

# @archinstall.plugin decorator hook to programmatically add
# plugins in runtime. Useful in profiles_bck and other things.
def plugin(f: Any, *args: Any, **kwargs: Any) -> None:
def plugin(f: Any, *_args: Any, **_kwargs: Any) -> None:
plugins[f.__name__] = f


Expand Down
1 change: 0 additions & 1 deletion archinstall/scripts/guided.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def perform_installation(
installation.mount_ordered_layout()

installation.sanity_check(
arch_config_handler.args.offline,
arch_config_handler.args.skip_ntp,
arch_config_handler.args.skip_wkd,
)
Expand Down
4 changes: 2 additions & 2 deletions archinstall/tui/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def _update_options(self, options: list[Option]) -> None:
if focus_item := self._group.focus_item:
self._set_preview(focus_item.get_id())

def on_input_submitted(self, event: Input.Submitted) -> None:
def on_input_submitted(self, _event: Input.Submitted) -> None:
if self.query_one(Input).has_focus:
self._handle_search_action()

Expand Down Expand Up @@ -557,7 +557,7 @@ def compose(self) -> ComposeResult:

yield Footer()

def on_input_submitted(self, event: Input.Submitted) -> None:
def on_input_submitted(self, _event: Input.Submitted) -> None:
if self.query_one(Input).has_focus:
self._handle_search_action()

Expand Down
4 changes: 2 additions & 2 deletions archinstall/tui/menu_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def focus_last(self) -> None:
if last_item is not None:
self.focus_item = last_item

def focus_prev(self, skip_empty: bool = True) -> None:
def focus_prev(self) -> None:
# e.g. when filter shows no items
if self.focus_item is None:
return
Expand All @@ -302,7 +302,7 @@ def focus_prev(self, skip_empty: bool = True) -> None:
if item is not None:
self.focus_item = item

def focus_next(self, skip_not_enabled: bool = True) -> None:
def focus_next(self) -> None:
# e.g. when filter shows no items
if self.focus_item is None:
return
Expand Down
10 changes: 5 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@


def process_docstring(
app: Sphinx,
what: str,
name: str,
obj: Any,
options: Any,
_app: Sphinx,
_what: str,
_name: str,
_obj: Any,
_options: Any,
lines: list[str],
) -> None:
spaces_pat = re.compile(r'( {8})')
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ docstring-code-format = true
[tool.ruff.lint]
select = [
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", # flake8-bugbear
"C4", # flake8-comprehensions
Expand Down
Loading