Skip to content

Commit 74f41c3

Browse files
committed
dependencies: Allow None in dep_identifier
Because we're going to have None once we move to more typed_kwargs
1 parent 69d6877 commit 74f41c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mesonbuild/dependencies/detect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from ..environment import Environment
1616
from .factory import DependencyFactory, WrappedFactoryFunc, DependencyGenerator
1717

18-
TV_DepIDEntry = T.Union[str, bool, int, T.Tuple[str, ...]]
18+
TV_DepIDEntry = T.Union[str, bool, int, None, T.Tuple[str, ...]]
1919
TV_DepID = T.Tuple[T.Tuple[str, TV_DepIDEntry], ...]
2020
PackageTypes = T.Union[T.Type[ExternalDependency], DependencyFactory, WrappedFactoryFunc]
2121

@@ -62,7 +62,7 @@ def get_dep_identifier(name: str, kwargs: T.Dict[str, T.Any]) -> 'TV_DepID':
6262
assert isinstance(i, str), i
6363
value = tuple(frozenset(listify(value)))
6464
else:
65-
assert isinstance(value, (str, bool, int)), value
65+
assert value is None or isinstance(value, (str, bool, int)), value
6666
identifier = (*identifier, (key, value),)
6767
return identifier
6868

0 commit comments

Comments
 (0)