refactor: Change add() to receive url and depth instead of import_str and import_path

This commit is contained in:
Cristian 2020-07-08 08:17:47 -05:00
parent c1d8a74e4f
commit f12bfeb322
3 changed files with 15 additions and 30 deletions

View file

@ -68,20 +68,12 @@ def main(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional
import_path = command.import_path
add(
import_str=import_path,
import_path=None,
url=import_path,
depth=command.depth,
update_all=command.update_all,
index_only=command.index_only,
out_dir=pwd or OUTPUT_DIR,
)
if command.depth == 1:
add(
import_str=None,
import_path=import_path,
update_all=command.update_all,
index_only=command.index_only,
out_dir=pwd or OUTPUT_DIR,
)
if __name__ == '__main__':