From 5d0335fd6a28e7e0a041074d3d58abe845d93936 Mon Sep 17 00:00:00 2001 From: Char Howland Date: Mon, 18 Sep 2023 21:52:28 -0600 Subject: [PATCH] chore: use alias for jsonpath parse Signed-off-by: Char Howland --- aries_cloudagent/wallet/sd_jwt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aries_cloudagent/wallet/sd_jwt.py b/aries_cloudagent/wallet/sd_jwt.py index 142ff2ca07..59f3291995 100644 --- a/aries_cloudagent/wallet/sd_jwt.py +++ b/aries_cloudagent/wallet/sd_jwt.py @@ -3,7 +3,7 @@ import re from typing import Any, List, Mapping, Optional, Union from marshmallow import fields -from jsonpath_ng.ext import parse +from jsonpath_ng.ext import parse as jsonpath_parse from sd_jwt.common import SDObj from sd_jwt.issuer import SDJWTIssuer from sd_jwt.verifier import SDJWTVerifier @@ -152,7 +152,7 @@ async def sd_jwt_sign( """ sd_list = create_sd_list(payload, non_sd_list) for sd in sd_list: - jsonpath_expression = parse(f"$.{sd}") + jsonpath_expression = jsonpath_parse(f"$.{sd}") matches = jsonpath_expression.find(payload) if len(matches) < 1: raise SDJWTError(f"Claim for {sd} not found in payload.")