diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-04-30 12:58:29 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-06-02 15:53:17 -0700 |
commit | 145d92aa27e4a7ff82115c5e82ec62251ce9756b (patch) | |
tree | df68dc96247ac17e0df056cdc2b5e869e6bacdd3 /mesonbuild/build.py | |
parent | cfb847a1f0815c40f2b1538b53eb22ace10be7c5 (diff) | |
download | meson-145d92aa27e4a7ff82115c5e82ec62251ce9756b.zip meson-145d92aa27e4a7ff82115c5e82ec62251ce9756b.tar.gz meson-145d92aa27e4a7ff82115c5e82ec62251ce9756b.tar.bz2 |
build: Use ImmutableSetProtocol for lru_cache'd value
To avoid mutation if possible.
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 51b6d29..dc375cc 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -40,7 +40,7 @@ from .linkers import StaticLinker from .interpreterbase import FeatureNew if T.TYPE_CHECKING: - from ._typing import ImmutableListProtocol + from ._typing import ImmutableListProtocol, ImmutableSetProtocol from .interpreter.interpreter import Test, SourceOutputs from .mesonlib import FileMode, FileOrString from .backend.backends import Backend @@ -931,7 +931,7 @@ class BuildTarget(Target): return result @lru_cache(maxsize=None) - def get_link_dep_subdirs(self): + def get_link_dep_subdirs(self) -> 'ImmutableSetProtocol[str]': result: OrderedSet[str] = OrderedSet() for i in self.link_targets: if not isinstance(i, StaticLibrary): |