From 68deffc952297f3c025cae7ad5604ba38ce3ba8f Mon Sep 17 00:00:00 2001 From: Oliver Ruebel Date: Thu, 6 Feb 2025 20:43:57 -0800 Subject: [PATCH] Removed NWBBaseTypeMapper.get_nwb_file --- CHANGELOG.md | 2 +- src/pynwb/ecephys.py | 2 +- src/pynwb/io/core.py | 11 +---------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 339754aa4..acdb3ece1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## PyNWB 3.0.0 (Upcoming) ### Breaking changes -- Removed unused functions `prepend_string` and `_not_parent` from `core.py` and `file.py` @oruebel [#2032](https://github.com/NeurodataWithoutBorders/pynwb/pull/2031) +- Removed unused functions `prepend_string` and `_not_parent` in `core.py`, `_not_parent` in `file.py`, and `NWBBaseTypeMapper.get_nwb_file` in `io/core.py` @oruebel [#2032](https://github.com/NeurodataWithoutBorders/pynwb/pull/2031) ### Enhancements and minor changes - Added `pynwb.read_nwb` convenience method to simplify reading an NWBFile written with any backend @h-mayorquin [#1994](https://github.com/NeurodataWithoutBorders/pynwb/pull/1994) diff --git a/src/pynwb/ecephys.py b/src/pynwb/ecephys.py index af8048fb8..a80536462 100644 --- a/src/pynwb/ecephys.py +++ b/src/pynwb/ecephys.py @@ -200,7 +200,7 @@ class EventWaveform(MultiContainerInterface): } def __init__(self, **kwargs): - if not self._in_construct_mode: + if not self._in_construct_mode: # pragma: no cover raise ValueError( "The EventWaveform neurodata type is deprecated. If you are interested in using it, " "please create an issue on https://github.com/NeurodataWithoutBorders/nwb-schema/issues." diff --git a/src/pynwb/io/core.py b/src/pynwb/io/core.py index 0e0378c58..90f06659e 100644 --- a/src/pynwb/io/core.py +++ b/src/pynwb/io/core.py @@ -6,21 +6,12 @@ from .. import register_map -from pynwb.file import NWBFile from pynwb.core import NWBData, NWBContainer, ScratchData from pynwb.misc import Units class NWBBaseTypeMapper(ObjectMapper): - - @staticmethod - def get_nwb_file(container): - curr = container - while curr is not None: - if isinstance(curr, NWBFile): - return curr - curr = container.parent - + pass @register_map(NWBContainer) class NWBContainerMapper(NWBBaseTypeMapper):