Skip to content

Commit

Permalink
Fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
svartkanin committed Aug 31, 2024
1 parent 94b012a commit 5485c1f
Show file tree
Hide file tree
Showing 35 changed files with 78 additions and 66 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/01_bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ body:
- type: textarea
id: bug-report
attributes:
label: The installation log
label: The installation log
description: 'note: located at `/var/log/archinstall/install.log`'
placeholder: |
Hardware model detected: Dell Inc. Precision 7670; UEFI mode: True
Expand Down Expand Up @@ -82,4 +82,4 @@ body:
**Note**: Feel free to modify the textarea above as you wish.
But it will grately help us in testing if we can generate the specific qemu command line,
for instance via:
`sudo virsh domxml-to-native qemu-argv --domain my-arch-machine`
`sudo virsh domxml-to-native qemu-argv --domain my-arch-machine`
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/02_feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ body:
description: >
Feel free to write any feature you think others might benefit from:
validations:
required: true
required: true
2 changes: 1 addition & 1 deletion .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
publish_dir: _build/
force_orphan: true
enable_jekyll: false # This is required to preserve _static (and thus the theme)
cname: archinstall.archlinux.page
cname: archinstall.archlinux.page
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ venv
requirements.txt
/.gitconfig
/actions-runner
/cmd_output.txt
/cmd_output.txt
2 changes: 1 addition & 1 deletion .pypirc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ index-servers =
pypi

[pypi]
repository = https://upload.pypi.org/legacy/
repository = https://upload.pypi.org/legacy/
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ sphinx:
build:
os: "ubuntu-22.04"
tools:
python: "3.11"
python: "3.11"
6 changes: 5 additions & 1 deletion archinstall/default_profiles/desktops/hyprland.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
from enum import Enum
from typing import List, Optional, TYPE_CHECKING, Any

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.profile import ProfileType, GreeterType, SelectResult
from archinstall.default_profiles.xorg import XorgProfile
from archinstall.tui import (
MenuItemGroup, MenuItem, SelectMenu,
FrameProperties, ResultType, Alignment
)

if TYPE_CHECKING:
from archinstall.lib.installer import Installer
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/desktops/sway.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from enum import Enum
from typing import List, Optional, TYPE_CHECKING, Any

from archinstall.default_profiles.profile import ProfileType, GreeterType
from archinstall.default_profiles.profile import ProfileType, GreeterType, SelectResult
from archinstall.default_profiles.xorg import XorgProfile

from archinstall.tui import (
Expand Down
2 changes: 1 addition & 1 deletion archinstall/default_profiles/server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, TYPE_CHECKING, List
from typing import Any, TYPE_CHECKING, List, Optional

from archinstall.lib.output import info
from archinstall.lib.profile.profiles_handler import profile_handler
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/disk/partitioning_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def _enter_size(
def validate(value: str) -> Optional[str]:
size = self._validate_value(sector_size, total_size, value, start)
if not size:
return str(_(f'Invalid size'))
return str(_('Invalid size'))
return None

result = EditMenu(
Expand Down
18 changes: 6 additions & 12 deletions archinstall/lib/interactions/general_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@
from ..packages.packages import validate_package_list
from ..storage import storage
from ..translationhandler import Language
from archinstall.tui.curses_menu import tui
from archinstall.tui import (
MenuItemGroup, MenuItem, SelectMenu,
FrameProperties, Alignment, Result, ResultType, EditMenu
)
from archinstall.tui import (
MenuItemGroup, MenuItem, SelectMenu,
FrameProperties, Alignment, EditMenu,
Orientation, tui
FrameProperties, Alignment, Result,
ResultType, EditMenu, Orientation
)

if TYPE_CHECKING:
Expand All @@ -25,7 +22,7 @@

def ask_ntp(preset: bool = True) -> bool:
header = str(_('Would you like to use automatic time synchronization (NTP) with the default time servers?\n')) + '\n'
header += str( _('Hardware time and other post-configuration steps might be required in order for NTP to work.\nFor more information, please check the Arch wiki')) + '\n'
header += str(_('Hardware time and other post-configuration steps might be required in order for NTP to work.\nFor more information, please check the Arch wiki')) + '\n'

preset_val = MenuItem.yes() if preset else MenuItem.no()
group = MenuItemGroup.yes_no()
Expand Down Expand Up @@ -171,11 +168,6 @@ def ask_additional_packages_to_install(preset: List[str] = []) -> List[str]:
def validator(value: str) -> Optional[str]:
packages = value.split() if value else []

def read_packages(p: list[str] = []) -> list[str]:
display = ' '.join(p)
input_packages = TextInput(_('Write additional packages to install (space separated, leave blank to skip): '), display).run().strip()
return input_packages.split() if input_packages else []

if len(packages) == 0:
return None

Expand Down Expand Up @@ -236,6 +228,8 @@ def validator(s: str) -> Optional[str]:
if result.type_ == ResultType.Skip:
return preset

assert result.item

downloads: int = int(result.item)

pacman_conf_path = pathlib.Path("/etc/pacman.conf")
Expand Down
17 changes: 15 additions & 2 deletions archinstall/lib/interactions/network_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ def _select_iface(self, data: List[Nic]) -> Optional[str]:

return None

def _get_ip_address(self, title: str, header: str, allow_skip: bool, multi: bool) -> Optional[str]:
def _get_ip_address(
self,
title: str,
header: str,
allow_skip: bool,
multi: bool,
preset: Optional[str] = None
) -> Optional[str]:
def validator(ip: str) -> Optional[str]:
if multi:
ips = ip.split(' ')
Expand Down Expand Up @@ -128,7 +135,13 @@ def _edit_iface(self, edit_nic: Nic) -> Nic:
display_dns = None

header = str(_('Enter your DNS servers with space separated (leave blank for none)')) + '\n'
dns_servers = self._get_ip_address(str(_('DNS servers')), header, True, True)
dns_servers = self._get_ip_address(
str(_('DNS servers')),
header,
True,
True,
display_dns
)

dns = []
if dns_servers is not None:
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/interactions/system_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def ask_for_swap(preset: bool = True) -> bool:
prompt = str(_('Would you like to use swap on zram?')) + '\n'

group = MenuItemGroup.yes_no()
group.set_focus_by_value(preset)
group.set_focus_by_value(default_item)

result = SelectMenu(
group,
Expand Down
24 changes: 12 additions & 12 deletions archinstall/lib/menu/abstract_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@

class Selector:
def __init__(
self,
description: str,
func: Optional[Callable[[Any], Any]] = None,
display_func: Optional[Callable] = None,
default: Optional[Any] = None,
enabled: bool = False,
dependencies: List = [],
dependencies_not: List = [],
exec_func: Optional[Callable] = None,
preview_func: Optional[Callable] = None,
mandatory: bool = False,
no_store: bool = False
self,
description: str,
func: Optional[Callable[[Any], Any]] = None,
display_func: Optional[Callable] = None,
default: Optional[Any] = None,
enabled: bool = False,
dependencies: List = [],
dependencies_not: List = [],
exec_func: Optional[Callable] = None,
preview_func: Optional[Callable] = None,
mandatory: bool = False,
no_store: bool = False
):
"""
Create a new menu selection entry
Expand Down
6 changes: 1 addition & 5 deletions archinstall/lib/menu/list_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

from archinstall.tui import (
MenuItemGroup, MenuItem, SelectMenu,
FrameProperties, FrameStyle, Alignment,
ResultType, EditMenu
Alignment
)

if TYPE_CHECKING:
Expand Down Expand Up @@ -119,9 +118,6 @@ def _prepare_selection(self, data_formatted: Dict[str, Any]) -> Tuple[List[str],

def _run_actions_on_entry(self, entry: Any) -> None:
options = self.filter_options(entry, self._sub_menu_actions) + [self._cancel_action]
display_value = self.selected_action_display(entry)

prompt = _("Select an action for '{}'").format(display_value)

items = [MenuItem(o, value=o) for o in options]
group = MenuItemGroup(items, sort_items=False)
Expand Down
1 change: 0 additions & 1 deletion archinstall/lib/profile/profiles_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from ..storage import storage



if TYPE_CHECKING:
from ..installer import Installer
_: Any
Expand Down
2 changes: 1 addition & 1 deletion archinstall/scripts/minimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import TYPE_CHECKING, Any, List

import archinstall
from archinstall import info
from archinstall import info, debug
from archinstall import Installer, ConfigurationOutput
from archinstall.default_profiles.minimal import MinimalProfile
from archinstall.lib.interactions import suggest_single_disk_layout, select_devices
Expand Down
4 changes: 2 additions & 2 deletions archinstall/tui/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from .curses_menu import (
tui, SelectMenu, EditMenu
tui, SelectMenu, EditMenu
)

from .menu_item import (
MenuItem, MenuItemGroup
MenuItem, MenuItemGroup
)

from .types import (
Expand Down
6 changes: 2 additions & 4 deletions archinstall/tui/table_menu.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
from typing import Any, Tuple, List, Dict, Optional, Callable
from typing import Any, Tuple, List, Dict, Optional

from archinstall.lib.output import FormattedOutput

from . import (
MenuItemGroup, MenuItem, SelectMenu,
FrameProperties, FrameStyle, Alignment,
ResultType
MenuItemGroup, MenuItem
)


Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ For other installation methods refer to the docs of the dependencies.

## Build

In `archinstall/docs`, run `make html` (or specify another target) to build locally. The build files will be in `archinstall/docs/_build`. Open `_build/html/index.html` with your browser to see your changes in action.
In `archinstall/docs`, run `make html` (or specify another target) to build locally. The build files will be in `archinstall/docs/_build`. Open `_build/html/index.html` with your browser to see your changes in action.
2 changes: 1 addition & 1 deletion docs/_static/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.wy-nav-content {
max-width: none;
}
}
2 changes: 1 addition & 1 deletion docs/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "!layout.html" %}
{% block extrahead %}
<link href="{{ pathto("_static/style.css", True) }}" rel="stylesheet" type="text/css">
{% endblock %}
{% endblock %}
2 changes: 1 addition & 1 deletion docs/archinstall/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ The simplest way currently is to look at a reference implementation or the commu
And search for `plugin.on_ <https://github.com/search?q=repo%3Aarchlinux%2Farchinstall+%22plugin.on_%22&type=code>`_ in the code base to find what ``archinstall`` will look for. PR's are welcome to widen the support for this.

.. _plugin discovery: https://packaging.python.org/en/latest/specifications/entry-points/
.. _entry points: https://docs.python.org/3/library/importlib.metadata.html#entry-points
.. _entry points: https://docs.python.org/3/library/importlib.metadata.html#entry-points
2 changes: 1 addition & 1 deletion docs/cli_parameters/config/custom_commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ The option takes a list of arguments, an example is:
| The following example will set a new hostname in the installed system.
| The example is just to illustrate that the command is not run in the ISO but inside the installed system after the base system is installed.
More examples can be found in the code repository under `examples/ <https://github.com/archlinux/archinstall/tree/e6344f93f7e476d05bbcd642f2ed91fdde545870/examples>`_
More examples can be found in the code repository under `examples/ <https://github.com/archlinux/archinstall/tree/e6344f93f7e476d05bbcd642f2ed91fdde545870/examples>`_
2 changes: 1 addition & 1 deletion docs/cli_parameters/config/disk_encryption.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Disk encryption consists of a top level entry in the user configuration.
}
}
The ``UID`` in the ``partitions`` list is an internal reference to the ``obj_id`` in the :ref:`disk config` entries.
The ``UID`` in the ``partitions`` list is an internal reference to the ``obj_id`` in the :ref:`disk config` entries.
2 changes: 1 addition & 1 deletion docs/cli_parameters/config/manual_options.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Key,Value(s),Description,Required
device,``str``,Which block-device to format,yes
partitions,[ {key: val} ],The data describing the change/addition in a partition,yes
wipe,``bool``,clear the disk before adding any partitions,No
wipe,``bool``,clear the disk before adding any partitions,No
2 changes: 1 addition & 1 deletion docs/flowcharts/BlockDeviceSelection.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/flowcharts/DiskSelectionProcess.drawio
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<mxfile host="Electron" modified="2021-05-02T19:57:46.193Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/14.5.1 Chrome/89.0.4389.82 Electron/12.0.1 Safari/537.36" etag="WWkzNgJUxTiFme1f07FW" version="14.5.1" type="device"><diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">7VvZdqM4EP2anHlKDpsxPMZ20sl0kl7S05meNwVkYCIjt5C3+fqRjFgFNnbwksQv3a5CCKG6dWsROdP7o/knAsb+PXYhOtMUd36mD840TVUsi/3HNYtYY5tC4ZHAFYMyxWPwH0zuFNpJ4MKoMJBijGgwLiodHIbQoQUdIATPisOGGBWfOgYelBSPDkCy9ilwqR9rLa2b6W9g4PnJk1XTjq+MQDJYvEnkAxfPcir96kzvE4xp/Gs070PENy/Zl6fbxRO6ezE//fkt+g3+6n3+8fDzPJ7sepNb0lcgMKRbT/3y2bLtaXf4oFrf7ga/rYfB/dW5IV6NLpL9gi7bPiFiQn3s4RCgq0zbI3gSupDPqjIpG3OH8Vgo/4WULgQWwIRipvLpCImr7C3I4m8mKBedRPzFxUQYzAvSQkhDHNI+RpgsV6obpmF3BkwfUYJfYO5K17IuL3V+R4BQTt/T+vZlbzmve80upetxLznSmOggEEWBs5wUECoGKYmcDAtxyHcieoHU8cWAeCf59pWAt8ZqYlyEJ8SBK8bpwnkA8eCq+cwUmsynIR5BtoXsPgIRoMG0uDggnMtLx2UAYj8EhjaAqljkFKCJeNIjRNytNaWHsPMygNPAYXRQRt3MDyh8HIPlDswYExURwy0v4KSyl+t53EypYbj1E9/mo1NHVSS01g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quCXzA70C0/tKN9hY5e21I0js6Xe1inxqbrbnsiblncJERwLkcv13VMwhrH/96q+PPq4Bd3OCKVUwXWMTjNG2VkFpx9dMve+2aN9Uqj+FNJUS3WEYRenqPkUsq16MHnP/LkGgoDwnIN3lUzEdrP3zGTT47/iwtA9F50mZqWKuHYipNazVaMBIRntEBITs78PjXGW/ZWtfvU/</diagram></mxfile>
<mxfile host="Electron" modified="2021-05-02T19:57:46.193Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/14.5.1 Chrome/89.0.4389.82 Electron/12.0.1 Safari/537.36" etag="WWkzNgJUxTiFme1f07FW" version="14.5.1" type="device"><diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">7VvZdqM4EP2anHlKDpsxPMZ20sl0kl7S05meNwVkYCIjt5C3+fqRjFgFNnbwksQv3a5CCKG6dWsROdP7o/knAsb+PXYhOtMUd36mD840TVUsi/3HNYtYY5tC4ZHAFYMyxWPwH0zuFNpJ4MKoMJBijGgwLiodHIbQoQUdIATPisOGGBWfOgYelBSPDkCy9ilwqR9rLa2b6W9g4PnJk1XTjq+MQDJYvEnkAxfPcir96kzvE4xp/Gs070PENy/Zl6fbxRO6ezE//fkt+g3+6n3+8fDzPJ7sepNb0lcgMKRbT/3y2bLtaXf4oFrf7ga/rYfB/dW5IV6NLpL9gi7bPiFiQn3s4RCgq0zbI3gSupDPqjIpG3OH8Vgo/4WULgQWwIRipvLpCImr7C3I4m8mKBedRPzFxUQYzAvSQkhDHNI+RpgsV6obpmF3BkwfUYJfYO5K17IuL3V+R4BQTt/T+vZlbzmve80upetxLznSmOggEEWBs5wUECoGKYmcDAtxyHcieoHU8cWAeCf59pWAt8ZqYlyEJ8SBK8bpwnkA8eCq+cwUmsynIR5BtoXsPgIRoMG0uDggnMtLx2UAYj8EhjaAqljkFKCJeNIjRNytNaWHsPMygNPAYXRQRt3MDyh8HIPlDswYExURwy0v4KSyl+t53EypYbj1E9/mo1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wMt1yjZquCXzA70C0/tKN9hY5e21I0js6Xe1inxqbrbnsiblncJERwLkcv13VMwhrH/96q+PPq4Bd3OCKVUwXWMTjNG2VkFpx9dMve+2aN9Uqj+FNJUS3WEYRenqPkUsq16MHnP/LkGgoDwnIN3lUzEdrP3zGTT47/iwtA9F50mZqWKuHYipNazVaMBIRntEBITs78PjXGW/ZWtfvU/</diagram></mxfile>
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ archinstall Documentation

| **archinstall** is library which can be used to install Arch Linux.
| The library comes packaged with different pre-configured installers, such as the default :ref:`guided` installer.
|
|
| A demo of the :ref:`guided` installer can be seen here: `https://www.youtube.com/watch?v=9Xt7X_Iqg6E <https://www.youtube.com/watch?v=9Xt7X_Iqg6E>`_.
Some of the features of Archinstall are:
Expand Down
2 changes: 1 addition & 1 deletion docs/installing/guided.rst
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ Options for ``--creds``
{
"username": "<USERNAME>",
"!password": "<PASSWORD>",
"sudo": false
"sudo": false
}
- List of regular user credentials, see configuration for reference
- Maybe
Expand Down
2 changes: 1 addition & 1 deletion docs/installing/python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ Or you can PyPa's `build <https://github.com/pypa/build>`_ and `installer <https
$ cd archinstall
$ python -m build .
$ python -m installer dist/*.whl
$ python -m installer dist/*.whl
2 changes: 1 addition & 1 deletion docs/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Tests and Checks
- [ ] I have tested the code!<br>
<!--
<!--
After submitting your PR, an ISO can be downloaded below the PR description. After testing it you can check the box
You can do manual tests too, like isolated function tests, just something!
-->
10 changes: 8 additions & 2 deletions examples/interactive_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
from archinstall import models
from archinstall import locale
from archinstall import info, debug
from archinstall import ConfigurationOutput
from archinstall.tui.curses_menu import tui
from archinstall.tui import (
MenuItemGroup, MenuItem, SelectMenu,
Alignment, Orientation
)

if TYPE_CHECKING:
_: Callable[[str], str]
Expand Down Expand Up @@ -131,14 +137,14 @@ def perform_installation(mountpoint: Path) -> None:

if not archinstall.arguments.get('silent'):
prompt = str(_('Would you like to chroot into the newly created installation and perform post-installation configuration?')) + '\n'
group = MenuItemGroup.default_confirm()
group = MenuItemGroup.yes_no()

result = SelectMenu(
group,
header=prompt,
alignment=Alignment.CENTER,
columns=2,
orientation=MenuOrientation.HORIZONTAL
orientation=Orientation.HORIZONTAL
).single()

if result.item == MenuItem.yes():
Expand Down
1 change: 1 addition & 0 deletions examples/minimal_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from archinstall import models
from archinstall import interactions
from archinstall.default_profiles.minimal import MinimalProfile
from archinstall.tui.curses_menu import tui

if TYPE_CHECKING:
_: Callable[[str], str]
Expand Down
Loading

0 comments on commit 5485c1f

Please sign in to comment.