aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter/compiler.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-08-28 11:58:03 -0700
committerGitHub <noreply@github.com>2021-08-28 11:58:03 -0700
commitf407ad5d28f24755a19bb95495141db0ad9fe740 (patch)
tree73f7eed2e85181d82058bfd19a2689756577c13e /mesonbuild/interpreter/compiler.py
parent64ea8dce7a26f06046c98bc7b3e30f06bf8ca98f (diff)
parentb4bc8464e69c353fc0792054ab4209d4e8b5a096 (diff)
downloadmeson-f407ad5d28f24755a19bb95495141db0ad9fe740.zip
meson-f407ad5d28f24755a19bb95495141db0ad9fe740.tar.gz
meson-f407ad5d28f24755a19bb95495141db0ad9fe740.tar.bz2
Merge pull request #9183 from dcbaker/submit/validate-default
Validate default values for KwargInfo
Diffstat (limited to 'mesonbuild/interpreter/compiler.py')
-rw-r--r--mesonbuild/interpreter/compiler.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/interpreter/compiler.py b/mesonbuild/interpreter/compiler.py
index 53c3ce0..54f4bee 100644
--- a/mesonbuild/interpreter/compiler.py
+++ b/mesonbuild/interpreter/compiler.py
@@ -17,7 +17,7 @@ from ..interpreterbase import (ObjectHolder, noPosargs, noKwargs,
InterpreterException)
from ..interpreterbase.decorators import ContainerTypeInfo, typed_kwargs, KwargInfo, typed_pos_args
from .interpreterobjects import (extract_required_kwarg, extract_search_dirs)
-from .type_checking import REQUIRED_KW, in_set_validator
+from .type_checking import REQUIRED_KW, in_set_validator, NoneType
if T.TYPE_CHECKING:
from ..interpreter import Interpreter
@@ -387,9 +387,9 @@ class CompilerHolder(ObjectHolder['Compiler']):
@typed_pos_args('compiler.compute_int', str)
@typed_kwargs(
'compiler.compute_int',
- KwargInfo('low', (int, None)),
- KwargInfo('high', (int, None)),
- KwargInfo('guess', (int, None)),
+ KwargInfo('low', (int, NoneType)),
+ KwargInfo('high', (int, NoneType)),
+ KwargInfo('guess', (int, NoneType)),
*_COMMON_KWS,
)
def compute_int_method(self, args: T.Tuple[str], kwargs: 'CompupteIntKW') -> int:
@@ -556,7 +556,7 @@ class CompilerHolder(ObjectHolder['Compiler']):
'compiler.find_library',
KwargInfo('required', (bool, coredata.UserFeatureOption), default=True),
KwargInfo('has_headers', ContainerTypeInfo(list, str), listify=True, default=[], since='0.50.0'),
- KwargInfo('static', (bool, None), since='0.51.0'),
+ KwargInfo('static', (bool, NoneType), since='0.51.0'),
KwargInfo('disabler', bool, default=False, since='0.49.0'),
KwargInfo('dirs', ContainerTypeInfo(list, str), listify=True, default=[]),
*[k.evolve(name=f'header_{k.name}') for k in _HEADER_KWS]