1 # SPDX-License-Identifier: MIT
3 # Copyright The SCons Foundation
5 """Various SCons type aliases.
7 For representing complex types across the entire repo without risking
8 circular dependencies, we take advantage of TYPE_CHECKING to import
9 modules in an tool-only environment. This allows us to introduce
10 hinting that resolves as expected in IDEs without clashing at runtime.
12 For consistency, it's recommended to ALWAYS use these aliases in a
13 type-hinting context, even if the type is actually expected to be
14 resolved in a given file.
17 from typing
import Union
, TYPE_CHECKING
23 # Because we don't have access to TypeAlias until 3.10, we have to utilize
24 # 'Union' for all aliases. As it expects at least two entries, anything that
25 # is only represented with a single type needs to list itself twice.
26 ExecutorType
= Union
["SCons.Executor.Executor", "SCons.Executor.Executor"]
31 # indent-tabs-mode:nil
33 # vim: set expandtab tabstop=4 shiftwidth=4: