Skip to content

Commit

Permalink
configuration: Update arguments type for delete_config
Browse files Browse the repository at this point in the history
The deprecated delete_config function supports passing a list
of ConfigFile enumerations. Update argument typing accordingly.

Signed-off-by: Pieter De Gendt <[email protected]>
  • Loading branch information
pdgendt committed Oct 26, 2024
1 parent 90033b9 commit 5b00550
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/west/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from pathlib import PureWindowsPath, Path
import platform
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

from west.util import WEST_DIR, west_dir, WestNotFound, PathType
Expand Down Expand Up @@ -491,7 +491,7 @@ def update_config(section: str, key: str, value: Any,
config.write(f)

def delete_config(section: str, key: str,
configfile: Optional[ConfigFile] = None,
configfile: Union[Optional[ConfigFile], List[ConfigFile]] = None,
topdir: Optional[PathType] = None) -> None:
'''Delete the option section.key from the given file or files.
Expand Down

0 comments on commit 5b00550

Please sign in to comment.