Skip to content

Commit 2c1c4a5

Browse files
committed
MyPy fixes
1 parent 1f3980d commit 2c1c4a5

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

spynnaker/pyNN/__init__.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
import spynnaker.pyNN as _sim # pylint: disable=import-self
5656

5757
from spynnaker.pyNN.exceptions import SpynnakerException
58-
58+
from spynnaker.pyNN.models.common.types import Names
5959
from spynnaker.pyNN.random_distribution import RandomDistribution
6060
from spynnaker.pyNN.data import SpynnakerDataView
6161
from spynnaker.pyNN.models.abstract_pynn_model import AbstractPyNNModel
@@ -464,7 +464,7 @@ def set_allow_delay_extensions(
464464

465465
def connect(pre: Population, post: Population, weight: float = 0.0,
466466
delay: Optional[float] = None, receptor_type: str = "excitatory",
467-
p: int = 1, rng: Optional[NumpyRNG] = None) -> Projection:
467+
p: int = 1, rng: Optional[NumpyRNG] = None) -> None:
468468
"""
469469
Builds a projection.
470470
@@ -487,8 +487,8 @@ def connect(pre: Population, post: Population, weight: float = 0.0,
487487
if rng is not None:
488488
warn_once(
489489
logger, "The rng argument to connect is ignored in sPyNNaker.")
490-
return Projection(pre, post, connector, receptor_type=receptor_type,
491-
synapse_type=synapse)
490+
Projection(pre, post, connector, receptor_type=receptor_type,
491+
synapse_type=synapse)
492492

493493

494494
def create(
@@ -527,7 +527,7 @@ def get_current_time() -> float:
527527
return __simulator.t
528528

529529

530-
def get_min_delay() -> int:
530+
def get_min_delay() -> float:
531531
"""
532532
The minimum allowed synaptic delay; delays will be clamped to be at
533533
least this.
@@ -539,7 +539,7 @@ def get_min_delay() -> int:
539539
return __simulator.dt
540540

541541

542-
def get_max_delay() -> int:
542+
def get_max_delay() -> float:
543543
"""
544544
Part of the PyNN API but does not make sense for sPyNNaker as
545545
different Projection, Vertex splitter combination could have different
@@ -601,7 +601,7 @@ def rank() -> int:
601601
return 0
602602

603603

604-
def record(variables: Union[str, Sequence[str]], source: Population,
604+
def record(variables: Names, source: Population,
605605
filename: str, sampling_interval: Optional[float] = None,
606606
annotations: Optional[Dict[str, Any]] = None) -> Block:
607607
"""
@@ -636,8 +636,6 @@ def reset(annotations: Optional[Dict[str, Any]] = None) -> None:
636636
if annotations is None:
637637
annotations = {}
638638
assert __simulator is not None
639-
for recorder in __simulator.recorders:
640-
recorder.store_to_cache(annotations)
641639
__simulator.reset()
642640

643641

0 commit comments

Comments
 (0)