From 34aef4483b569a22fc005671137e9767d92c6593 Mon Sep 17 00:00:00 2001 From: Andrew Dickinson Date: Sat, 25 Apr 2020 18:06:42 -0400 Subject: [PATCH] Fix PEP8 compliance (use def instead of assigning a lambda) --- ihatemoney/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ihatemoney/utils.py b/ihatemoney/utils.py index d950a123..414e4f1b 100644 --- a/ihatemoney/utils.py +++ b/ihatemoney/utils.py @@ -321,8 +321,11 @@ def localize_list(list, surround_with_em=True): end = _("{previous_object}, and {end_object}") item_wrapper = em_surround + # fmt: off if not surround_with_em: - item_wrapper = lambda x: x + def item_wrapper(x): + return x + # fmt: on if len(list) == 1: return one.format(single_object=item_wrapper(list[0]))