Skip to content

Commit ca87f26

Browse files
committed
Add some extra cases to satisfy type-checking
1 parent 771b652 commit ca87f26

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

origami.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def cells_adjacent_to_cell_in_direction(cells, cell, direction):
5959
return [c for c in cells if cell[YMAX] == c[YMIN]]
6060
if direction == "left":
6161
return [c for c in cells if cell[XMIN] == c[XMAX]]
62-
return None
62+
raise Exception('Unsupported direction "{}"'.format(direction))
6363

6464

6565
class WithSettings:
@@ -200,13 +200,14 @@ def resize_panes(self, orientation, mode):
200200
max1 = YMAX
201201
min2 = XMIN
202202
max2 = XMAX
203-
204203
elif orientation == "rows":
205204
data = rows
206205
min1 = XMIN
207206
max1 = XMAX
208207
min2 = YMIN
209208
max2 = YMAX
209+
else:
210+
raise Exception('Unsupported orientation "{}"'.format(orientation))
210211

211212
relevant_index = set()
212213

0 commit comments

Comments
 (0)