From a9769b772bfac81da862082a1964218c0ad82863 Mon Sep 17 00:00:00 2001 From: Mate Zoltan Date: Fri, 19 Jan 2024 13:21:27 +0100 Subject: [PATCH] Avoid using walrus operator to stay compatible with python version earlier than 3.8 --- checkout_sdk/checkout_response.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/checkout_sdk/checkout_response.py b/checkout_sdk/checkout_response.py index 901e3449..9cebd845 100644 --- a/checkout_sdk/checkout_response.py +++ b/checkout_sdk/checkout_response.py @@ -58,10 +58,10 @@ def decorated_method(cls, data, cache, path): @_cache def _unwrap_object(cls, data, cache, path): return { - key: cls._unwrap(attr, cache, path + [key]) + key: cls._unwrap(getattr(data, key), cache, path + [key]) for key in dir(data) if not key.startswith('__') - and not cls._is_function(attr := getattr(data, key)) + and not cls._is_function(getattr(data, key)) } @classmethod