Skip to content

Commit

Permalink
Add some extra cases to satisfy type-checking
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl committed Dec 21, 2020
1 parent 771b652 commit ca87f26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions origami.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def cells_adjacent_to_cell_in_direction(cells, cell, direction):
return [c for c in cells if cell[YMAX] == c[YMIN]]
if direction == "left":
return [c for c in cells if cell[XMIN] == c[XMAX]]
return None
raise Exception('Unsupported direction "{}"'.format(direction))


class WithSettings:
Expand Down Expand Up @@ -200,13 +200,14 @@ def resize_panes(self, orientation, mode):
max1 = YMAX
min2 = XMIN
max2 = XMAX

elif orientation == "rows":
data = rows
min1 = XMIN
max1 = XMAX
min2 = YMIN
max2 = YMAX
else:
raise Exception('Unsupported orientation "{}"'.format(orientation))

relevant_index = set()

Expand Down

0 comments on commit ca87f26

Please sign in to comment.