Skip to content

Commit

Permalink
Merge pull request #42 from lucc/fix-quantify-code-issues
Browse files Browse the repository at this point in the history
Join consecutive ifs
  • Loading branch information
pazz committed Oct 1, 2017
2 parents 2c94f32 + 15acd60 commit 207563a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions urwidtrees/nested.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,11 @@ def _last_child_position(self, tree, pos, outmost_only=False):

# get last child in the outmost tree if we do not drop "covered"
# parts and the position path points to a root of the subtree.
if self._interpret_covered:
if entry.parent_position(pos[1]) is None:
# return the last child of the outmost tree
outerchild = tree.last_child_position(pos[0])
if outerchild is not None:
childpos = outerchild,
if self._interpret_covered and entry.parent_position(pos[1]) is None:
# return the last child of the outmost tree
outerchild = tree.last_child_position(pos[0])
if outerchild is not None:
childpos = outerchild,

# continue as if we have not found anything yet
if childpos is None:
Expand Down

0 comments on commit 207563a

Please sign in to comment.