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
6 changes: 3 additions & 3 deletions archinstall/lib/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(
cmd: str | list[str],
peek_output: bool | None = False,
environment_vars: dict[str, str] | None = None,
working_directory: str | None = './',
working_directory: str = './',
remove_vt100_escape_codes_from_lines: bool = True,
):
if isinstance(cmd, str):
Expand Down Expand Up @@ -323,7 +323,7 @@ def __init__(
cmd: str | list[str],
peek_output: bool | None = False,
environment_vars: dict[str, str] | None = None,
working_directory: str | None = './',
working_directory: str = './',
remove_vt100_escape_codes_from_lines: bool = True,
):
self.cmd = cmd
Expand All @@ -349,7 +349,7 @@ def __iter__(self, *args: list[Any], **kwargs: dict[str, Any]) -> Iterator[bytes
if self.session:
yield from self.session

def __getitem__(self, key: slice) -> bytes | None:
def __getitem__(self, key: slice) -> bytes:
if not self.session:
raise KeyError('SysCommand() does not have an active session.')
elif type(key) is slice:
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/locale/locale_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _define_menu_options(self) -> list[MenuItem]:
),
]

def _prev_locale(self, item: MenuItem) -> str | None:
def _prev_locale(self, item: MenuItem) -> str:
temp_locale = LocaleConfiguration(
self._menu_item_group.find_by_key('kb_layout').get_value(),
self._menu_item_group.find_by_key('sys_lang').get_value(),
Expand Down
6 changes: 3 additions & 3 deletions archinstall/lib/mirrors.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def _define_menu_options(self) -> list[MenuItem]:
),
]

def _prev_regions(self, item: MenuItem) -> str | None:
def _prev_regions(self, item: MenuItem) -> str:
regions = item.get_value()

output = ''
Expand Down Expand Up @@ -438,7 +438,7 @@ def get_status_by_region(self, region: str, speed_sort: bool) -> list[MirrorStat
region_list = mappings[region]
return sorted(region_list, key=lambda mirror: (mirror.score, mirror.speed))

def _parse_remote_mirror_list(self, mirrorlist: str) -> dict[str, list[MirrorStatusEntryV3]] | None:
def _parse_remote_mirror_list(self, mirrorlist: str) -> dict[str, list[MirrorStatusEntryV3]]:
mirror_status = MirrorStatusListV3.model_validate_json(mirrorlist)

sorting_placeholder: dict[str, list[MirrorStatusEntryV3]] = {}
Expand Down Expand Up @@ -472,7 +472,7 @@ def _parse_remote_mirror_list(self, mirrorlist: str) -> dict[str, list[MirrorSta

return sorted_by_regions

def _parse_locale_mirrors(self, mirrorlist: str) -> dict[str, list[MirrorStatusEntryV3]] | None:
def _parse_locale_mirrors(self, mirrorlist: str) -> dict[str, list[MirrorStatusEntryV3]]:
lines = mirrorlist.splitlines()

# remove empty lines
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/models/device_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ def json(self) -> _SnapshotConfigSerialization:
return {'type': self.snapshot_type.value}

@staticmethod
def parse_args(args: _SnapshotConfigSerialization) -> SnapshotConfig | None:
def parse_args(args: _SnapshotConfigSerialization) -> SnapshotConfig:
return SnapshotConfig(SnapshotType(args['type']))


Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def _localize_path(path: Path) -> Path:
return path


def _import_via_path(path: Path, namespace: str | None = None) -> str | None:
def _import_via_path(path: Path, namespace: str | None = None) -> str:
if not namespace:
namespace = os.path.basename(path)

Expand Down
2 changes: 1 addition & 1 deletion archinstall/tui/curses_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ def print(
text: str,
row: int = 0,
col: int = 0,
endl: str | None = '\n',
endl: str = '\n',
clear_screen: bool = False,
) -> None:
if clear_screen:
Expand Down