Skip to content

Commit

Permalink
Internal change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 681914558
  • Loading branch information
tomvdw authored and The TensorFlow Datasets Authors committed Oct 3, 2024
1 parent 3ccc73a commit 26812e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 2 additions & 6 deletions tensorflow_datasets/core/utils/py_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,8 @@ def incomplete_files(

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


@contextlib.contextmanager
Expand Down
2 changes: 0 additions & 2 deletions tensorflow_datasets/core/utils/py_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Tests for py_utils."""

import collections
import pathlib

Expand Down

0 comments on commit 26812e9

Please sign in to comment.