Просмотр исходного кода

fix: remove the default value of output option in tools/cli.py and tools/cli_dev.py (#494)

Co-authored-by: icecraft <xurui1@pjlab.org.cn>
icecraft 1 год назад
Родитель
Сommit
f0a8886c7b
2 измененных файлов с 6 добавлено и 8 удалено
  1. 5 5
      magic_pdf/tools/cli.py
  2. 1 3
      magic_pdf/tools/cli_dev.py

+ 5 - 5
magic_pdf/tools/cli.py

@@ -31,7 +31,6 @@ from magic_pdf.tools.common import do_parse, parse_pdf_methods
     type=click.Path(),
     required=True,
     help='output local directory',
-    default='',
 )
 @click.option(
     '-m',
@@ -46,11 +45,12 @@ without method specified, auto will be used by default.""",
     default='auto',
 )
 @click.option(
-    "-d",
-    "--debug",
-    "debug_able",
+    '-d',
+    '--debug',
+    'debug_able',
     type=bool,
-    help="Enables detailed debugging information during the execution of the CLI commands.",
+    help=('Enables detailed debugging information during'
+          'the execution of the CLI commands.', ),
     default=False,
 )
 def cli(path, output_dir, method, debug_able):

+ 1 - 3
magic_pdf/tools/cli_dev.py

@@ -64,7 +64,6 @@ def cli():
     type=click.Path(),
     required=True,
     help='输出到本地目录',
-    default='',
 )
 def jsonl(jsonl, method, output_dir):
     model_config.__use_inside_model__ = False
@@ -114,8 +113,7 @@ def jsonl(jsonl, method, output_dir):
               'output_dir',
               type=click.Path(),
               required=True,
-              help='本地输出目录',
-              default='')
+              help='本地输出目录')
 @click.option(
     '-m',
     '--method',