allow to specify list of package dependencies in rebuild target

also replace nargs= by action=append in non-positional args. It is
required to make arguments parsing result more predictable and
consistent
This commit is contained in:
2021-04-18 13:34:27 +03:00
parent b0d1f3c091
commit 5c297d1c67
3 changed files with 7 additions and 5 deletions

View File

@ -8,7 +8,7 @@ from ahriman.models.package import Package
def _default_args(args: argparse.Namespace) -> argparse.Namespace:
args.depends_on = None
args.depends_on = []
return args
@ -33,7 +33,7 @@ def test_run_filter(args: argparse.Namespace, configuration: Configuration,
must run command with depends filter
"""
args = _default_args(args)
args.depends_on = "python-aur"
args.depends_on = ["python-aur"]
mocker.patch("pathlib.Path.mkdir")
mocker.patch("ahriman.core.repository.repository.Repository.packages",
return_value=[package_ahriman, package_python_schedule])