Skip to content

[AutoPR] TODO migrate to pydantic 2.0, and use a nested sel ... #130

Open
@github-actions

Description

@github-actions

TODO migrate to pydantic 2.0, and use a nested self-referential Union like this:

# supports jinja2 templates like `{{ pull_request.title }}`
TemplateString = str
# supports jinja2 templates in nested dicts/lists
TemplateObject = Union[TemplateString, dict[str, Any], list[Any]]
# TODO migrate to pydantic 2.0, and use a nested self-referential Union like this:
# TemplateObject = Union[TemplateString, dict[str, "TemplateObject"], list["TemplateObject"]]
class ContextDict(dict[ContextVarName, Any]):
def get_path(self, path: ContextVarPath) -> Any:

To resolve this TODO, you can start by updating the code to use the latest version of pydantic (2.0). Then, you can implement a nested self-referential Union, following the example provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions