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/compilers/objcpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/compilers/objcpp.py') diff --git a/mesonbuild/compilers/objcpp.py b/mesonbuild/compilers/objcpp.py index 7ee207736..3d2ed25ac 100644 --- a/mesonbuild/compilers/objcpp.py +++ b/mesonbuild/compilers/objcpp.py @@ -85,7 +85,7 @@ class ClangObjCPPCompiler(ClangCompiler, ObjCPPCompiler): '2': default_warn_args + ['-Wextra'], '3': default_warn_args + ['-Wextra', '-Wpedantic']} - def get_options(self) -> 'coredata.KeyedOptionDictType': + def get_options(self) -> 'coredata.MutableKeyedOptionDictType': opts = super().get_options() opts.update({ OptionKey('std', machine=self.for_machine, lang='cpp'): coredata.UserComboOption( -- cgit v1.2.3