mirror of
https://github.com/Jylpah/blitz-tools.git
synced 2026-10-21 10:17:05 +02:00
sort_dict(): force input to str
This commit is contained in:
1 parent
d4a35e6e8d
commit
b273fcd9f3
1 file changed
+1
-1
+1
-1
@@ -684,7 +684,7 @@ def sort_dict(d: dict, number: bool = False) -> dict:
|
|||||||
if number:
|
if number:
|
||||||
return dict(sorted(d.items(), key=lambda item: int(item[0])))
|
return dict(sorted(d.items(), key=lambda item: int(item[0])))
|
||||||
else:
|
else:
|
||||||
return dict(sorted(d.items(), key=lambda item: item[0]))
|
return dict(sorted(d.items(), key=lambda item: str(item[0])))
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
|
|||||||
Reference in new issue
Block a user