Skip to content

Commit 80c4c48

Browse files
committed
Making changes suggested by pylint
1 parent 8568bfe commit 80c4c48

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tensorflow_datasets/image_classification/cats_vs_dogs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
)
4444
_NUM_CORRUPT_IMAGES = 1738
4545
_DESCRIPTION = (
46-
"A large set of images of cats and dogs. "
47-
"There are %d corrupted images that are dropped." % _NUM_CORRUPT_IMAGES
46+
f"A large set of images of cats and dogs. "
47+
f"There are {_NUM_CORRUPT_IMAGES} corrupted images that are dropped."
4848
)
4949

5050
_NAME_RE = re.compile(r"^PetImages[\\/](Cat|Dog)[\\/]\d+\.jpg$")
@@ -127,7 +127,7 @@ def _generate_examples(self, archive):
127127

128128
if num_skipped != _NUM_CORRUPT_IMAGES:
129129
raise ValueError(
130-
"Expected %d corrupt images, but found %d"
131-
% (_NUM_CORRUPT_IMAGES, num_skipped)
130+
f"Expected {_NUM_CORRUPT_IMAGES} corrupt images, but found"
131+
f" {num_skipped}."
132132
)
133133
logging.warning("%d images were corrupted and were skipped", num_skipped)

0 commit comments

Comments
 (0)