fix, feature: removed unpacking that lead to incorrect argument number, added Enum entry, added TODOs
This commit is contained in:
18
softman.py
18
softman.py
@@ -22,12 +22,13 @@ class SoftPathGroup(Enum):
|
||||
CONFIG = 0
|
||||
DATA = 1
|
||||
MEM = 2
|
||||
EXE = 3
|
||||
|
||||
# @TODO continue adding magic methods to below class
|
||||
# @NOTE https://rszalski.github.io/magicmethods/#sequence
|
||||
class Software:
|
||||
# @TODO 2 options: add additional requirements to type definition below,
|
||||
# or ensure attribute which stores data of this type also stores other data
|
||||
# @TODO move below 2 class variables declarations outside of class, but make class variables equal to them
|
||||
# @TODO when done with above, rename all intra-class references to such variables appropriately
|
||||
_AppParams = Dict("_AppParams", {
|
||||
SoftPathGroup.CONFIG.name: {
|
||||
SoftScope.PERSONAL.name: IdlePath | list[IdlePath],
|
||||
@@ -43,6 +44,11 @@ class Software:
|
||||
SoftScope.PERSONAL.name: IdlePath | list[IdlePath],
|
||||
SoftScope.LOCAL.name: IdlePath | list[IdlePath],
|
||||
SoftScope.GLOBAL.name: IdlePath | list[IdlePath]
|
||||
},
|
||||
SoftPathGroup.EXE.name: {
|
||||
SoftScope.PERSONAL.name: IdlePath | list[IdlePath],
|
||||
SoftScope.LOCAL.name: IdlePath | list[IdlePath],
|
||||
SoftScope.GLOBAL.name: IdlePath | list[IdlePath]
|
||||
}
|
||||
}, total=False)
|
||||
_SubAppParams = Dict("_SubAppParams", {
|
||||
@@ -66,14 +72,20 @@ class Software:
|
||||
SoftScope.PERSONAL.name: [],
|
||||
SoftScope.LOCAL.name: [],
|
||||
SoftScope.GLOBAL.name: []
|
||||
},
|
||||
SoftPathGroup.EXE.name: {
|
||||
SoftScope.PERSONAL.name: [],
|
||||
SoftScope.LOCAL.name: [],
|
||||
SoftScope.GLOBAL.name: []
|
||||
}
|
||||
}
|
||||
_Apps = type("_Apps", (), **__app_input)
|
||||
_Apps = type("_Apps", (), __app_input)
|
||||
__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: Software._SubAppParams) -> Software._AppParams:
|
||||
keyword_args: Software._AppParams = kwpaths
|
||||
|
||||
|
||||
Reference in New Issue
Block a user