aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-03-14 12:18:43 +0100
committerDylan Baker <dylan@pnwbakers.com>2022-03-14 10:27:38 -0700
commit076855c22ffdae28cc86816c9fd06b9c0e401702 (patch)
treec36a5460b798013ec5096fa1af5548721e8ab4dc /mesonbuild
parenta5bb65437722874bfca5d7ea3db542a5482385eb (diff)
downloadmeson-076855c22ffdae28cc86816c9fd06b9c0e401702.zip
meson-076855c22ffdae28cc86816c9fd06b9c0e401702.tar.gz
meson-076855c22ffdae28cc86816c9fd06b9c0e401702.tar.bz2
sourceset: rename "dependencies" fields to deps
The dependencies field clashes with the dependencies module, so that mypy interprets "dependencies.Dependency" as a "Dependency" attribute of the "dependencies" field. Rename the field to something else, so that it does not clash. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/modules/sourceset.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/mesonbuild/modules/sourceset.py b/mesonbuild/modules/sourceset.py
index 78cf47c..f3ce0db 100644
--- a/mesonbuild/modules/sourceset.py
+++ b/mesonbuild/modules/sourceset.py
@@ -62,12 +62,12 @@ class SourceSetRule(T.NamedTuple):
sources: T.Any
if_false: T.Any
sourcesets: T.List[SourceSetImpl]
- dependencies: T.List[dependencies.Dependency]
+ deps: T.List[dependencies.Dependency]
class SourceFiles(T.NamedTuple):
sources: OrderedSet[T.Union[mesonlib.FileOrString, build.GeneratedTypes]]
- dependencies: OrderedSet[dependencies.Dependency]
+ deps: OrderedSet[dependencies.Dependency]
class SourceSet:
@@ -195,10 +195,10 @@ class SourceSetImpl(SourceSet, MutableModuleObject):
if not into:
into = SourceFiles(OrderedSet(), OrderedSet())
for entry in self.rules:
- if all(x.found() for x in entry.dependencies) and \
+ if all(x.found() for x in entry.deps) and \
all(enabled_fn(key) for key in entry.keys):
into.sources.update(entry.sources)
- into.dependencies.update(entry.dependencies)
+ into.deps.update(entry.deps)
for ss in entry.sourcesets:
ss.collect(enabled_fn, all_sources, into)
if not all_sources:
@@ -221,7 +221,7 @@ class SourceSetImpl(SourceSet, MutableModuleObject):
) -> T.List[dependencies.Dependency]:
self.frozen = True
files = self.collect(lambda x: True, True)
- return list(files.dependencies)
+ return list(files.deps)
@typed_pos_args('sourceset.apply', (build.ConfigurationData, dict))
@typed_kwargs('sourceset.apply', KwargInfo('strict', bool, default=True))
@@ -272,7 +272,7 @@ class SourceFilesObject(ModuleObject):
@noKwargs
def dependencies_method(self, state: ModuleState, args: T.List[TYPE_var], kwargs: TYPE_kwargs
) -> T.List[dependencies.Dependency]:
- return list(self.files.dependencies)
+ return list(self.files.deps)
class SourceSetModule(ExtensionModule):
@FeatureNew('SourceSet module', '0.51.0')