Skip to content

Commit

Permalink
Use inverted() instead of invert() in captured_path
Browse files Browse the repository at this point in the history
Thanks @egoltsman
Fixes #18.
  • Loading branch information
Giorgio Gonnella committed Oct 30, 2020
1 parent 29063e7 commit f150d9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gfapy/line/group/ordered/captured_path.py
Expand Up @@ -87,7 +87,7 @@ def _push_first_edge_on_se_path(self, path, items):
oss = [oriented_edge.line.sid1, oriented_edge.line.sid2]
if oriented_edge.orient == "-":
for i in range(len(oss)):
oss[i].invert()
oss[i] = oss[i].inverted()
if len(items) > 1:
nextitem = items[1]
if isinstance(nextitem.line, gfapy.line.segment.GFA2):
Expand All @@ -99,7 +99,7 @@ def _push_first_edge_on_se_path(self, path, items):
oss_of_next = [nextitem.line.sid1, nextitem.line.sid2]
if oriented_edge.orient == "-":
for i in range(len(oss_of_next)):
oss_of_next[i].invert()
oss_of_next[i] = oss_of_next[i].inverted()
if oss[0] in oss_of_next:
oss.reverse()
# if oss_of_next have no element in common with oss an error will be
Expand Down Expand Up @@ -129,7 +129,7 @@ def _push_nonfirst_edge_on_se_path(self, path, oriented_edge):
possible_prev = [oriented_edge.line.sid1, oriented_edge.line.sid2]
if oriented_edge.orient == "-":
for i, v in enumerate(possible_prev):
possible_prev[i].invert()
possible_prev[i] = possible_prev[i].inverted()
if prev_os == possible_prev[0]:
path.append(possible_prev[1])
elif prev_os == possible_prev[1]:
Expand Down

3 comments on commit f150d9e

@egoltsman
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
Just a head up, it looks like the PyPi repostitory hasn't been updated with this commit as I still get the same issue with the .inver() calls.

@ggonnella
Copy link
Owner

@ggonnella ggonnella commented on f150d9e Jun 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the version in PyPi now. Thank you for pointing this out.

@egoltsman
Copy link

@egoltsman egoltsman commented on f150d9e Jun 4, 2021 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.