manifest: fix SubmodulesType
The type's values are either lists of Submodule objects, or bools. Wrapping this in Optional means that None is a valid value, which isn't ideal, as it forces users to check for that type. The value False is just as good in this case, so let's just use that. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
2ddfaca377
commit
9228057446
|
@ -92,8 +92,8 @@ class Submodule(NamedTuple):
|
|||
name: str
|
||||
path: str
|
||||
|
||||
# Submodules might be the list of values, bool or None.
|
||||
SubmodulesType = Optional[Union[List[Submodule], bool]]
|
||||
# Submodules may be a list of values or a bool.
|
||||
SubmodulesType = Union[List[Submodule], bool]
|
||||
|
||||
# Manifest locating, parsing, loading, etc.
|
||||
|
||||
|
@ -598,7 +598,7 @@ class Project:
|
|||
def __init__(self, name: str, url: str,
|
||||
revision: Optional[str] = None,
|
||||
path: Optional[PathType] = None,
|
||||
submodules: Optional[SubmodulesType] = None,
|
||||
submodules: SubmodulesType = False,
|
||||
clone_depth: Optional[int] = None,
|
||||
west_commands: Optional[WestCommandsType] = None,
|
||||
topdir: Optional[PathType] = None,
|
||||
|
|
Loading…
Reference in New Issue