mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
fix: recently added
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import locale
|
||||
from typing import TypeVar
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
# Set to user's default locale:
|
||||
locale.setlocale(locale.LC_ALL, "")
|
||||
@@ -9,3 +12,9 @@ locale.setlocale(locale.LC_ALL, "")
|
||||
|
||||
def format_number(number: float) -> str:
|
||||
return locale.format_string("%d", number, grouping=True)
|
||||
|
||||
|
||||
|
||||
|
||||
def flatten(list_: list[list[T]]) -> list[T]:
|
||||
return [item for sublist in list_ for item in sublist]
|
||||
|
||||
Reference in New Issue
Block a user