Skip to content

Commit

Permalink
tuple type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Aug 13, 2024
1 parent 5e065bf commit 9fa1363
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions pacman/data/pacman_data_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,8 @@ def iterate_placemements(cls) -> Iterable[Placement]:

@classmethod
def iterate_placements_by_vertex_type(
cls, vertex_type: Union[type, Tuple[type]]) -> Iterable[Placement]:
cls, vertex_type: Union[
type, Tuple[type, ...]]) -> Iterable[Placement]:
"""
Iterate over placements on any chip with this vertex_type.
Expand Down Expand Up @@ -383,8 +384,8 @@ def iterate_placements_on_core(cls, xy: XY) -> Iterable[Placement]:

@classmethod
def iterate_placements_by_xy_and_type(
cls, xy: XY,
vertex_type: Union[type, Tuple[type]]) -> Iterable[Placement]:
cls, xy: XY, vertex_type: Union[
type, Tuple[type, ...]]) -> Iterable[Placement]:
"""
Iterate over placements with this x, y and type.
Expand Down
8 changes: 4 additions & 4 deletions pacman/model/placements/placements.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ def iterate_placements_on_core(self, xy: XY) -> Iterable[Placement]:
return self._placements[xy].values()

def iterate_placements_by_xy_and_type(
self, xy: XY,
vertex_type: Union[type, Tuple[type]]) -> Iterable[Placement]:
self, xy: XY, vertex_type: Union[
type, Tuple[type, ...]]) -> Iterable[Placement]:
"""
Iterate over placements with this x, y and this vertex_type.
Expand All @@ -167,8 +167,8 @@ def iterate_placements_by_xy_and_type(
yield placement

def iterate_placements_by_vertex_type(
self,
vertex_type: Union[type, Tuple[type]]) -> Iterable[Placement]:
self, vertex_type: Union[
type, Tuple[type, ...]]) -> Iterable[Placement]:
"""
Iterate over placements on any chip with this vertex_type.
Expand Down

0 comments on commit 9fa1363

Please sign in to comment.