File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
tensorflow_datasets/core/utils Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -354,12 +354,8 @@ def incomplete_files(
354
354
355
355
def is_incomplete_file (path : epath .Path ) -> bool :
356
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
- )
357
+ regex = rf'{ re .escape (constants .INCOMPLETE_PREFIX )} [0-9a-fA-F]{{32}}\..+'
358
+ return bool (re .search (rf'^{ regex } $' , path .name ))
363
359
364
360
365
361
@contextlib .contextmanager
Original file line number Diff line number Diff line change 13
13
# See the License for the specific language governing permissions and
14
14
# limitations under the License.
15
15
16
- """Tests for py_utils."""
17
-
18
16
import collections
19
17
import pathlib
20
18
You can’t perform that action at this time.
0 commit comments