Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk
diff options
context:
space:
mode:
authorDaniel <blackrabbit256@gmail.com>2022-03-01 01:45:08 +1100
committerGitHub <noreply@github.com>2022-02-28 15:45:08 +0100
commitfa87d85708331ad45f28906217f94937bae474fe (patch)
tree2c0dec90275a7c262cd99db5490215f7aff51694 /archinstall/lib/disk
parent0fed839110983f024edda88c10d9cd55be9ae122 (diff)
Fix (some) mypy things (#996)
* Fix mypy things * Fix flake8 Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib/disk')
-rw-r--r--archinstall/lib/disk/filesystem.py1
-rw-r--r--archinstall/lib/disk/helpers.py8
2 files changed, 5 insertions, 4 deletions
diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py
index 4f1b4217..25e251c2 100644
--- a/archinstall/lib/disk/filesystem.py
+++ b/archinstall/lib/disk/filesystem.py
@@ -7,6 +7,7 @@ from typing import Optional, Dict, Any, TYPE_CHECKING
# https://stackoverflow.com/a/39757388/929999
if TYPE_CHECKING:
from .blockdevice import BlockDevice
+ _: Any
from .partition import Partition
from .validators import valid_fs_type
diff --git a/archinstall/lib/disk/helpers.py b/archinstall/lib/disk/helpers.py
index afaf9e5e..eae618fb 100644
--- a/archinstall/lib/disk/helpers.py
+++ b/archinstall/lib/disk/helpers.py
@@ -1,7 +1,7 @@
from __future__ import annotations
import json
import logging
-import os
+import os # type: ignore
import pathlib
import re
import time
@@ -10,7 +10,7 @@ from typing import Union, List, Iterator, Dict, Optional, Any, TYPE_CHECKING
# https://stackoverflow.com/a/39757388/929999
if TYPE_CHECKING:
from .partition import Partition
-
+
from .blockdevice import BlockDevice
from .dmcryptdev import DMCryptDev
from .mapperdev import MapperDev
@@ -206,7 +206,7 @@ def all_disks() -> List[BlockDevice]:
log(f"[Deprecated] archinstall.all_disks() is deprecated. Use archinstall.all_blockdevices() with the appropriate filters instead.", level=logging.WARNING, fg="yellow")
return all_blockdevices(partitions=False, mappers=False)
-def all_blockdevices(mappers=False, partitions=False, error=False) -> List[BlockDevice, Partition]:
+def all_blockdevices(mappers=False, partitions=False, error=False) -> Dict[str, Any]:
"""
Returns BlockDevice() and Partition() objects for all available devices.
"""
@@ -237,7 +237,7 @@ def all_blockdevices(mappers=False, partitions=False, error=False) -> List[Block
raise error
information = enrich_blockdevice_information(information)
-
+
for path, path_info in information.items():
if path_info.get('DMCRYPT_NAME'):
instances[path] = DMCryptDev(dev_path=path)