Use isinstance(object, (types)) pattern instead of type(object) == types.Type
[htsworkflow.git] / htsworkflow / pipelines / summary.py
index c1108a2e83abf25661bcf779f44bd87e3c7cca74..8c3ec7747b551e011fae474ef257f9a276a7ba69 100644 (file)
@@ -6,7 +6,6 @@ from __future__ import print_function, unicode_literals
 import os
 import logging
 import re
-import types
 from pprint import pprint
 
 from lxml import html
@@ -287,8 +286,7 @@ class LaneResultSummary(object):
             value = getattr(self, variable_name)
             if value is None:
                 continue
-            # it looks like a sequence
-            elif type(value) in (types.TupleType, types.ListType):
+            elif isinstance(value, (tuple, list)):
                 element = make_mean_range_element(
                   lane_result,
                   tag,