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
9 changes: 1 addition & 8 deletions archinstall/lib/disk/disk_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,20 +176,13 @@ def _select_btrfs_snapshots(self, preset: SnapshotConfig | None) -> SnapshotConf
alignment=Alignment.CENTER,
).run()

snapshot_type: SnapshotType | None = None

match result.type_:
case ResultType.Skip:
return preset
case ResultType.Reset:
return None
case ResultType.Selection:
snapshot_type = result.get_value()

if not snapshot_type:
return None

return SnapshotConfig(snapshot_type=snapshot_type)
return SnapshotConfig(snapshot_type=result.get_value())

def _prev_disk_layouts(self, item: MenuItem) -> str | None:
if not item.value:
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/interactions/network_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def ask_to_configure_network(preset: NetworkConfiguration | None) -> NetworkConf
if preset:
group.set_selected_by_value(preset.type)

result = SelectMenu[NetworkConfiguration](
result = SelectMenu[NicType](
group,
alignment=Alignment.CENTER,
frame=FrameProperties.min(tr('Network configuration')),
Expand Down
2 changes: 0 additions & 2 deletions archinstall/lib/interactions/system_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,3 @@ def ask_for_swap(preset: bool = True) -> bool:
return result.item() == MenuItem.yes()
case ResultType.Reset:
raise ValueError('Unhandled result type')

return preset
2 changes: 0 additions & 2 deletions archinstall/lib/locale/locale_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,3 @@ def select_kb_layout(preset: str | None = None) -> str | None:
return preset
case _:
raise ValueError('Unhandled return type')

return None
3 changes: 1 addition & 2 deletions archinstall/lib/models/device_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1490,9 +1490,8 @@ def __post_init__(self) -> None:
def should_generate_encryption_file(self, dev: PartitionModification | LvmVolume) -> bool:
if isinstance(dev, PartitionModification):
return dev in self.partitions and dev.mountpoint != Path('/')
elif isinstance(dev, LvmVolume):
else:
return dev in self.lvm_volumes and dev.mountpoint != Path('/')
return False

def json(self) -> _DiskEncryptionSerialization:
obj: _DiskEncryptionSerialization = {
Expand Down
2 changes: 1 addition & 1 deletion archinstall/lib/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _get_values(
elif is_dataclass(o):
return asdict(o)
else:
return o.__dict__
return o.__dict__ # type: ignore[unreachable]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added an ignore for now because I'm not sure if this line can be reached.

This function has other typing issues, so the ignore can be revisited after the other issues are addressed.


@classmethod
def as_table(
Expand Down
2 changes: 0 additions & 2 deletions archinstall/lib/profile/profile_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,5 +237,3 @@ def select_profile(
pass

return current_profile

return None
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ module = "archinstall.lib.*"
disallow_incomplete_defs = false
disallow_untyped_defs = false
warn_return_any = false
warn_unreachable = false

[[tool.mypy.overrides]]
module = "archinstall.lib.disk.*"
Expand Down