aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/python.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-08-27 11:47:12 -0700
committerDylan Baker <dylan@pnwbakers.com>2021-08-27 14:54:29 -0700
commit11fbaf29d8444ca35269a938e46327dfbe7820bd (patch)
tree135656b3fb49b4d185655f43fe1de62580788fee /mesonbuild/modules/python.py
parent3f5d80b8bbd40d166657c1c7f856fe7777623df1 (diff)
downloadmeson-11fbaf29d8444ca35269a938e46327dfbe7820bd.zip
meson-11fbaf29d8444ca35269a938e46327dfbe7820bd.tar.gz
meson-11fbaf29d8444ca35269a938e46327dfbe7820bd.tar.bz2
interpreter: fix cases of `KwargInfo(..., T, default=None)`
The correct way to mark these is `KwargInfo(..., (T, type(None)))`. There's also a few cases of `(T, None)` which is invalid, as `None` isn't a type
Diffstat (limited to 'mesonbuild/modules/python.py')
-rw-r--r--mesonbuild/modules/python.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index bb6b9ab..d03f951 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -28,6 +28,7 @@ from ..dependencies import DependencyMethods, PkgConfigDependency, NotFoundDepen
from ..dependencies.base import process_method_kw
from ..environment import detect_cpu_family
from ..interpreter import ExternalProgramHolder, extract_required_kwarg, permitted_dependency_kwargs
+from ..interpreter.type_checking import NoneType
from ..interpreterbase import (
noPosargs, noKwargs, permittedKwargs, ContainerTypeInfo,
InvalidArguments, typed_pos_args, typed_kwargs, KwargInfo,
@@ -484,7 +485,7 @@ class PythonInstallation(ExternalProgramHolder):
@typed_pos_args('install_data', varargs=(str, mesonlib.File))
@typed_kwargs('python_installation.install_sources', _PURE_KW, _SUBDIR_KW,
- KwargInfo('install_tag', str, since='0.60.0'))
+ KwargInfo('install_tag', (str, NoneType), since='0.60.0'))
def install_sources_method(self, args: T.Tuple[T.List[T.Union[str, mesonlib.File]]],
kwargs: 'PyInstallKw') -> 'Data':
tag = kwargs['install_tag'] or 'runtime'