Skip to content

Commit

Permalink
More pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dkfellows committed Oct 3, 2019
1 parent 1df72d5 commit 48a8d10
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
7 changes: 4 additions & 3 deletions pacman/operations/router_algorithms/basic_dijkstra_routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ def __call__(self, placements, machine, machine_graph,

def _route(self, placement, placements, machine, graph, node_info, tables):
# pylint: disable=too-many-arguments
out_going_edges = filter(
lambda edge: edge.traffic_type == EdgeTrafficType.MULTICAST,
graph.get_edges_starting_at_vertex(placement.vertex))
out_going_edges = (
edge
for edge in graph.get_edges_starting_at_vertex(placement.vertex)
if edge.traffic_type == EdgeTrafficType.MULTICAST)

dest_chips = set()
edges_to_route = list()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
from pacman.utilities.utility_objs import Field
from pacman.utilities.utility_objs.flexi_field import SUPPORTED_TAGS

TYPES_OF_FIELDS = Enum(
value="TYPES_OF_FIELDS",
names=[("FIXED_MASK", 0),
("FIXED_KEY", 1),
("FIXED_FIELD", 2)])

NUM_BITS_IN_ROUTING = 31
ROUTING_MASK_BIT = 1
START_OF_ROUTING_KEY_POSITION = 0


class TYPES_OF_FIELDS(Enum):
FIXED_MASK = 0
FIXED_KEY = 1
FIXED_FIELD = 2


def deduce_types(graph):
""" Deducing the number of applications required for this key space.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ def get_vertices_on_same_chip(vertex, graph):
if isinstance(constraint, SameChipAsConstraint):
same_chip_as_vertices.append(constraint.vertex)

for edge in filter(
lambda edge: edge.traffic_type == EdgeTrafficType.SDRAM,
graph.get_edges_starting_at_vertex(vertex)):
same_chip_as_vertices.append(edge.post_vertex)
same_chip_as_vertices.extend(
edge.post_vertex
for edge in graph.get_edges_starting_at_vertex(vertex)
if edge.traffic_type == EdgeTrafficType.SDRAM)
return same_chip_as_vertices


Expand Down
8 changes: 4 additions & 4 deletions pacman/utilities/utility_objs/flexi_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

from enum import Enum

SUPPORTED_TAGS = Enum(
value="SUPPORTED_TAGS",
names=[("APPLICATION", 0),
("ROUTING", 1)])

class SUPPORTED_TAGS(Enum):
APPLICATION = 0
ROUTING = 1


class FlexiField(object):
Expand Down

0 comments on commit 48a8d10

Please sign in to comment.