From 234a5171857b57e1032aefc03b1a92d678c9ad03 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 16 Feb 2026 15:56:34 +0000 Subject: [PATCH 1/8] mypy pynn --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 347e9ace246..c9083a61c09 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,5 +17,5 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" [[tool.mypy.overrides]] -module = ["matplotlib", "matplotlib.*", "pyNN.*", "quantities", "neo", "neo.*", "scipy", "scipy.*", "lazyarray"] +module = ["matplotlib", "matplotlib.*", "quantities", "neo", "neo.*", "scipy", "scipy.*", "lazyarray"] ignore_missing_imports = true From 19d98318e57d2d68a00e58c05779f092341f1da5 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Mon, 16 Feb 2026 16:13:12 +0000 Subject: [PATCH 2/8] follow_untyped_imports = true --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c9083a61c09..fb194a050b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,4 +18,4 @@ build-backend = "setuptools.build_meta" [[tool.mypy.overrides]] module = ["matplotlib", "matplotlib.*", "quantities", "neo", "neo.*", "scipy", "scipy.*", "lazyarray"] -ignore_missing_imports = true +follow_untyped_imports = true From 677e015d5b4a9d86a4e5be26fc828f40eaa79cd5 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 17 Feb 2026 06:42:34 +0000 Subject: [PATCH 3/8] dont follow some imports --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fb194a050b3..80541b150b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,5 +17,5 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" [[tool.mypy.overrides]] -module = ["matplotlib", "matplotlib.*", "quantities", "neo", "neo.*", "scipy", "scipy.*", "lazyarray"] -follow_untyped_imports = true +module = ["matplotlib", "matplotlib.*", "pyNN","pyNN.random","pyNN.space","quantities", "neo", "neo.*", "scipy", "scipy.*", "lazyarray"] +ignore_missing_imports = true From 36ac2bdc1efe476ccd6a1135c5e8a04481aac078 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 17 Feb 2026 07:31:38 +0000 Subject: [PATCH 4/8] add a typed file --- spynnaker/pyNN/setup_pynn.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spynnaker/pyNN/setup_pynn.py b/spynnaker/pyNN/setup_pynn.py index 8d6e09ffc3f..055783eaf24 100644 --- a/spynnaker/pyNN/setup_pynn.py +++ b/spynnaker/pyNN/setup_pynn.py @@ -29,7 +29,7 @@ # The version of PyNN that we really want -_TARGET_PYNN_VERSION = "0.9" +_TARGET_PYNN_VERSION = "0.12" def version_satisfies(module: ModuleType, requirement: str) -> bool: @@ -58,7 +58,14 @@ def install_spynnaker_into(module: ModuleType) -> None: pynn_init = os.path.join(spinnaker_dir, "__init__.py") spynnaker_init = os.path.abspath(sim.__file__) + pynn_dir = os.path.dirname(spynnaker_init) + spynnaker_dir = os.path.dirname(pynn_dir) shutil.copyfile(spynnaker_init, pynn_init) + + py_typed = os.path.join(spynnaker_dir, "py.typed") + pynn_typed = os.path.join(spinnaker_dir, "py_typed") + shutil.copyfile(py_typed, pynn_typed) + print(f"Updated {pynn_init} to be the same as spynnaker.pyNN") From 6aa42262bb07d55189f229c1c9c873b9f301982e Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 17 Feb 2026 07:37:39 +0000 Subject: [PATCH 5/8] py.typed --- spynnaker/pyNN/setup_pynn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spynnaker/pyNN/setup_pynn.py b/spynnaker/pyNN/setup_pynn.py index 055783eaf24..38f2f93a424 100644 --- a/spynnaker/pyNN/setup_pynn.py +++ b/spynnaker/pyNN/setup_pynn.py @@ -63,10 +63,11 @@ def install_spynnaker_into(module: ModuleType) -> None: shutil.copyfile(spynnaker_init, pynn_init) py_typed = os.path.join(spynnaker_dir, "py.typed") - pynn_typed = os.path.join(spinnaker_dir, "py_typed") + pynn_typed = os.path.join(spinnaker_dir, "py.typed") shutil.copyfile(py_typed, pynn_typed) print(f"Updated {pynn_init} to be the same as spynnaker.pyNN") + print(f"Added {pynn_typed}") def setup_pynn() -> None: From e1fdce72eae06bedce054aa0f76c80b89386afaa Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 17 Feb 2026 07:38:46 +0000 Subject: [PATCH 6/8] pyNN.utility.* --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 80541b150b6..5ac94a522c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,5 +17,5 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" [[tool.mypy.overrides]] -module = ["matplotlib", "matplotlib.*", "pyNN","pyNN.random","pyNN.space","quantities", "neo", "neo.*", "scipy", "scipy.*", "lazyarray"] +module = ["matplotlib", "matplotlib.*", "pyNN","pyNN.random","pyNN.space","pyNN.utility.*","quantities", "neo", "neo.*", "scipy", "scipy.*", "lazyarray"] ignore_missing_imports = true From 4d5545bb55c56ec2c190f480c27eb1f8cbabede5 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 17 Feb 2026 07:52:14 +0000 Subject: [PATCH 7/8] more pynn missing --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5ac94a522c4..1426bffbc64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,5 +17,5 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" [[tool.mypy.overrides]] -module = ["matplotlib", "matplotlib.*", "pyNN","pyNN.random","pyNN.space","pyNN.utility.*","quantities", "neo", "neo.*", "scipy", "scipy.*", "lazyarray"] +module = ["matplotlib", "matplotlib.*", "pyNN","pyNN.descriptions","pyNN.neuron.*","pyNN.random","pyNN.recording.*","pyNN.space","pyNN.standardmodels.*","pyNN.utility.*","quantities", "neo", "neo.*", "scipy", "scipy.*", "lazyarray"] ignore_missing_imports = true From 23ec040f14119a6fddbc8e4e57e5c5ce16847b1f Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Wed, 18 Feb 2026 07:31:55 +0000 Subject: [PATCH 8/8] pynn.* --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1426bffbc64..af0541c3e7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,5 +17,5 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" [[tool.mypy.overrides]] -module = ["matplotlib", "matplotlib.*", "pyNN","pyNN.descriptions","pyNN.neuron.*","pyNN.random","pyNN.recording.*","pyNN.space","pyNN.standardmodels.*","pyNN.utility.*","quantities", "neo", "neo.*", "scipy", "scipy.*", "lazyarray"] +module = ["matplotlib", "matplotlib.*", "pyNN.*","quantities", "neo", "neo.*", "scipy", "scipy.*", "lazyarray"] ignore_missing_imports = true