Skip to content

Commit

Permalink
fixup! fixup! fixup! Added import job documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
juanpardo committed Oct 5, 2023
1 parent a62a719 commit 561a83a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion croud/clusters/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ def import_jobs_list(args: Namespace) -> None:
keys=["id", "cluster_id", "status", "type", "destination"],
output_fmt=get_output_format(args),
transforms={
"source": lambda field: field.get(field.get("type")),
"destination": lambda field: field.get("table"),
},
)
Expand Down
5 changes: 0 additions & 5 deletions croud/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,13 @@ def format_rows(self, rows: Union[List[JsonDict], JsonDict]) -> str:
# | bar | 2 |
# +-----+-----+

# all_keys = [row.keys() for row in rows]
# all_keys = list(itertools.chain(*all_keys))
# all_keys_set = set(all_keys)
# all_keys = [x for x in all_keys if x not in all_keys_set]
all_keys = list(map(str, rows[0].keys())) if len(rows) else self.keys
if all_keys:
for row in rows:
for key in list(map(str, row.keys())):
if key not in all_keys:
all_keys.append(key)

# headers = set(itertools.chain(*all_keys)) if len(rows) else self.keys
headers = all_keys if len(rows) else self.keys

if headers is None:
Expand Down

0 comments on commit 561a83a

Please sign in to comment.