From 5a04745c775f6bf33b352a9233e4f75dd0adca36 Mon Sep 17 00:00:00 2001 From: Alex Tavarez Date: Fri, 2 Jan 2026 17:06:01 -0500 Subject: [PATCH] fix, feature: removed unpacking that lead to incorrect argument number, added Enum entry, added TODOs --- softman.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/softman.py b/softman.py index b36ea78..7e2222f 100644 --- a/softman.py +++ b/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