Skip to content

[AutoPR] TODO if it's a template, enforce dict structure on ... #132

Open
@github-actions

Description

@github-actions

TODO if it's a template, enforce dict structure on the template

and issubclass(type_, pydantic.BaseModel)
):
for field_name in type_.__fields__.keys():
if any(field_name in m.__fields__ for m in typing.get_args(add_union)):
raise ValueError(f"{field_name} is a restricted field name.")
# TODO if it's a template, enforce dict structure on the template
type_ = Union[type_, add_union]
template_fields[name_] = (type_, template_field)
inputs_template = pydantic.create_model(
action.id + model.__name__ + "ActionFieldTemplate",
__base__=StrictModel,

To resolve this TODO, you can start by checking if the code is dealing with a template. If it is, you can enforce the dict structure by validating the input data against a predefined template structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions