Skip to content

Commit

Permalink
Removed NWBBaseTypeMapper.get_nwb_file
Browse files Browse the repository at this point in the history
  • Loading branch information
oruebel committed Feb 7, 2025
1 parent 5b4798d commit 68deffc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/pynwb/ecephys.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
11 changes: 1 addition & 10 deletions src/pynwb/io/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 68deffc

Please sign in to comment.