Skip to content

Commit

Permalink
typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Mar 4, 2024
1 parent 536a038 commit d7d9c5e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pacman/operations/fixed_route_router/fixed_route_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import Dict, List, Tuple
from typing import Dict, List, Tuple, Type
from spinn_utilities.progress_bar import ProgressBar
from spinn_machine import Chip, FixedRouteEntry
from pacman.data import PacmanDataView
Expand All @@ -22,12 +22,12 @@


def fixed_route_router(
destination_class) -> Dict[Tuple[int, int], FixedRouteEntry]:
destination_class: Type) -> Dict[Tuple[int, int], FixedRouteEntry]:
"""
Runs the fixed route generator for all boards on machine.
:param destination_class: the destination class to route packets to
:type destination_class: type or tuple(type,...)
:type destination_class: type
:return: router tables for fixed route paths
:rtype: dict((int, int)), ~spinn_machine.FixedRouteEntry)
:raises PacmanConfigurationException: if no placement processor found
Expand All @@ -48,7 +48,12 @@ class _FixedRouteRouter(object):
"_destination_class", "_fixed_route_tables",
"_machine")

def __init__(self, destination_class):
def __init__(self, destination_class: Type):
"""
:param destination_class: the destination class to route packets to
:type destination_class: type
"""
self._machine = PacmanDataView.get_machine()
self._destination_class = destination_class
self._fixed_route_tables: Dict[Tuple[int, int], FixedRouteEntry] = \
Expand Down

0 comments on commit d7d9c5e

Please sign in to comment.