diff --git a/softman.py b/softman.py index 5d2f9d2..f2e5806 100644 --- a/softman.py +++ b/softman.py @@ -10,6 +10,7 @@ from custtypes import ExecutedPath, IdlePath from enum import Enum from pathlib import Path, PurePath from whereami import USER_PATH, PROJ_ROOT +from collections.abc import Sequence AppPath: Neotype = Union[ExecutedPath, IdlePath] @@ -68,14 +69,14 @@ Apps = type("Apps", (), __app_input) # @TODO continue adding magic methods to below class # @NOTE https://rszalski.github.io/magicmethods/#sequence -class Software: +class Software (Sequence): __user_path: ExecutedPath = USER_PATH def __init__(self): self._fqdn: str | None = None # @TODO fix NameError for 'Software' in parameter type check - def declare(self, name: str, **kwpaths: _SubAppParams) -> AppParams: + def append(self, name: str, **kwpaths: _SubAppParams) -> AppParams: keyword_args: AppParams = kwpaths app = Apps(**keyword_args) @@ -153,11 +154,29 @@ class Software: ) return len(apps) - def __contains__(self): + def pop(self) -> Never: raise NotImplementedError - def __missing__(self): + def remove(self) -> Never: raise NotImplementedError - def __iter__(self): - raise NotImplementedError \ No newline at end of file + def __contains__(self) -> Never: + raise NotImplementedError + + def count(self) -> Never: + return NotImplementedError + + def __missing__(self) -> Never: + raise NotImplementedError + + def __iter__(self) -> Never: + raise NotImplementedError + + def reverse(self) -> Never: + raise NotImplementedError + + def sort(self, key: Callable = (lambda e: e), reverse: bool = False) -> Never: + raise NotImplementedError + +class Softs(Enum): + ssh = 0 \ No newline at end of file