File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
tensorflow_datasets/scripts/cli Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,11 @@ def _parse_flags(argv: List[str]) -> argparse.Namespace:
55
55
action = 'version' ,
56
56
version = 'TensorFlow Datasets: ' + tfds .__version__ ,
57
57
)
58
+ parser .add_argument (
59
+ '--dry_run' ,
60
+ action = 'store_true' ,
61
+ help = 'If True, print the parsed arguments.' ,
62
+ )
58
63
parser .set_defaults (subparser_fn = lambda _ : parser .print_help ())
59
64
# Register sub-commands
60
65
subparser = parser .add_subparsers (title = 'command' )
@@ -96,8 +101,11 @@ def main(args: argparse.Namespace) -> None:
96
101
new_stream = tfds .core .utils .tqdm_utils .TqdmStream ()
97
102
python_handler .setStream (new_stream )
98
103
99
- # Launch the subcommand defined in the subparser (or default to print help)
100
- args .subparser_fn (args )
104
+ if args .dry_run :
105
+ print (args )
106
+ else :
107
+ # Launch the subcommand defined in the subparser (or default to print help)
108
+ args .subparser_fn (args )
101
109
102
110
103
111
def launch_cli () -> None :
You can’t perform that action at this time.
0 commit comments