diff --git a/tensorflow_datasets/core/utils/shard_utils.py b/tensorflow_datasets/core/utils/shard_utils.py index 3708df47745..429405335a7 100644 --- a/tensorflow_datasets/core/utils/shard_utils.py +++ b/tensorflow_datasets/core/utils/shard_utils.py @@ -20,9 +20,10 @@ - tfrecord_writer, to read sharded bucket files (temp files), based on final sharding needs. """ + from __future__ import annotations -from collections.abc import Sequence +from collections.abc import Iterable, Sequence import dataclasses import math import os diff --git a/tensorflow_datasets/core/utils/shard_utils_test.py b/tensorflow_datasets/core/utils/shard_utils_test.py index 149ec771f02..1882b178e37 100644 --- a/tensorflow_datasets/core/utils/shard_utils_test.py +++ b/tensorflow_datasets/core/utils/shard_utils_test.py @@ -240,6 +240,5 @@ def test_incorrect_values(self, filename, skip, take, examples_in_shard, msg): with self.assertRaisesRegex(ValueError, expected_regex=msg): shard_utils.FileInstruction(filename, skip, take, examples_in_shard) - if __name__ == '__main__': testing.test_main()