From 06d12064d0ccb1477fadf1d62492a493fb2fb947 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 12 Oct 2021 21:45:24 -0400 Subject: OptionOverrideProxy: Make it immutable to avoid copies It is always used as an immutable view so there is no point in doing copies. However, mypy insist it must implement the same APIs as Dict[OptionKey, UserOption[Any]] so keep faking it. --- mesonbuild/optinterpreter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/optinterpreter.py') diff --git a/mesonbuild/optinterpreter.py b/mesonbuild/optinterpreter.py index 46a4445..eeb7cf8 100644 --- a/mesonbuild/optinterpreter.py +++ b/mesonbuild/optinterpreter.py @@ -52,7 +52,7 @@ optname_regex = re.compile('[^a-zA-Z0-9_-]') class OptionInterpreter: def __init__(self, subproject: 'SubProject') -> None: - self.options: 'coredata.KeyedOptionDictType' = {} + self.options: 'coredata.MutableKeyedOptionDictType' = {} self.subproject = subproject self.option_types = {'string': self.string_parser, 'boolean': self.boolean_parser, -- cgit v1.1