From a21af43200e13fa65e12bdbe5116a0cecc4990b3 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 6 Oct 2022 23:42:37 -0400 Subject: micro-optimize: define typing-only objects in TYPE_CHECKING Union types that exist solely for use as annotations don't need to be created in normal runs. --- mesonbuild/cmake/executor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/cmake/executor.py') diff --git a/mesonbuild/cmake/executor.py b/mesonbuild/cmake/executor.py index afd21ef96..7482f546d 100644 --- a/mesonbuild/cmake/executor.py +++ b/mesonbuild/cmake/executor.py @@ -33,8 +33,8 @@ if T.TYPE_CHECKING: from ..mesonlib import MachineChoice from ..programs import ExternalProgram -TYPE_result = T.Tuple[int, T.Optional[str], T.Optional[str]] -TYPE_cache_key = T.Tuple[str, T.Tuple[str, ...], str, T.FrozenSet[T.Tuple[str, str]]] + TYPE_result = T.Tuple[int, T.Optional[str], T.Optional[str]] + TYPE_cache_key = T.Tuple[str, T.Tuple[str, ...], str, T.FrozenSet[T.Tuple[str, str]]] class CMakeExecutor: # The class's copy of the CMake path. Avoids having to search for it -- cgit v1.2.3