Check if we have all dependencies for an position change
547982
public function has()
    {
        if (!Request::has('position')) {
            return false;
        }

        if (isset($this->item->position)) {
            return true;
        }

        if (!empty($this->pivot) && isset($this->pivot->position)) {
            return true;
        }

        return false;
    }
1257797
def is_dependant(package, project_name):
    """"""
    for requirement in package.requires():
        # perform case-insensitive matching
        if requirement.project_name.lower() == project_name.lower():
            return True
    return False
522351
def check_dependencies():
    
    available = []
    try:
        shell('ebook-convert')
        available.append('calibre')
    except OSError:
        pass
    try:
        shell('pandoc --help')
        available.append('pandoc')
    except OSError:
        pass
    if not available:
        sys.exit(error('No generator found, you cannot use md2ebook.'))
    check_dependency_epubcheck()
    return available
688584
public void checkDependencyCycles(List<String> errors) {
		if (!dependenciesResolved) {
			throw new Error("Call resolveDependencies() first");
		}

		SimpleDirectedGraph<ModuleModel, Edge> g = buildModuleDependencyGraph();

		CycleDetector<ModuleModel, Edge> detector = new CycleDetector<>(g);
		Set<ModuleModel> cycleModules = detector.findCycles();

		if (!cycleModules.isEmpty()) {
			errors.add("Found cycle in module dependency graph. Involved modules: "
					+ cycleModules);
		}
	}
29835
def _finalized(self):
        
        return \
            len(self._finalized_dependencies) >= self.dependency_count \
            and len(self._enqueued_dependencies) >= self.dependency_count
1261536
def needs(self):
        """"""
        result = []
        for dep in self.dependencies:
            module = dep.split(".")[0].lower()
            if module not in result:
                result.append(module)

        return result
265551
def status(deps=DEPENDENCIES, linesep=os.linesep):
    """"""
    maxwidth = 0
    col1 = []
    col2 = []
    for dependency in deps:
        title1 = dependency.modname
        title1 += ' ' + dependency.required_version
        col1.append(title1)
        maxwidth = max([maxwidth, len(title1)])
        col2.append(dependency.get_installed_version())
    text = ""
    for index in range(len(deps)):
        text += col1[index].ljust(maxwidth) + ':  ' + col2[index] + linesep
    return text[:-1]
1115465
def command_dependents(options):
    """"""
    dependents = dependencies(options.package, options.recursive, options.info)

    if dependents:
        print(*dependents, sep='\n')
1219950
def show_dependencies(self, stream=sys.stdout):
        """"""
        def child_iter(node):
            return [d.node for d in node.deps]

        def text_str(node):
            return colored(str(node), color=node.status.color_opts["color"])

        for task in self.iflat_tasks():
            print(draw_tree(task, child_iter, text_str), file=stream)
1204782
def check_dependencies():
    

    # Check that git is installed
    if not shutil.which("git"):
        raise Error(_("You don't have git. Install git, then re-run!"))

    # Check that git --version > 2.7
    version = subprocess.check_output(["git", "--version"]).decode("utf-8")
    matches = re.search(r"^git version (\d+\.\d+\.\d+).*$", version)
    if not matches or pkg_resources.parse_version(matches.group(1)) < pkg_resources.parse_version("2.7.0"):
        raise Error(_("You have an old version of git. Install version 2.7 or later, then re-run!"))
953449
def find_release(package, releases, dependencies=None):
    """"""
    dependencies = dependencies if dependencies is not None else {}
    for release in releases:
        url = release['url']
        old_priority = dependencies.get(package, {}).get('priority', 0)

        for suffix, priority in SUFFIXES.items():
            if url.endswith(suffix):
                if old_priority < priority:
                    sha256 = release['digests']['sha256']
                    dependencies[package] = {
                        'package': package,
                        'url': url,
                        'sha256': sha256,
                        'priority': priority,
                    }

    return dependencies[package]
282095
def check(self, diff):
        """"""
        path = diff.b_path
        assert any(
            path.endswith(ext)
            for ext in importlib.machinery.SOURCE_SUFFIXES
        )
893903
def all_dependencies(self, target):
    """"""
    for dep in target.closure(bfs=True, **self.target_closure_kwargs):
      yield dep
738177
def check(projects):
    """"""
    log = logging.getLogger('ciu')
    log.info('{0} top-level projects to check'.format(len(projects)))
    print('Finding and checking dependencies ...')
    blockers = dependencies.blockers(projects)

    print('')
    for line in message(blockers):
        print(line)

    print('')
    for line in pprint_blockers(blockers):
        print(' ', line)

    return len(blockers) == 0
1210636
def find_dependencies_with_parent(self, dependent, parent):
        
        self.logger.info("    Finding dependencies of %s via parent %s" %
                          (dependent.hex[:8], parent.hex[:8]))
        diff = self.repo.diff(parent, dependent,
                              context_lines=self.options.context_lines)
        for patch in diff:
            path = patch.delta.old_file.path
            self.logger.info("      Examining hunks in %s" % path)
            for hunk in patch.hunks:
                self.blame_diff_hunk(dependent, parent, path, hunk)
783643
function check(suppliedOptions){
    var options = assign(Object.create(defaultOptions), suppliedOptions || {});
    var packageJson = require(path.resolve(process.cwd(), options.package));
    var checkDevDependencies = !!options.checkDevDependencies;
    var checkDependencies = !!options.checkDependencies;
    var moduleTimes = {
        dependencies: {},
        devDependencies: {}
    };
    var loadTime = -1;

    if(packageJson.main){
        loadTime = execSync(execString + path.resolve(process.cwd(), packageJson.main), {encoding: "utf8"});
    }

    if(checkDependencies){
        Object.keys(packageJson.dependencies).forEach(function(depen){
            var time = execSync(execString + path.resolve(process.cwd(), "node_modules", depen), {
                encoding: "utf8",
                cwd: process.cwd()
            });

            moduleTimes.dependencies[depen] = parseFloat(time);
        });
    }

    if(checkDevDependencies){
        Object.keys(packageJson.devDependencies).forEach(function(depen){
            var time = execSync(execString + path.resolve(process.cwd(), "node_modules", depen), {
                encoding: "utf8",
                cwd: process.cwd()
            });

            moduleTimes.devDependencies[depen] = parseFloat(time);
        });
    }

    return {
        moduleTimes: moduleTimes,
        loadTime: loadTime
    };
}
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)