mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 11:29:46 +03:00
pmb.parse.arguments: Type hint and remove unused arguments from add_kernel_arg() (MR 2514)
Presumably, args and kwargs are just here to retain compatibility with add_argument() from argparse.ArgumentParser, but they aren't actually used and consequently only give the illusion of compatibility. Just remove them to simplify the function signature.
This commit is contained in:
parent
7bca381dea
commit
3ee75e61a5
1 changed files with 3 additions and 1 deletions
|
@ -820,7 +820,9 @@ def add_packages_arg(subparser, name="packages", *args, **kwargs):
|
|||
arg.completer = package_completer # type: ignore[attr-defined]
|
||||
|
||||
|
||||
def add_kernel_arg(subparser, name="package", nargs="?", *args, **kwargs):
|
||||
def add_kernel_arg(
|
||||
subparser: argparse.ArgumentParser, name: str = "package", nargs: int | str = "?"
|
||||
) -> None:
|
||||
arg = subparser.add_argument(
|
||||
name, nargs=nargs, help="kernel package (e.g. linux-postmarketos-allwinner)"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue