Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Del unused funcs #2036

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## PyNWB 3.0.0 (Upcoming)

### Breaking changes

- 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 [#2036](https://github.com/NeurodataWithoutBorders/pynwb/pull/2036)

### 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)
- Added support for NWB schema 2.8.0. @rly [#2001](https://github.com/NeurodataWithoutBorders/pynwb/pull/2001)
Expand Down
8 changes: 0 additions & 8 deletions src/pynwb/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
from pynwb import get_type_map


def _not_parent(arg):
return arg['name'] != 'parent'


def prepend_string(string, prepend=' '):
return prepend + prepend.join(string.splitlines(True))


class NWBMixin(AbstractContainer):

_data_type_attr = 'neurodata_type'
Expand Down
4 changes: 0 additions & 4 deletions src/pynwb/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
from .core import NWBContainer, NWBDataInterface, MultiContainerInterface, ScratchData, LabelledDict


def _not_parent(arg):
return arg['name'] != 'parent'


@register_class('LabMetaData', CORE_NAMESPACE)
class LabMetaData(NWBContainer):
"""
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
Loading