From 9d91eea6c2b8d6747e1b7c9b1e59126b232473f8 Mon Sep 17 00:00:00 2001 From: Andrew Dickinson Date: Sun, 26 Apr 2020 12:44:48 -0400 Subject: [PATCH] Update ihatemoney/utils.py Co-Authored-By: Glandos --- ihatemoney/utils.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ihatemoney/utils.py b/ihatemoney/utils.py index e274c687..e3547fc6 100644 --- a/ihatemoney/utils.py +++ b/ihatemoney/utils.py @@ -320,12 +320,7 @@ def localize_list(list, surround_with_em=True): middle = _("{previous_object}, {next_object}") end = _("{previous_object}, and {end_object}") - item_wrapper = em_surround - # fmt: off - if not surround_with_em: - def item_wrapper(x): - return x - # fmt: on + item_wrapper = em_surround if surround_with_em else lambda x: x if len(list) == 1: return one.format(single_object=item_wrapper(list[0]))