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:
Martí Bolívar 2021-01-11 17:07:18 -08:00 committed by Marti Bolivar
parent 2ddfaca377
commit 9228057446
1 changed files with 3 additions and 3 deletions

View File

@ -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,