Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
232d4b45
Commit
232d4b45
authored
Dec 27, 2019
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZODB Components: Preparation of erp5_base migration from FS: Fix pylint redefined-builtin warnings.
parent
5bb99fe1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
product/ERP5/Document/BusinessProcess.py
product/ERP5/Document/BusinessProcess.py
+4
-4
No files found.
product/ERP5/Document/BusinessProcess.py
View file @
232d4b45
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment