diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml index b371619e..173be2e9 100644 --- a/.github/workflows/python_actions.yml +++ b/.github/workflows/python_actions.yml @@ -20,7 +20,7 @@ on: [push] jobs: call: - uses: SpiNNakerManchester/SupportScripts/.github/workflows/python_checks.yml@main + uses: SpiNNakerManchester/SupportScripts/.github/workflows/python_checks.yml@mypy2 with: dependencies: SpiNNUtils SpiNNMachine SpiNNMan PACMAN spalloc SpiNNFrontEndCommon TestBase ubuntu-packages: graphviz diff --git a/gfe_examples/template/template_vertex.py b/gfe_examples/template/template_vertex.py index 491cff9e..bfaf6bd7 100644 --- a/gfe_examples/template/template_vertex.py +++ b/gfe_examples/template/template_vertex.py @@ -120,7 +120,7 @@ def _write_app_memory_regions(self, spec: DataSpecificationGenerator, spec.write_value(int(key is not None)) spec.write_value(0 if key is None else key) - def read(self) -> bytes: + def read(self) -> memoryview: """ Get the recorded data. diff --git a/gfe_integration_tests/test_extra_monitor/test_extra_monitor.py b/gfe_integration_tests/test_extra_monitor/test_extra_monitor.py index 95c040d9..3d6d1dd8 100644 --- a/gfe_integration_tests/test_extra_monitor/test_extra_monitor.py +++ b/gfe_integration_tests/test_extra_monitor/test_extra_monitor.py @@ -42,7 +42,7 @@ def get_data_region_address(placement: Placement, region: DataRegions) -> int: return transceiver.read_word(placement.x, placement.y, address_location) -def check_data(data: bytes) -> None: +def check_data(data: bytearray) -> None: # check data is correct here ints = n_word_struct(len(data) // 4).unpack(data) start_value = 0 @@ -57,7 +57,7 @@ def check_data(data: bytes) -> None: def _do_transfer(gatherer: DataSpeedUpPacketGatherMachineVertex, receiver_placement: Placement, writer_placement: Placement, - writer_vertex: SDRAMWriter) -> bytes: + writer_vertex: SDRAMWriter) -> bytearray: with StreamingContextManager(FecDataView.iterate_gathers()): extra_monitor = receiver_placement.vertex assert isinstance(extra_monitor, ExtraMonitorSupportMachineVertex) diff --git a/spinnaker_graph_front_end/utilities/simulator_vertex.py b/spinnaker_graph_front_end/utilities/simulator_vertex.py index d971c836..827f189d 100644 --- a/spinnaker_graph_front_end/utilities/simulator_vertex.py +++ b/spinnaker_graph_front_end/utilities/simulator_vertex.py @@ -97,7 +97,7 @@ def placement(self) -> Placement: return FecDataView.get_placement_of_vertex(self) def get_recording_channel_data( - self, recording_id: int) -> Tuple[bytes, bool]: + self, recording_id: int) -> Tuple[memoryview, bool]: """ Get the data from a recording channel. The simulation must have :py:func:`spinnaker_graph_front_end.run` before this will work,