omit period in steps when possible
This commit is contained in:
parent
69e8e3ffbc
commit
8b76098bc7
@ -3,6 +3,8 @@
|
||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
from operator import itemgetter
|
||||
|
||||
from typing import Union
|
||||
|
||||
import aqt
|
||||
from anki.consts import NEW_CARDS_RANDOM
|
||||
from anki.lang import _, ngettext
|
||||
@ -165,7 +167,13 @@ class DeckConf(QDialog):
|
||||
##################################################
|
||||
|
||||
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"):
|
||||
# top level?
|
||||
|
Loading…
Reference in New Issue
Block a user