From e9639be16790f94d759ea8467541e3a471565622 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 26 Jul 2021 14:25:14 -0700 Subject: compilers: Fix annotations for run and cached_compile Which absolutely should accept `str | File`, but the annotations claim that only strings are accepted. --- mesonbuild/coredata.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mesonbuild/coredata.py') diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index ea74e7c..3436515 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -34,14 +34,14 @@ import typing as T if T.TYPE_CHECKING: from . import dependencies - from .compilers.compilers import Compiler, CompileResult # noqa: F401 + from .compilers.compilers import Compiler from .environment import Environment - from .mesonlib import OptionOverrideProxy + from .mesonlib import OptionOverrideProxy, FileOrString from .cmake.traceparser import CMakeCacheEntry OptionDictType = T.Union[T.Dict[str, 'UserOption[T.Any]'], OptionOverrideProxy] KeyedOptionDictType = T.Union[T.Dict['OptionKey', 'UserOption[T.Any]'], OptionOverrideProxy] - CompilerCheckCacheKey = T.Tuple[T.Tuple[str, ...], str, str, T.Tuple[str, ...], str] + CompilerCheckCacheKey = T.Tuple[T.Tuple[str, ...], str, 'FileOrString', T.Tuple[str, ...], str] version = '0.59.99' backendlist = ['ninja', 'vs', 'vs2010', 'vs2012', 'vs2013', 'vs2015', 'vs2017', 'vs2019', 'xcode'] -- cgit v1.1