The continue statement in ufl.utils.sorting.topological_sorting (https://github.com/FEniCS/ufl/blob/main/ufl/utils/sorting.py#L25) has no effect: it causes execution to jump to the beginning of the inner for loop, which would happen anyway since there is no code following the continue inside the loop. It should be a break statement, since there is no need to continue searching the edges once node has been removed from S.
Description of changes
This pull request replaces the offending continue with a break.
Description of issue
The
continue
statement inufl.utils.sorting.topological_sorting
(https://github.com/FEniCS/ufl/blob/main/ufl/utils/sorting.py#L25) has no effect: it causes execution to jump to the beginning of the innerfor
loop, which would happen anyway since there is no code following thecontinue
inside the loop. It should be abreak
statement, since there is no need to continue searching the edges oncenode
has been removed fromS
.Description of changes
This pull request replaces the offending
continue
with abreak
.