diff --git a/facefusion/types.py b/facefusion/types.py index 7057b5d..141c767 100755 --- a/facefusion/types.py +++ b/facefusion/types.py @@ -355,4 +355,3 @@ State = TypedDict('State', }) StateSet : TypeAlias = Dict[AppContext, State] -Wording : TypeAlias = Union[str, Dict[str, str]] diff --git a/facefusion/wording.py b/facefusion/wording.py index 14d9216..5c3ef2b 100755 --- a/facefusion/wording.py +++ b/facefusion/wording.py @@ -1,7 +1,5 @@ from typing import Any, Dict, Optional -from facefusion.types import Wording - WORDING : Dict[str, Any] =\ { 'conda_not_activated': 'Conda is not activated', @@ -343,13 +341,13 @@ WORDING : Dict[str, Any] =\ } -def get(notation : str) -> Optional[Wording]: - wording = WORDING +def get(notation : str) -> Optional[str]: + current = WORDING for fragment in notation.split('.'): - if fragment in wording: - wording = wording.get(fragment) - else: - return None + if fragment in current: + current = current.get(fragment) + if isinstance(current, str): + return current - return wording + return None