Skip to content

Commit 0605ba6

Browse files
author
Scenic Authors
committed
...cleanup and resolve pytype issues with assertions...
PiperOrigin-RevId: 689850257
1 parent 0340172 commit 0605ba6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scenic/dataset_lib/tests/test_dataset_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def make_fake_batches():
7474
self.assertEqual(outputs['batch_mask'].shape,
7575
(desired_bs,) + batch_mask_shape)
7676
if pre_padding_mask:
77+
assert complete_batch_mask is not None
7778
self.assertEqual(outputs['batch_mask'].sum(), complete_batch_mask.sum())
7879
else:
7980
self.assertEqual(outputs['batch_mask'].sum(),
@@ -104,6 +105,7 @@ def make_fake_batches():
104105
self.assertEqual(outputs['batch_mask'].shape,
105106
(desired_bs,) + batch_mask_shape)
106107
if pre_padding_mask:
108+
assert complete_batch_mask is not None
107109
self.assertEqual(outputs['batch_mask'].sum(), complete_batch_mask.sum())
108110
else:
109111
self.assertEqual(outputs['batch_mask'].sum(),

0 commit comments

Comments
 (0)