Commit 232d4b45 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Preparation of erp5_base migration from FS: Fix pylint redefined-builtin warnings.

parent 5bb99fe1
...@@ -862,17 +862,17 @@ class BusinessProcess(Path, XMLObject): ...@@ -862,17 +862,17 @@ class BusinessProcess(Path, XMLObject):
if trade_phase_list: # reduce graph if trade_phase_list: # reduce graph
next_dict = defaultdict(set) next_dict = defaultdict(set)
# build {phase: next_set} (i.e. reverse result) # build {phase: next_set} (i.e. reverse result)
for next, phase_set in result.iteritems(): for next_, phase_set in result.iteritems():
for phase in phase_set: for phase in phase_set:
next_dict[phase].add(next) next_dict[phase].add(next_)
# for each phase to remove # for each phase to remove
for phase in set(result).difference(trade_phase_list): for phase in set(result).difference(trade_phase_list):
# edit the graph like we would do for a doubly linked list # edit the graph like we would do for a doubly linked list
previous_set = result.pop(phase) previous_set = result.pop(phase)
next_set = next_dict[phase] next_set = next_dict[phase]
# i.e. edit next phases to replace current phase by previous ones # i.e. edit next phases to replace current phase by previous ones
for next in next_set: for next_ in next_set:
phase_set = result[next] phase_set = result[next_]
# Not remove() as it may have already been removed earlier # Not remove() as it may have already been removed earlier
# if >1 elements of next_set have the same parent # if >1 elements of next_set have the same parent
phase_set.discard(phase) phase_set.discard(phase)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment