tackle
tackle copied to clipboard
Bug: When special variable is named in function there is a crash
<-:
calling_directory->: "{{calling_directory}}"
calling_file->: "{{calling_file}}"
Both these vars are brought into creating a declarative hook and so there is a duplicate value error.
Function = create_model(
func_name,
__base__=BaseFunction,
**new_func,
**function_input.dict(include={'args', 'render_exclude'}),
**{'function_dict': (dict, function_dict)}, # Preserve for `extends` key
# https://github.com/sudoblockio/tackle/issues/99
public_hooks=context.public_hooks,
private_hooks=context.private_hooks,
calling_directory=context.calling_directory,
calling_file=context.calling_file,
override_context=context.override_context,
no_input=context.no_input,
# Causes TypeError in pydantic -> __subclasscheck__
# env_=context.env_,
)