Skip to content

Commit db4b9a7

Browse files
committed
fix pylint
1 parent 633a49b commit db4b9a7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/test_internals.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from onnx import helper
1717

1818
import tensorflow as tf
19-
import tf2onnx
2019
from tf2onnx import utils
2120
from tf2onnx.graph_matcher import OpTypePattern, GraphMatcher
2221
from tf2onnx.graph import GraphUtil

tf2onnx/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def save_protobuf(path, message, as_text=False):
362362

363363

364364
def is_list_or_tuple(obj):
365-
return type(obj) in [list, tuple]
365+
return isinstance(obj, (list, tuple))
366366

367367

368368
def is_unknown_dimension(dim):
@@ -405,11 +405,12 @@ def are_shapes_compatible(src, dest):
405405
try:
406406
merge_shapes(src, dest)
407407
return True
408-
except Exception:
408+
except: # pylint: disable=bare-except
409409
return False
410410

411411

412412
def are_shapes_equal(src, dest):
413+
""" Check whether 2 shapes are equal. """
413414
if src is None:
414415
return dest is None
415416
if dest is None:

0 commit comments

Comments
 (0)