Skip to content

Commit

Permalink
typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Dec 16, 2024
1 parent 2110a44 commit 3ec2384
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions spynnaker/pyNN/models/neuron/population_machine_vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 3ec2384

Please sign in to comment.