mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-06 13:01:50 +02:00
Fix PEP8 compliance (use def instead of assigning a lambda)
This commit is contained in:
parent
caa2ece50a
commit
34aef4483b
1 changed files with 4 additions and 1 deletions
|
@ -321,8 +321,11 @@ def localize_list(list, surround_with_em=True):
|
||||||
end = _("{previous_object}, and {end_object}")
|
end = _("{previous_object}, and {end_object}")
|
||||||
|
|
||||||
item_wrapper = em_surround
|
item_wrapper = em_surround
|
||||||
|
# fmt: off
|
||||||
if not surround_with_em:
|
if not surround_with_em:
|
||||||
item_wrapper = lambda x: x
|
def item_wrapper(x):
|
||||||
|
return x
|
||||||
|
# fmt: on
|
||||||
|
|
||||||
if len(list) == 1:
|
if len(list) == 1:
|
||||||
return one.format(single_object=item_wrapper(list[0]))
|
return one.format(single_object=item_wrapper(list[0]))
|
||||||
|
|
Loading…
Reference in a new issue