mirror of
https://github.com/Jylpah/blitz-tools.git
synced 2026-10-21 02:07:06 +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:
|
||||
return dict(sorted(d.items(), key=lambda item: int(item[0])))
|
||||
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