mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 07:04:27 -04:00
fix: Avoid mutable default input argument
This commit is contained in:
parent
44eede96e5
commit
db523c9d82
1 changed files with 4 additions and 1 deletions
|
@ -526,11 +526,14 @@ def add(urls: Union[str, List[str]],
|
||||||
overwrite: bool=False,
|
overwrite: bool=False,
|
||||||
init: bool=False,
|
init: bool=False,
|
||||||
out_dir: Path=OUTPUT_DIR,
|
out_dir: Path=OUTPUT_DIR,
|
||||||
extractors: list=[]) -> List[Link]:
|
extractors: list=None) -> List[Link]:
|
||||||
"""Add a new URL or list of URLs to your archive"""
|
"""Add a new URL or list of URLs to your archive"""
|
||||||
|
|
||||||
assert depth in (0, 1), 'Depth must be 0 or 1 (depth >1 is not supported yet)'
|
assert depth in (0, 1), 'Depth must be 0 or 1 (depth >1 is not supported yet)'
|
||||||
|
|
||||||
|
if extractors is None:
|
||||||
|
extractors = []
|
||||||
|
|
||||||
if init:
|
if init:
|
||||||
run_subcommand('init', stdin=None, pwd=out_dir)
|
run_subcommand('init', stdin=None, pwd=out_dir)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue