From 894a4cc8612a4a2e4d78dbf9fff65f87ab65abe4 Mon Sep 17 00:00:00 2001 From: Jochem Smit Date: Wed, 27 Nov 2024 11:49:44 +0100 Subject: [PATCH] type comparison with 'is' vs '==' --- hdxms_datasets/datasets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hdxms_datasets/datasets.py b/hdxms_datasets/datasets.py index 2325eaa..772cc10 100644 --- a/hdxms_datasets/datasets.py +++ b/hdxms_datasets/datasets.py @@ -247,9 +247,9 @@ def describe( output_dict[state] = state_desc - if return_type == str: + if return_type is str: return yaml.dump(output_dict, sort_keys=False) - elif return_type == dict: + elif return_type is dict: return output_dict else: raise TypeError(f"Invalid return type {return_type!r}")