Skip to content

[AutoPR] TODO use jsonpath_ng instead #131

Open
@github-actions

Description

@github-actions

TODO use jsonpath_ng instead

class ContextDict(dict[ContextVarName, Any]):
def get_path(self, path: ContextVarPath) -> Any:
"""
Get a value from the context by path (e.g., `pull_request.title`).
"""
# TODO use jsonpath_ng instead
path_parts = path.split(".")
value = self
try:
for part in path_parts:
if isinstance(value, pydantic.BaseModel):

To resolve this TODO, you can start by replacing the existing code that uses jsonpath with the jsonpath_ng library. Make sure to update any necessary imports and modify the code to use the new library's syntax and functionality. Test the changes thoroughly to ensure they work as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions