We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ccc73a commit 26812e9Copy full SHA for 26812e9
2 files changed
tensorflow_datasets/core/utils/py_utils.py
@@ -354,12 +354,8 @@ def incomplete_files(
354
355
def is_incomplete_file(path: epath.Path) -> bool:
356
"""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
+ regex = rf'{re.escape(constants.INCOMPLETE_PREFIX)}[0-9a-fA-F]{{32}}\..+'
+ return bool(re.search(rf'^{regex}$', path.name))
363
364
365
@contextlib.contextmanager
tensorflow_datasets/core/utils/py_utils_test.py
@@ -13,8 +13,6 @@
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
15
16
-"""Tests for py_utils."""
17
-
18
import collections
19
import pathlib
20
0 commit comments