introduce type ArgumentSet

This commit is contained in:
harisreedhar
2026-02-17 15:35:08 +05:30
committed by henryruhs
parent 8dba29ef18
commit a94209507d
2 changed files with 8 additions and 7 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
from argparse import Action
from typing import List
from facefusion.types import Args, ArgsStore, ArgumentValue, Scope
from facefusion.types import Args, ArgsStore, ArgumentSet, Scope
ARGS_STORE : ArgsStore =\
@@ -12,15 +12,15 @@ ARGS_STORE : ArgsStore =\
}
def get_api_set() -> ArgumentValue:
def get_api_set() -> ArgumentSet:
return ARGS_STORE.get('api')
def get_cli_set() -> ArgumentValue:
def get_cli_set() -> ArgumentSet:
return ARGS_STORE.get('cli')
def get_sys_set() -> ArgumentValue:
def get_sys_set() -> ArgumentSet:
return ARGS_STORE.get('sys')
+4 -3
View File
@@ -100,12 +100,13 @@ Resolution : TypeAlias = Tuple[int, int]
Args : TypeAlias = Dict[str, Any]
Scope : TypeAlias = Literal['api', 'cli', 'sys']
ArgumentValue : TypeAlias = Dict[str, Any]
ArgumentSet : TypeAlias = Dict[str, ArgumentValue]
ArgsStore = TypedDict('ArgsStore',
{
'api' : Dict[str, ArgumentValue],
'cli' : Dict[str, ArgumentValue],
'sys' : Dict[str, ArgumentValue]
'api' : ArgumentSet,
'cli' : ArgumentSet,
'sys' : ArgumentSet
})