1
0
Fork 0
mirror of synced 2024-06-28 19:10:33 +12:00

small type fixes

This commit is contained in:
Nick Sweeting 2020-10-30 04:50:08 -04:00
parent 319179bb71
commit cac3912439
2 changed files with 10 additions and 8 deletions

View file

@ -5,7 +5,7 @@ import os
import sys import sys
import argparse import argparse
from typing import Optional, Dict, List, IO from typing import Optional, Dict, List, IO, Union
from pathlib import Path from pathlib import Path
from ..config import OUTPUT_DIR from ..config import OUTPUT_DIR
@ -17,7 +17,7 @@ CLI_DIR = Path(__file__).resolve().parent
# these common commands will appear sorted before any others for ease-of-use # these common commands will appear sorted before any others for ease-of-use
meta_cmds = ('help', 'version') meta_cmds = ('help', 'version')
main_cmds = ('init', 'info', 'config') main_cmds = ('init', 'info', 'config')
archive_cmds = ('add', 'remove', 'update', 'list') archive_cmds = ('add', 'remove', 'update', 'list', 'status')
display_first = (*meta_cmds, *main_cmds, *archive_cmds) display_first = (*meta_cmds, *main_cmds, *archive_cmds)
@ -56,7 +56,7 @@ def list_subcommands() -> Dict[str, str]:
def run_subcommand(subcommand: str, def run_subcommand(subcommand: str,
subcommand_args: List[str]=None, subcommand_args: List[str]=None,
stdin: Optional[IO]=None, stdin: Optional[IO]=None,
pwd: Optional[str]=None) -> None: pwd: Union[Path, str, None]=None) -> None:
"""Run a given ArchiveBox subcommand with the given list of args""" """Run a given ArchiveBox subcommand with the given list of args"""
module = import_module('.archivebox_{}'.format(subcommand), __package__) module = import_module('.archivebox_{}'.format(subcommand), __package__)

View file

@ -26,13 +26,15 @@ from .stubs import (
) )
# precedence order for config: # precedence order for config:
# 1. cli args # 1. cli args (e.g. )
# 2. shell environment vars # 2. shell environment vars (env USE_COLOR=False archivebox add '...')
# 3. config file # 3. config file (echo "SAVE_FAVICON=False" >> ArchiveBox.conf)
# 4. defaults # 4. defaults (defined below in Python)
# env USE_COLO=false archivebox add '...' #
# env SHOW_PROGRESS=1 archivebox add '...' # env SHOW_PROGRESS=1 archivebox add '...'
# archivebox config --set TIMEOUT=600
#
# ****************************************************************************** # ******************************************************************************
# Documentation: https://github.com/pirate/ArchiveBox/wiki/Configuration # Documentation: https://github.com/pirate/ArchiveBox/wiki/Configuration