mirror of
https://github.com/facefusion/facefusion.git
synced 2026-04-30 21:37:49 +02:00
introduce type ArgumentSet
This commit is contained in:
@@ -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
@@ -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
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user