configuration: Update arguments type for delete_config
The deprecated delete_config function supports passing a list of ConfigFile enumerations. Update argument typing accordingly. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
292c43c5b8
commit
0536d7a3c4
|
@ -40,7 +40,7 @@ import os
|
||||||
from pathlib import PureWindowsPath, Path
|
from pathlib import PureWindowsPath, Path
|
||||||
import platform
|
import platform
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Any, Dict, Iterable, List, Optional, Tuple, TYPE_CHECKING
|
from typing import Any, Dict, Iterable, List, Optional, Tuple, TYPE_CHECKING, Union
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from west.util import WEST_DIR, west_dir, WestNotFound, PathType
|
from west.util import WEST_DIR, west_dir, WestNotFound, PathType
|
||||||
|
@ -491,7 +491,7 @@ def update_config(section: str, key: str, value: Any,
|
||||||
config.write(f)
|
config.write(f)
|
||||||
|
|
||||||
def delete_config(section: str, key: str,
|
def delete_config(section: str, key: str,
|
||||||
configfile: Optional[ConfigFile] = None,
|
configfile: Union[Optional[ConfigFile], List[ConfigFile]] = None,
|
||||||
topdir: Optional[PathType] = None) -> None:
|
topdir: Optional[PathType] = None) -> None:
|
||||||
'''Delete the option section.key from the given file or files.
|
'''Delete the option section.key from the given file or files.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue