Skip to content

Commit

Permalink
Merge branch 'master' into fix-keyword-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
canozyurt authored Aug 17, 2022
2 parents 277896f + a067368 commit d7993da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ jobs:
- name: Test
run: |
tox -e py
tox -e py3
codecov
13 changes: 4 additions & 9 deletions maas/client/flesh/tabular.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from abc import ABCMeta, abstractmethod
import collections
from collections.abc import Iterable
import csv
import enum
from io import StringIO
Expand Down Expand Up @@ -297,9 +298,7 @@ def render(self, target, datum):
elif target is RenderTarget.json:
return datum
elif target is RenderTarget.csv:
if isinstance(datum, collections.Iterable) and not isinstance(
datum, (str, bytes)
):
if isinstance(datum, Iterable) and not isinstance(datum, (str, bytes)):
return ",".join(datum)
else:
return datum
Expand All @@ -308,9 +307,7 @@ def render(self, target, datum):
return ""
elif isinstance(datum, colorclass.Color):
return datum.value_no_colors
elif isinstance(datum, collections.Iterable) and not isinstance(
datum, (str, bytes)
):
elif isinstance(datum, Iterable) and not isinstance(datum, (str, bytes)):
return "\n".join(datum)
else:
return str(datum)
Expand All @@ -319,9 +316,7 @@ def render(self, target, datum):
return ""
elif isinstance(datum, colorclass.Color):
return datum
elif isinstance(datum, collections.Iterable) and not isinstance(
datum, (str, bytes)
):
elif isinstance(datum, Iterable) and not isinstance(datum, (str, bytes)):
return "\n".join(datum)
else:
return str(datum)
Expand Down

0 comments on commit d7993da

Please sign in to comment.