diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98a7de1..f65d600 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,5 +53,5 @@ jobs: - name: Test run: | - tox -e py + tox -e py3 codecov diff --git a/maas/client/flesh/tabular.py b/maas/client/flesh/tabular.py index 91f202c..a59c097 100644 --- a/maas/client/flesh/tabular.py +++ b/maas/client/flesh/tabular.py @@ -4,6 +4,7 @@ from abc import ABCMeta, abstractmethod import collections +from collections.abc import Iterable import csv import enum from io import StringIO @@ -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 @@ -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) @@ -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)