fix custom func inspection
This commit is contained in:
parent
8c0aa285bd
commit
d90a1dd5a5
2 changed files with 2 additions and 2 deletions
|
|
@ -15,7 +15,7 @@ from ytdl_sub.utils.exceptions import StringFormattingException
|
|||
from ytdl_sub.utils.script import ScriptUtils
|
||||
|
||||
BASE_SCRIPT: Script = Script(
|
||||
ScriptUtils.add_sanitized_variables(dict(VARIABLE_SCRIPTS, **CUSTOM_FUNCTION_SCRIPTS))
|
||||
dict(ScriptUtils.add_sanitized_variables(VARIABLE_SCRIPTS), **CUSTOM_FUNCTION_SCRIPTS)
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ def _validate_formatter(
|
|||
text=formatter_validator.format_string,
|
||||
)
|
||||
variable_names = {var.name for var in parsed.variables}
|
||||
custom_function_names = {func.name for func in parsed.custom_functions}
|
||||
custom_function_names = {f"%{func.name}" for func in parsed.custom_functions}
|
||||
|
||||
if not variable_names.issubset(mock_script.variable_names):
|
||||
raise StringFormattingVariableNotFoundException(
|
||||
|
|
|
|||
Loading…
Reference in a new issue