-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Labels
Description
TODO use jsonpath_ng instead
AutoPR/autopr/models/executable.py
Lines 39 to 49 in 1d818f4
| 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.