Skip to content

Commit

Permalink
type comparison with 'is' vs '=='
Browse files Browse the repository at this point in the history
  • Loading branch information
Jhsmit committed Nov 27, 2024
1 parent 0671be1 commit 894a4cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hdxms_datasets/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 894a4cc

Please sign in to comment.