Skip to content

Commit 0a109f1

Browse files
oprypinThe TensorFlow Datasets Authors
authored andcommitted
Suppress new Pyrefly findings before upgrading to v1.2.0
PiperOrigin-RevId: 979034554
1 parent 00a6c1c commit 0a109f1

8 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎tensorflow_datasets/core/community/dataset_sources.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def to_json(self) -> utils.JsonValue:
5757
else:
5858
return { # pyrefly: ignore[bad-return]
5959
'root_path': os.fspath(self.root_path),
60-
'filenames': self.filenames,
60+
'filenames': self.filenames, # pyrefly: ignore[bad-assignment]
6161
}
6262

6363

‎tensorflow_datasets/core/dataset_builders/croissant_builder.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def _split_generators(
430430
for split in split_reference.split_record_set.data # pyrefly: ignore[not-iterable]
431431
}
432432
else:
433-
return {'default': self._generate_examples(filters=self._filters)} # pyrefly: ignore[bad-argument-type, bad-return]
433+
return {'default': self._generate_examples(filters=self._filters)} # pyrefly: ignore[bad-argument-type, bad-assignment, bad-return]
434434

435435
def _generate_examples(
436436
self,

‎tensorflow_datasets/core/folder_dataset/compute_split_utils.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def _compute_split_statistics(
233233
functools.partial(
234234
_process_shard,
235235
data_dir=filename_template.data_dir,
236-
adapter=adapter,
236+
adapter=adapter, # pyrefly: ignore[bad-argument-type]
237237
),
238238
split_files,
239239
progress_bar=True,

‎tensorflow_datasets/core/reader.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def parse_and_decode(ex: Tensor) -> TreeDict[Tensor]:
484484
# Eventually add the `tfds_id` after the decoding
485485
if read_config and read_config.add_tfds_id:
486486
parse_and_decode = functools.partial(
487-
_decode_with_id, decode_fn=parse_and_decode
487+
_decode_with_id, decode_fn=parse_and_decode # pyrefly: ignore[bad-argument-type]
488488
)
489489

490490
ds = ds.map(

‎tensorflow_datasets/object_detection/waymo_open_dataset.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ def _generate_images_and_annotations(tf_record_file):
290290

291291
camera_name = open_dataset.CameraName.Name.Name(frame_image.name)
292292
image_and_annotation["camera_" + camera_name] = { # pyrefly: ignore[unsupported-operation]
293-
"image": frame_image.image,
294-
"labels": labels,
293+
"image": frame_image.image, # pyrefly: ignore[bad-assignment]
294+
"labels": labels, # pyrefly: ignore[bad-assignment]
295295
}
296296

297297
yield image_and_annotation

‎tensorflow_datasets/rl_unplugged/rlu_locomotion/rlu_locomotion.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def get_features_dict(self):
173173
return tfds.features.FeaturesDict({
174174
'steps': tfds.features.Dataset({ # pyrefly: ignore[bad-argument-type]
175175
'observation': {
176-
'walker': walker_features,
176+
'walker': walker_features, # pyrefly: ignore[bad-assignment]
177177
},
178178
'action': action_features,
179179
'reward': np.float32,

‎tensorflow_datasets/robomimic/dataset_utils.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def _get_features(self) -> tfds.features.FeaturesDict:
303303
'episode_id': np.str_,
304304
'steps': tfds.features.Dataset({ # pyrefly: ignore[bad-argument-type]
305305
'action': tensor_feature(action_size), # pyrefly: ignore[bad-argument-type]
306-
'observation': observation,
306+
'observation': observation, # pyrefly: ignore[bad-assignment]
307307
'reward': np.float64,
308308
'is_first': np.bool_,
309309
'is_last': np.bool_,

‎tensorflow_datasets/structured/wine_quality/wine_quality.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def _info(self):
121121
description=_DESCRIPTION,
122122
features=tfds.features.FeaturesDict({ # pyrefly: ignore[bad-argument-type]
123123
"quality": np.int32,
124-
"features": features_dict,
124+
"features": features_dict, # pyrefly: ignore[bad-assignment]
125125
}),
126126
supervised_keys=("features", "quality"),
127127
homepage=_HOMEPAGE_URL,

0 commit comments

Comments
 (0)