Skip to content

Commit 98c658f

Browse files
committed
Remove more unused code
1 parent 006c97b commit 98c658f

File tree

5 files changed

+6
-16
lines changed

5 files changed

+6
-16
lines changed

doc/source/images/generate_diagram.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ def generate_diagram(rect_pos, rect_width, figsize):
7373
alpha = [1., 1., 0.3]
7474
for name, pos in rect_pos.items():
7575
obj = objs[name]
76-
relationships = [getattr(obj, '_single_child_objects', []),
77-
getattr(obj, '_child_properties', [])]
76+
relationships = [getattr(obj, '_single_child_objects', [])]
7877

7978
for r in range(3):
8079
for ch_name in relationships[r]:

doc/source/io_developers_guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Miscellaneous
3838
=============
3939

4040
* If your IO supports several versions of a format (like ABF1, ABF2), upload to the gin.g-node.org test file repository all file versions possible. (for test coverage).
41-
* :py:func:`neo.core.Block.create_many_to_one_relationship` offers a utility to complete the hierarchy when all one-to-many relationships have been created.
41+
* :py:func:`neo.core.Block.create_relationship` offers a utility to complete the hierarchy when all one-to-many relationships have been created.
4242
* In the docstring, explain where you obtained the file format specification if it is a closed one.
4343
* If your IO is based on a database mapper, keep in mind that the returned object MUST be detached,
4444
because this object can be written to another url for copying.

neo/core/block.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ class Block(Container):
6464
'''
6565

6666
_container_child_objects = ('Segment', 'Group')
67-
_child_properties = ()
6867
_recommended_attrs = ((('file_datetime', datetime),
6968
('rec_datetime', datetime),
7069
('index', int)) +

neo/core/container.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,20 +114,15 @@ class Container(BaseNeo):
114114
class.__name__.lower()+'s' will be automatically
115115
defined to hold this child and will be
116116
initialized to an empty list.
117-
:_child_properties: Properties that return sub-children of a particular
118-
type. These properties must still be defined.
119-
This is mostly used for generate_diagram.
120117
:_repr_pretty_containers: The names of containers attributes printed
121-
when pretty-printing using iPython.
118+
when pretty-printing using IPython.
122119
123120
The following helper properties are available
124121
(in addition to those of BaseNeo):
125-
:_single_child_objects: All neo container objects that can be children
126-
of this object and where the child can only
127-
have one parent of this type.
122+
:_child_objects: All neo container objects that can be children
123+
of this object.
128124
:_container_child_objects: +
129125
:_data_child_objects:
130-
:_child_objects: All child objects. Same as :_single_child_objects:
131126
:_container_child_containers: The names of the container attributes
132127
used to store :_container_child_objects:
133128
:_data_child_containers: The names of the container attributes used
@@ -192,8 +187,6 @@ class Container(BaseNeo):
192187
_container_child_objects = ()
193188
# Child objects that have data and have a single parent
194189
_data_child_objects = ()
195-
# Properties returning children of children [of children...]
196-
_child_properties = ()
197190
# Containers that are listed when pretty-printing
198191
_repr_pretty_containers = ()
199192

@@ -208,7 +201,7 @@ def __init__(self, name=None, description=None, file_origin=None,
208201
@property
209202
def _child_objects(self):
210203
"""
211-
Child objects that have a single parent.
204+
Return the names of the classes that can be children of this container.
212205
"""
213206
return self._container_child_objects + self._data_child_objects
214207

neo/test/coretest/test_container.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def test__children(self):
5656

5757
self.assertEqual(container._container_child_objects, ())
5858
self.assertEqual(container._data_child_objects, ())
59-
self.assertEqual(container._child_properties, ())
6059

6160
self.assertEqual(container._repr_pretty_containers, ())
6261

0 commit comments

Comments
 (0)