Issue:
The current implementation of the sort_collections function in the utils.py manually checks for multiple data types (str, float, int, bool) using individual isinstance checks. This can be simplified by grouping these checks into a single isinstance statement, improving readability and reducing redundancy.
Task:
Update the sort_collections function in the utils.py to use a single isinstance check for primitive types.
Issue: The current implementation of the
sort_collections
function in theutils.py
manually checks for multiple data types (str, float, int, bool
) using individualisinstance
checks. This can be simplified by grouping these checks into a singleisinstance
statement, improving readability and reducing redundancy.Task:
Update the
sort_collections
function in theutils.py
to use a singleisinstance
check for primitive types.