Checks if the node has dependencies.
171363
def has_dependencies(node, dag):
    """"""
    for downstream_nodes in dag.values():
        if node in downstream_nodes:
            return True
    return False
1350863
private void validateExtension(LocalExtension localExtension, boolean dependencies)
    {
        Collection<String> namespaces = DefaultInstalledExtension.getNamespaces(localExtension);

        if (namespaces == null) {
            if (dependencies || !DefaultInstalledExtension.isDependency(localExtension, null)) {
                try {
                    validateExtension(localExtension, null, Collections.emptyMap());
                } catch (InvalidExtensionException e) {
                    if (this.logger.isDebugEnabled()) {
                        this.logger.warn("Invalid extension [{}]", localExtension.getId(), e);
                    } else {
                        this.logger.warn("Invalid extension [{}] ({})", localExtension.getId(),
                            ExceptionUtils.getRootCauseMessage(e));
                    }

                    addInstalledExtension(localExtension, null, false);
                }
            }
        } else {
            for (String namespace : namespaces) {
                if (dependencies || !DefaultInstalledExtension.isDependency(localExtension, namespace)) {
                    try {
                        validateExtension(localExtension, namespace, Collections.emptyMap());
                    } catch (InvalidExtensionException e) {
                        if (this.logger.isDebugEnabled()) {
                            this.logger.warn("Invalid extension [{}] on namespace [{}]", localExtension.getId(),
                                namespace, e);
                        } else {
                            this.logger.warn("Invalid extension [{}] on namespace [{}] ({})", localExtension.getId(),
                                namespace, ExceptionUtils.getRootCauseMessage(e));
                        }

                        addInstalledExtension(localExtension, namespace, false);
                    }
                }
            }
        }
    }
322176
def has_resolved_dependencies(self):
        """"""
        for dependency in self.dependencies:
            if dependency.state != Task.State.DONE:
                return False

        return True
369092
public function hasDependencies()
    {
        foreach ($this->dependencies as $key) {
            if (isset($this->config[$key]) && $this->config[$key]) {
                return true;
            }
        }

        return false;
    }
136466
public function addNode(DependencyNode $node)
    {
        if (!$this->dependencies->contains($node)) {
            $this->dependencies->attach($node, new ArrayObject());
            $this->nodes[] = $node;

            foreach ($node->getDependencies() as $depency) {
                $this->addDependency($node, $depency);
            }
        }
    }
941503
public boolean dependsOn (T elem1, T elem2)
    {
        DependencyNode<T> node1 = _nodes.get(elem1);
        DependencyNode<T> node2 = _nodes.get(elem2);

        List<DependencyNode<T>> nodesToCheck = new ArrayList<DependencyNode<T>>();
        List<DependencyNode<T>> nodesAlreadyChecked = new ArrayList<DependencyNode<T>>();
        nodesToCheck.addAll(node1.parents);

        // We prevent circular dependencies when we add dependencies.  Otherwise, this'd be
        //  potentially non-terminating.
        while (!nodesToCheck.isEmpty()) {
            // We take it off the end since we don't care about order and this is faster.
            DependencyNode<T> checkNode = nodesToCheck.remove(nodesToCheck.size() - 1);

            if (nodesAlreadyChecked.contains(checkNode)) {
                // We've seen him before, no need to check again.
                continue;

            } else if (checkNode == node2) {
                // We've found our dependency
                return true;

            } else  {
                nodesAlreadyChecked.add(checkNode);
                nodesToCheck.addAll(checkNode.parents);
            }
        }

        return false;
    }
788111
function hasErrors(results) {
  return  (results.dependencies && results.dependencies.length) ||
          (results.devDependencies && results.devDependencies.length)
}
527738
def check_dependee_build(self, depender, dependee, dependee_id):
		
		shutit_global.shutit_global_object.yield_to_draw()
		cfg = self.cfg
		# If depender is installed or will be installed, so must the dependee
		if not (cfg[dependee.module_id]['shutit.core.module.build'] or
		        self.is_to_be_built_or_is_installed(dependee)):
			return 'depender module id:\n\n[' + depender.module_id + ']\n\nis configured: "build:yes" or is already built but dependee module_id:\n\n[' + dependee_id + ']\n\n is not configured: "build:yes"'
		return ''
25814
public function checkPhpDependencies()
    {
        $errors = array();
        foreach($this->getDependencyPhpExtensions() as $dep)
        {
            if(!extension_loaded($dep['name'])) {
                $errors[] = $dep;
            }
        }
        if(count($errors)) {
            return $errors;
        }
        return true;
    }
743612
private void checkDependencies() {
    if (basedOnResult != null) {
      if (!input.isComplete() || !algs.isComplete() || basedOnResult.get() != algs.getAlgorithmStep().getResult()) {
        // We've become invalidated, notify.
        basedOnResult = null;
        firePanelUpdated();
      }
    }
  }
59181
static function hasDependencies() {
		if ( false !== \Pressbooks\Utility\check_epubcheck_install() && false !== \Pressbooks\Utility\check_kindlegen_install() ) {
			return true;
		}

		return false;
	}
598500
public function evaluateDependency()
	{
		if($this->_dependencies!==null)
		{
			foreach($this->_dependencies as $dependency)
				$dependency->evaluateDependency();
		}
	}
353302
def has(cls):
    """"""
    deps = {}
    for i in dir(cls):
        if i.startswith('__') and i.endswith('__'):
            continue
        val = getattr(cls, i, None)
        if isinstance(val, Dependency):
            deps[i] = val
            if val.name is None:
                val.name = i
    cls.__injections__ = deps
    return cls
102237
public function dependsOn(self $node)
    {
        if (!in_array($node, $this->dependencies)) {
            $this->dependencies[] = $node;
        }
    }
466239
def check_dependencies(dependencies, module):
    
    if type(dependencies) == str:
        dependencies = [dependencies]
    elif type(dependencies) != list:
        raise TypeError('dependencies argument must be of type list or string')

    for dependency in dependencies:
        if dependency not in settings.INSTALLED_APPS:
            raise DependencyError('%s depends on %s, which should be in settings.INSTALLED_APPS' % (module, dependency))
1133532
def node_dependencies(context: Context):
    
    args = ['--loglevel', {0: 'silent', 1: 'warn', 2: 'info'}[context.verbosity]]
    if not context.use_colour:
        args.append('--color false')
    args.append('install')
    return context.shell('npm', *args)
1044659
def check_deps(deps):
        """"""
        if not isinstance(deps, list):
            deps = [deps]
        checks = list(Environment.has_apps(deps))
        if not all(checks):
            for name, available in list(dict(zip(deps, checks)).items()):
                if not available:
                    error_msg = "The required application/dependency '{0}'" \
                                " isn't available.".format(name)
                    raise SystemError(error_msg)