Bug 1322025 - Don't automatically add --help dependencies to CombinedDependsFunctions. r=chmanchester

Adding those dependencies, retrospectively, only worked around the poor
handling of --help requirements by the linter, that we fixed a few
commits ago. This is now not necessary anymore.
This commit is contained in:
Mike Hommey
2017-01-25 17:10:03 +09:00
parent 77d96bf284
commit 90cd8a2e88

View File

@@ -117,25 +117,13 @@ class CombinedDependsFunction(DependsFunction):
elif d not in flatten_deps:
flatten_deps.append(d)
# Automatically add a --help dependency if one of the dependencies
# depends on it.
for d in flatten_deps:
if (isinstance(d, DependsFunction) and
sandbox._help_option in d.dependencies):
flatten_deps.insert(0, sandbox._help_option)
break
super(CombinedDependsFunction, self).__init__(
sandbox, func, flatten_deps)
@memoize
def result(self, need_help_dependency=False):
# Ignore --help for the combined result
deps = self.dependencies
if deps[0] == self.sandbox._help_option:
deps = deps[1:]
resolved_args = [self.sandbox._value_for(d, need_help_dependency)
for d in deps]
for d in self.dependencies]
return self._func(resolved_args)
def __eq__(self, other):