aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-08-04 20:02:53 -0400
committerEli Schwartz <eschwartz@archlinux.org>2022-08-04 20:06:01 -0400
commit37f95303f09209ff6d9652a17354bc4dceecb32f (patch)
tree35444fbd131ffb2a103f5f13576987d67d8a8ea2 /mesonbuild/dependencies
parent7c320e60f1afcb9c0ea7ec68e29842266c775a43 (diff)
downloadmeson-37f95303f09209ff6d9652a17354bc4dceecb32f.zip
meson-37f95303f09209ff6d9652a17354bc4dceecb32f.tar.gz
meson-37f95303f09209ff6d9652a17354bc4dceecb32f.tar.bz2
typing: simplify type annotations for libraries
In a bunch of places we need to list various types of libraries including custom_target outputs, and it gets very long. Use a common T.Union for this.
Diffstat (limited to 'mesonbuild/dependencies')
-rw-r--r--mesonbuild/dependencies/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 1cea1e0..550a88f 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -36,7 +36,7 @@ if T.TYPE_CHECKING:
from ..environment import Environment
from ..interpreterbase import FeatureCheckBase
from ..build import (
- CustomTarget, IncludeDirs, CustomTargetIndex, SharedLibrary,
+ CustomTarget, IncludeDirs, CustomTargetIndex, LibTypes,
StaticLibrary
)
from ..mesonlib import FileOrString
@@ -235,7 +235,7 @@ class Dependency(HoldableObject):
class InternalDependency(Dependency):
def __init__(self, version: str, incdirs: T.List['IncludeDirs'], compile_args: T.List[str],
link_args: T.List[str],
- libraries: T.List[T.Union[SharedLibrary, StaticLibrary, CustomTarget, CustomTargetIndex]],
+ libraries: T.List[LibTypes],
whole_libraries: T.List[T.Union[StaticLibrary, CustomTarget, CustomTargetIndex]],
sources: T.Sequence[T.Union[FileOrString, CustomTarget, StructuredSources]],
ext_deps: T.List[Dependency], variables: T.Dict[str, str],