From 81f5cee2188dcbd6b92e6b570c2c98961588a17a Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 30 Aug 2021 17:58:16 -0700 Subject: [PATCH] interpreter: rename EnvironmentVariablesObject -> EnvironmentVariablesHolder This is more consistent with other Holder classes --- mesonbuild/interpreter/interpreter.py | 2 +- mesonbuild/interpreter/interpreterobjects.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index d640e6559..c21b90ea8 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -395,7 +395,7 @@ class Interpreter(InterpreterBase, HoldableObject): build.Data: OBJ.DataHolder, build.InstallDir: OBJ.InstallDirHolder, build.IncludeDirs: OBJ.IncludeDirsHolder, - build.EnvironmentVariables: OBJ.EnvironmentVariablesObject, + build.EnvironmentVariables: OBJ.EnvironmentVariablesHolder, compilers.RunResult: compilerOBJ.TryRunResultHolder, dependencies.ExternalLibrary: OBJ.ExternalLibraryHolder, coredata.UserFeatureOption: OBJ.FeatureOptionHolder, diff --git a/mesonbuild/interpreter/interpreterobjects.py b/mesonbuild/interpreter/interpreterobjects.py index bc9d8e7f4..262ff8763 100644 --- a/mesonbuild/interpreter/interpreterobjects.py +++ b/mesonbuild/interpreter/interpreterobjects.py @@ -238,7 +238,7 @@ class RunProcess(MesonInterpreterObject): _ENV_SEPARATOR_KW = KwargInfo('separator', str, default=os.pathsep) -class EnvironmentVariablesObject(ObjectHolder[build.EnvironmentVariables], MutableInterpreterObject): +class EnvironmentVariablesHolder(ObjectHolder[build.EnvironmentVariables], MutableInterpreterObject): def __init__(self, obj: build.EnvironmentVariables, interpreter: 'Interpreter'): super().__init__(obj, interpreter) @@ -251,9 +251,9 @@ class EnvironmentVariablesObject(ObjectHolder[build.EnvironmentVariables], Mutab repr_str = "<{0}: {1}>" return repr_str.format(self.__class__.__name__, self.held_object.envvars) - def __deepcopy__(self, memo: T.Dict[str, object]) -> 'EnvironmentVariablesObject': + def __deepcopy__(self, memo: T.Dict[str, object]) -> 'EnvironmentVariablesHolder': # Avoid trying to copy the intepreter - return EnvironmentVariablesObject(copy.deepcopy(self.held_object), self.interpreter) + return EnvironmentVariablesHolder(copy.deepcopy(self.held_object), self.interpreter) def warn_if_has_name(self, name: str) -> None: # Multiple append/prepend operations was not supported until 0.58.0.