ZODB Components: Preparation of erp5_base migration from FS: Fix pylint...
ZODB Components: Preparation of erp5_base migration from FS: Fix pylint unbalanced-tuple-unpacking warning.
Showing
-
Owner
We often do this on purpose so that it fails when there is more than one element in the list, especially in tests.
How about adding a
assert len(delivery_to_update_list) == 1
or something ? -
Developer
I didn't know about that. I will commit your suggestion tomorrow unless somebody has a better idea. Thanks!
-
Owner
This is maybe a case where a line comment to disable the pylint check is acceptable.
delivery, = delivery_to_update_list #pylint: disable=unbalanced-tuple-unpacking
-
Developer
Well, having an assert or something similar makes it clear that there must be only one element, whereas pylint disabling comment does not IMO.
Please register or sign in to comment