mirror of
https://github.com/mesonbuild/meson.git
synced 2026-11-06 05:16:42 +00:00
hotdoc: move None check to caller of set_arg_value
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
1 parent
11b0e79dca
commit
81c998f7d7
1 file changed
+3
-5
@@ -99,15 +99,13 @@ class HotdocTargetBuilder:
|
||||
argname = option.strip("-").replace("-", "_")
|
||||
|
||||
value = self.kwargs.pop(argname) # type: ignore[misc]
|
||||
if value is not None and value_processor:
|
||||
if value is None:
|
||||
return
|
||||
if value_processor:
|
||||
value = value_processor(value)
|
||||
|
||||
self.set_arg_value(option, value)
|
||||
|
||||
def set_arg_value(self, option: str, value: TYPE_var) -> None:
|
||||
if value is None:
|
||||
return
|
||||
|
||||
if isinstance(value, bool):
|
||||
if value:
|
||||
self.cmd.append(option)
|
||||
|
||||
Reference in new issue
Block a user