Skip to content

Commit

Permalink
asserts for safety and typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Mar 28, 2024
1 parent 5295658 commit b083b8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spinn_machine/routing_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def __init__(self, *,

# Add processor IDs, ignore duplicates
if spinnaker_route is None:
assert processor_ids is not None
assert link_ids is not None
if isinstance(processor_ids, int):
processor_ids = [processor_ids]
if isinstance(link_ids, int):
Expand All @@ -90,7 +92,7 @@ def __init__(self, *,
self._defaultable = False
else:
if incoming_processor is None:
if len(self.link_ids) != 1:
if len(link_ids) != 1:
self._defaultable = False
else:
link_id = next(iter(link_ids))
Expand Down

0 comments on commit b083b8f

Please sign in to comment.