mirror of
https://github.com/facefusion/facefusion.git
synced 2026-10-13 17:17:30 +02:00
introduce type ArgumentSet
This commit is contained in:
1 parent
ecc280a93f
commit
e7a28cf072
2 files changed
+8
-7
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
from argparse import Action
|
from argparse import Action
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from facefusion.types import Args, ArgsStore, ArgumentValue, Scope
|
from facefusion.types import Args, ArgsStore, ArgumentSet, Scope
|
||||||
|
|
||||||
|
|
||||||
ARGS_STORE : ArgsStore =\
|
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')
|
return ARGS_STORE.get('api')
|
||||||
|
|
||||||
|
|
||||||
def get_cli_set() -> ArgumentValue:
|
def get_cli_set() -> ArgumentSet:
|
||||||
return ARGS_STORE.get('cli')
|
return ARGS_STORE.get('cli')
|
||||||
|
|
||||||
|
|
||||||
def get_sys_set() -> ArgumentValue:
|
def get_sys_set() -> ArgumentSet:
|
||||||
return ARGS_STORE.get('sys')
|
return ARGS_STORE.get('sys')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
-3
@@ -100,12 +100,13 @@ Resolution : TypeAlias = Tuple[int, int]
|
|||||||
Args : TypeAlias = Dict[str, Any]
|
Args : TypeAlias = Dict[str, Any]
|
||||||
Scope : TypeAlias = Literal['api', 'cli', 'sys']
|
Scope : TypeAlias = Literal['api', 'cli', 'sys']
|
||||||
ArgumentValue : TypeAlias = Dict[str, Any]
|
ArgumentValue : TypeAlias = Dict[str, Any]
|
||||||
|
ArgumentSet : TypeAlias = Dict[str, ArgumentValue]
|
||||||
|
|
||||||
ArgsStore = TypedDict('ArgsStore',
|
ArgsStore = TypedDict('ArgsStore',
|
||||||
{
|
{
|
||||||
'api' : Dict[str, ArgumentValue],
|
'api' : ArgumentSet,
|
||||||
'cli' : Dict[str, ArgumentValue],
|
'cli' : ArgumentSet,
|
||||||
'sys' : Dict[str, ArgumentValue]
|
'sys' : ArgumentSet
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user