From 40be376b4ef5b64d6f690e476ba45d6a4b87aff2 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 2 Dec 2024 11:38:17 +0000 Subject: [PATCH 1/2] return type None --- spinn_front_end_common/data/fec_data_writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spinn_front_end_common/data/fec_data_writer.py b/spinn_front_end_common/data/fec_data_writer.py index 0a79ca674..8f822be6e 100644 --- a/spinn_front_end_common/data/fec_data_writer.py +++ b/spinn_front_end_common/data/fec_data_writer.py @@ -564,7 +564,7 @@ def clear_notification_protocol(self) -> None: @classmethod @overrides(FecDataView.add_vertex) - def add_vertex(cls, vertex: ApplicationVertex): + def add_vertex(cls, vertex: ApplicationVertex) -> None: # Avoid the safety check in FecDataView PacmanDataWriter.add_vertex(vertex) From 329c354d68832872b9c814da347111f934d222eb Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 17 Dec 2024 08:37:40 +0000 Subject: [PATCH 2/2] typing fixes --- .../reverse_ip_tag_multicast_source_machine_vertex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spinn_front_end_common/utility_models/reverse_ip_tag_multicast_source_machine_vertex.py b/spinn_front_end_common/utility_models/reverse_ip_tag_multicast_source_machine_vertex.py index d727f80bf..0f81970c2 100644 --- a/spinn_front_end_common/utility_models/reverse_ip_tag_multicast_source_machine_vertex.py +++ b/spinn_front_end_common/utility_models/reverse_ip_tag_multicast_source_machine_vertex.py @@ -255,12 +255,12 @@ def _max_send_buffer_keys_per_timestep( counts = numpy.bincount( numpy.concatenate(send_buffer_times).astype("int")) if len(counts): - return max(counts) + return int(numpy.max(counts)) return 0 if len(send_buffer_times): counts = numpy.bincount(send_buffer_times) if len(counts): - return n_keys * max(counts) + return n_keys * int(numpy.max(counts)) return 0 return 0