Skip to content

Commit

Permalink
fix type and flake errs
Browse files Browse the repository at this point in the history
  • Loading branch information
bradrf committed Mar 19, 2017
1 parent b3d2a2a commit 6194119
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kubey/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,13 +395,13 @@ def each_row(rows, flattener):
for row in rows:
row = list(row) # copy row to avoid stomping on original items
if flattener:
for item in row:
for i, item in enumerate(row):
if is_iterable(item):
row[i] = flattener(item)
yield row
continue
# extract out a _copy_ of iterable items and populate into "exploded" rows
iterables = {i: list(item) for i, item in enumerate(row) if is_iterable(item)}
iterables = {i: list(item) for i, item in enumerate(row) if is_iterable(item)}
exploded = row
while True:
exploding = False
Expand All @@ -414,6 +414,7 @@ def each_row(rows, flattener):
yield exploded
exploded = [''] * len(row) # reset next row with empty columns


def is_iterable(item):
# just simple ones for now
return isinstance(item, list) or isinstance(item, tuple)
Expand Down

0 comments on commit 6194119

Please sign in to comment.