Skip to content

Commit

Permalink
Simplify type checking in sort_collections()
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrilito1 authored and samriddhi99 committed Sep 29, 2024
1 parent f1d40f6 commit 1c075c7
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 1c075c7

Please sign in to comment.