Skip to content

Commit 48babc9

Browse files
committed
bytearray or bytes
1 parent 2f8d81d commit 48babc9

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

spinn_front_end_common/interface/interface_functions/load_data_specification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from spinn_front_end_common.interface.ds import DsSqlliteDatabase
3535

3636
logger = FormatAdapter(logging.getLogger(__name__))
37-
_Writer: TypeAlias = Callable[[int, int, int, bytearray], Any]
37+
_Writer: TypeAlias = Callable[[int, int, int, bytearray | bytes], Any]
3838

3939
MONITOR_CUTOFF = 12800 # 50 packets of 256 bytes
4040

spinn_front_end_common/utility_models/data_speed_up_packet_gatherer_machine_vertex.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ def __open_connection(self) -> SCAMPConnection:
606606

607607
def _send_data_via_extra_monitors(
608608
self, destination_chip: Chip, start_address: int,
609-
data_to_write: bytes) -> None:
609+
data_to_write: bytearray | bytes) -> None:
610610
"""
611611
Sends data using the extra monitor cores.
612612
@@ -739,7 +739,7 @@ def _read_in_missing_seq_nums(
739739
return seen_last, seen_all
740740

741741
def _outgoing_retransmit_missing_seq_nums(
742-
self, data_to_write: bytes, missing: Set[int],
742+
self, data_to_write: bytearray | bytes, missing: Set[int],
743743
connection: SCAMPConnection) -> None:
744744
"""
745745
Transmits back into SpiNNaker the missing data based off missing
@@ -772,7 +772,7 @@ def __position_from_seq_number(seq_num: int) -> int:
772772
return BYTES_IN_FULL_PACKET_WITH_KEY * seq_num
773773

774774
def __make_data_in_stream_message(
775-
self, data_to_write: bytes, seq_num: int,
775+
self, data_to_write: bytearray | bytes, seq_num: int,
776776
position: Optional[int]) -> Tuple[SDPMessage, int]:
777777
"""
778778
Determine the data needed to be sent to the SpiNNaker machine
@@ -833,7 +833,7 @@ def __send_tell_flag(self, connection: SCAMPConnection) -> None:
833833
_DataInCommands.SEND_TELL, self._transaction_id)))
834834

835835
def _send_all_data_based_packets(
836-
self, data_to_write: bytes, start_address: int,
836+
self, data_to_write: bytearray | bytes, start_address: int,
837837
connection: SCAMPConnection) -> None:
838838
"""
839839
Send all the data as one block.

0 commit comments

Comments
 (0)