Unverified Commit b0c76d48 authored by Lingfan Yu's avatar Lingfan Yu Committed by GitHub
Browse files

[Bug] fix __slots__ in view.py (#230)

parent b98dc92c
...@@ -25,7 +25,7 @@ class NodeView(object): ...@@ -25,7 +25,7 @@ class NodeView(object):
-------- --------
TBD TBD
""" """
__slot__ = '_graph' __slots__ = ['_graph']
def __init__(self, graph): def __init__(self, graph):
self._graph = graph self._graph = graph
...@@ -48,7 +48,7 @@ class NodeView(object): ...@@ -48,7 +48,7 @@ class NodeView(object):
return F.arange(0, len(self)) return F.arange(0, len(self))
class NodeDataView(MutableMapping): class NodeDataView(MutableMapping):
__slot__ = ['_graph', '_nodes'] __slots__ = ['_graph', '_nodes']
def __init__(self, graph, nodes): def __init__(self, graph, nodes):
self._graph = graph self._graph = graph
...@@ -79,7 +79,7 @@ class NodeDataView(MutableMapping): ...@@ -79,7 +79,7 @@ class NodeDataView(MutableMapping):
EdgeSpace = namedtuple('EdgeSpace', ['data']) EdgeSpace = namedtuple('EdgeSpace', ['data'])
class EdgeView(object): class EdgeView(object):
__slot__ = ['_graph'] __slots__ = ['_graph']
def __init__(self, graph): def __init__(self, graph):
self._graph = graph self._graph = graph
...@@ -102,7 +102,7 @@ class EdgeView(object): ...@@ -102,7 +102,7 @@ class EdgeView(object):
return self._graph.all_edges(*args, **kwargs) return self._graph.all_edges(*args, **kwargs)
class EdgeDataView(MutableMapping): class EdgeDataView(MutableMapping):
__slot__ = ['_graph', '_edges'] __slots__ = ['_graph', '_edges']
def __init__(self, graph, edges): def __init__(self, graph, edges):
self._graph = graph self._graph = graph
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment