build: Add a `__bool__` dunder to ConfigurationData
Which will be used by the `configure_file` method of the interpreter.
This commit is contained in:
parent
b7dec69b98
commit
b4a512b9f8
|
@ -2719,6 +2719,9 @@ class ConfigurationData(HoldableObject):
|
|||
def __contains__(self, value: str) -> bool:
|
||||
return value in self.values
|
||||
|
||||
def __bool__(self) -> bool:
|
||||
return bool(self.values)
|
||||
|
||||
def get(self, name: str) -> T.Tuple[T.Union[str, int, bool], T.Optional[str]]:
|
||||
return self.values[name] # (val, desc)
|
||||
|
||||
|
|
Loading…
Reference in New Issue