Skip to content

Commit d4cf9e6

Browse files
fineguyThe TensorFlow Datasets Authors
authored andcommitted
Fix type annotations for croissant CLI args.
PiperOrigin-RevId: 644663702
1 parent 7d88044 commit d4cf9e6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tensorflow_datasets/scripts/cli/croissant.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ class CmdArgs(simple_parsing.helpers.FrozenSerializable):
6363
overwrite_version: Semantic version of the dataset to be set.
6464
"""
6565

66-
jsonld: epath.PathLike
67-
data_dir: epath.PathLike
66+
jsonld: epath.Path
67+
data_dir: epath.Path
6868
# Need to override the default use of `Enum.name` for choice options.
6969
file_format: str = simple_parsing.choice(
7070
*(file_format.value for file_format in file_adapters.FileFormat),
@@ -78,8 +78,8 @@ class CmdArgs(simple_parsing.helpers.FrozenSerializable):
7878
nargs='?',
7979
)
8080
mapping: str | None = None
81-
download_dir: epath.PathLike | None = None
82-
publish_dir: epath.PathLike | None = None
81+
download_dir: epath.Path | None = None
82+
publish_dir: epath.Path | None = None
8383
skip_if_published: bool = False
8484
overwrite: bool = False
8585
overwrite_version: str | None = None
@@ -130,8 +130,8 @@ def prepare_croissant_builder(args: CmdArgs) -> None:
130130
cli_utils.download_and_prepare(
131131
builder=builder,
132132
download_config=None,
133-
download_dir=epath.Path(args.download_dir) if args.download_dir else None,
134-
publish_dir=epath.Path(args.publish_dir) if args.publish_dir else None,
133+
download_dir=args.download_dir,
134+
publish_dir=args.publish_dir,
135135
skip_if_published=args.skip_if_published,
136136
overwrite=args.overwrite,
137137
)

0 commit comments

Comments
 (0)