Skip to content

Commit 26812e9

Browse files
tomvdwThe TensorFlow Datasets Authors
authored and
The TensorFlow Datasets Authors
committed
Internal change
PiperOrigin-RevId: 681914558
1 parent 3ccc73a commit 26812e9

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

tensorflow_datasets/core/utils/py_utils.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -354,12 +354,8 @@ def incomplete_files(
354354

355355
def is_incomplete_file(path: epath.Path) -> bool:
356356
"""Returns whether the given filename suggests that it's incomplete."""
357-
return bool(
358-
re.search(
359-
rf'^{re.escape(constants.INCOMPLETE_PREFIX)}[0-9a-fA-F]{{32}}\..+$',
360-
path.name,
361-
)
362-
)
357+
regex = rf'{re.escape(constants.INCOMPLETE_PREFIX)}[0-9a-fA-F]{{32}}\..+'
358+
return bool(re.search(rf'^{regex}$', path.name))
363359

364360

365361
@contextlib.contextmanager

tensorflow_datasets/core/utils/py_utils_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
"""Tests for py_utils."""
17-
1816
import collections
1917
import pathlib
2018

0 commit comments

Comments
 (0)