From fa87d85708331ad45f28906217f94937bae474fe Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 1 Mar 2022 01:45:08 +1100 Subject: Fix (some) mypy things (#996) * Fix mypy things * Fix flake8 Co-authored-by: Daniel Girtler --- archinstall/lib/profiles.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'archinstall/lib/profiles.py') diff --git a/archinstall/lib/profiles.py b/archinstall/lib/profiles.py index 4295fa8f..65a30b0b 100644 --- a/archinstall/lib/profiles.py +++ b/archinstall/lib/profiles.py @@ -9,11 +9,12 @@ import sys import urllib.error import urllib.parse import urllib.request -from typing import Optional, Dict, Union, TYPE_CHECKING +from typing import Optional, Dict, Union, TYPE_CHECKING, Any from types import ModuleType # https://stackoverflow.com/a/39757388/929999 if TYPE_CHECKING: from .installer import Installer + _: Any from .general import multisplit from .networking import list_interfaces @@ -123,7 +124,7 @@ class Script: self.installer = installer # TODO: Appears not to be used anymore? self.converted_path = None self.spec = None - self.examples = None + self.examples = {} self.namespace = os.path.splitext(os.path.basename(self.path))[0] self.original_namespace = self.namespace @@ -197,7 +198,7 @@ class Script: class Profile(Script): - def __init__(self, installer :Installer, path :str): + def __init__(self, installer :Optional[Installer], path :str): super(Profile, self).__init__(path, installer) def __dump__(self, *args :str, **kwargs :str) -> Dict[str, str]: -- cgit v1.2.3-54-g00ecf