fixing fstring
This commit is contained in:
parent
e3426d2124
commit
0f8c0ad9bf
9 changed files with 17 additions and 19 deletions
|
|
@ -1916,7 +1916,7 @@ def at_search_result(matches, caller, query="", quiet=False, **kwargs):
|
|||
if multimatch_string:
|
||||
error = "%s\n" % multimatch_string
|
||||
else:
|
||||
error = _("More than one match for '%s' (please narrow target):\n" % query)
|
||||
error = _("More than one match for '{query}' (please narrow target):\n".format(query=query))
|
||||
|
||||
for num, result in enumerate(matches):
|
||||
# we need to consider Commands, where .aliases is a list
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ def datetime(entry, option_key="Datetime", account=None, from_tz=None, **kwargs)
|
|||
|
||||
"""
|
||||
if not entry:
|
||||
raise ValueError(_(f"No {option_key} entered!"))
|
||||
raise ValueError(_("No {option_key} entered!".format(option_key=option_key)))
|
||||
if not from_tz:
|
||||
from_tz = _pytz.UTC
|
||||
if account:
|
||||
|
|
@ -67,7 +67,7 @@ def datetime(entry, option_key="Datetime", account=None, from_tz=None, **kwargs)
|
|||
try:
|
||||
from_tz = _pytz.timezone(acct_tz)
|
||||
except Exception as err:
|
||||
raise ValueError(_(f"Timezone string '{acct_tz}' is not a valid timezone ({err})"))
|
||||
raise ValueError(_("Timezone string '{acct_tz}' is not a valid timezone ({err})".format(acct_tz=acct_tz, err=err)))
|
||||
else:
|
||||
from_tz = _pytz.UTC
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue