mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
omit period in steps when possible
This commit is contained in:
parent
69e8e3ffbc
commit
8b76098bc7
1 changed files with 9 additions and 1 deletions
|
@ -3,6 +3,8 @@
|
||||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
|
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
import aqt
|
import aqt
|
||||||
from anki.consts import NEW_CARDS_RANDOM
|
from anki.consts import NEW_CARDS_RANDOM
|
||||||
from anki.lang import _, ngettext
|
from anki.lang import _, ngettext
|
||||||
|
@ -165,7 +167,13 @@ class DeckConf(QDialog):
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
def listToUser(self, l):
|
def listToUser(self, l):
|
||||||
return " ".join([str(x) for x in l])
|
def num_to_user(n: Union[int, float]):
|
||||||
|
if n == round(n):
|
||||||
|
return str(int(n))
|
||||||
|
else:
|
||||||
|
return str(n)
|
||||||
|
|
||||||
|
return " ".join(map(num_to_user, l))
|
||||||
|
|
||||||
def parentLimText(self, type="new"):
|
def parentLimText(self, type="new"):
|
||||||
# top level?
|
# top level?
|
||||||
|
|
Loading…
Reference in a new issue