Skip to content

Commit

Permalink
Simplify type checking in sort_collections()
Browse files Browse the repository at this point in the history
Closes #185
  • Loading branch information
gabrilito1 authored and samriddhi99 committed Sep 29, 2024
1 parent f1d40f6 commit 88c74ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tirith/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def sort_collections(inputs):
try:
if isinstance(inputs, str) or isinstance(inputs, float) or isinstance(inputs, int) or isinstance(inputs, bool):
if isinstance(inputs, (str, float, int, bool)):
return inputs
elif isinstance(inputs, list):
if len(inputs) == 0:
Expand Down

0 comments on commit 88c74ce

Please sign in to comment.