From 2bc2d6668661dcdd1c3ff5795f505a0e492f8bc2 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Mon, 1 Nov 2021 17:52:32 +0200 Subject: Improvements to JSON coverage tests to validate json behaviour deprecation support api changes --- redis/commands/json/decoders.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 redis/commands/json/decoders.py (limited to 'redis/commands/json/decoders.py') diff --git a/redis/commands/json/decoders.py b/redis/commands/json/decoders.py new file mode 100644 index 0000000..0ee102a --- /dev/null +++ b/redis/commands/json/decoders.py @@ -0,0 +1,12 @@ +def int_or_list(b): + if isinstance(b, int): + return b + else: + return b + + +def int_or_none(b): + if b is None: + return None + if isinstance(b, int): + return b -- cgit v1.2.1