Skip to content

Commit

Permalink
fix types (#2299)
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Simonovsky <[email protected]>
Co-authored-by: Martin Simonovsky <[email protected]>
  • Loading branch information
mys007 and Martin Simonovsky authored Jan 29, 2024
1 parent baf5ad0 commit 9538da8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tf2onnx/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ def make_onnx_node_with_attr(op_type: str, inputs: Sequence[str], outputs: Seque
valid_attrs = {}
if kwargs:
for key, value in sorted(kwargs.items()):
if not isinstance(value, bytes) and \
isinstance(value, collections.abc.Sequence) and len(list(value)) == 0:
if not isinstance(value, (bytes, str)) and \
isinstance(value, collections.abc.Iterable) and len(list(value)) == 0:
attr_empty_lists[key] = value
else:
valid_attrs[key] = value
Expand Down

0 comments on commit 9538da8

Please sign in to comment.