Returns the direct dependencies or dependents of a single item. Does not follow the entire dependency path.

        :param item: Node to return dependencies for.
        :return: Immediate dependencies or dependents.
967127
def get(self, item):
        
        e = self._deps.get(item)
        if e is None:
            return self.get_default()
        return e.parent
637066
def get(self, item):
        
        if item in self:  # noqa
            item = getattr(self, item)
            return item()
293917
def find_dependencies(self, dependent_rev, recurse=None):
        
        if recurse is None:
            recurse = self.options.recurse

        try:
            dependent = self.get_commit(dependent_rev)
        except InvalidCommitish as e:
            abort(e.message())

        self.todo.append(dependent)
        self.todo_d[dependent.hex] = True

        first_time = True

        while self.todo:
            sha1s = [commit.hex[:8] for commit in self.todo]
            if first_time:
                self.logger.info("Initial TODO list: %s" % " ".join(sha1s))
                first_time = False
            else:
                self.logger.info("  TODO list now: %s" % " ".join(sha1s))
            dependent = self.todo.pop(0)
            dependent_sha1 = dependent.hex
            del self.todo_d[dependent_sha1]
            self.logger.info("  Processing %s from TODO list" %
                              dependent_sha1[:8])

            if dependent_sha1 in self.done_d:
                self.logger.info("  %s already done previously" %
                                  dependent_sha1)
                continue

            self.notify_listeners('new_commit', dependent)

            parent = dependent.parents[0]
            self.find_dependencies_with_parent(dependent, parent)
            self.done.append(dependent_sha1)
            self.done_d[dependent_sha1] = True
            self.logger.info("  Found all dependencies for %s" %
                              dependent_sha1[:8])
            # A commit won't have any dependencies if it only added new files
            dependencies = self.dependencies.get(dependent_sha1, {})
            self.notify_listeners('dependent_done', dependent, dependencies)

        self.logger.info("Finished processing TODO list")
        self.notify_listeners('all_done')
118267
def dependencies(self) -> List[Dependency]:
        """"""
        dependencies_str = DB.get_hash_value(self.key, 'dependencies')
        dependencies = []
        for dependency in ast.literal_eval(dependencies_str):
            dependencies.append(Dependency(dependency))
        return dependencies
1319208
def findPreviousItem(self, item):
        
        if not item:
            return None
        
        while item.parent():
            index = item.parent().indexOfChild(item)
            if index == 0:
                return item.parent()
            
            child = item.parent().child(index-1)
            if child:
                while child.childCount():
                    child = child.child(child.childCount() - 1)
                return child
            
            item = item.parent()
        
        index = self.indexOfTopLevelItem(item)
        out = self.topLevelItem(index-1)
        while out and out.childCount():
            out = out.child(out.childCount() - 1)
        return out
619667
function getDirectRequires(p) {
      return p.dependencies.filter(function(d) {
        return DIRECT_REQUIRES_REG.test(d);
      }).map(function(d) {
        return "require('"+ getDependencyPath(d, p) +"');";
      }).join('\n');
    }
1237235
def item_at_line(root_item, line):
    
    previous_item = root_item
    item = root_item
    for item in get_item_children(root_item):
        if item.line > line:
            return previous_item
        previous_item = item
    else:
        return item
480899
def get_single_item(d):
    """"""
    assert len(d) == 1, 'Single-item dict must have just one item, not %d.' % len(d)
    return next(six.iteritems(d))
403237
async function buildDirectDependentTree() {
  const dependents = new Map();

  for (const packageName of await _list()) {
    dependents.set(packageName, new Set());
  }

  for (const packageName of await _list()) {
    for (const dep of tree.get(packageName)) {
      dependents.get(dep).add(packageName);
    }
  }

  return dependents;
}
6642
def __generate_dependency_tree(self):
        
        dependency_dict = {}
        for s in self.manifest.sections():
            if s != "config":
                if self.manifest.has_option(s, 'depends'):
                    dependency_list = [d.strip() for d in re.split('\n|,', self.manifest.get(s, 'depends'))]
                    dependency_dict[s] = dependency_list
                else:
                    dependency_dict[s] = []
        try:
            return DependencyTree(dependency_dict)
        except DependencyTreeException:
            dte = sys.exc_info()[1]
            raise ManifestException("Dependency tree for manifest is invalid! %s" % str(dte))
132292
def resolve_dependencies(self):
        
        return dict(
            [((key, self.data_dependencies[key])
                if type(self.data_dependencies[key]) != DeferredDependency
                else (key, self.data_dependencies[key].resolve()))
             for key in self.data_dependencies])
458540
def itemByPath( self, path, includeRoot = False ):
        
        sep     = self.separator()
        path    = nativestring(path).strip(sep)
        if ( not path ):
            if ( includeRoot ):
                return self.invisibleRootItem()
            else:
                return None
            
        splt    = path.split(sep)
        item    = self.invisibleRootItem()
        for part in splt:
            next_item = None
            for row in range(item.rowCount()):
                child = item.child(row)
                if ( child.text() == part ):
                    next_item = child
                    break
            
            if ( not next_item ):
                item = None
                break
                
            item = next_item
            item.initialize()
        
        return item
48665
def get_iterargs(self, item):
    
    # iterargs should always be mandatory, unless there's a good reason
    # not to, which I can't think of right now.

    args = self._get_aggregate_args(item, 'mandatoryArgs')
    return tuple(sorted([arg for arg in args if arg in self.iterargs]))
1269128
def get(self, item_name):
		
		if self.prefix:
			item_name = self.prefix + self.seperator + item_name
		item_names = item_name.split(self.seperator)
		node = self._storage
		for item_name in item_names:
			node = node[item_name]
		return node
1191651
function extractDependencyIds(options) {
  const dependencies = [];

  function extract(items) {
    // Invalid if not Array
    if (Array.isArray(items)) {
      items.reduce((dependencies, item) => {
        // Items can be Array with depedency as first param
        const dep = Array.isArray(item) ? item[0] : item;

        // Only gather string references, not functions/modules
        if ('string' == typeof dep) dependencies.push(dep);
        return dependencies;
      }, dependencies);
    }
  }

  if (options.plugins) extract(options.plugins);
  if (options.presets) extract(options.presets);

  return dependencies;
}
1082869
def getItem(self, itemId):
        
        url = "%s/items/%s" % (self.root, itemId)
        return Item(url=url,
                    securityHandler=self._securityHandler,
                    proxy_url=self._proxy_url,
                    proxy_port=self._proxy_port)
185053
def deep_dependendants(self, target):
        
        direct_dependents = self._gettask(target).provides_for

        return (direct_dependents +
                reduce(
                    lambda a, b: a + b,
                    [self.deep_dependendants(x) for x in direct_dependents],
                    []))