Skip to content

Commit

Permalink
馃悰 return self for edge methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ehne committed Sep 27, 2021
1 parent c402958 commit 886c363
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pynode_next/edge.py
Expand Up @@ -49,6 +49,7 @@ def target(self, source=None):
def set_attribute(self, name, value):
"""Sets an attribute of the edge"""
self._attrs[name] = value
return self

def attribute(self, name):
"""Gets an attribute of the edge"""
Expand Down Expand Up @@ -176,6 +177,7 @@ def traverse(self, initial_node=None, color=Color.RED, keep_path=True):
else:
# stores the changed color
self._color = color
return self

def __str__(self):
return f"({self._source}, {self._target})"
Expand Down

0 comments on commit 886c363

Please sign in to comment.