- Notifications
You must be signed in to change notification settings - Fork88
Open
Labels
Description
TODO use jsonpath_ng instead
AutoPR/autopr/models/executable.py
Lines 39 to 49 in1d818f4
| classContextDict(dict[ContextVarName,Any]): | |
| defget_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: | |
| forpartinpath_parts: | |
| ifisinstance(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.