pmb.helpers.run: Add some type hints (MR 2262)
This commit is contained in:
parent
85f777073e
commit
5577495dc5
|
@ -1,10 +1,12 @@
|
||||||
# Copyright 2023 Oliver Smith
|
# Copyright 2023 Oliver Smith
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
import pmb.helpers.run_core
|
import pmb.helpers.run_core
|
||||||
|
from argparse import Namespace
|
||||||
|
from typing import Any, Dict, List, Optional
|
||||||
|
|
||||||
|
|
||||||
def user(args, cmd, working_dir=None, output="log", output_return=False,
|
def user(args: Namespace, cmd: List[str], working_dir: Optional[str]=None, output: str="log", output_return: bool=False,
|
||||||
check=None, env={}, sudo=False):
|
check: Optional[bool]=None, env: Dict[Any, Any]={}, sudo: bool=False) -> str:
|
||||||
"""
|
"""
|
||||||
Run a command on the host system as user.
|
Run a command on the host system as user.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue