From 3ec23847fe212e58a466d7b5f26e4b05fcd73d45 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 16 Dec 2024 07:55:20 +0000 Subject: [PATCH] typing --- .../population_machine_local_only_combined_vertex.py | 6 +++--- spynnaker/pyNN/models/neuron/population_machine_vertex.py | 6 +++--- .../models/neuron/population_neurons_machine_vertex.py | 8 ++++---- .../neuron/population_synapses_machine_vertex_lead.py | 6 +++--- .../spike_source/spike_source_poisson_machine_vertex.py | 6 +++--- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/spynnaker/pyNN/models/neuron/population_machine_local_only_combined_vertex.py b/spynnaker/pyNN/models/neuron/population_machine_local_only_combined_vertex.py index 86626d3e39..0ec684654b 100644 --- a/spynnaker/pyNN/models/neuron/population_machine_local_only_combined_vertex.py +++ b/spynnaker/pyNN/models/neuron/population_machine_local_only_combined_vertex.py @@ -323,8 +323,8 @@ def __write_local_only_data(self, spec: DataSpecificationGenerator): spec.write_value(int(self._pop_vertex.drop_late_spikes)) @overrides(AbstractRewritesDataSpecification.regenerate_data_specification) - def regenerate_data_specification( - self, spec: DataSpecificationReloader, placement: Placement): + def regenerate_data_specification(self, spec: DataSpecificationReloader, + placement: Placement) -> None: self._rewrite_neuron_data_spec(spec) # close spec @@ -335,7 +335,7 @@ def reload_required(self) -> bool: return self.__regenerate_data @overrides(AbstractRewritesDataSpecification.set_reload_required) - def set_reload_required(self, new_value: bool): + def set_reload_required(self, new_value: bool) -> None: self.__regenerate_data = new_value def _parse_local_only_provenance( diff --git a/spynnaker/pyNN/models/neuron/population_machine_vertex.py b/spynnaker/pyNN/models/neuron/population_machine_vertex.py index 4bb5df270a..bc4a0539ce 100644 --- a/spynnaker/pyNN/models/neuron/population_machine_vertex.py +++ b/spynnaker/pyNN/models/neuron/population_machine_vertex.py @@ -340,8 +340,8 @@ def generate_data_specification( @overrides( AbstractRewritesDataSpecification.regenerate_data_specification) - def regenerate_data_specification( - self, spec: DataSpecificationReloader, placement: Placement): + def regenerate_data_specification(self, spec: DataSpecificationReloader, + placement: Placement) -> None: if self.__regenerate_neuron_data: self._rewrite_neuron_data_spec(spec) self.__regenerate_neuron_data = False @@ -360,7 +360,7 @@ def reload_required(self) -> bool: return self.__regenerate_neuron_data or self.__regenerate_synapse_data @overrides(AbstractRewritesDataSpecification.set_reload_required) - def set_reload_required(self, new_value: bool): + def set_reload_required(self, new_value: bool) -> None: # These are set elsewhere once data is generated pass diff --git a/spynnaker/pyNN/models/neuron/population_neurons_machine_vertex.py b/spynnaker/pyNN/models/neuron/population_neurons_machine_vertex.py index 16ff8d1d09..ed4d4ae840 100644 --- a/spynnaker/pyNN/models/neuron/population_neurons_machine_vertex.py +++ b/spynnaker/pyNN/models/neuron/population_neurons_machine_vertex.py @@ -281,9 +281,9 @@ def generate_data_specification( @overrides( AbstractRewritesDataSpecification.regenerate_data_specification) - def regenerate_data_specification( - self, spec: DataSpecificationReloader, placement: Placement): - # Write the other parameters + def regenerate_data_specification(self, spec: DataSpecificationReloader, + placement: Placement) -> None: + # Write the other parameters self._rewrite_neuron_data_spec(spec) # close spec @@ -294,7 +294,7 @@ def reload_required(self) -> bool: return self.__regenerate_data @overrides(AbstractRewritesDataSpecification.set_reload_required) - def set_reload_required(self, new_value: bool): + def set_reload_required(self, new_value: bool) -> None: self.__regenerate_data = new_value @property diff --git a/spynnaker/pyNN/models/neuron/population_synapses_machine_vertex_lead.py b/spynnaker/pyNN/models/neuron/population_synapses_machine_vertex_lead.py index 40b4a65e9b..654ffde40e 100644 --- a/spynnaker/pyNN/models/neuron/population_synapses_machine_vertex_lead.py +++ b/spynnaker/pyNN/models/neuron/population_synapses_machine_vertex_lead.py @@ -140,8 +140,8 @@ def _parse_synapse_provenance( self, label, x, y, p, provenance_data) @overrides(AbstractRewritesDataSpecification.regenerate_data_specification) - def regenerate_data_specification( - self, spec: DataSpecificationReloader, placement: Placement): + def regenerate_data_specification(self, spec: DataSpecificationReloader, + placement: Placement) -> None: # We don't need to do anything here because the originally written # data can be used again pass @@ -151,7 +151,7 @@ def reload_required(self) -> bool: return self.__regenerate_data @overrides(AbstractRewritesDataSpecification.set_reload_required) - def set_reload_required(self, new_value: bool): + def set_reload_required(self, new_value: bool) -> None: self.__regenerate_data = new_value @overrides(PopulationMachineSynapses.set_do_synapse_regeneration) diff --git a/spynnaker/pyNN/models/spike_source/spike_source_poisson_machine_vertex.py b/spynnaker/pyNN/models/spike_source/spike_source_poisson_machine_vertex.py index 3a1e9f24ff..754f892862 100644 --- a/spynnaker/pyNN/models/spike_source/spike_source_poisson_machine_vertex.py +++ b/spynnaker/pyNN/models/spike_source/spike_source_poisson_machine_vertex.py @@ -335,12 +335,12 @@ def reload_required(self) -> bool: return SpynnakerDataView.get_first_machine_time_step() == 0 @overrides(AbstractRewritesDataSpecification.set_reload_required) - def set_reload_required(self, new_value: bool): + def set_reload_required(self, new_value: bool) -> None: self.__rate_changed = new_value @overrides(AbstractRewritesDataSpecification.regenerate_data_specification) - def regenerate_data_specification( - self, spec: DataSpecificationReloader, placement: Placement): + def regenerate_data_specification(self, spec: DataSpecificationReloader, + placement: Placement) -> None: # write rates self._write_poisson_rates(spec)