Skip to content
Snippets Groups Projects
Commit 547ff079 authored by Ivar Härnqvist's avatar Ivar Härnqvist
Browse files

fix use of british english (neighbours -> neighbors)

parent 8188390e
No related branches found
No related tags found
1 merge request!12Misc. fixes
......@@ -86,9 +86,9 @@ class Operation(GraphComponent):
@property
@abstractmethod
def neighbours(self) -> "List[Operation]":
def neighbors(self) -> "List[Operation]":
"""Return all operations that are connected by signals to this operation.
If no neighbours are found this returns an empty list
If no neighbors are found this returns an empty list
"""
raise NotImplementedError
......@@ -175,17 +175,17 @@ class AbstractOperation(Operation, AbstractGraphComponent):
return [self]
@property
def neighbours(self) -> List[Operation]:
neighbours: List[Operation] = []
def neighbors(self) -> List[Operation]:
neighbors: List[Operation] = []
for port in self._input_ports:
for signal in port.signals:
neighbours.append(signal.source.operation)
neighbors.append(signal.source.operation)
for port in self._output_ports:
for signal in port.signals:
neighbours.append(signal.destination.operation)
neighbors.append(signal.destination.operation)
return neighbours
return neighbors
def traverse(self) -> Operation:
"""Traverse the operation tree and return a generator with start point in the operation."""
......@@ -198,7 +198,7 @@ class AbstractOperation(Operation, AbstractGraphComponent):
while queue:
operation = queue.popleft()
yield operation
for n_operation in operation.neighbours:
for n_operation in operation.neighbors:
if n_operation not in visited:
visited.add(n_operation)
queue.append(n_operation)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment